CN108401131A - Thread processing method and device, server - Google Patents

Thread processing method and device, server Download PDF

Info

Publication number
CN108401131A
CN108401131A CN201810406682.4A CN201810406682A CN108401131A CN 108401131 A CN108401131 A CN 108401131A CN 201810406682 A CN201810406682 A CN 201810406682A CN 108401131 A CN108401131 A CN 108401131A
Authority
CN
China
Prior art keywords
thread
user
turn
request
tidal 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.)
Granted
Application number
CN201810406682.4A
Other languages
Chinese (zh)
Other versions
CN108401131B (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.)
Shanghai Yunsheng Future Technology Group Co ltd
Original Assignee
Beijing School Of Science And 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 Beijing School Of Science And Technology Co Ltd filed Critical Beijing School Of Science And Technology Co Ltd
Priority to CN201810406682.4A priority Critical patent/CN108401131B/en
Publication of CN108401131A publication Critical patent/CN108401131A/en
Application granted granted Critical
Publication of CN108401131B publication Critical patent/CN108401131B/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

Abstract

This application discloses a kind of thread processing method and device, servers.This method includes the thread request for receiving the first user and sending;The thread type of the thread request is judged by rectification thread;It is executed according to the thread type and presets turn of tidal stream thread process;And it is executed by the default turn of tidal stream thread process and is exchanged with the audio and video of second user.Present application addresses lock on the kernel thread that high concurrent exists in the prior art, and can not enhance the ability of single server support number of users.Method in the application reduces because synchronizing signal locks the states such as caused CPU spare time, therefore improves the efficiency of program processing audio/video flow, improves the utilization rate of CP.Increase the anti-pressure ability of separate unit room audio/video flow server.

Description

