Stream data processing method and system
By integrating code stream data and message signaling in a system buffer and managing threads efficiently, the method enhances streaming system performance, addressing packet loss issues and achieving high-speed data processing.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2023-05-09
- Publication Date
- 2026-03-11
AI Technical Summary
Existing streaming systems face limitations in reception and transmission speeds, particularly during high concurrency and high traffic, leading to packet loss and application-level losses, which hinder their development.
Integrate code stream data and message signaling into the same thread task channel using different file descriptors and cache them in a system buffer, with a packet receiving thread storing the data in an internal stream buffer, and different business threads reading the data from this buffer.
Improves the performance of receiving and transferring stream data, enabling processing at full bandwidth speeds of 10 Gbps and reducing packet loss, thereby optimizing resource utilization and reducing system jams.
Smart Images

Figure 0007828483000001 
Figure 0007828483000002 
Figure 0007828483000003
Abstract
Description
[Technical Field]
[0001] FIELD Embodiments of the present invention relate to the field of stream data processing, and more particularly to a method and system for processing stream data. [Background technology]
[0002] Currently, the fifth generation mobile communication technology (5G) is gradually entering the commercial era, bringing about significant impacts and changes to the global audio-video industry, with streaming systems serving products and businesses such as video conferencing, video IoT, and video platforms becoming an important information transmission mechanism. The quantitative changes in speed brought about by 5G will promote qualitative changes across the industry and help accelerate the development of streaming systems.
[0003] Generally, streaming systems in the industry mainly perform functions such as live streaming, recording, and playback, and their reception and transmission performance is an important indicator for evaluating the quality of a streaming system. Currently, the industry's reception and transmission speeds can reach 2Gbps, but further improvement is difficult. In the case of high concurrency and high traffic, their processing capacity is severely limited. For example, insufficient packet reception speeds can cause system-level losses, and insufficient packet transmission and processing speeds can cause application-level losses. As a result, the reception and transmission performance of streaming systems has become a critical bottleneck limiting their development. Summary of the Invention [Problem to be solved by the invention]
[0004] The embodiments of the present invention provide a stream data processing method and system that at least solves the problem in the prior art of packet loss of link data due to receiving, processing and transferring stream data when the flow rate is high. [Means for solving the problem]
[0005] According to one embodiment of the present invention, a method for processing stream data is provided, which includes: integrating code stream data and message signaling into the same thread task channel according to different file descriptors and caching them in a system buffer; a packet receiving thread obtains the code stream data from the system buffer and stores it in a buffer inside the stream; and a different type of business thread reads the code stream data from the buffer inside the stream.
[0006] According to another embodiment of the present invention, a stream data processing system is provided, including: a data processing module configured to integrate code stream data and message signaling into the same thread task channel according to different file descriptors and cache them in a system buffer; a data acquisition module configured to acquire the code stream data from the system buffer and store it in a buffer inside the stream; and a data reading module configured to read the code stream data from the buffer inside the stream based on different types of business threads.
[0007] According to yet another embodiment of the present invention there is further provided a computer readable storage medium having stored thereon a computer program which, when operated, is arranged to perform the steps of any one of the method embodiments above.
[0008] According to yet another embodiment of the present invention, there is further provided an electronic device comprising a memory in which a computer program is stored and a processor arranged to run the computer program to perform the steps of any one of the method embodiments described above. [Brief explanation of the drawings]
[0009] [Figure 1]FIG. 2 is a block diagram of the hardware structure of a mobile terminal for the stream data processing method according to the embodiment of the present invention; [Figure 2] FIG. 2 is a network skeleton diagram illustrating the operation of a stream data processing method according to an embodiment of the present invention. [Figure 3] 1 is a flowchart of a stream data processing method according to an embodiment of the present invention. [Figure 4] 10 is a flowchart illustrating a process for a transaction thread to read codestream data according to an embodiment of the present invention; [Figure 5] 1 is a flowchart of a stream data processing method according to an embodiment of the present invention. [Figure 6] 1 is a structural block diagram of a stream data processing system according to an embodiment of the present invention; [Figure 7] FIG. 2 is a structural block diagram of a data processing module according to an embodiment of the present invention; [Figure 8] FIG. 2 is a structural block diagram of a data reading module according to an embodiment of the present invention; [Figure 9] 1 is a structural block diagram of a stream data processing system according to an embodiment of the present invention; [Figure 10] 1 is a flowchart of stream data processing according to a scene embodiment of the present invention. [Figure 11] FIG. 2 is a schematic diagram of a thread management mechanism according to a scenario embodiment of the present invention. [Figure 12] FIG. 2 is a schematic diagram illustrating the principle of a packet receiving thread adopting a vertical and horizontal packet acquisition technique according to a scenario embodiment of the present invention; [Figure 13] 1 is a schematic diagram of the technical principle of a business thread integrating producers and consumers according to a scenario embodiment of the present invention; DETAILED DESCRIPTION OF THE INVENTION
[0010] DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, the embodiments of the present invention will be described in detail with reference to the drawings and in conjunction with the embodiments.
[0011] In addition, the terms "first," "second," etc. in the specification, claims, and above drawings of the present invention are used to distinguish between similar objects and are not necessarily used to describe a specific order or chronology.
[0012] Method embodiments according to the present application may be implemented in a mobile terminal, a computer terminal, or a similar computing device. For example, when implemented on a mobile terminal, FIG. 1 is a hardware structural block diagram of a mobile terminal for implementing the stream data processing method of the present invention. As shown in FIG. 1, the mobile terminal includes one or more processors 102 (only one of which is shown in FIG. 1 ) (processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) and memory 104 for storing data. The mobile terminal may further include a transmission device 106 and an input / output device 108 used for communication functions. As will be appreciated by those skilled in the art, the structure shown in FIG. 1 is merely schematic and does not limit the structure of the mobile terminal. For example, the mobile terminal may include more or fewer components than those shown in FIG. 1 or may have a different configuration than those shown in FIG. 1.
[0013] The memory 104 can be used to store computer programs, such as software programs and modules of application software, and computer programs corresponding to the stream data processing methods of embodiments of the present invention. The processor 102 executes the computer programs stored in the memory 104 to perform various functional applications and data processing, i.e., to realize the above-described methods. The memory 104 may include high-speed random memory and may further include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some embodiments, the memory 104 may further include memory located remotely from the processor 102, and these remote memories may be connected to the mobile terminal via a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local network, a mobile communication network, and combinations thereof.
[0014] The transmission device 106 is used to receive or transmit data over a network. A specific example of the network may include a wireless network provided by the mobile terminal's communications supplier. In one embodiment, the transmission device 106 includes a network adapter (abbreviated as a Network Interface Controller, NIC) that can connect to other network devices via a base station to communicate with the Internet. In one embodiment, the transmission device 106 may be a radio frequency (RF) module that is used to communicate with the Internet wirelessly.
[0015] An embodiment of the present application may be implemented in a network architecture as shown in FIG. 2. As shown in FIG. 2, the network architecture is implemented on a server, which may be a physical machine, a virtual machine, or even a Docker containerized environment. The network architecture is divided into two parts: a kernel space and a user space. The kernel space refers to the environment in which the operating system and driver programs run. When code stream data enters the server, it first enters the kernel space. The user space refers to the environment in which the stream runs, and the stream exports the code stream data from the kernel space to the user space. Between the kernel space and the user space is a Socket Buffer system buffer, which is used to provide a temporary buffer when the code stream data is transferred from the kernel space to the user space. The user space includes various stream functional modules, such as a packet receiving thread RECEIVE, a stream internal buffer rBuffer, a recording thread RECORD, a storage IO buffer IO Buffer, and a live streaming thread PLAY.
[0016] In this embodiment, a stream data processing method is provided that is operated by the mobile terminal or network architecture. FIG. 3 is a flowchart of the stream data processing method according to the embodiment of the present invention. As shown in FIG. 3, the flow includes: Step S302: integrating codestream data and message signaling into the same thread task channel according to different file descriptors, and caching them in a system buffer; A packet receiving thread retrieves the codestream data from the system buffer and stores it in an internal stream buffer (S304); The different types of business threads include step S306 of reading the codestream data from a buffer inside the stream.
[0017] Through the above steps, the code stream data and message signaling are integrated into the same thread task channel according to different file descriptors and cached in a system buffer, thereby improving the performance of receiving stream data; the packet receiving thread obtains the code stream data from the system buffer and stores it in a buffer inside the stream; different types of business threads read the code stream data from the buffer inside the stream, thereby improving the performance of processing and transferring stream data and achieving the effect of improving the speed of receiving and transferring stream data.
[0018] Here, the execution entity of the above steps may be, but is not limited to, a base station, a terminal, or the like.
[0019] In one exemplary embodiment, the codestream data and the message signaling are separated by a socket file descriptor and a named pipe file descriptor, respectively, in the same thread task channel.
[0020] In one exemplary embodiment, the packet receiving thread obtaining the code stream data from the system buffer includes transmitting a packet structure of the code stream data using a pointer, the packet receiving thread obtaining the code stream data from the system buffer using an asynchronous IO event trigger, and adjusting the number of packets obtained and the maximum number of events based on the size of the flow rate of the code stream data.
[0021] In one exemplary embodiment, the packet receiving thread acquiring the code stream data from the system buffer further includes employing multiple packet receiving threads to acquire the code stream data from the system buffer and sending it to a predetermined CPU among a multi-core CPU for processing, and increasing the priority of the packet receiving thread.
[0022] In one exemplary embodiment, the different types of business threads reading the code stream data from a buffer within the stream includes the packet receiving thread and business thread transmitting packets of the code stream data using a producer / consumer mode centered on a buffer within the stream, where the packet receiving thread is a producer and the business thread is a consumer.
[0023] In one exemplary embodiment, FIG. 4 is a flowchart of a business thread reading code stream data according to an embodiment of the present invention. As shown in FIG. 4, the different types of business threads read the code stream data from the buffer inside the stream: Step S402: merging the different types of business threads into the same packet receiving thread and CPU for processing; The method further includes a step S404 of selecting and processing the packet receiving thread with the smallest load based on the number of tasks of the different types of business threads.
[0024] In one exemplary embodiment, the buffer inside the stream is a ring-shaped resource pool.
[0025] In one exemplary embodiment, FIG. 5 is a flowchart of a stream data processing method according to an embodiment of the present invention. As shown in FIG. 5, after the different types of business threads read the code stream data from the buffer inside the stream, the different types of business threads further include storing the code stream data in a storage device to permanently store the data. That is, the flow is as follows: Step S502: integrating codestream data and message signaling into the same thread task channel according to different file descriptors, and caching them in a system buffer; A packet receiving thread retrieves the codestream data from the system buffer and stores it in an internal stream buffer (S504); A different type of business thread reads the codestream data from a buffer within the stream in step S506; The different types of business threads include step S508 of storing the codestream data in a storage device and permanently storing the data.
[0026] From the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be realized by software and a required general-purpose hardware platform, and of course, can be realized by hardware, but in many cases, the former is a more preferred embodiment. Based on this understanding, the technical solution of the present invention, in essence or in part contributing to the prior art, can be reflected in the form of a software product, which is stored in a storage medium (e.g., ROM / RAM, magnetic disk, optical disk) and includes a plurality of instructions for causing a terminal device (which may be a mobile phone, computer, server, network device, etc.) to execute the methods described in each embodiment of the present invention.
[0027] This embodiment further provides a stream data processing system, which is used to realize the above-described embodiments and preferred embodiments, and the previously described system will not be further described. For example, the term "module" used below may be a combination of software and / or hardware that realizes a preset function. While the devices described in the following embodiments are preferably realized by software, they may also be realized by hardware or a combination of software and hardware.
[0028] FIG. 6 is a structural block diagram of a stream data processing system according to an embodiment of the present invention. As shown in FIG. 6, the stream data processing system 60 includes: a data processing module 610 configured to integrate code stream data and message signaling into the same thread task channel according to different file descriptors and cache them in a system buffer; a data acquisition module 620 configured to acquire the code stream data from the system buffer and store it in a buffer inside the stream; and a data reading module 630 configured to read the code stream data from the buffer inside the stream according to different types of business threads.
[0029] In one exemplary embodiment, FIG. 7 is a structural block diagram of a data processing module according to an embodiment of the present invention. As shown in FIG. 7, the data processing module 70 divides the data processing module 610 in the stream data processing system 60 shown in FIG. 6 into two parts, which are a first data processing unit 710 configured to integrate and enter the code stream data into the thread task channel according to a socket file descriptor, and a second data processing unit 720 configured to integrate and enter the message signaling into the thread task channel according to a named pipe file descriptor.
[0030] Those skilled in the art will appreciate that, according to the content of the data, in the actual implementation, the data processing module can be further divided into multiple data processing units, which is not limited here.
[0031] In one exemplary embodiment, FIG. 8 is a structural block diagram of a data reading module according to an embodiment of the present invention. As shown in FIG. 8, the data reading module 80 divides the data reading module 630 in the stream data processing system 60 shown in FIG. 6 into three parts, each of which includes a first reading unit 810 configured to immediately read the code stream data from the internal buffer of the stream according to different types of business threads after the code stream data is stored in the internal buffer of the stream; a second reading unit 820 configured to simultaneously read the code stream data from the internal buffer of the stream according to different types of business threads after the code stream data is stored in the internal buffer of the stream; and a third reading unit 830 configured to read the code stream data from the internal buffer of the stream as needed according to different types of business threads after the code stream data is stored in the internal buffer of the stream.
[0032] Those skilled in the art will understand that according to the content of the data, in the actual implementation, the data reading module can be further divided into multiple data reading units, which is not limited here.
[0033] In one exemplary embodiment, FIG. 9 is a structural block diagram of a stream data processing system according to an embodiment of the present invention. As shown in FIG. 9, in addition to including the modules shown in FIG. 6, the stream data processing system 90 further includes a data storage module 910 configured to store the code stream data read by the data reading module in a storage device.
[0034] As will be understood by those skilled in the art, the modules and units in the above embodiments may be combined together, or may be partially combined as needed, or may be concentrated into one or more devices or systems, as long as they can realize the corresponding functions.
[0035] In addition, each of the above modules may be realized by software or hardware, and if realized by hardware, the above modules may all be located on the same processor, or the above modules may be located on different processors in any combination, but this is not limited to this.
[0036] An embodiment of the present invention further provides a computer readable storage medium having stored thereon a computer program configured, when in operation, to perform the steps of any one of the method embodiments above.
[0037] In one exemplary embodiment, the computer-readable storage medium may include, but is not limited to, a medium capable of storing a computer program, such as a USB disk, a read-only memory (abbreviated as ROM), a random access memory (abbreviated as RAM), a removable hard disk, a magnetic disk, or an optical disk.
[0038] An embodiment of the present invention further provides an electronic device comprising a memory in which a computer program is stored, and a processor arranged to run the computer program to perform the steps of any one of the method embodiments above.
[0039] In one exemplary embodiment, the electronic device may further include a transmission device coupled to the processor, and an input / output device coupled to the processor.
[0040] For specific examples of this embodiment, please refer to the examples described in the above examples and exemplary embodiments, and this embodiment will not be further described here.
[0041] In order to help those skilled in the art better understand the technical solution of the present invention, the technical solution of the present invention will be described below in conjunction with specific scene examples.
[0042] Example of scene 1 Figure 10 is a flowchart of stream data processing according to a scenario embodiment of the present invention. As shown in Figure 10, taking a stream data transmission model as an example, first, a link-wide thread management mechanism is established, channel convergence technology is provided, and threads are rationally managed and optimized. Next, the stream packet reception thread retrieves packets from the operating system buffer and provides vertical and horizontal packet acquisition technology to improve performance in the packet reception stage. Next, the packet reception thread stores the retrieved packets in a stream circular buffer. Next, the stream transaction thread copies the packets from the circular buffer to the related transaction for data processing, providing technology to integrate producers and consumers, improving data transmission performance. Finally, the data is persistently stored. The specific steps shown in Figure 10 will be explained in detail below.
[0043] Step S1002: A thread management mechanism is established.
[0044] A thread management mechanism is established across the link that transmits stream data, and threads are managed and optimized rationally, reducing system jams and improving transmission performance.
[0045] 11 is a schematic diagram of a thread management mechanism in a scenario embodiment of the present invention. As shown in FIG. 11, packet code streams and message signaling are integrated into the same receiving thread for processing and overall management, but are distinguished when entering the channel: signaling goes through the named pipe file fd, and code streams go through the socket fd. This avoids the need to prevent multi-thread access through locks, reduces the cost of information management, and reduces CPU jams and code redundancy. The channel is Thread Task Channel is .
[0046] Step S1004: The packet receiving thread receives codestream data by adopting a vertical and horizontal packet acquisition technique.
[0047] Before entering the stream module, the media data first arrives at the operating system buffer. The stream packet receiving thread RECEIVE, i.e., the codestream data entry, is responsible for taking the codestream data out of the system buffer, i.e., receiving the data.
[0048] To improve the performance of the link, it is advantageous to maximize the processing performance of the receiving thread vertically, sufficiently schedule hardware and system resources horizontally, and combine the vertical and horizontal directions to improve the performance of the packet receiving thread stage.
[0049] FIG. 12 is a schematic diagram of the principle of a packet receiving thread adopting a vertical and horizontal packet acquisition technique in a scenario embodiment of the present invention. As shown in FIG. 12, in the vertical direction, packet structures are transmitted using pointers to avoid large memory copies, and the packet receiving thread RECEIVE uses an asynchronous I0 event trigger to adjust the number of packets to be acquired and the maximum number of events based on the size of the flow, thereby improving the packet acquisition capability of a single thread.
[0050] In the horizontal direction, the number of receiving threads is increased, and multi-threading and system multi-core CPU affinity policies are adopted. The packet receiving thread RECEIVE is sent to a specific CPU core for processing, and the priority of the packet receiving thread is improved, thereby making greater use of system core resources and prioritizing faster processing.
[0051] Step S1006: The codestream data is stored in a buffer inside the stream.
[0052] After the packet receiving thread retrieves the data, it stores the packets in the stream's internal circular buffer, rBuffer. rBuffer uses a resource pool, which eliminates the need for additional memory for recycling and prevents memory fragmentation. This module temporarily caches packets retrieved from the system buffer by the packet receiving thread, RECEIVE. This serves as a backup for packets, allowing subsequent data reads to be easily performed simultaneously by different tasks, such as RECORD storage and PLAY transmission, enabling playback while storing.
[0053] Step S1008: The business thread processes the codestream data by adopting the technology of integrating producers and consumers.
[0054] The transaction threads are logically located behind the rbuffer, and various transaction threads can simultaneously read data in the rbuffer and use it in their own transaction flow, for example, the RECORD thread stores, the PLAY thread transfers, and so on.
[0055] To improve the performance of the link, the producer and consumer mode is used, with the packet receiving thread as the producer and the business thread as the consumer, and these working threads are actually integrated into the same thread, which is used to improve the performance of the rbuffer module and improve the performance of the business thread in processing data.
[0056] Figure 13 is a schematic diagram of the technical principle of business threads integrating producers and consumers in a scenario embodiment of the present invention. As shown in Figure 13, rbuffer is regarded as the central point, the packet receiving thread RECEIVE is regarded as the producer, and business threads RECORD, PLAY, etc. are regarded as consumers. Packets are transmitted from the producer RECEIVE thread to consumer threads such as RECORD and PLAY via rBuffer. This technology decouples different operating threads using asynchronous scheduling, reduces the mutual influence between threads, and reduces the delay in consumption time.
[0057] Based on this technology, each abstract running thread is regarded as a running task, and they are actually merged and processed in the same thread and CPU. When allocating tasks, the task is allocated to the thread with the least load according to the number of tasks in the current thread, making better use of hardware resources and reducing the unnecessary consumption of the operating system in generating and managing threads.
[0058] Step S1010: The codestream data is stored permanently.
[0059] This link is the end of the codestream data transmission, which needs to be stored in a storage device for persistence after receiving, forwarding, etc. As shown in Figure 2, after the recording thread RECORD reads a packet from rBuffer, it first writes the packet to the IO Buffer, and then transfers the buffered data to the local storage or target storage when the file is closed or the buffer is full, thereby reducing the load of reading and writing IO.
[0060] As described above, embodiments of the present invention provide a stream data processing method and system, which can theoretically process data code streams at full bandwidth speeds at 10 gigabit bandwidths (10 Gbps). Embodiments of the present invention significantly improve the reception and transmission performance of streaming systems, thereby significantly saving resources and costs for the audio-video industry. To address the problem of link data packet loss due to high-volume stream data reception, processing, and transmission, embodiments of the present invention first establish a link-wide thread management mechanism to integrate and manage code streams and signaling in the same reception thread, but distinguish them when entering the channel, avoiding the need for locks to prevent multi-thread access, optimizing thread management, and reducing system jams. That is, a channel convergence technique is provided to rationally manage and optimize threads. Furthermore, vertically, the packet acquisition performance of a single packet reception thread is improved. Horizontally, core resource utilization is greatly expanded, and the code stream data is extracted from the system buffer and stored in an internal stream buffer, which is advantageous. That is, a vertical and horizontal packet acquisition technique is provided to improve performance at the data reception stage. Finally, the asynchronous scheduling method decouples different working threads, reducing the mutual influence between threads and the delay in processing time, and actually merging abstract threads into the same thread and core for processing, reducing unnecessary consumption of threads, making full use of system resources, and accelerating data processing through the internal cache module, thereby providing a technology that merges producers and consumers and improving the performance of the data processing stage.
[0061] Embodiments of the present invention are applicable to audio-video related industries based on streaming data processing, such as video conferencing, video IoT, and video platforms. Specifically, they are applicable to scenarios with a large number of access links and high concurrency, high-performance data transmission, and tasks that do not require packet loss. The stream link flow and analytical concepts, gradual performance optimization techniques, and scheme designs of the embodiments of the present invention have distinct characteristics. Achieving the same or identical purposes as the embodiments of the present invention by means of packet capture, business call chain tracing tools, etc., is also considered to be within the scope of protection of the present invention.
[0062] As will be apparent to those skilled in the art, each module or step of the present invention described above may be implemented by a general-purpose computing device, may be centralized in a single computing device, or may be distributed across a network of multiple computing devices, may be implemented by program code executable by the computing device, and may thereby be stored in a storage device and executed by the computing device, and in some cases, may execute the steps shown or described herein in a different order, or may be implemented as individual integrated circuit modules, or multiple modules or steps may be implemented as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.
[0063] The above is merely a preferred embodiment of the present invention, and is not intended to limit the present invention. Those skilled in the art can have various modifications and changes to the present invention. Any modifications, equivalent replacements, and improvements made without departing from the spirit of the present invention shall be included in the protection scope of the present invention.
Claims
1. A stream data processing method, comprising: A thread management mechanism aggregates code stream data and message signaling into a same thread task channel according to different file descriptors, and caches the aggregated code stream data and message signaling in a system buffer; a packet receiving thread retrieving the codestream data from the system buffer and storing the retrieved codestream data in a buffer within the stream; A method in which different types of business threads read the codestream data from a buffer within the stream.
2. 2. The method of claim 1, wherein the codestream data and the message signaling are distinguished by a socket file descriptor and a named pipe file descriptor, respectively, in the same thread task channel.
3. The packet receiving thread obtains the codestream data from the system buffer, 2. The method of claim 1, wherein the packet structure of the codestream data is transferred using a pointer, the packet receiving thread acquires the codestream data from the system buffer using an asynchronous IO event trigger, and the method further comprises adjusting the number of packets acquired and the maximum number of events based on the size of the flow rate of the codestream data.
4. The packet receiving thread obtains the codestream data from the system buffer, 2. The method of claim 1, further comprising employing multiple packet receiving threads to retrieve the codestream data from the system buffer, and sending the codestream data to a predetermined CPU of a multi-core CPU for processing, and increasing the priority of the packet receiving threads.
5. The different types of business threads read the code stream data from a buffer within the stream, 5. The method of claim 4, wherein the packet receiving thread and the business thread transmit packets of the codestream data using a producer / consumer mode around a buffer inside the stream, wherein the packet receiving thread is a producer and the business thread is a consumer.
6. The different types of business threads read the code stream data from a buffer within the stream, merging the different types of business threads into the same packet receiving thread and CPU for processing; The method according to claim 5 , further comprising selecting and processing the packet receiving thread with the smallest load from the plurality of packet receiving threads based on the number of tasks of the different types of business threads.
7. The method of claim 6 , wherein the buffer within the stream is a ring-shaped resource pool.
8. After the different types of business threads read the code stream data from the buffers within the stream, The method of claim 1 , further comprising: storing the code stream data in a storage device for persistent storage of the data, the different types of business threads storing the code stream data in a storage device.
9. A stream data processing system, a data processing module configured to aggregate codestream data and message signaling into the same thread task channel according to different file descriptors, and cache the aggregated codestream data and message signaling in a system buffer; a data acquisition module configured to acquire the codestream data from the system buffer and store the acquired codestream data in a buffer within the stream; a data reading module configured to read the code stream data from a buffer within the stream based on different types of business threads.
10. The data processing module includes: a first data processing unit configured to aggregate and input the code stream data into the thread task channel according to a socket file descriptor; a second data processing unit arranged to integrate said message signaling into said thread task channel according to a named pipe file descriptor.
11. The data reading module includes: a first reading unit configured to read the code stream data from the buffer within the stream immediately after the code stream data is stored in the buffer within the stream according to different types of the business threads; a second reading unit configured to simultaneously read the code stream data from the buffer within the stream according to different types of the business threads after the code stream data is stored in the buffer within the stream; and a third reading unit configured to read the code stream data from the buffer within the stream as needed based on the demands of different types of the business threads after the code stream data is stored in the buffer within the stream.
12. 10. The system of claim 9, further comprising a data storage module configured to store the codestream data read by the data reading module in a storage device.
13. A computer program which, when executed by a processor, causes the computer to implement the method according to any one of claims 1 to 8.
14. An electronic device comprising a memory, a processor, and a computer program stored in the memory and operable on the processor, the computer program causing the processor to implement the method of any one of claims 1 to 8 when executing the computer program.
15. The system of claim 9 , wherein the buffer within the stream is a ring-shaped resource pool.
Citation Information
Patent Citations
Packet receiving method, device and system for network media stream
CN106302372A
Court hearing recording system and method
CN107731230A
Media stream distribution method, CDN node server, CDN system and readable storage medium
CN112995753A
Large-scale real-time data stream integrated processing, forwarding and storage method and system
CN113553346A
Real-time communication RTC connection method, server and storage medium
CN113630439A