CN108401131B - Thread processing method and device and server - Google Patents

Thread processing method and device and server Download PDF

Info

Publication number
CN108401131B
CN108401131B CN201810406682.4A CN201810406682A CN108401131B CN 108401131 B CN108401131 B CN 108401131B CN 201810406682 A CN201810406682 A CN 201810406682A CN 108401131 B CN108401131 B CN 108401131B
Authority
CN
China
Prior art keywords
thread
user
request
user state
audio
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810406682.4A
Other languages
Chinese (zh)
Other versions
CN108401131A (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 Xueyi 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 Xueyi Technology Co ltd filed Critical Beijing Xueyi 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

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/14Systems for two-way working
    • H04N7/15Conference systems

Landscapes

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

Abstract

The application discloses a thread processing method and device and a server. The method comprises the steps of receiving a thread request sent by a first user; judging the thread type of the thread request through a rectification thread; executing preset flow transfer thread processing according to the thread type; and processing and executing audio and video exchange with a second user through the preset stream conversion thread. The method and the device solve the technical problems that high-concurrency core threads are locked and the capacity of supporting the number of users by a single server cannot be enhanced in the prior art. The method reduces the idle states of the CPU and the like caused by the synchronous signal lock, thereby improving the efficiency of processing the audio and video stream by the program and improving the utilization rate of the CP. The pressure resistance of the audio and video stream server in a single room is improved.

Description

Thread processing method and device and server
Technical Field
The present application relates to the field of video processing, and in particular, to a thread processing method and apparatus, and a server. Specifically, the splitting is realized by matching a data stream slicing mechanism with a user state table, and the method can be used for a video conference.
Background
The mobile video conference is a hot spot of the internet at present, and the forwarding speed and efficiency of audio and video data streams through a room server are the key for determining the number of the participants supported by a single server.
The audio and video server forwarding thread must take the IP and the port of the user through the user state table to realize the packet transfer of the audio and video data. However, since the user state table is changeable, a synchronization signal is needed between the state thread and the forwarding thread for controlling the user state table to process synchronization of the state thread and the forwarding thread, the efficiency of the synchronization signal has little influence on program overhead with few threads and low performance requirements, but when the number of threads is more than 100 and is a key core thread, the efficiency of signal synchronization is very critical, and even becomes one of key influencing factors that a single server can support the number of participating users.
Aiming at the problems that high-concurrency core threads are locked and the capacity of supporting the number of users by a single server cannot be enhanced in the related art, an effective solution is not provided at present.
Disclosure of Invention
The present application mainly aims to provide a thread processing method to solve the problem that locking is performed on a core thread with high concurrency, and the capability of supporting the number of users by a single server cannot be enhanced.
In order to achieve the above object, according to one aspect of the present application, a thread processing method is provided. The problem of multithread processing signal synchronization can be realized in a streaming media service program with harsh server processing performance.
The thread processing method comprises the following steps: receiving a thread request sent by a first user; judging the thread type of the thread request through a rectification thread; executing preset flow transfer thread processing according to the thread type; and processing and executing audio and video exchange with a second user through the preset stream conversion thread.
Further, the determining, by the rectifying thread, the thread type of the thread request includes: the rectification thread divides a flow conversion thread according to the user identity of the first user; the rectification threads are classified according to the fact that a thread request sent by a first user is an audio and video stream data request or a user state request; if the thread request is a user state request, slicing and adding the thread request into a corresponding user state table request queue; and if the thread request is a video stream data request, adding the sliced video stream to a corresponding user audio and video transmission queue.
Further, executing a preset diversion thread process according to the thread type includes: processing a state signal of a first user in a room by the diversion thread; the diversion thread acquires the change of the user state from the user state queue and reads and writes a user state table; each user state request in the same room is dispersed into a plurality of user state queues and is distributed to a specific thread for processing; the state tables of users in the same room are sliced and maintained by corresponding forwarding threads.
Further, executing a preset diversion thread process according to the thread type includes: the stream transfer thread obtains online users belonging to management of the room through the maintained user state table, and forwards the received stream transfer thread to the users of the user state table; when sending data, the diversion thread copies the video stream data to be sent of the thread to other threads.
Further, the processing and execution of the audio and video exchange with the second user through the preset stream transfer thread includes: copying the audio and video transmission queue of each conversion thread; when each forwarding thread distributes streaming media data, the streaming media video transmission queue maintained by the thread of the forwarding thread is copied to other forwarding threads for performing video stream broadcasting on users on other user state table slices.
Further, the processing and execution of the audio and video exchange with the second user through the preset stream transfer thread includes: slicing the flow conversion thread and the user state queue, and serializing the user state table and the flow conversion operation. The user requests are distributed and sliced into different user state queues by the rectification thread, and the threads to be forwarded are read and written into the sliced user state table for reading and operating the sliced flow-forwarding threads.
In order to achieve the above object, according to another aspect of the present application, there is provided a thread processing apparatus.
The thread processing device according to the application comprises: the receiving module is used for receiving a thread request sent by a first user; the judging module is used for judging the thread type of the thread request through a rectification thread; the execution module is used for executing preset diversion thread processing according to the thread type; and the switching module is used for processing and executing audio and video switching with a second user through the preset switching thread.
Furthermore, the judging module is used for dividing the flow conversion thread by the rectification thread according to the user identity of the first user; the rectification threads are classified according to the fact that a thread request sent by a first user is an audio and video stream data request or a user state request; if the thread request is a user state request, slicing and adding the thread request into a corresponding user state table request queue; and if the thread request is a video stream data request, adding the sliced video stream to a corresponding user audio and video transmission queue.
Further, the determining module is further configured to process a status signal of a first user in a room by the diversion thread; the diversion thread acquires the change of the user state from the user state queue and reads and writes a user state table; each user state request in the same room is dispersed into a plurality of user state queues and is distributed to a specific thread for processing; the state tables of users in the same room are sliced and maintained by corresponding forwarding threads.
In order to achieve the above object, according to another aspect of the present application, there is provided a server including the thread processing apparatus.
The method is based on a data stream slicing mechanism, and a user state table splitting method is matched to replace a signal synchronous locking scheme method, so that signal locking in a video conference key thread is avoided, and the system pressure resistance of the streaming media server is greatly improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this application, serve to provide a further understanding of the application and to enable other features, objects, and advantages of the application to be more apparent. The drawings and their description illustrate the embodiments of the invention and do not limit it. In the drawings:
fig. 1 is a schematic diagram of an overall deployment structure of a common streaming server according to the related art;
FIG. 2 is a common streaming server program processing logic according to the related art;
FIG. 3 is a schematic view of a prior art deficiency principle according to the related art;
FIG. 4 is a schematic structural diagram of a streaming server according to an embodiment of the present application;
FIG. 5 is a flow diversion server processing sequence diagram according to an embodiment of the present application;
FIG. 6 is a schematic diagram of a process of entering a program after passing through a rectifying thread according to an embodiment of the present application;
FIG. 7 is a first illustrative view of a flow transfer thread in a flow transfer server processing sequence diagram according to an embodiment of the present application;
FIG. 8 is a second flowchart of a second embodiment of a offload server processing sequence diagram;
FIG. 9(a) a conventional user status list diagram of the related art;
FIG. 9(b) is a schematic diagram of a state list in an embodiment of the present application;
FIG. 10 is a first diagram illustrating the flow forwarding functionality of a flow forwarding thread according to an embodiment of the present application;
FIG. 11 is a diagram illustrating a second flow forwarding function of a flow forwarding thread according to an embodiment of the present application;
FIG. 12 is a diagram illustrating serialization processing user state tables and reflow operations according to an embodiment of the present application; and
fig. 13 is a schematic copy diagram of an audio/video transmission queue of each streaming thread according to an embodiment of the present application;
FIG. 14 is a diagram illustrating a thread processing method according to an embodiment of the present application; and
fig. 15 is a schematic view of a thread processing apparatus according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be used. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
In the present application, each conference room is called a room in the mobile video conference, and users in the rooms can make audio-video calls with each other.
The audio and video server in the application is a service program used for forwarding audio and video streams of different users in one room.
The user status table in the present application is a data structure table recording the IP addresses and ports of the respective user terminals, and also records the information of the respective users in the same room, whether the users are online, the IP and port of the user, and the like.
The user state queue in the application is a queue cache for storing the user state change request, does not read and write the user state table, and is erased after other threads read the user state table.
The stream conversion thread in the application is a group of threads used for forwarding the audio and video stream on the audio and video server, and according to different modules, the audio and video data stream of one room is distributed to the corresponding stream conversion thread.
The status thread in the present application is a thread that handles the signaling of the user of the room to move forward and backward.
The sender ID identification information in this application is a set of decimal digits of indefinite length such as 2, 10, 11810, 11811.
In the present application, the modulus, i.e., the remainder (%) is taken, and the value of the modulus is 10 for convenience of description herein.
As shown in fig. 14, the method includes steps S102 to S108 as follows:
step S102, receiving a thread request sent by a first user;
and after receiving the video stream data or the user state request pushed from the mobile phone end by the user, the streaming server groups the video stream data or the user state request according to the numerical value obtained by the modulus of the ID of the sender, and delivers the data to the streaming thread with the corresponding number for processing.
Step S104, judging the thread type of the thread request through a rectification thread;
the rectification thread divides the conversion flow thread according to the modulus of the ID of the sender, and classifies the conversion flow thread according to the video stream data or the user state request sent by the user.
Step S106, executing preset diversion thread processing according to the thread type;
if the user state request is the user state request, slicing and adding the user state request into the corresponding user state table request queue, and if the user audio and video data is the user audio and video data, slicing and adding the user audio and video data into the corresponding user audio and video transmission queue.
And step S108, performing audio and video exchange with a second user through the preset stream conversion thread processing.
Preferably, each conversion thread audio and video sends a copy of the queue, and isolation caused by state slicing is solved. When each forwarding thread distributes streaming media data, the streaming media video transmission queue maintained by the thread of the forwarding thread is copied to other forwarding threads for carrying out video stream broadcasting on users on other user state table slices.
Preferably, the diversion thread continuously obtains the change of the user state from the user state queue and reads and writes the user state table. The user state table is changed from a traditional object to a plurality of objects, and because the user state requests are sliced by the rectifying thread in the previous step, the user state requests in the same room are also dispersed into a plurality of user state queues and are allocated to specific thread processing.
From the above description, it can be seen that the following technical effects are achieved by the present application:
the method is based on a data stream slicing mechanism, and a user state table splitting method is matched to replace a signal synchronous locking scheme method, so that signal locking in a video conference key thread is avoided, and the system pressure resistance of the streaming media server is greatly improved.
It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowcharts, in some cases, the steps illustrated or described may be performed in an order different than presented herein.
According to an embodiment of the present application, there is also provided a thread processing apparatus for implementing the thread processing method, as shown in fig. 15, the apparatus including: a receiving module 10, configured to receive a thread request sent by a first user; the judging module 20 is configured to judge the thread type of the thread request through a rectification thread; the execution module 30 is configured to execute a preset diversion thread process according to the thread type; and the switching module 40 is used for performing audio and video switching with a second user through the preset switching thread processing.
Specifically, the method or the device in the application is used for an audio and video server program of an application program, the application program of a participant sends videos collected from a mobile phone of a user to the audio and video server, the audio and video server adopts a data stream slicing mechanism used by the scheme to cooperate with a user state table splitting method to replace a signal synchronous locking scheme method, the application program video stream of a conference speaker is finally forwarded to mobile phones of other conference participants, and no signal locking of a key thread is realized. The execution efficiency and the bearing capacity of the audio and video server are improved.
The principle of the invention is as follows:
the following techniques are mainly involved in the prior art for synchronization signals:
the synchronous signal lock adopts a resource exclusive mode to synchronize the user state table of the diversion thread and the state thread, if the basic mechanism of the synchronous signal lock is adopted, the user state table is set in a locked state when the diversion thread reads or writes the user state table, and at the moment, the state thread and other forwarding threads wait until the diversion thread finishes reading and writing and can read and write the user state table. From the above, the disadvantages of the synchronization signal lock are also obvious: the synchronization of the user state tables results in all the streaming thread execution for reading and writing the user state tables being in a waiting state during the time the user state tables are locked, in particular in systems handling audio-video conferences requiring relatively real time, requiring delay control at the millisecond level, which is a significant disadvantage in the speed of the locking process. The use of a synchronization signal in a streaming thread, which is one of the most critical threads of a forwarding service, greatly affects the overall performance of the room server and also severely affects the ability of the single room server to process audio and video data streams.
The technology is an optimized modification of the synchronous signal lock technology, and according to the characteristic that a user reads more and writes less to a user state table, each diversion thread of the user state table is read with the read permission at the same time, one diversion thread is reading the user state table, other diversion threads can also obtain the permission to read the user state table at the same time, and no lock is added between the read operation threads of the user state table. Only when the state thread writes the user state table, any other thread accessing the user state table cannot execute and is in a waiting state.
The disadvantage of the read-write lock separation technique of the synchronization signal lock is that: although the synchronization signal lock is optimized, the synchronization efficiency of the synchronization signal lock is improved, but the problem that other threads which refer to the user state table cannot access the user state table due to the fact that the user state table is being written is not solved fundamentally, and particularly when the user state table is frequently written due to the fact that the number of threads is large and the user network environment is complicated. This mechanism can have a large impact on the efficiency of high concurrency.
As shown in fig. 1, in the overall deployment and structure of a common streaming server, a streaming server program is in the entire system, a participant a sends a path of flow collected from a mobile phone terminal a to a load balancing server program according to a proximity principle, the load balancing server program sends the path of flow a to the streaming server program, the streaming server program processes the flow, the processed flow is distributed to the load balancing server program where the participant B is located, and finally the load is balanced and then transmitted to the participant B, so that the transfer of a video stream is completed. The flow of participant B to a is also a similar process.
As shown in fig. 2, in the common program processing logic of the streaming server in the prior art, a synchronization signal lock is used to keep synchronization between a user state table read thread and a user state table write thread, which cannot solve the problem that when one thread writes the user state table, other threads that want to read and write the user state table all wait for state, and this mechanism restricts the pressure resistance of a single server.
In addition, as shown in fig. 3, when a thread of a user state in a room and a forwarding thread both read and write the same user state table object, so that the state table object in the room is read and written by one of the threads, operations of all other threads with respect to the thread are in a waiting-to-unlock state, and the operation can be continued only after the threads occupying the state table in the room are processed and unlocked.
In view of the above problems, the embodiments of the present application provide the following solutions:
as shown in fig. 4, firstly, in the embodiment of the present application, a rectifying thread is added for slicing a data stream, and a user state table object of the conventional scheme is split into N user state table objects by processing through the rectifying thread. And a user state request sequence object is added between the user state object and the client and is used for storing the rectified and sliced user state temporary data.
Specifically, the main structure of the streaming server is as follows: the streaming server mainly comprises a rectification thread, a streaming thread, a user state table object array, a user state request sequence object array and a buffer area number to be sent of audio and video data.
The rectification thread is responsible for distributing audio and video received from the network and a user room state change request to the diversion threads with different serial numbers according to a certain rule for processing.
The switching thread mainly sends the user data of the buffer area to be sent of the audio and video data to a proper IP address and port according to the user member list information on the user state table object to realize the audio and video stream exchange of each user in the room.
As shown in fig. 5, the rectification thread in the flow diversion server processing sequence diagram specifically includes:
and after receiving the video stream data or the user state request pushed from the mobile phone end by the user, the streaming server groups the video stream data or the user state request according to the numerical value obtained by the modulus of the ID of the sender, and delivers the data to the streaming thread with the corresponding number for processing. In this case, assuming that the modulus is 10, the data sent by the users 1 and 11 is modulo by the sender ID, and then 1% 10 is 1, and 11% 10 is 2, so the data sent by the two users are processed by the rectifying thread and then divided into the number 1 diverting thread for processing; similarly, 2% 10 is 2, and 12% 10 is 2, so the data sent by the user No. 2 and the user No. 12 are divided into the diversion thread No. 2 for processing after being processed by the rectification thread. Besides, the rectifying thread divides the stream conversion thread according to the sender ID modulus, and classifies according to the video stream data or the user state request sent by the user, if the user state request is, the stream is sliced and added to the corresponding user state table request queue, and if the user audio and video data is, the stream is sliced and added to the corresponding user audio and video sending queue.
For example, if user number 11 sends audio/video data, and user number 12 sends user status change data, they go through the rectification thread and then enter the program for processing, as shown in fig. 6.
As shown in fig. 7 and 8, the process thread in the sequence diagram of the streaming server specifically includes:
1) processing of room user status signals by a diversion thread
And the diversion thread continuously obtains the change of the user state from the user state queue and reads and writes the user state table. The user state table is changed from a traditional object to a plurality of objects, and because the user state requests are sliced by the rectifying thread in the previous step, the user state requests in the same room are also dispersed into a plurality of user state queues and are allocated to specific thread processing.
The user state table is sliced from a traditional object into a plurality of objects, the sliced user state table is maintained by corresponding forwarding threads, for example, the number of the forwarding threads is consistent with the modulus, in this embodiment, 10 are taken, and the user state table slice of 1 is taken after the number 1 of the forwarding threads are maintained and the modulus is taken. Assuming a modulo of 10, the user status table is divided into 10 according to the value of the room user's ID modulo 10. As shown in fig. 7 and 8, which are differences between the conventional user status list and the status list in the embodiment of the present application, it is assumed that 1,2,3,11,12, and 13 users in the room a are logged into the room to perform the video conference.
As shown in fig. 9(a) and 9(b), for each forwarding thread, a part of user state object n1 of a certain room under its jurisdiction is maintained separately, for example, if 10 is taken, it is assumed that there is a room a, and there are currently users 1,2,3,4,5,6,7,8,9,10,11,12,13,14, and 15 in room a. Then the users in room a on the user status table n1 maintained on thread number 1 have only users number 1 and 11. The users of room a on the user state table n2 bound on thread number 2 have only 2 and 12.
2) Stream forwarding functionality for a stream forwarding thread
As shown in fig. 10 and 11, the diversion thread 1 obtains online users belonging to management of a certain room from the maintained user state table n1, and forwards the received stream to the user of the user state table n 1. Since all user tables of a room are modulo-sliced into multiple user state tables n 1-n 10, the sending of a video stream by an initiator is only amortized over one of the streaming threads. Therefore, in order to enable all users in the room to receive the data stream, the stream forwarding thread n needs to copy the video stream data to be transmitted of the thread to other threads when transmitting the data, and it is ensured that the users scattered in the other user state table n2 and n3 … n10 also receive the audio and video data of the video initiator.
In summary, the implementation method in the embodiment of the present application at least includes the following features:
1) slicing the flow conversion thread and the user state queue, and serializing the user state table and the flow conversion operation. The rectification thread distributes and slices the user request to different user state queues, the thread to be forwarded is read and written to the sliced user state table for reading and operating the sliced streaming thread, and the same streaming service thread including the read-write user state table, the read-write video stream list to be sent and the sending of the audio and video data stream is in one thread and is operated in series, so that the locking problem that different threads access the same signal state is avoided. As shown in detail in fig. 12.
2) And each conversion thread audio and video sends the copy of the queue, so that the isolation caused by state scribing is solved. When each forwarding thread distributes streaming media data, the streaming media video transmission queue maintained by the thread of the forwarding thread is copied to other forwarding threads for carrying out video stream broadcasting on users on other user state table slices. Taking thread 1 as an example, although thread 1 only contains the state information of two users, i.e. No. 1 and No. 11, in room a because the sliced user state table n1, the streaming media data in thread 1 is copied to threads No. 2 and No. 3 and thread No. 10, and the user state of room a in all the streaming threads is the user state of the whole room a. The streaming media data in the room can be distributed to all users in the room. As shown in detail in fig. 13.
It will be apparent to those skilled in the art that the modules or steps of the present application described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and they may alternatively be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, or fabricated separately as individual integrated circuit modules, or fabricated as a single integrated circuit module from multiple modules or steps. Thus, the present application is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (6)