Thread processing method and device, server
Technical field
This application involves field of video processing, in particular to a kind of thread processing method and device, server.Tool Body, coordinate user status table to realize by data stream sliced sheet mechanism and splits, can be used in video conference.
Background technology
Mobile video session is a hot spot of current internet, the forwarding by room service device to audio and video data streams Speed and efficiency are the key that determine that single server supports number of users of attending a meeting.
Audio/video server forwarding thread must take IP and the port of user by user status table, to realize audio and video Data are subcontracted.But since user status table can change, the state thread and turn of tidal stream line of user status table are controlled Synchronizing signal is just needed between journey, and state thread is synchronous with turn of tidal stream thread handling, the efficiency of synchronizing signal is few for thread, It has no impact substantially in the small program expense of performance requirement, but it is such as much in 100 and be key core line in thread Cheng Shi, the efficiency that signal synchronizes is very crucial, in addition at influence single server can support the crucial effect of number of users of attending a meeting because One of element.
For being locked on the kernel thread there are high concurrent in the related technology, and single server support can not be enhanced and used The problem of ability of amount amount, currently no effective solution has been proposed.
Invention content
The main purpose of the application is to provide a kind of thread processing method, to solve there are the kernel threads of high concurrent Upper locking, and the problem of single server supports the ability of number of users can not be enhanced.
To achieve the goals above, according to the one side of the application, a kind of thread processing method is provided.It can take The problem that multiple threads signal synchronizes is realized in the harsher streaming media service program of device process performance of being engaged in.
Include according to the thread processing method of the application:Receive the thread request of the first user transmission;Pass through rectification thread Judge the thread type of the thread request;It is executed according to the thread type and presets turn of tidal stream thread process;And by described Default turn of tidal stream thread process execution is exchanged with the audio and video of second user.
Further, judge that the thread type of the thread request includes by rectification thread:Rectification thread is according to first The user identity modulus of user divides turn of tidal stream thread;Rectification thread is audio and video fluxion according to the thread request that the first user sends Classify according to request or User Status request;If thread request is User Status request, it is sliced and is added to correspondence User status table request queue;If thread request is video stream data request, it is added to corresponding user's sound after slice Video transmit queue.
Further, executing default turn of tidal stream thread process according to the thread type includes:The processing of the turn of tidal stream thread The status signal of first user in room;The turn of tidal stream thread goes to obtain the change of User Status from user state queue, and Read and write user status table;It is dispersed in multiple user state queues, distributes in each User Status request of same room with them To specific thread process;It is sliced in the state table of same room with them user and goes to safeguard by corresponding forwarding thread.
Further, executing default turn of tidal stream thread process according to the thread type includes:The turn of tidal stream thread passes through dimension The user status table of shield obtains the online user for belonging to management in room, and the circulation thread received is sent out user status table User;The turn of tidal stream thread wait when sending data can de-duplicate this thread video stream data portion pending it is each to other In thread.
Further, executed by the default turn of tidal stream thread process exchanged with the audio and video of second user including:It is each The copy of turn of tidal stream thread audio and video transmit queue;Each forwarding thread distribution flow media data when, own thread is tieed up The streaming media video transmit queue of shield replicates a user for being used to be sliced to other users state table to other forwarding threads Do video streams broadcast.
Further, executed by the default turn of tidal stream thread process exchanged with the audio and video of second user including:Slice The turn of tidal stream thread and user state queue of change, serialization processing user status table and turn of tidal stream operation.Rectification thread asks user In distribution and slice to different user state queues, thread to be forwarded is write after reading in the user status table after being sliced, and supplies Turn of tidal stream thread after slice is read and operation.
To achieve the goals above, according to the another aspect of the application, a kind of thread process device is provided.
Include according to the thread process device of the application:Receiving module, the thread request for receiving the first user transmission; Judgment module, the thread type for judging the thread request by rectification thread;Execution module, for according to the thread Type, which executes, presets turn of tidal stream thread process;And Switching Module, for being executed and second by the default turn of tidal stream thread process The audio and video of user exchange.
Further, the judgment module divides turn of tidal stream for rectification thread according to the user identity modulus of the first user Thread;Rectification thread is that audio/video flow request of data or User Status request carry out according to the thread request that the first user sends Classification;If thread request is User Status request, it is sliced and is added to corresponding user status table request queue;If line Journey asks Seeking Truth video stream data to be asked, then is added to corresponding user's audio and video transmit queue after being sliced.
Further, the judgment module, is additionally operable to, the state letter of the first user in the processing room of the turn of tidal stream thread Number;The turn of tidal stream thread goes to obtain the change of User Status from user state queue, and reads and writes user status table;Same Each User Status request in room is dispersed in multiple user state queues, distributes to specific thread process;Same The state table of a room user is sliced and goes to safeguard by corresponding forwarding thread.
To achieve the goals above, according to the another aspect of the application, a kind of server, including the thread are provided Processing unit.
Method in the application is based on data stream sliced sheet mechanism, cooperation user status table Split Method substitution signal synchrolock side Case method avoids the signal lock in video conference critical thread, substantially increases the system anti-pressure ability of streaming media server.
Description of the drawings
The attached drawing constituted part of this application is used for providing further understanding of the present application so that the application's is other Feature, objects and advantages become more apparent upon.The illustrative examples attached drawing and its explanation of the application is for explaining the application, not Constitute the improper restriction to the application.In the accompanying drawings:
Fig. 1 is according to the relevant technologies in common turn of tidal stream server integral deployment structural schematic diagram;
Fig. 2 is to handle logic according to the common turn of tidal stream server program of the relevant technologies;
Fig. 3 is the prior art defect principle schematic according to the relevant technologies;
Fig. 4 is the turn of tidal stream server architecture schematic diagram according to the embodiment of the present application;
Fig. 5 is the turn of tidal stream server process sequence figure according to the embodiment of the present application;
Fig. 6 is the processing schematic diagram for entering program after rectification thread according to the embodiment of the present application;
Fig. 7 is the turn of tidal stream thread schematic diagram one in the turn of tidal stream server process sequence figure according to the embodiment of the present application;
Fig. 8 is the turn of tidal stream thread schematic diagram two in the turn of tidal stream server process sequence figure according to the embodiment of the present application;
Traditional User Status list schematic diagram of Fig. 9 (a) the relevant technologies;
Fig. 9 (b) is status list schematic diagram in the embodiment of the present application in the application;
Figure 10 is to send out functional schematic one according to the circulation of the turn of tidal stream thread of the embodiment of the present application;
Figure 11 is to send out functional schematic two according to the circulation of the turn of tidal stream thread of the embodiment of the present application;
Figure 12 is to handle user status table and turn of tidal stream operation chart according to the serialization of the embodiment of the present application;And
Figure 13 is the copy schematic diagram according to each turn of tidal stream thread audio and video transmit queue of the embodiment of the present application;
Figure 14 is the thread processing method schematic diagram in the embodiment of the present application;And
Figure 15 is the thread process schematic device in the embodiment of the present application.
Specific implementation mode
In order to make those skilled in the art more fully understand application scheme, below in conjunction in the embodiment of the present application Attached drawing, technical solutions in the embodiments of the present application are clearly and completely described, it is clear that described embodiment is only The embodiment of the application part, instead of all the embodiments.Based on the embodiment in the application, ordinary skill people The every other embodiment that member is obtained without making creative work should all belong to the model of the application protection It encloses.
It should be noted that term " first " in the description and claims of this application and above-mentioned attached drawing, " Two " etc. be for distinguishing similar object, without being used to describe specific sequence or precedence.It should be appreciated that using in this way Data can be interchanged in the appropriate case, so as to embodiments herein described herein.In addition, term " comprising " and " tool Have " and their any deformation, it is intended that cover it is non-exclusive include, for example, containing series of steps or unit Process, method, system, product or equipment those of are not necessarily limited to clearly to list step or unit, but may include without clear It is listing to Chu or for these processes, method, product or equipment intrinsic other steps or unit.
It should be noted that in the absence of conflict, the features in the embodiments and the embodiments of the present application can phase Mutually combination.The application is described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
Room in this application is that each meeting room is referred to as a room in mobile video session, each in room A user can mutual voice and video telephone.
Audio/video server in this application is the service journey of the audio/video flow for forwarding a room different user Sequence.
User status table in this application is the data structure table for the IP address and port that record each user terminal, Each user information in same room with them is additionally record, whether user is online, the IP of user and port etc..
User state queue in this application is the queue caching for storing User Status and changing request, itself does not read and write User status table, after the reading of other threads, erasing.
Turn of tidal stream thread in this application is one group of thread for forwarding audio/video flow on audio/video server, this Shen Please according to modulus difference, the audio and video data streams in a room are shared corresponding turn of tidal stream thread.
State thread in this application is to handle the user in room into the thread for signaling of checking out.
Sender's ID identity information in this application is one group of ten's digit for being not fixed length such as 2,10, 11810,11811.
Modulus in this application, that is, rem operation (%), and herein for the ease of narration, the value of mould is the value of mould 10。
As shown in figure 14, this method includes following step S102 to step S108:
Step S102 receives the thread request that the first user sends;
Turn of tidal stream server receives user after mobile phone terminal pushes to the video stream data come or User Status request, according to hair The person of sending ID modulus institute value is grouped, and data are given to the turn of tidal stream thread process of reference numeral.
Step S104 judges the thread type of the thread request by rectification thread;
In addition to being sent also according to user while dividing turn of tidal stream thread by sender's ID modulus, come up is to regard to rectification thread Frequency flow data or User Status request are classified.
Step S106 is executed according to the thread type and is preset turn of tidal stream thread process;
It is just sliced if it is User Status request and is added to corresponding user status table request queue, if it is user's sound Video data is added to corresponding user's audio and video transmit queue after being just sliced.
Step S108 is executed by the default turn of tidal stream thread process and is exchanged with the audio and video of second user.
Preferably, the copy of each turn of tidal stream thread audio and video transmit queue solves to isolate caused by state scribing.It is each to turn When hair line journey distributes stream medium data, the streaming media video transmit queue that own thread is safeguarded replicates portion and arrives other Forwarding thread is used to do video streams broadcast to the user on other users state table slice.
Preferably, turn of tidal stream thread constantly goes to obtain the change of User Status from user state queue, and reads and writes user's shape State table.User status table becomes multiple objects by a traditional object, since the rectification thread of previous step asks User Status It asks and is sliced, therefore each User Status request of same room with them can be also dispersed in multiple user state queues, Distribute to specific thread process.
It can be seen from the above description that the application realizes following technique effect:
Method in the application is based on data stream sliced sheet mechanism, cooperation user status table Split Method substitution signal synchrolock side Case method avoids the signal lock in video conference critical thread, substantially increases the system anti-pressure ability of streaming media server.
It should be noted that step shown in the flowchart of the accompanying drawings can be in such as a group of computer-executable instructions It is executed in computer system, although also, logical order is shown in flow charts, and it in some cases, can be with not The sequence being same as herein executes shown or described step.
According to the embodiment of the present application, a kind of thread process device for implementing above-mentioned thread processing method is additionally provided, As shown in figure 15, which includes:Receiving module 10, the thread request for receiving the first user transmission;Judgment module 20 is used In the thread type for judging the thread request by rectification thread;Execution module 30, for being executed according to the thread type Default turn of tidal stream thread process;And Switching Module 40, for being executed and second user by the default turn of tidal stream thread process Audio and video exchange.
Specifically, by by the application method or device in the audio/video server program of application program, The application program for participating in meeting person passes through the video that will be acquired from user mobile phone, sends on audio/video server, audio and video service Device coordinates user status table Split Method substitution signal synchrolock scheme method using data stream sliced sheet mechanism used in this case, will The application program video flowing of conference speech person is ultimately forwarded on the mobile phone of other meeting participants, realizes critical thread without letter Number lock.Improve the execution efficiency and bearing capacity of audio/video server.
The principle of the present invention is as follows:
Technology below is related generally to for synchronizing signal in the prior art:
Synchronizing signal is locked, and synchronizing signal lock synchronizes turn of tidal stream thread and state thread user's shape in such a way that resource is exclusive State table is the User Status when turn of tidal stream thread is read or writes user status table if the fundamental mechanism locked using synchronizing signal Table sets lock-out state, and state thread and other forwarding threads wait for waiting until just go after the read-write of turn of tidal stream thread always at this time Read and write user status table.From the foregoing, it will be observed that the shortcomings that synchronizing signal is locked is also more apparent:It may result in synchronize user status table During user status table is locked, all readings and the turn of tidal stream thread execution for writing user status table are waited for, especially It is to require delay control in millisecond stratification levels in the system as the relatively real-time audio/video conference of processing requirement, this The processing speed that sample locks is obviously inadequate.Synchronizing signal is used in one of the thread of most critical of forwarding service turn of tidal stream thread, The overall performance for influencing very much room service device also seriously affects the ability of single room service device processing audio and video data streams.
Synchronizing signal locks Read-Write Locks isolation technics, this kind of technology is to optimize correcting to one of synchronizing signal lock technology, should Kind technology reads user status table according to user to write few feature more, in allowing at the same time, reads each of user status table Turn of tidal stream thread obtains read right simultaneously, and a turn of tidal stream thread is reading user status table, other turn of tidal stream thread can also at this time Permission is obtained simultaneously and reads user status table, is not locked between the read operation thread of user status table.Only state thread is writing use When the state table of family, other any threads for accessing user status table cannot all execute, and be waited for.
The shortcomings that synchronizing signal lock Read-Write Locks isolation technics, is:Although synchronizing signal lock is optimized, improve The synchronous efficiency of synchronizing signal lock, but does not solve fundamentally, caused by being write due to user status table other The problem of thread of reference user status table can not access at this time, when especially thread is more, user network environment is negative When frequently writing user status table caused by miscellaneous.This mechanism influences the efficiency of high concurrent can be very big.
As shown in Figure 1, in common turn of tidal stream server integral deployment and structure, turn of tidal stream server program is in whole system In, the roads the A stream acquired from mobile phone terminal A is sent to load-balanced server program, load balancing by participant A according to principle nearby The roads A stream is sent to turn of tidal stream server program by service routine, on turn of tidal stream server program convection current handled, processing after the completion of distribute To the load-balanced server program where B, final load balancing is transmitted to participant B again, completes the transfer of video flowing.Participant The A that spreads of B is also similar flow.
As shown in Fig. 2, in the common turn of tidal stream server program processing logic of the prior art, all kept using synchronizing signal lock User status table reads thread and writes the synchronous of thread, cannot thus solve a thread when writing user status table, other are thought Thread all wait states of user status table are read and write, this mechanism restricts the anti-pressure ability of single server.
In addition, as shown in figure 3, when a room User Status thread read and write with the same forwarding thread it is same User Status table object results in the state table object in the room when being read and write by one of thread in this way, other institutes are wired Journey can all be in about the operation of the thread and wait for unlocked state, and the thread process for the state table for occupying the room is waited for finish simultaneously It after unlock, can just be worked on, technology common at present can only reduce to the greatest extent since this is asked caused by signal interlocking Topic.
In view of the above-mentioned problems, providing following solution in the embodiment of the present application:
As shown in figure 4, first, in the embodiment of the present application, increasing rectification thread for by data stream sliced sheet, using simultaneously The User Status table object of traditional scheme is split into N number of User Status table object by rectification thread process.In User Status User Status request sequence object is increased between object and client, it is interim for the User Status after preserving rectification and being sliced Data.
Specifically, the primary structure of turn of tidal stream server is:Mainly there are rectification thread, two class of turn of tidal stream thread in turn of tidal stream server Thread and user status table object array and User Status request sequence object array, audio, video data buffering area array to be sent It constitutes.
Wherein, rectification thread is responsible for changing request by one to the audio and video and user's room state that receive from network Fixed rule gives the turn of tidal stream thread process of different serial numbers.
Wherein, turn of tidal stream thread, mainly the user data of audio, video data buffering area to be sent, according to user status table pair As upper user member list information, it is sent to the audio/video flow that each user in room is realized on suitable IP address and port It exchanges.
As shown in figure 5, the rectification thread in turn of tidal stream server process sequence figure is specially:
Turn of tidal stream server receives user after mobile phone terminal pushes to the video stream data come or User Status request, according to hair The person of sending ID modulus institute value is grouped, and data are given to the turn of tidal stream thread process of reference numeral.At this time, it is assumed that mould is 10, then No. 1, the data that send of 11 users by 1%10=1,11%10=2 after sender's ID modulus, so the two users The data of transmission can assign to No. 1 turn of tidal stream thread after rectification thread process and be handled;Same 2%10=2,12%10=2, So the data that this No. 2 users and No. 12 users send can assign to No. 2 turn of tidal stream threads after rectification thread process and handle. In addition, rectification thread while dividing turn of tidal stream thread by sender's ID modulus also according to user in addition to sending, come up is video flowing Data or User Status request are classified, and are just sliced if it is User Status request and are added to corresponding user status table Request queue is added to corresponding user's audio and video transmit queue after being just sliced if it is user's audio, video data.
For example, such as No. 11 users have sent audio, video data, No. 12 users have sent User Status change data then it After rectification thread enter program processing, as shown in Figure 6.
As shown in Figure 7, Figure 8, the turn of tidal stream thread in turn of tidal stream server process sequence figure is specially:
1) processing for room station status signal of turn of tidal stream thread
Turn of tidal stream thread constantly goes to obtain the change of User Status from user state queue, and reads and writes user status table.With Family state table becomes multiple objects by a traditional object, since the rectification thread of previous step carries out User Status request Slice, therefore each User Status request of same room with them can be also dispersed in multiple user state queues, distribute to spy Fixed thread process.
The state table of same room with them user is sliced, and user status table becomes multiple objects by a traditional object, this User status table after slice goes to safeguard by corresponding to forwarding thread, for example turn of tidal stream number of threads is consistent with modulus, in the present embodiment In take 10, No. 1 turn of tidal stream thread safeguard after modulus be 1 user status table slice.Assuming that modulus is 10, then according to room user ID pairs of 10 modulus value, user status table is divided into 10.If Fig. 7 and Fig. 8 are traditional User Status list and this Shen Please in embodiment status list difference, it is assumed that there are 1,2,3,11,12,13 users logging into room in the rooms A, carry out Video conference.
As shown in Fig. 9 (a) and Fig. 9 (b), for each forwarding thread, the portion in some room oneself administered individually is maintained Divide User Status object n1, such as if mould takes 10, it is assumed that a is No. A room, there is 1,2,3,4,5,6,7 at present, No. 8,9,10,11,12,13,14,15 users are in the rooms a.The use in the rooms A on the user status table n1 then safeguarded in Line 1 journey There was only No. 1 and No. 11 in family.The user in the rooms a only has No. 2 and No. 12 on the user status table n2 bound on No. 2 threads ....
2) the stream forwarding capability of turn of tidal stream thread
As shown in Figure 10, Figure 11, turn of tidal stream thread 1 belongs to management by what the user status table n1 of maintenance obtained certain room Online user, and the user of the circulation hair user status table n1 received.Since all user's tables in a room are taken On mould fragment to multiple user status table n1---n10, and promoter's transmission video flowing can only share wherein one On a turn of tidal stream thread.Therefore in order to realize, all users can receive data flow in room, it is necessary to which turn of tidal stream thread n is sending number According to when can be in the video stream data portion pending to other each threads of de-duplicate this thread, guarantee is dispersed in other users shape State table table n2, n3 ... n10, on user also receive the audio, video data of video originator.
In summary, following feature is included at least in the implementation method in the embodiment of the present application:
1) the turn of tidal stream thread and user state queue of Slice, serialization processing user status table and turn of tidal stream operation.Rectification User is asked distribution and is sliced into different user state queues by thread, and thread to be forwarded writes the use after slice after reading It in the state table of family, reads and operates for the turn of tidal stream thread after slice, include read-write user's shape for the same turn of tidal stream service thread State table and read-write video flowing list to be sent and transmission audio and video data streams are serial operations all in a thread, so Avoid the locking problem that different threads access same signal condition.In detail as shown in figure 12.
2) copy of each turn of tidal stream thread audio and video transmit queue solves to isolate caused by state scribing.Each repeated line When journey distributes stream medium data, the streaming media video transmit queue that own thread is safeguarded replicates a to other forwardings Thread is used to do video streams broadcast to the user on other users state table slice.By taking Line 1 journey as an example, although Line 1 journey by User status table n1 after slice contains only the status information of No. 1 and No. 11 two user on the rooms a, but due to No. 1 Stream medium data on thread has been copied in other threads No. 2 and No. 3 and No. 10 line journey, cuts a on all turn of tidal stream threads The user in room adds up, and is exactly the User Status in the entire rooms a.So the stream medium data in room can be distributed to room In all users on.In detail as shown in figure 13.
Obviously, those skilled in the art should be understood that each module of above-mentioned the application or each step can be with general Computing device realize that they can be concentrated on a single computing device, or be distributed in multiple computing devices and formed Network on, optionally, they can be realized with the program code that computing device can perform, it is thus possible to which they are stored Be performed by computing device in the storage device, either they are fabricated to each integrated circuit modules or by they In multiple modules or step be fabricated to single integrated circuit module to realize.In this way, the application be not limited to it is any specific Hardware and software combines.
The foregoing is merely the preferred embodiments of the application, are not intended to limit this application, for the skill of this field For art personnel, the application can have various modifications and variations.Within the spirit and principles of this application, any made by repair Change, equivalent replacement, improvement etc., should be included within the protection domain of the application.

Claims (10)

1. a kind of thread processing method, which is characterized in that it is exchanged for executing audio and video, the method includes:
Receive the thread request of the first user transmission;
The thread type of the thread request is judged by rectification thread;
It is executed according to the thread type and presets turn of tidal stream thread process;And
It is executed by the default turn of tidal stream thread process and is exchanged with the audio and video of second user.
2. thread processing method according to claim 1, which is characterized in that judge the thread request by rectification thread Thread type include:
Rectification thread divides turn of tidal stream thread according to the user identity modulus of the first user;
Rectification thread is that audio/video flow request of data or User Status request carry out according to the thread request that the first user sends Classification;
If thread request is User Status request, it is sliced and is added to corresponding user status table request queue;
If thread request is video stream data request, it is added to corresponding user's audio and video transmit queue after slice.
3. thread processing method according to claim 1, which is characterized in that executed according to the thread type and preset turn of tidal stream Thread process includes:
The status signal of first user in the processing room of the turn of tidal stream thread;
The turn of tidal stream thread goes to obtain the change of User Status from user state queue, and reads and writes user status table;
It is dispersed in multiple user state queues in each User Status request of same room with them, distributes to specific thread Processing;
It is sliced in the state table of same room with them user and goes to safeguard by corresponding forwarding thread.
4. thread processing method according to claim 1, which is characterized in that executed according to the thread type and preset turn of tidal stream Thread process includes:
The turn of tidal stream thread obtains the online user for belonging to management in room by the user status table of maintenance, and handle receives Circulation thread hair user status table user;
The turn of tidal stream thread wait when sending data can de-duplicate this thread video stream data portion pending to other each lines Cheng Zhong.
5. thread processing method according to claim 1, which is characterized in that executed by the default turn of tidal stream thread process Exchanged with the audio and video of second user including:
The copy of each turn of tidal stream thread audio and video transmit queue;
Each forwarding thread distribution flow media data when, the streaming media video transmit queue that own thread is safeguarded is multiple System is a to be used to do video streams broadcast to the user on other users state table slice to other forwarding threads.
6. thread processing method according to claim 1, which is characterized in that executed by the default turn of tidal stream thread process Exchanged with the audio and video of second user including:
The turn of tidal stream thread and user state queue of Slice, serialization processing user status table and turn of tidal stream operation.Rectification thread will User asks distribution and is sliced into different user state queues, and thread to be forwarded writes the User Status after slice after reading In table, reads and operate for the turn of tidal stream thread after slice.
7. a kind of thread process device, which is characterized in that exchanged for executing audio and video, described device includes:
Receiving module, the thread request for receiving the first user transmission;
Judgment module, the thread type for judging the thread request by rectification thread;
Execution module presets turn of tidal stream thread process for being executed according to the thread type;And
Switching Module is exchanged for being executed by the default turn of tidal stream thread process with the audio and video of second user.
8. thread process device according to claim 7, which is characterized in that the judgment module is pressed for rectification thread Turn of tidal stream thread is divided according to the user identity modulus of the first user;
Rectification thread is that audio/video flow request of data or User Status request carry out according to the thread request that the first user sends Classification;
If thread request is User Status request, it is sliced and is added to corresponding user status table request queue;
If thread request is video stream data request, it is added to corresponding user's audio and video transmit queue after slice.
9. thread process device according to claim 7, which is characterized in that the judgment module is additionally operable to,
The status signal of first user in the processing room of the turn of tidal stream thread;
The turn of tidal stream thread goes to obtain the change of User Status from user state queue, and reads and writes user status table, wherein institute It is the User Status fragment table after being sliced where user to state user status table;
It is dispersed in multiple user state queues in each User Status request of same room with them, distributes to specific thread Processing;
It is sliced in the state table of same room with them user and goes to safeguard by corresponding forwarding thread.
10. a kind of server, which is characterized in that including such as claim 7 to 9 any one of them thread process device.
CN201810406682.4A 2018-05-01 2018-05-01 Thread processing method and device and server Active CN108401131B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810406682.4A CN108401131B (en) 2018-05-01 2018-05-01 Thread processing method and device and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810406682.4A CN108401131B (en) 2018-05-01 2018-05-01 Thread processing method and device and server