1. A thread processing method for performing audio-video exchange, the method comprising:
receiving a thread request sent by a first user;
judging the thread type of the thread request through a rectification thread;
executing preset flow transfer thread processing according to the thread type; and
processing and executing audio and video exchange with a second user through the preset conversion thread;
judging the thread type of the thread request through the rectification thread comprises the following steps:
the rectification thread divides a flow conversion thread according to the user identity of the first user;
the rectification threads are classified according to the fact that a thread request sent by a first user is an audio and video stream data request or a user state request;
if the thread request is a user state request, slicing and adding the thread request into a corresponding user state table request queue;
if the thread request is a video stream data request, adding the sliced video stream to a corresponding user audio and video transmission queue;
executing a preset diversion thread process according to the thread type comprises:
processing a state signal of a first user in a room by the diversion thread;
the diversion thread acquires the change of the user state from the user state queue and reads and writes a user state table;
each user state request in the same room is dispersed into a plurality of user state queues and is distributed to a specific thread for processing;
the state tables of users in the same room are sliced and maintained by corresponding forwarding threads.
2. The thread processing method of claim 1, wherein performing predetermined diversion thread processing according to the thread type comprises:
the stream transfer thread obtains online users belonging to management of the room through the maintained user state table, and forwards the received stream transfer thread to the users of the user state table;
when sending data, the diversion thread copies the video stream data to be sent of the thread to other threads.
3. The thread processing method of claim 1, wherein performing audio-video exchange with a second user through the preset streaming thread processing comprises:
copying the audio and video transmission queue of each conversion thread;
when each forwarding thread distributes streaming media data, the streaming media video transmission queue maintained by the thread of the forwarding thread is copied to other forwarding threads for performing video stream broadcasting on users on other user state table slices.
4. The thread processing method of claim 1, wherein performing audio-video exchange with a second user through the preset streaming thread processing comprises:
slicing a diversion thread and a user state queue, and serializing a user state table and a diversion operation; the user requests are distributed and sliced into different user state queues by the rectification thread, and the threads to be forwarded are read and written into the sliced user state table for reading and operating the sliced flow-forwarding threads.
5. A thread processing apparatus for performing audio-video exchange, the apparatus comprising:
the receiving module is used for receiving a thread request sent by a first user;
the judging module is used for judging the thread type of the thread request through a rectification thread;
the execution module is used for executing preset diversion thread processing according to the thread type; and
the switching module is used for processing and executing audio and video switching with a second user through the preset switching thread;
the judging module is used for dividing the flow conversion thread by the rectification thread according to the user identity module of the first user;
the rectification threads are classified according to the fact that a thread request sent by a first user is an audio and video stream data request or a user state request;
if the thread request is a user state request, slicing and adding the thread request into a corresponding user state table request queue;
if the thread request is a video stream data request, adding the sliced video stream to a corresponding user audio and video transmission queue;
the judging module is also used for judging whether the current time is short,
processing a state signal of a first user in a room by the diversion thread;
the diversion thread acquires the change of the user state from the user state queue and reads and writes a user state table, wherein the user state table is a user state fragmentation table in which the sliced user is located;
each user state request in the same room is dispersed into a plurality of user state queues and is distributed to a specific thread for processing;
the state tables of users in the same room are sliced and maintained by corresponding forwarding threads.
6. A server, comprising the thread processing apparatus of claim 5.
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 CN108401131A (en) 2018-08-14
CN108401131B true 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 (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8635247B1 (en) * 2006-04-28 2014-01-21 Netapp, Inc. Namespace and storage management application infrastructure for use in management of resources in a storage system environment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
CN108401131A (en) 2018-08-14

Similar Documents

Publication Publication Date Title
Huang et al. Codes can reduce queueing delay in data centers
EP1330907B1 (en) Method and apparatus for real-time parallel delivery of segments of a large payload file
US9299111B2 (en) Efficient presence distribution mechanism for a large enterprise
US20150215405A1 (en) Methods of managing and storing distributed files based on information-centric network
US20170024450A1 (en) Systems and methods for autonomous, scalable, and distributed database management
TW200915084A (en) Allocating network adapter resources among logical partitions
CN109067578B (en) Method and device for multicast fast switching
CN101753439A (en) Method for distributing and transmitting streaming media
CN103731341A (en) Method and system for processing instant messaging services
CN106385435A (en) Service treatment method and system of service system
US9591046B1 (en) Efficiently providing multimedia services
US10013293B2 (en) Queueing messages related by affinity set
US7280492B2 (en) Videoconferencing system
US8880665B2 (en) Nonstop service system using voting, and information updating and providing method in the same
US9473316B2 (en) Resource consumption reduction via meeting affinity
CN110727507B (en) Message processing method and device, computer equipment and storage medium
Dommel et al. Efficacy of floor control protocols in distributed multimedia collaboration
CN110493245A (en) A kind of stream medium data dissemination system based on distributed parallel system
US20200329083A1 (en) Video conference transmission method and apparatus, and mcu
CN102355604B (en) Media message transmission method and device
CN108401131B (en) Thread processing method and device and server
US20150296182A1 (en) Method and system for providing video service
CN110704520A (en) Service processing method and device
Baltas et al. Ultra low delay switching for networked music performance
CN115941907A (en) RTP data packet sending method, system, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
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.

TR01 Transfer of patent right