Publications (2)

Publication Number Publication Date
CN108401131A true CN108401131A (en) 2018-08-14
CN108401131B CN108401131B (en) 2020-07-17

Family

ID=63101046

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810406682.4A Active CN108401131B (en) 2018-05-01 2018-05-01 Thread processing method and device and server

Country Status (1)

Country Link
CN (1) CN108401131B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140108519A1 (en) * 2006-04-28 2014-04-17 Netapp, Inc. Namespace and storage management application infrastructure for use in management of resources in a storage system environment
CN104238999A (en) * 2013-06-09 2014-12-24 阿里巴巴集团控股有限公司 Task scheduling method and device based on horizontal partitioning type distributed database
CN105634984A (en) * 2015-12-29 2016-06-01 重庆安碧捷科技股份有限公司 Multithread many-to-many medical data transmission method based on TCP protocol
CN106341433A (en) * 2015-07-07 2017-01-18 北京易车互联信息技术有限公司 Service system, signal server and intercom server

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140108519A1 (en) * 2006-04-28 2014-04-17 Netapp, Inc. Namespace and storage management application infrastructure for use in management of resources in a storage system environment
CN104238999A (en) * 2013-06-09 2014-12-24 阿里巴巴集团控股有限公司 Task scheduling method and device based on horizontal partitioning type distributed database
CN106341433A (en) * 2015-07-07 2017-01-18 北京易车互联信息技术有限公司 Service system, signal server and intercom server
CN105634984A (en) * 2015-12-29 2016-06-01 重庆安碧捷科技股份有限公司 Multithread many-to-many medical data transmission method based on TCP protocol

Also Published As

Publication number Publication date
CN108401131B (en) 2020-07-17

Similar Documents

Publication Publication Date Title
CN104536724B (en) The concurrent access performance optimization method of Hash table under a kind of multi-core environment
US10601911B2 (en) Partitioning of a blockchain ledger
US20150067135A1 (en) Member-oriented hybrid cloud operating system architecture and communication method thereof
CN106170016A (en) A kind of method and system processing high concurrent data requests
Sivaram et al. HIPIQS: A high-performance switch architecture using input queuing
WO2020192649A1 (en) Data center management system
CN108063813B (en) Method and system for parallelizing password service network in cluster environment
CN107852428A (en) Expansible real-time Message Passing system
US20190020601A1 (en) Packet forwarding
CN101257457A (en) Method for network processor to copy packet and network processor
CN103001793B (en) Method and device for managing ACL (access control list)
US9584423B2 (en) Dynamic resource repositioning load balancing and location management system and method
US8832215B2 (en) Load-balancing in replication engine of directory server
EP3544251A1 (en) Resource scheduling method
JP4028847B2 (en) Optimal server in common work queue environment
WO2017113962A1 (en) Method of accessing distributed database and device providing distributed data service
CN103873523A (en) Client cluster access method and device
CN107659661A (en) A kind of financial real-time bus system and its control method
WO2020083322A1 (en) Call method, device and system
CN108351838B (en) Memory management functions are provided using polymerization memory management unit (MMU)
US7114156B2 (en) System and method for processing multiple work flow requests from multiple users in a queuing system
US11947534B2 (en) Connection pools for parallel processing applications accessing distributed databases
US8356102B2 (en) Selective connection between corresponding communication components involved in a teleconference
Fei et al. FlexNFV: Flexible network service chaining with dynamic scaling
US9473316B2 (en) Resource consumption reduction via meeting affinity

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
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20231127

Address after: Room 1202, 12th Floor, No. 88 Puji Road, Jing'an District, Shanghai, 200000 (nominal 15th Floor)

Patentee after: Shanghai Yunsheng Future Technology Group Co.,Ltd.

Address before: Room 505-17, 5th Floor, No. 36 Haidian West Street, Haidian District, Beijing, 100080

Patentee before: BEIJING XUEYI TECHNOLOGY Co.,Ltd.