WO2024156239A1 - Video streaming transmission method and apparatus, electronic device, and storage medium - Google Patents
Video streaming transmission method and apparatus, electronic device, and storage medium Download PDFInfo
- Publication number
- WO2024156239A1 WO2024156239A1 PCT/CN2023/140372 CN2023140372W WO2024156239A1 WO 2024156239 A1 WO2024156239 A1 WO 2024156239A1 CN 2023140372 W CN2023140372 W CN 2023140372W WO 2024156239 A1 WO2024156239 A1 WO 2024156239A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- ssrc
- cache
- ssrcs
- video
- access request
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 63
- 230000005540 biological transmission Effects 0.000 title claims abstract description 52
- 230000004044 response Effects 0.000 claims abstract description 15
- 238000012545 processing Methods 0.000 claims description 33
- 230000000875 corresponding effect Effects 0.000 claims description 26
- 238000004590 computer program Methods 0.000 claims description 18
- 230000002596 correlated effect Effects 0.000 claims description 6
- 238000007781 pre-processing Methods 0.000 claims description 4
- 230000008859 change Effects 0.000 claims description 3
- 238000004891 communication Methods 0.000 description 7
- 238000010586 diagram Methods 0.000 description 5
- 230000006870 function Effects 0.000 description 5
- 101000827703 Homo sapiens Polyphosphoinositide phosphatase Proteins 0.000 description 3
- 102100023591 Polyphosphoinositide phosphatase Human genes 0.000 description 3
- 101100233916 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) KAR5 gene Proteins 0.000 description 3
- 238000013500 data storage Methods 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000002085 persistent effect Effects 0.000 description 2
- 238000011084 recovery Methods 0.000 description 2
- 230000011664 signaling Effects 0.000 description 2
- 101001121408 Homo sapiens L-amino-acid oxidase Proteins 0.000 description 1
- 102100026388 L-amino-acid oxidase Human genes 0.000 description 1
- 101100012902 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) FIG2 gene Proteins 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 239000013589 supplement Substances 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/239—Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests
- H04N21/2393—Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests involving handling client requests
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/234—Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
- H04N21/23406—Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving management of server-side video buffer
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/60—Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client
- H04N21/63—Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
- H04N21/643—Communication protocols
- H04N21/6437—Real-time Transport Protocol [RTP]
Definitions
- the present application relates to the field of communication technology, and in particular to a video stream transmission method, device, electronic device and storage medium.
- the video synchronization source is a 32-bit field defined in the Real-time Transport Protocol (RTP) message header, which is used to uniquely identify a stream.
- RTP Real-time Transport Protocol
- an SSRC needs to be assigned to each video stream and sent to the streaming server of the video platform to notify the streaming server to receive the stream with the SSRC. Then the system will call the signaling service to notify the camera to push the stream with the SSRC.
- the embodiments of the present application provide a video stream transmission method, device, electronic device and storage medium to achieve the ability to cope with high concurrent video access requests, increase the access speed of the video stream, and thus improve the video transmission efficiency.
- a video stream transmission method comprising:
- N is a positive integer
- a lock release operation is performed, and the streaming media server is instructed to receive the video stream corresponding to the video access request with the first SSRC.
- the method further includes:
- the streaming media server fails to receive the video stream corresponding to the video access request with the first SSRC, the first SSRC is changed from an occupied state to an unoccupied state.
- performing an operation of generating an SSRC includes:
- generating a batch of SSRCs with target probability values includes:
- the generated SSRC is stored in the cache, including:
- the second SSRC that is not currently occupied among the generated (N-i) SSRCs is stored in the cache.
- generating (N-i) random SSRCs with a target probability value includes:
- performing an operation of generating an SSRC includes:
- the video stream transmission method is applied to a distributed deployment scenario;
- the cache is a redis cache, the lock used for the locking operation is a redis distributed lock, and the first SSRC is recorded in an occupied state through a database.
- a video stream transmission device comprising:
- a preprocessing module used for pre-generating N different video synchronization sources SSRC and storing them in a cache, where N is a positive integer;
- a first processing module configured to perform a locking operation in response to receiving a video access request
- the second processing module is used to determine whether the number i of free SSRCs in the cache is less than M. If so, execute An operation of generating an SSRC and storing the generated SSRC in a cache, where M is a positive integer;
- a third processing module is used to allocate a first SSRC in the cache to the video access request, wherein the first SSRC is a currently unoccupied SSRC;
- a fourth processing module configured to delete the first SSRC in the cache and record the first SSRC as being in an occupied state
- the fifth processing module is used to execute the lock release operation and instruct the streaming media server to receive the video stream corresponding to the video access request with the first SSRC.
- the device further includes:
- the sixth processing module is used to change the first SSRC from an occupied state to an unoccupied state when the streaming media server fails to receive the video stream corresponding to the video access request with the first SSRC.
- the second processing module includes:
- the first generation submodule is used to generate a batch of SSRCs with a target probability value, wherein the target probability value is negatively correlated with i.
- the first generation submodule includes:
- a generating unit for generating (N-i) random SSRCs with a target probability value
- the second processing module includes:
- the storage submodule is used to store the currently unoccupied second SSRC among the generated (N-i) SSRCs in the cache.
- the generating unit includes:
- a generating subunit used for generating a random value p, wherein the value of p is between 0 and 1;
- the determination subunit is used to determine whether (i/N) is less than p. If (i/N) is less than p, (N-i) random SSRCs are generated.
- the second processing module includes:
- the second generation submodule is used to generate (N-i) currently unoccupied SSRCs.
- the video stream transmission method is applied to a distributed deployment scenario;
- the cache is a redis cache, the lock used for the locking operation is a redis distributed lock, and the first SSRC is recorded in an occupied state through a database.
- an electronic device including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the video stream transmission method in the first aspect.
- a computer-readable storage medium on which a computer program/instruction is stored.
- the computer program/instruction is executed by a processor, the video stream transmission method in the first aspect is implemented.
- a computer program product including a computer program/instruction, which implements the video stream transmission method in the first aspect when executed by a processor.
- N different video synchronization sources SSRC are generated in advance and stored in the cache, where N is A positive integer; in response to receiving a video access request, performing a locking operation; determining whether the number i of free SSRCs in the cache is less than M, and if so, performing an operation of generating an SSRC, and storing the generated SSRC in the cache, where M is a positive integer; allocating a first SSRC in the cache to the video access request, wherein the first SSRC is a currently unoccupied SSRC; deleting the first SSRC in the cache, and recording the first SSRC as being in an occupied state; performing a lock release operation, and instructing the streaming media server to receive the video stream corresponding to the video access request with the first SSRC.
- a method of pre-generating SSRC is adopted to store a batch of spare idle SSRCs in the cache.
- an available SSRC is selected from the cache and allocated to the video access request, without having to perform an SSRC generation operation every time a video access request is received, which can speed up the allocation of SSRC. Since the allocation speed of SSRC is fast, the time between locking and releasing the lock is greatly shortened, which can reduce the lock granularity and lock competition time when allocating SSRC, avoid the problem of too long video stream access time or even interface timeout, and can cope with high concurrent video access requests, improve the access speed of video streams, and thus improve video transmission efficiency.
- FIG1 is an example diagram of an application scenario of a video stream transmission method provided in an embodiment of the present application.
- FIG2 is a flowchart of a video stream transmission method provided in an embodiment of the present application.
- FIG3 is a second flowchart of a video stream transmission method provided in an embodiment of the present application.
- FIG4 is a third flowchart of a video stream transmission method provided in an embodiment of the present application.
- FIG5 is a schematic structural diagram of a video stream transmission device provided in an embodiment of the present application.
- FIG6 is a structural block diagram of an electronic device provided in an embodiment of the present application.
- Embodiments of the present application provide a video stream transmission method, device, electronic device, and storage medium.
- the application scenario of video stream transmission includes: video stream transmission control device 10, streaming media server 11 of the video platform and cameras 121, 122, ..., camera 12n, where n is an integer greater than 1.
- the video stream transmission control device 10 When the streaming media server 11 of the video platform needs to access the video streams of cameras 121 to 12n, the video stream transmission control device 10 will allocate an SSRC to the video stream corresponding to the video access request every time it receives a video access request, and send it to the streaming media server 11 of the video platform, notifying the streaming media server 11 to receive the stream with the SSRC, and then the video stream transmission control device 10 will call the signaling service again to notify the corresponding camera, such as camera 121, to push the stream to the streaming media server 11 with the SSRC.
- Video synchronization source is a 32-bit field defined in the Real-time Transport Protocol (RTP) message header, which is used to uniquely identify a stream.
- RTP Real-time Transport Protocol
- Lock It is a synchronization mechanism in a thread. By locking, mutually exclusive access to shared resources can be achieved. In the embodiment of the present application, the lock is used to prevent different video streams from acquiring the same SSRC and causing cross-streaming.
- Lock contention refers to a large number of threads competing for the same lock. For lock contention, if the protected code needs to complete more work, the number of threads waiting to obtain the lock will also increase.
- a batch of spare SSRCs are generated in advance and stored in the cache.
- the SSRC is directly obtained from the cache and allocated to the video access request, which can speed up the allocation of SSRC.
- the shorter the time consumption of allocating SSRC the smaller the lock granularity is, and the interaction with the streaming media server within the lock range is avoided. It can cope with high-concurrency video access requests, increase the access speed of the video stream, reduce the loss of video data, and thus improve the transmission efficiency of the video stream.
- the available SSRCs in the cache are replenished in time, ensuring the sustainability of high-concurrency video access requests being allocated to SSRCs.
- FIG. 2 is one of the flowcharts of a video stream transmission method provided in an embodiment of the present application. As shown in FIG. 2 , the method may include the following steps: step 201, step 202, step 203, step 204, step 205, and step 206;
- step 201 N different SSRCs are pre-generated and stored in a cache, where N is a positive integer.
- the cache can support high-speed reading of data, so the pre-generated SSRC is written into the cache for storage.
- the pre-generated SSRC can be stored in the cache of the memory.
- the number N of pre-generated SSRCs can be determined based on the number of concurrent video access requests in the actual application scenario, as well as the storage efficiency and cost of the cache. Alternatively, the number N of pre-generated SSRCs can also be determined based on historical experience, which is not limited in the embodiment of the present application.
- N different SSRCs may be randomly generated.
- step 202 in response to receiving a video access request, a locking operation is performed.
- a lock for performing a locking operation can be selected according to the actual application scenario. For example, for a distributed deployment scenario, a redis distributed lock can be selected.
- step 203 it is determined whether the number i of idle SSRCs in the cache is less than M. If so, an operation of generating SSRCs is performed and the generated SSRCs are stored in the cache, where M is a positive integer.
- the free SSRC in the cache refers to an available SSRC, that is, an SSRC that is not currently occupied in the cache.
- the number i of idle SSRCs in the cache can be read, and by comparing whether the number i of currently idle SSRCs is less than M, it is determined whether the available SSRCs in the cache are insufficient. If the number i of idle SSRCs is less than M, it is considered that the available SSRCs in the cache are insufficient, and a batch of SSRCs needs to be generated or attempted to be generated to supplement the available SSRCs in the cache.
- step 203 includes the following steps: step 2031;
- step 2031 it is determined whether the number i of free SSRCs in the cache is less than M. If so, a batch of SSRCs is generated with a target probability value, wherein the target probability value is negatively correlated with i.
- the target probability value may be [1-(i/N)].
- (Ni) random SSRCs may be generated with a target probability value. Since the generated (Ni) SSRCs are a string of random strings, they may be different from the currently occupied SSRCs. Similarly, in order to ensure that all SSRCs in the cache are available, the second SSRC that is currently not occupied among the generated (Ni) SSRCs is stored in the cache.
- the following steps can be used to achieve the goal: generate a random value p, where the value of p is between 0 and 1; determine whether (i/N) is less than p, and if (i/N) is less than p, generate (N-i) random SSRCs.
- step 203 includes the following steps: step 2032;
- step 2032 (N-i) currently unoccupied SSRCs are generated and stored in a cache, so that the number of available SSRCs in the cache is always N.
- a first SSRC in the cache is allocated to the video access request, wherein the first SSRC is a currently unoccupied SSRC.
- an SSRC can be randomly selected from the cache as the first SSRC and allocated to the video access request.
- step 205 the first SSRC in the cache is deleted, and the first SSRC is recorded as being in an occupied state.
- the first SSRC in order to prevent the first SSRC from being allocated to multiple video access requests, resulting in streaming problems, after the first SSRC is allocated to a video access request, the first SSRC needs to be deleted from the cache.
- step 206 a lock release operation is performed, and the streaming media server is instructed to receive the video stream corresponding to the video access request with the first SSRC.
- the streaming media server when the streaming media server successfully receives the video stream corresponding to the video access request with the first SSRC, the video stream transmission process corresponding to the current video access request ends, and the subsequent received video access requests continue to be processed.
- the streaming media server fails to receive the video stream corresponding to the video access request with the first SSRC
- the first SSRC is modified from an occupied state to an unoccupied state to realize the recovery of the SSRC.
- N different video synchronization source SSRCs are pre-generated and stored in the cache, where N is a positive integer; in response to receiving a video access request, a locking operation is performed; it is determined whether the number i of free SSRCs in the cache is less than M, and if so, an operation of generating SSRCs is performed, and the generated SSRCs are stored in the cache, where M is a positive integer; the first SSRC in the cache is allocated to the video access request, wherein the first SSRC is a currently unoccupied SSRC; the first SSRC in the cache is deleted, and the first SSRC is recorded as being in an occupied state. execute the lock release operation, and instruct the streaming media server to receive the video stream corresponding to the video access request with the first SSRC.
- a method of pre-generating SSRC is adopted to store a batch of spare idle SSRCs in the cache.
- an available SSRC is selected from the cache and allocated to the video access request, without having to perform an SSRC generation operation every time a video access request is received, which can speed up the allocation of SSRC. Since the allocation speed of SSRC is fast, the time between locking and releasing the lock is greatly shortened, which can reduce the lock granularity and lock competition time when allocating SSRC, avoid the problem of too long video stream access time or even interface timeout, and can cope with high concurrent video access requests, improve the access speed of video streams, and thus improve video transmission efficiency.
- FIG3 is a second flowchart of a video stream transmission method provided by an embodiment of the present application. As shown in FIG3 , the method may include the following steps: step 301, step 302, step 303, step 304, step 305, and step 306;
- step 301 N different SSRCs are pre-generated and stored in a cache, where N is a positive integer.
- step 302 in response to receiving a video access request, a lock is acquired, and a locking operation is performed based on the acquired lock.
- step 303 the number i of free SSRCs in the current cache is queried and compared with the threshold M. If i is less than M, (N-i) random SSRCs are generated with probability [1-(i/N)], and the currently unoccupied SSRCs among the (N-i) random SSRCs are written into the cache.
- the above step 303 may be repeatedly performed until the number of idle SSRCs in the cache is greater than or equal to M.
- step 304 an SSRC is obtained from the cache, the SSRC is deleted from the cache, and is stored in the persistent database to mark it as occupied.
- step 305 the lock is released.
- step 306 the streaming media server is notified to prepare to receive the stream using the SSRC.
- the program ends; if the streaming media server fails to receive the stream using the SSRC, the SSRC is deleted from the persistent database, i.e., it is marked as unused.
- the method of pre-generating SSRC is used to avoid the need to perform an SSRC generation operation each time an access request is received, thereby improving the SSRC acquisition speed, reducing the granularity of the lock when generating SSRC, avoiding interaction with the streaming media server within the lock range, reducing lock contention, and improving concurrency, thereby accelerating the video stream access speed in high concurrency scenarios, and improving the transmission efficiency of the video stream.
- FIG4 is a flowchart of a video stream transmission method provided in an embodiment of the present application.
- the video transmission method can be applied to a distributed deployment scenario. Accordingly, as shown in FIG4 , the method may include the following: Steps: step 401, step 402, step 403, step 404, step 405 and step 406;
- step 401 N different SSRCs are generated in advance and stored in the redis cache, where N is a positive integer.
- the cache for storing SSRC is a redis cache
- the lock used for the locking operation is a redis distributed lock
- the first SSRC is recorded as being in an occupied state through a database.
- the first SSRC is recorded as being in an occupied state through a mysql database.
- step 402 in response to receiving a video access request, a setnx command is used to obtain a lock from a redis database and perform a locking operation.
- step 403 the number i of free SSRCs remaining in the redis cache is queried and compared with the threshold M. If i is less than M, (N-i) random SSRCs are generated with probability [1-(i/N)], and the SSRCs that are actually not occupied are written into the redis cache.
- the above step 403 may be repeatedly performed until the number of idle SSRCs in the cache is greater than or equal to M.
- step 404 an unoccupied SSRC is obtained from the redis cache and allocated to the video access request, the allocated SSRC is deleted from the redis cache, and stored in the database to mark that the SSRC is occupied.
- step 405 the redis lock is released.
- step 406 the streaming media server is notified to prepare to receive the stream with the SSRC. If the streaming media server successfully receives the stream with the SSRC, the program ends; if it fails, the SSRC is deleted from the database.
- redis cache is used to store idle SSRCs
- redis database is used to record used SSRCs
- redis distributed locks are used as locking methods, which can cope with distributed deployment scenarios and achieve efficient transmission of video streams in distributed deployment scenarios.
- the embodiment of the present application further provides a video stream transmission device.
- the video stream transmission device described below and the video stream transmission method described above can refer to each other.
- FIG5 is a schematic diagram of the structure of a video stream transmission device provided in an embodiment of the present application.
- the video stream transmission device 500 may include: a pre-processing module 501, a first processing module 502, a second processing module 503, a third processing module 504, a fourth processing module 505 and a fifth processing module 506;
- the pre-processing module 501 is used to pre-generate N different video synchronization sources SSRC and store them in a cache, where N is a positive integer;
- a first processing module 502 configured to perform a locking operation in response to receiving a video access request
- the second processing module 503 is used to determine whether the number i of idle SSRCs in the cache is less than M. If so, an operation of generating SSRCs is performed and the generated SSRCs are stored in the cache, where M is a positive integer;
- the third processing module 504 is configured to assign the first SSRC in the cache to the video access request, wherein the first SSRC is the currently unoccupied SSRC;
- the fourth processing module 505 is used to delete the first SSRC in the cache and record that the first SSRC is in an occupied state;
- the fifth processing module 506 is used to execute a lock release operation and instruct the streaming media server to receive the video stream corresponding to the video access request with the first SSRC.
- N different video synchronization source SSRCs are pre-generated and stored in the cache, where N is a positive integer; in response to receiving a video access request, a locking operation is performed; it is determined whether the number i of free SSRCs in the cache is less than M, and if so, an operation of generating SSRCs is performed, and the generated SSRCs are stored in the cache, where M is a positive integer; the first SSRC in the cache is allocated to the video access request, wherein the first SSRC is a currently unoccupied SSRC; the first SSRC in the cache is deleted, and the first SSRC is recorded as being in an occupied state; a lock release operation is performed, and the streaming media server is instructed to receive the video stream corresponding to the video access request with the first SSRC.
- a method of pre-generating SSRC is adopted to store a batch of spare idle SSRCs in the cache.
- an available SSRC is selected from the cache and allocated to the video access request, without having to perform an SSRC generation operation every time a video access request is received, which can speed up the allocation of SSRC. Since the allocation speed of SSRC is fast, the time between locking and releasing the lock is greatly shortened, which can reduce the lock granularity and lock competition time when allocating SSRC, avoid the problem of too long video stream access time or even interface timeout, and can cope with high concurrent video access requests, improve the access speed of video streams, and thus improve video transmission efficiency.
- the video stream transmission device 500 may further include:
- the sixth processing module is used to change the first SSRC from an occupied state to an unoccupied state when the streaming media server fails to receive the video stream corresponding to the video access request with the first SSRC.
- the second processing module 503 may include:
- the first generation submodule is used to generate a batch of SSRCs with a target probability value, wherein the target probability value is negatively correlated with i.
- the first generation submodule may include:
- a generating unit for generating (N-i) random SSRCs with a target probability value
- the second processing module 503 may include:
- the storage submodule is used to store the currently unoccupied second SSRC among the generated (N-i) SSRCs in the cache.
- the generating unit may include:
- a generating subunit used for generating a random value p, wherein the value of p is between 0 and 1;
- the second processing module 503 may include:
- the second generation submodule is used to generate (N-i) currently unoccupied SSRCs.
- the video stream transmission method can be applied to a distributed deployment scenario; the cache is a redis cache, the lock used for the locking operation is a redis distributed lock, and the first SSRC is recorded in an occupied state through a database.
- an embodiment of the present application further provides an electronic device, including: a memory for storing a computer program; and a processor for implementing the steps of the above video stream transmission method when executing the computer program.
- FIG6 it is a schematic diagram of the composition structure of an electronic device, which may include: a processor 610, a memory 620, a communication interface 630 and a communication bus 640.
- the processor 610, the memory 620 and the communication interface 630 all communicate with each other through the communication bus 640.
- the processor 610 can be a central processing unit (CPU), a specific application integrated circuit, a digital signal processor, a field programmable gate array or other programmable logic devices, etc.
- the processor 610 may call a program stored in the memory 620. Specifically, the processor 610 may execute operations in an embodiment of the CDN resource scheduling method.
- the memory 620 is used to store one or more programs, which may include program codes, and the program codes include computer operation instructions.
- the memory 620 at least stores programs for implementing the following functions:
- N is a positive integer
- a lock release operation is performed, and the streaming media server is instructed to receive the video stream corresponding to the video access request with the first SSRC.
- a method of pre-generating SSRC is adopted to store a batch of spare idle SSRCs in the cache.
- an available SSRC is selected from the cache and allocated to the video access request, without having to perform an SSRC generation operation every time a video access request is received, which can speed up the allocation speed of SSRC. Since SSRC is allocated quickly, the time between locking and releasing the lock is greatly shortened, which can reduce the lock granularity and lock contention time when allocating SSRC, avoid the problem of long video stream access time or even interface timeout, and can handle high-concurrency video access requests, increase the access speed of video streams, and thus improve video transmission efficiency.
- the memory 620 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function, etc.; the data storage area may store data created during use.
- the memory 620 may include a high-speed random access memory and may also include a non-volatile memory, such as at least one disk storage device or other volatile solid-state storage device.
- the communication interface 630 may be an interface of a communication module, and is used to connect to other devices or systems.
- FIG. 6 does not constitute a limitation on the electronic device in the embodiment of the present application.
- the electronic device may include more or fewer components than those shown in FIG. 6 , or combine certain components.
- the embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above-mentioned video stream transmission method are implemented.
- the embodiment of the present application also provides a computer program product or a computer program, which may include computer instructions, and the computer instructions may be stored in a computer-readable storage medium.
- the processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor may execute the computer instructions so that the computer device executes the description of the video streaming transmission method in the corresponding embodiment of the foregoing text, so it will not be repeated here.
- the description of the beneficial effects of adopting the same method will not be repeated.
- each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referred to each other.
- Professionals can also further realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, computer software or a combination of the two.
- the composition and steps of each example have been generally described in the above description according to the function. Whether these functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.
- the steps of the method or algorithm described in the embodiments disclosed herein can be directly executed by hardware or a processor.
- the software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
Disclosed in the embodiments of the present application are a video streaming transmission method and apparatus, an electronic device, and a storage medium. The method comprises: pre-generating N different video synchronization sources (SSRCs) and storing same in a cache, N being a positive integer; in response to receiving a video access request, executing a locking operation; determining whether the number i of idle SSRCs in the cache is less than M, and if so, executing an SSRC-generating operation and storing a generated SSRC in the cache, M being a positive integer; allocating a first SSRC in the cache to the video access request, the first SSRC being an SSRC which is not occupied at present; deleting the first SSRC in the cache, and marking the first SSRC as an occupied state; and executing a locking release operation, and instructing a streaming media server to receive with the first SSRC a video streaming corresponding to the video access request.
Description
本申请要求在2023年01月28日提交中国专利局、申请号为202310042919.6、发明名称为“视频流传输方法、装置、电子设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority to a Chinese patent application filed with the Chinese Patent Office on January 28, 2023, with application number 202310042919.6 and invention name “Video Stream Transmission Method, Device, Electronic Device and Storage Medium”, the entire contents of which are incorporated by reference in this application.
本申请涉及通信技术领域,特别涉及一种视频流传输方法、装置、电子设备及存储介质。The present application relates to the field of communication technology, and in particular to a video stream transmission method, device, electronic device and storage medium.
近年来,从专业领域到民用、家用领域,视频监控不断普及,需求不断扩大,一个成规模的视频平台往往会接入海量的视频流。当视频平台的流媒体服务器对接的视频流数量较大,或者在大批量视频流为了应对容灾而迁移时,如何应对海量的视频接入请求,将其迅速地接入视频平台的流媒体服务器,以尽可能减少视频流数据的丢失是一个重要课题。In recent years, video surveillance has become increasingly popular, from professional fields to civilian and home fields, and the demand has continued to expand. A large-scale video platform often accesses a large number of video streams. When the number of video streams connected to the streaming media server of the video platform is large, or when a large number of video streams are migrated for disaster recovery, how to deal with the massive video access requests and quickly access them to the streaming media server of the video platform to minimize the loss of video stream data is an important issue.
视频同步源(Synchronization source,SSRC)是实时传输协议(Real-time Transport Protocol,RTP)报文头中定义的一个32位字段,用来唯一标识一路流。在视频接入过程中,需要为每一路视频流分配一个SSRC,并下发给视频平台的流媒体服务器,通知该流媒体服务器以该SSRC收流,而后系统会再调用信令服务,来通知摄像头以该SSRC推流。The video synchronization source (SSRC) is a 32-bit field defined in the Real-time Transport Protocol (RTP) message header, which is used to uniquely identify a stream. During the video access process, an SSRC needs to be assigned to each video stream and sent to the streaming server of the video platform to notify the streaming server to receive the stream with the SSRC. Then the system will call the signaling service to notify the camera to push the stream with the SSRC.
现有技术中,为了确保SSRC能够正确生成以避免串流,在每接收到一个视频接入请求,首先会加锁,之后为该视频接入请求实时生成一个SSRC,再下发给流媒体服务器,在接收到流媒体服务器的正确返回后将该SSRC标记为已使用,完成上述操作后才可以释放锁。现有技术虽然可以在一定程度上实现视频流的传输,但也存在一些问题,例如,锁的粒度较大,导致在高并发的视频接入请求场景下,锁竞争时间较长,容易出现视频流接入时间过长,甚至接口超时的问题,视频流传输效率较低。In the prior art, in order to ensure that SSRC can be correctly generated to avoid streaming, each time a video access request is received, a lock is first added, and then an SSRC is generated in real time for the video access request, and then sent to the streaming media server. After receiving the correct response from the streaming media server, the SSRC is marked as used, and the lock can be released only after the above operations are completed. Although the prior art can realize the transmission of video streams to a certain extent, there are also some problems. For example, the granularity of the lock is large, resulting in a long lock competition time in the scenario of high concurrent video access requests, which is prone to long video stream access time or even interface timeout, and low video stream transmission efficiency.
发明内容Summary of the invention
本申请实施例提供一种视频流传输方法、装置、电子设备及存储介质,以实现能够应对高并发量的视频接入请求,提高视频流的接入速度,从而提高视频传输效率。The embodiments of the present application provide a video stream transmission method, device, electronic device and storage medium to achieve the ability to cope with high concurrent video access requests, increase the access speed of the video stream, and thus improve the video transmission efficiency.
在本申请一些实施例中,公开了一种视频流传输方法,方法包括:
In some embodiments of the present application, a video stream transmission method is disclosed, the method comprising:
预先生成N个不同的视频同步源SSRC,并存储于缓存中,N为正整数;Generate N different video synchronization sources SSRC in advance and store them in the cache, where N is a positive integer;
响应于接收到视频接入请求,执行加锁操作;In response to receiving the video access request, performing a locking operation;
确定缓存中空闲的SSRC的个数i是否小于M,若是,则执行生成SSRC的操作,并将所生成的SSRC存储于缓存中,M为正整数;Determine whether the number i of free SSRCs in the cache is less than M. If so, perform an operation of generating SSRCs and store the generated SSRCs in the cache, where M is a positive integer;
将缓存中的第一SSRC分配给视频接入请求,其中,第一SSRC为当前未被占用的SSRC;Allocating a first SSRC in the cache to the video access request, wherein the first SSRC is a currently unoccupied SSRC;
删除缓存中第一SSRC,并记录第一SSRC为被占用状态;Delete the first SSRC in the cache and record the first SSRC as being occupied;
执行释放锁操作,并指示流媒体服务器以第一SSRC接收视频接入请求对应的视频流。A lock release operation is performed, and the streaming media server is instructed to receive the video stream corresponding to the video access request with the first SSRC.
可选地,作为一个实施例,指示流媒体服务器以第一SSRC接收视频接入请求对应的视频流之后,还包括:Optionally, as an embodiment, after instructing the streaming media server to receive the video stream corresponding to the video access request with the first SSRC, the method further includes:
在流媒体服务器以第一SSRC接收视频接入请求对应的视频流失败的情况下,将第一SSRC由被占用状态修改为未被占用状态。In the case that the streaming media server fails to receive the video stream corresponding to the video access request with the first SSRC, the first SSRC is changed from an occupied state to an unoccupied state.
可选地,作为一个实施例,执行生成SSRC的操作,包括:Optionally, as an embodiment, performing an operation of generating an SSRC includes:
以目标概率值生成一批SSRC,其中,目标概率值与i负相关。Generate a batch of SSRCs with target probability values, where the target probability value is negatively correlated with i.
可选地,作为一个实施例,以目标概率值生成一批SSRC,包括:Optionally, as an embodiment, generating a batch of SSRCs with target probability values includes:
以目标概率值生成(N-i)个随机SSRC;Generate (N-i) random SSRCs with target probability value;
将所生成的SSRC存储于缓存中,包括:The generated SSRC is stored in the cache, including:
将所生成的(N-i)个SSRC中当前未被占用的第二SSRC存储于缓存中。The second SSRC that is not currently occupied among the generated (N-i) SSRCs is stored in the cache.
可选地,作为一个实施例,以目标概率值生成(N-i)个随机SSRC,包括:Optionally, as an embodiment, generating (N-i) random SSRCs with a target probability value includes:
生成随机值p,其中,p的取值介于0至1之间;Generate a random value p, where the value of p is between 0 and 1;
确定(i/N)是否小于p,若(i/N)小于p,则生成(N-i)个随机SSRC。Determine whether (i/N) is less than p. If (i/N) is less than p, generate (N-i) random SSRCs.
可选地,作为一个实施例,执行生成SSRC的操作,包括:Optionally, as an embodiment, performing an operation of generating an SSRC includes:
生成(N-i)个当前未被占用的SSRC。Generate (N-i) currently unoccupied SSRCs.
可选地,作为一个实施例,视频流传输方法应用于分布式部署场景;缓存为redis缓存,加锁操作所使用的锁为redis分布式锁,通过数据库记录第一SSRC为被占用状态。Optionally, as an embodiment, the video stream transmission method is applied to a distributed deployment scenario; the cache is a redis cache, the lock used for the locking operation is a redis distributed lock, and the first SSRC is recorded in an occupied state through a database.
在本申请一些实施例中,公开了一种视频流传输装置,装置包括:In some embodiments of the present application, a video stream transmission device is disclosed, the device comprising:
预处理模块,用于预先生成N个不同的视频同步源SSRC,并存储于缓存中,N为正整数;A preprocessing module, used for pre-generating N different video synchronization sources SSRC and storing them in a cache, where N is a positive integer;
第一处理模块,用于响应于接收到视频接入请求,执行加锁操作;A first processing module, configured to perform a locking operation in response to receiving a video access request;
第二处理模块,用于确定缓存中空闲的SSRC的个数i是否小于M,若是,则执行
生成SSRC的操作,并将所生成的SSRC存储于缓存中,M为正整数;The second processing module is used to determine whether the number i of free SSRCs in the cache is less than M. If so, execute An operation of generating an SSRC and storing the generated SSRC in a cache, where M is a positive integer;
第三处理模块,用于将缓存中的第一SSRC分配给视频接入请求,其中,第一SSRC为当前未被占用的SSRC;A third processing module is used to allocate a first SSRC in the cache to the video access request, wherein the first SSRC is a currently unoccupied SSRC;
第四处理模块,用于删除缓存中第一SSRC,并记录第一SSRC为被占用状态;a fourth processing module, configured to delete the first SSRC in the cache and record the first SSRC as being in an occupied state;
第五处理模块,用于执行释放锁操作,并指示流媒体服务器以第一SSRC接收视频接入请求对应的视频流。The fifth processing module is used to execute the lock release operation and instruct the streaming media server to receive the video stream corresponding to the video access request with the first SSRC.
可选地,作为一个实施例,装置还包括:Optionally, as an embodiment, the device further includes:
第六处理模块,用于在流媒体服务器以第一SSRC接收视频接入请求对应的视频流失败的情况下,将第一SSRC由被占用状态修改为未被占用状态。The sixth processing module is used to change the first SSRC from an occupied state to an unoccupied state when the streaming media server fails to receive the video stream corresponding to the video access request with the first SSRC.
可选地,作为一个实施例,第二处理模块包括:Optionally, as an embodiment, the second processing module includes:
第一生成子模块,用于以目标概率值生成一批SSRC,其中,目标概率值与i负相关。The first generation submodule is used to generate a batch of SSRCs with a target probability value, wherein the target probability value is negatively correlated with i.
可选地,作为一个实施例,第一生成子模块包括:Optionally, as an embodiment, the first generation submodule includes:
生成单元,用于以目标概率值生成(N-i)个随机SSRC;A generating unit, for generating (N-i) random SSRCs with a target probability value;
第二处理模块包括:The second processing module includes:
存储子模块,用于将所生成的(N-i)个SSRC中当前未被占用的第二SSRC存储于缓存中。The storage submodule is used to store the currently unoccupied second SSRC among the generated (N-i) SSRCs in the cache.
可选地,作为一个实施例,生成单元包括:Optionally, as an embodiment, the generating unit includes:
生成子单元,用于生成随机值p,其中,p的取值介于0至1之间;A generating subunit, used for generating a random value p, wherein the value of p is between 0 and 1;
确定子单元,用于确定(i/N)是否小于p,若(i/N)小于p,则生成(N-i)个随机SSRC。The determination subunit is used to determine whether (i/N) is less than p. If (i/N) is less than p, (N-i) random SSRCs are generated.
可选地,作为一个实施例,第二处理模块包括:Optionally, as an embodiment, the second processing module includes:
第二生成子模块,用于生成(N-i)个当前未被占用的SSRC。The second generation submodule is used to generate (N-i) currently unoccupied SSRCs.
可选地,作为一个实施例,视频流传输方法应用于分布式部署场景;缓存为redis缓存,加锁操作所使用的锁为redis分布式锁,通过数据库记录第一SSRC为被占用状态。Optionally, as an embodiment, the video stream transmission method is applied to a distributed deployment scenario; the cache is a redis cache, the lock used for the locking operation is a redis distributed lock, and the first SSRC is recorded in an occupied state through a database.
在本申请一些实施例中,公开了一种电子设备,包括存储器、处理器及存储在存储器上的计算机程序,处理器执行计算机程序以实现如第一方面中的视频流传输方法。In some embodiments of the present application, an electronic device is disclosed, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the video stream transmission method in the first aspect.
在本申请一些实施例中,公开了一种计算机可读存储介质,其上存储有计算机程序/指令,该计算机程序/指令被处理器执行时实现如第一方面中的视频流传输方法。In some embodiments of the present application, a computer-readable storage medium is disclosed, on which a computer program/instruction is stored. When the computer program/instruction is executed by a processor, the video stream transmission method in the first aspect is implemented.
在本申请一些实施例中,公开了一种计算机程序产品,包括计算机程序/指令,该计算机程序/指令被处理器执行时实现如第一方面中的视频流传输方法。In some embodiments of the present application, a computer program product is disclosed, including a computer program/instruction, which implements the video stream transmission method in the first aspect when executed by a processor.
本申请实施例中,预先生成N个不同的视频同步源SSRC,并存储于缓存中,N为
正整数;响应于接收到视频接入请求,执行加锁操作;确定缓存中空闲的SSRC的个数i是否小于M,若是,则执行生成SSRC的操作,并将所生成的SSRC存储于缓存中,M为正整数;将缓存中的第一SSRC分配给视频接入请求,其中,第一SSRC为当前未被占用的SSRC;删除缓存中第一SSRC,并记录第一SSRC为被占用状态;执行释放锁操作,并指示流媒体服务器以第一SSRC接收视频接入请求对应的视频流。In the embodiment of the present application, N different video synchronization sources SSRC are generated in advance and stored in the cache, where N is A positive integer; in response to receiving a video access request, performing a locking operation; determining whether the number i of free SSRCs in the cache is less than M, and if so, performing an operation of generating an SSRC, and storing the generated SSRC in the cache, where M is a positive integer; allocating a first SSRC in the cache to the video access request, wherein the first SSRC is a currently unoccupied SSRC; deleting the first SSRC in the cache, and recording the first SSRC as being in an occupied state; performing a lock release operation, and instructing the streaming media server to receive the video stream corresponding to the video access request with the first SSRC.
可见,本申请实施例中,采用预先生成SSRC的方式,在缓存中存放一批备用的空闲SSRC,在收到视频接入请求时,从缓存中选择一个可用的SSRC分配给视频接入请求,而不必每次收到视频接入请求都要执行一次SSRC生成操作,可以加快SSRC的分配速度。由于SSRC的分配速度较快,因此加锁和释放锁之间的时长大大缩短,可以降低分配SSRC时的锁粒度和锁竞争时长,避免出现视频流接入时间过长,甚至接口超时的问题,能够应对高并发量的视频接入请求,提高视频流的接入速度,从而提高视频传输效率。It can be seen that in the embodiment of the present application, a method of pre-generating SSRC is adopted to store a batch of spare idle SSRCs in the cache. When a video access request is received, an available SSRC is selected from the cache and allocated to the video access request, without having to perform an SSRC generation operation every time a video access request is received, which can speed up the allocation of SSRC. Since the allocation speed of SSRC is fast, the time between locking and releasing the lock is greatly shortened, which can reduce the lock granularity and lock competition time when allocating SSRC, avoid the problem of too long video stream access time or even interface timeout, and can cope with high concurrent video access requests, improve the access speed of video streams, and thus improve video transmission efficiency.
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
图1是本申请实施例提供的视频流传输方法的应用场景示例图;FIG1 is an example diagram of an application scenario of a video stream transmission method provided in an embodiment of the present application;
图2是本申请实施例提供的一种视频流传输方法的流程图之一;FIG2 is a flowchart of a video stream transmission method provided in an embodiment of the present application;
图3是本申请实施例提供的一种视频流传输方法的流程图之二;FIG3 is a second flowchart of a video stream transmission method provided in an embodiment of the present application;
图4是本申请实施例提供的一种视频流传输方法的流程图之三;FIG4 is a third flowchart of a video stream transmission method provided in an embodiment of the present application;
图5是本申请实施例提供的一种视频流传输装置的结构示意图;FIG5 is a schematic structural diagram of a video stream transmission device provided in an embodiment of the present application;
图6是本申请实施例提供的一种电子设备的结构框图。FIG6 is a structural block diagram of an electronic device provided in an embodiment of the present application.
为了使本技术领域的人员更好地理解本申请方案,下面结合附图和具体实施方式对本申请作进一步的详细说明。显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.
本申请实施例提供了一种视频流传输方法、装置、电子设备及存储介质。Embodiments of the present application provide a video stream transmission method, device, electronic device, and storage medium.
为了便于理解,下面首先对本申请实施例的应用场景和涉及到的一些概念进行介绍。
To facilitate understanding, the application scenarios of the embodiments of the present application and some concepts involved are first introduced below.
以摄像头采集到的视频流接入视频平台为例,视频流传输的应用场景:如图1所示,该应用场景中包括:视频流传输控制设备10、视频平台的流媒体服务器11和摄像头121、摄像头122,…,摄像头12n,n为大于1的整数。当视频平台的流媒体服务器11需要接入摄像头121~摄像头12n的视频流时,视频流传输控制设备10每接收到一个视频接入请求,就会为该视频接入请求对应的视频流分配一个SSRC,并下发给视频平台的流媒体服务器11,通知流媒体服务器11以该SSRC收流,而后视频流传输控制设备10会再调用信令服务,来通知对应的摄像头例如摄像头121,以该SSRC向流媒体服务器11推流。Taking the access of the video stream collected by the camera to the video platform as an example, the application scenario of video stream transmission: as shown in Figure 1, the application scenario includes: video stream transmission control device 10, streaming media server 11 of the video platform and cameras 121, 122, ..., camera 12n, where n is an integer greater than 1. When the streaming media server 11 of the video platform needs to access the video streams of cameras 121 to 12n, the video stream transmission control device 10 will allocate an SSRC to the video stream corresponding to the video access request every time it receives a video access request, and send it to the streaming media server 11 of the video platform, notifying the streaming media server 11 to receive the stream with the SSRC, and then the video stream transmission control device 10 will call the signaling service again to notify the corresponding camera, such as camera 121, to push the stream to the streaming media server 11 with the SSRC.
视频同步源(Synchronization source,SSRC)是实时传输协议(Real-time Transport Protocol,RTP)报文头中定义的一个32位字段,用来唯一标识一路流。Video synchronization source (SSRC) is a 32-bit field defined in the Real-time Transport Protocol (RTP) message header, which is used to uniquely identify a stream.
锁:是线程中的一种同步机制,通过加锁,可以实现对共享资源的互斥访问。本申请实施例中,锁用于避免不同视频流获取到相同SSRC而发生串流。Lock: It is a synchronization mechanism in a thread. By locking, mutually exclusive access to shared resources can be achieved. In the embodiment of the present application, the lock is used to prevent different video streams from acquiring the same SSRC and causing cross-streaming.
锁竞争(Lock Contention):是指大量的线程在同一个锁上发生竞争。对于锁竞争,若被保护的代码需要完成的工作量越多,则等待获得锁的线程也数量也变的越来越多。Lock contention: refers to a large number of threads competing for the same lock. For lock contention, if the protected code needs to complete more work, the number of threads waiting to obtain the lock will also increase.
现有技术中,在为视频接入请求分配SSRC时,每接收到一个视频接入请求,首先会加锁,之后为该视频接入请求实时生成一个SSRC,再下发给流媒体服务器,在接收到流媒体服务器的正确返回后,将该SSRC标记为已使用,完成上述操作后才可以释放锁。这样的分配方式效率较低,主要存在以下问题:每次收到一个视频接入请求都需要执行一次SSRC生成操作,生成SSRC的耗时较长导致锁粒度大,在高并发的视频接入请求场景下锁竞争时间较长,容易出现视频流接入时间过长,甚至接口超时的问题,导致视频流传输效率较低。In the prior art, when allocating SSRC for video access requests, each time a video access request is received, the lock is first added, and then an SSRC is generated for the video access request in real time, and then sent to the streaming media server. After receiving the correct response from the streaming media server, the SSRC is marked as used, and the lock can be released only after the above operations are completed. This allocation method is inefficient and has the following main problems: each time a video access request is received, an SSRC generation operation needs to be performed, and the time consumption of generating SSRC is long, resulting in a large lock granularity. In the scenario of high concurrency of video access requests, the lock competition time is long, and it is easy to have the problem of too long video stream access time or even interface timeout, resulting in low video stream transmission efficiency.
本申请实施例中,预先生成一批备用的SSRC,并存储于缓存中,当接收到视频接入请求时,直接从缓存中获取SSRC,并分配给视频接入请求,可以加快SSRC的分配速度,分配SSRC的耗时较短使得锁粒度小,避免在锁范围内与流媒体服务器交互,能够应对高并发量的视频接入请求,提高视频流的接入速度,减少视频数据的丢失,从而提高视频流传输效率。此外,通过将缓存中空闲的SSRC个数与阈值M进行比较,来及时补充缓存中的可用SSRC,保证了高并发的视频接入请求被分配到SSRC的可持续性。In the embodiment of the present application, a batch of spare SSRCs are generated in advance and stored in the cache. When a video access request is received, the SSRC is directly obtained from the cache and allocated to the video access request, which can speed up the allocation of SSRC. The shorter the time consumption of allocating SSRC, the smaller the lock granularity is, and the interaction with the streaming media server within the lock range is avoided. It can cope with high-concurrency video access requests, increase the access speed of the video stream, reduce the loss of video data, and thus improve the transmission efficiency of the video stream. In addition, by comparing the number of free SSRCs in the cache with the threshold M, the available SSRCs in the cache are replenished in time, ensuring the sustainability of high-concurrency video access requests being allocated to SSRCs.
接下来对本申请实施例提供的一种视频流传输方法进行介绍。Next, a video stream transmission method provided in an embodiment of the present application is introduced.
图2是本申请实施例提供的一种视频流传输方法的流程图之一,如图2所示,该方法可以包括以下步骤:步骤201、步骤202、步骤203、步骤204、步骤205和步骤206;FIG. 2 is one of the flowcharts of a video stream transmission method provided in an embodiment of the present application. As shown in FIG. 2 , the method may include the following steps: step 201, step 202, step 203, step 204, step 205, and step 206;
在步骤201中,预先生成N个不同的SSRC,并存储于缓存中,N为正整数。In step 201, N different SSRCs are pre-generated and stored in a cache, where N is a positive integer.
本申请实施例中,考虑到视频接入场景的高并发特性,即需要在很短的时间内为大
量的视频接入请求分配SSRC,因此SSRC的读取速度需要尽可能地快速。又由于相较于其他存储设备、单元或者模块,缓存可以支持数据的高速读取,因此将预先生成的SSRC写入缓存中,进行存储。In the embodiment of the present application, considering the high concurrency characteristics of the video access scenario, that is, the need to provide a large number of A large number of video access requests are allocated SSRC, so the reading speed of SSRC needs to be as fast as possible. Compared with other storage devices, units or modules, the cache can support high-speed reading of data, so the pre-generated SSRC is written into the cache for storage.
本申请实施例中,考虑到内存具备支持数据高速读取的特性,因此可以将预先生成的SSRC存储于内存的缓存中。In the embodiment of the present application, considering that the memory has the characteristic of supporting high-speed data reading, the pre-generated SSRC can be stored in the cache of the memory.
本申请实施例中,可以根据实际应用场景中视频接入请求的并发数,以及缓存的存储效率和成本,确定预先生成的SSRC的个数N。或者,也可以根据历史经验,确定预先生成的SSRC的个数N,本申请实施例对此不作限定。In the embodiment of the present application, the number N of pre-generated SSRCs can be determined based on the number of concurrent video access requests in the actual application scenario, as well as the storage efficiency and cost of the cache. Alternatively, the number N of pre-generated SSRCs can also be determined based on historical experience, which is not limited in the embodiment of the present application.
本申请实施例中,在预先生成SSRC时,可以随机生成N个不同的SSRC。In the embodiment of the present application, when the SSRC is generated in advance, N different SSRCs may be randomly generated.
在步骤202中,响应于接收到视频接入请求,执行加锁操作。In step 202, in response to receiving a video access request, a locking operation is performed.
本申请实施例中,可以根据实际应用场景,选择用于执行加锁操作的锁。例如,对于分布式部署场景,可以选择redis分布式锁。In the embodiment of the present application, a lock for performing a locking operation can be selected according to the actual application scenario. For example, for a distributed deployment scenario, a redis distributed lock can be selected.
在步骤203中,确定缓存中空闲的SSRC的个数i是否小于M,若是,则执行生成SSRC的操作,并将所生成的SSRC存储于缓存中,M为正整数。In step 203, it is determined whether the number i of idle SSRCs in the cache is less than M. If so, an operation of generating SSRCs is performed and the generated SSRCs are stored in the cache, where M is a positive integer.
本申请实施例中,缓存中空闲的SSRC指的是可用的SSRC,也就是,缓存中当前未被占用的SSRC。In the embodiment of the present application, the free SSRC in the cache refers to an available SSRC, that is, an SSRC that is not currently occupied in the cache.
本申请实施例中,可以读取缓存中空闲的SSRC的个数i,通过比较当前空闲的SSRC的个数i是否小于M,来判断缓存中的可用SSRC是否不足,如果空闲的SSRC的个数i小于M,则认为缓存中的可用SSRC不足,需要生成一批SSRC或者尝试生成一批SSRC,以补充缓存中的可用SSRC。In the embodiment of the present application, the number i of idle SSRCs in the cache can be read, and by comparing whether the number i of currently idle SSRCs is less than M, it is determined whether the available SSRCs in the cache are insufficient. If the number i of idle SSRCs is less than M, it is considered that the available SSRCs in the cache are insufficient, and a batch of SSRCs needs to be generated or attempted to be generated to supplement the available SSRCs in the cache.
在一些实施例中,考虑到一次性生成一批SSRC的时间成本比较高,为了降低时间成本,同时又确保缓存中的SSRC得到及时补充,可以以一定概率尝试为缓存生成一批SSRC,相应地,上述步骤203包括以下步骤:步骤2031;In some embodiments, considering that the time cost of generating a batch of SSRCs at one time is relatively high, in order to reduce the time cost and ensure that the SSRCs in the cache are replenished in time, a batch of SSRCs may be attempted to be generated for the cache with a certain probability. Accordingly, the above step 203 includes the following steps: step 2031;
在步骤2031中,确定缓存中空闲的SSRC的个数i是否小于M,若是,则以目标概率值生成一批SSRC,其中,目标概率值与i负相关。In step 2031, it is determined whether the number i of free SSRCs in the cache is less than M. If so, a batch of SSRCs is generated with a target probability value, wherein the target probability value is negatively correlated with i.
本申请实施例中,缓存中空闲的SSRC的个数i越多,目标概率值越小,生成一批SSRC的概率越小;缓存中空闲的SSRC的个数i越小,目标概率值越大,生成一批SSRC的概率越大。In the embodiment of the present application, the more the number i of idle SSRCs in the cache is, the smaller the target probability value is, and the smaller the probability of generating a batch of SSRCs is; the smaller the number i of idle SSRCs in the cache is, the larger the target probability value is, and the greater the probability of generating a batch of SSRCs is.
本申请实施例中,目标概率值可以为[1-(i/N)]。In the embodiment of the present application, the target probability value may be [1-(i/N)].
本申请实施例中,为了进一步降低生成成本,可以以目标概率值生成(N-i)个随机SSRC。由于所生成的(N-i)个SSRC是一串随机字符串,其有可能与当前被占用的SSRC
相同,为了确保缓存中的所有SSRC均是可用的,因此将所生成的(N-i)个SSRC中当前未被占用的第二SSRC存储于缓存中。In the embodiment of the present application, in order to further reduce the generation cost, (Ni) random SSRCs may be generated with a target probability value. Since the generated (Ni) SSRCs are a string of random strings, they may be different from the currently occupied SSRCs. Similarly, in order to ensure that all SSRCs in the cache are available, the second SSRC that is currently not occupied among the generated (Ni) SSRCs is stored in the cache.
本申请实施例中,在以目标概率值生成(N-i)个随机SSRC时,可以通过以下步骤实现:生成随机值p,其中,p的取值介于0至1之间;确定(i/N)是否小于p,若(i/N)小于p,则生成(N-i)个随机SSRC。In an embodiment of the present application, when (N-i) random SSRCs are generated with a target probability value, the following steps can be used to achieve the goal: generate a random value p, where the value of p is between 0 and 1; determine whether (i/N) is less than p, and if (i/N) is less than p, generate (N-i) random SSRCs.
在一些实施例中,为确保缓存中可用的SSRC一直处于充足状态,上述步骤203包括以下步骤:步骤2032;In some embodiments, to ensure that the available SSRC in the cache is always sufficient, the above step 203 includes the following steps: step 2032;
在步骤2032中,生成(N-i)个当前未被占用的SSRC,将(N-i)个当前未被占用的SSRC存储于缓存中,使得缓存中的可用SSRC数量经常为N。In step 2032, (N-i) currently unoccupied SSRCs are generated and stored in a cache, so that the number of available SSRCs in the cache is always N.
在步骤204中,将缓存中的第一SSRC分配给视频接入请求,其中,第一SSRC为当前未被占用的SSRC。In step 204, a first SSRC in the cache is allocated to the video access request, wherein the first SSRC is a currently unoccupied SSRC.
本申请实施例中,由于缓存中的SSRC均为可用的SSRC,因此可以随机从缓存中选择一个SSRC作为第一SSRC,分配给视频接入请求。In the embodiment of the present application, since the SSRCs in the cache are all available SSRCs, an SSRC can be randomly selected from the cache as the first SSRC and allocated to the video access request.
在步骤205中,删除缓存中第一SSRC,并记录第一SSRC为被占用状态。In step 205, the first SSRC in the cache is deleted, and the first SSRC is recorded as being in an occupied state.
本申请实施例中,为了避免第一SSRC被分配给多个视频接入请求,导致串流问题,因此在将第一SSRC分配给一个视频接入请求后,需要从缓存中删除第一SSRC。In the embodiment of the present application, in order to prevent the first SSRC from being allocated to multiple video access requests, resulting in streaming problems, after the first SSRC is allocated to a video access request, the first SSRC needs to be deleted from the cache.
本申请实施例中,为避免后续新生成的SSRC中存在与第一SSRC相同的SSRC时,将与第一SSRC相同的SSRC存储于缓存中导致串流的问题,需要记录第一SSRC为已被占用,使得上述生成的SSRC不会存储至缓存中。In the embodiment of the present application, in order to avoid the problem of storing the same SSRC as the first SSRC in the cache when there is an SSRC identical to the first SSRC in the newly generated SSRC, resulting in streaming, it is necessary to record the first SSRC as occupied so that the above-generated SSRC will not be stored in the cache.
在步骤206中,执行释放锁操作,并指示流媒体服务器以第一SSRC接收视频接入请求对应的视频流。In step 206, a lock release operation is performed, and the streaming media server is instructed to receive the video stream corresponding to the video access request with the first SSRC.
本申请实施例中,在流媒体服务器以第一SSRC接收视频接入请求对应的视频流成功的情况下,本次视频接入请求对应的视频流传输过程结束,继续处理后续接收到的视频接入请求。In the embodiment of the present application, when the streaming media server successfully receives the video stream corresponding to the video access request with the first SSRC, the video stream transmission process corresponding to the current video access request ends, and the subsequent received video access requests continue to be processed.
本申请实施例中,在流媒体服务器以第一SSRC接收视频接入请求对应的视频流失败的情况下,将第一SSRC由被占用状态修改为未被占用状态,以实现对SSRC的回收。In the embodiment of the present application, when the streaming media server fails to receive the video stream corresponding to the video access request with the first SSRC, the first SSRC is modified from an occupied state to an unoccupied state to realize the recovery of the SSRC.
由上述实施例可见,该实施例中,预先生成N个不同的视频同步源SSRC,并存储于缓存中,N为正整数;响应于接收到视频接入请求,执行加锁操作;确定缓存中空闲的SSRC的个数i是否小于M,若是,则执行生成SSRC的操作,并将所生成的SSRC存储于缓存中,M为正整数;将缓存中的第一SSRC分配给视频接入请求,其中,第一SSRC为当前未被占用的SSRC;删除缓存中第一SSRC,并记录第一SSRC为被占用状
态;执行释放锁操作,并指示流媒体服务器以第一SSRC接收视频接入请求对应的视频流。As can be seen from the above embodiment, in this embodiment, N different video synchronization source SSRCs are pre-generated and stored in the cache, where N is a positive integer; in response to receiving a video access request, a locking operation is performed; it is determined whether the number i of free SSRCs in the cache is less than M, and if so, an operation of generating SSRCs is performed, and the generated SSRCs are stored in the cache, where M is a positive integer; the first SSRC in the cache is allocated to the video access request, wherein the first SSRC is a currently unoccupied SSRC; the first SSRC in the cache is deleted, and the first SSRC is recorded as being in an occupied state. execute the lock release operation, and instruct the streaming media server to receive the video stream corresponding to the video access request with the first SSRC.
可见,本申请实施例中,采用预先生成SSRC的方式,在缓存中存放一批备用的空闲SSRC,在收到视频接入请求时,从缓存中选择一个可用的SSRC分配给视频接入请求,而不必每次收到视频接入请求都要执行一次SSRC生成操作,可以加快SSRC的分配速度。由于SSRC的分配速度较快,因此加锁和释放锁之间的时长大大缩短,可以降低分配SSRC时的锁粒度和锁竞争时长,避免出现视频流接入时间过长,甚至接口超时的问题,能够应对高并发量的视频接入请求,提高视频流的接入速度,从而提高视频传输效率。It can be seen that in the embodiment of the present application, a method of pre-generating SSRC is adopted to store a batch of spare idle SSRCs in the cache. When a video access request is received, an available SSRC is selected from the cache and allocated to the video access request, without having to perform an SSRC generation operation every time a video access request is received, which can speed up the allocation of SSRC. Since the allocation speed of SSRC is fast, the time between locking and releasing the lock is greatly shortened, which can reduce the lock granularity and lock competition time when allocating SSRC, avoid the problem of too long video stream access time or even interface timeout, and can cope with high concurrent video access requests, improve the access speed of video streams, and thus improve video transmission efficiency.
图3是本申请实施例提供的一种视频流传输方法的流程图之二,如图3所示,该方法可以包括以下步骤:步骤301、步骤302、步骤303、步骤304、步骤305和步骤306;FIG3 is a second flowchart of a video stream transmission method provided by an embodiment of the present application. As shown in FIG3 , the method may include the following steps: step 301, step 302, step 303, step 304, step 305, and step 306;
在步骤301中,预先生成N个不同的SSRC,并存储于缓存中,N为正整数。In step 301, N different SSRCs are pre-generated and stored in a cache, where N is a positive integer.
在步骤302中,响应于接收到视频接入请求,获取锁,并基于获取到的锁执行加锁操作。In step 302, in response to receiving a video access request, a lock is acquired, and a locking operation is performed based on the acquired lock.
在步骤303中,查询当前缓存中空闲的SSRC个数i,与阈值M进行比较,若i小于M,则以概率[1-(i/N)]生成(N-i)个随机SSRC,将(N-i)个随机SSRC中当前未被占用的SSRC写入缓存。In step 303, the number i of free SSRCs in the current cache is queried and compared with the threshold M. If i is less than M, (N-i) random SSRCs are generated with probability [1-(i/N)], and the currently unoccupied SSRCs among the (N-i) random SSRCs are written into the cache.
本申请实施例中,可以反复执行上述步骤303,直至缓存中空闲SSRC数量大于等于M。In the embodiment of the present application, the above step 303 may be repeatedly performed until the number of idle SSRCs in the cache is greater than or equal to M.
在步骤304中,从缓存中获取一个SSRC,将该SSRC从缓存中删除,并存入持久化数据库以标记其已被占用。In step 304, an SSRC is obtained from the cache, the SSRC is deleted from the cache, and is stored in the persistent database to mark it as occupied.
在步骤305中,释放锁。In step 305, the lock is released.
在步骤306中,通知流媒体服务器准备以该SSRC收流。In step 306, the streaming media server is notified to prepare to receive the stream using the SSRC.
本申请实施例中,若流媒体服务器以该SSRC收流成功,则程序结束;若流媒体服务器以该SSRC收流失败,将该SSRC从持久化数据库中删除,即标记其为未使用。In the embodiment of the present application, if the streaming media server successfully receives the stream using the SSRC, the program ends; if the streaming media server fails to receive the stream using the SSRC, the SSRC is deleted from the persistent database, i.e., it is marked as unused.
可见,本申请实施例中,使用预生成SSRC的方式,避免了每次收到一个接入请求都需要执行一次SSRC生成操作,提高了SSRC的获取速度,减小了生成SSRC时锁的粒度,避免了在锁范围内与流媒体服务器交互,减小了锁竞争,提高了并发度,从而加快了高并发场景下的视频流接入速度,可以提高视频流的传输效率。It can be seen that in the embodiment of the present application, the method of pre-generating SSRC is used to avoid the need to perform an SSRC generation operation each time an access request is received, thereby improving the SSRC acquisition speed, reducing the granularity of the lock when generating SSRC, avoiding interaction with the streaming media server within the lock range, reducing lock contention, and improving concurrency, thereby accelerating the video stream access speed in high concurrency scenarios, and improving the transmission efficiency of the video stream.
图4是本申请实施例提供的一种视频流传输方法的流程图之三,本申请实施例中,视频传输方法可以应用于分布式部署场景,相应地,如图4所示,该方法可以包括以下
步骤:步骤401、步骤402、步骤403、步骤404、步骤405和步骤406;FIG4 is a flowchart of a video stream transmission method provided in an embodiment of the present application. In the embodiment of the present application, the video transmission method can be applied to a distributed deployment scenario. Accordingly, as shown in FIG4 , the method may include the following: Steps: step 401, step 402, step 403, step 404, step 405 and step 406;
在步骤401中,预先生成N个不同的SSRC,并存储于redis缓存中,N为正整数。In step 401, N different SSRCs are generated in advance and stored in the redis cache, where N is a positive integer.
本申请实施例中,用于存在SSRC的缓存为redis缓存,加锁操作所使用的锁为redis分布式锁,通过数据库记录第一SSRC为被占用状态。例如,通过mysql数据库记录第一SSRC为被占用状态。In the embodiment of the present application, the cache for storing SSRC is a redis cache, the lock used for the locking operation is a redis distributed lock, and the first SSRC is recorded as being in an occupied state through a database. For example, the first SSRC is recorded as being in an occupied state through a mysql database.
在步骤402中,响应于接收到视频接入请求,使用setnx命令从redis数据库获取锁并执行加锁操作。In step 402, in response to receiving a video access request, a setnx command is used to obtain a lock from a redis database and perform a locking operation.
在步骤403中,查询redis缓存中剩余的空闲SSRC个数i,与阈值M进行比较,若i小于M,则以概率[1-(i/N)]生成(N-i)个随机SSRC,将其中实际未被占用的SSRC写入redis缓存。In step 403, the number i of free SSRCs remaining in the redis cache is queried and compared with the threshold M. If i is less than M, (N-i) random SSRCs are generated with probability [1-(i/N)], and the SSRCs that are actually not occupied are written into the redis cache.
本申请实施例中,可以反复执行上述步骤403,直至缓存中空闲SSRC数量大于等于M。In the embodiment of the present application, the above step 403 may be repeatedly performed until the number of idle SSRCs in the cache is greater than or equal to M.
在步骤404中,从redis缓存中获取一个未被占用的SSRC分配给视频接入请求,将被分配的SSRC从redis缓存中删除,并存入数据库以标记该SSRC已被占用。In step 404, an unoccupied SSRC is obtained from the redis cache and allocated to the video access request, the allocated SSRC is deleted from the redis cache, and stored in the database to mark that the SSRC is occupied.
在步骤405中,释放redis锁。In step 405, the redis lock is released.
在步骤406中,通知流媒体服务器准备以该SSRC收流,若流媒体服务器以该SSRC收流成功,则程序结束;若失败,将该SSRC从数据库中删除。In step 406, the streaming media server is notified to prepare to receive the stream with the SSRC. If the streaming media server successfully receives the stream with the SSRC, the program ends; if it fails, the SSRC is deleted from the database.
可见,本申请实施例中,使用redis缓存存放空闲SSRC,使用redis的数据库记录已被使用的SSRC,并采用redis分布式锁作为加锁方式,可以应对分布式部署场景,实现分布式部署场景下视频流的高效传输。It can be seen that in the embodiment of the present application, redis cache is used to store idle SSRCs, redis database is used to record used SSRCs, and redis distributed locks are used as locking methods, which can cope with distributed deployment scenarios and achieve efficient transmission of video streams in distributed deployment scenarios.
相应于上面的方法实施例,本申请实施例还提供了一种视频流传输装置,下文描述的视频流传输装置与上文描述的视频流传输方法可相互对应参照。Corresponding to the above method embodiment, the embodiment of the present application further provides a video stream transmission device. The video stream transmission device described below and the video stream transmission method described above can refer to each other.
图5是本申请实施例提供的一种视频流传输装置的结构示意图,如图5所示,视频流传输装置500,可以包括:预处理模块501、第一处理模块502、第二处理模块503、第三处理模块504、第四处理模块505和第五处理模块506;FIG5 is a schematic diagram of the structure of a video stream transmission device provided in an embodiment of the present application. As shown in FIG5 , the video stream transmission device 500 may include: a pre-processing module 501, a first processing module 502, a second processing module 503, a third processing module 504, a fourth processing module 505 and a fifth processing module 506;
预处理模块501,用于预先生成N个不同的视频同步源SSRC,并存储于缓存中,N为正整数;The pre-processing module 501 is used to pre-generate N different video synchronization sources SSRC and store them in a cache, where N is a positive integer;
第一处理模块502,用于响应于接收到视频接入请求,执行加锁操作;A first processing module 502, configured to perform a locking operation in response to receiving a video access request;
第二处理模块503,用于确定缓存中空闲的SSRC的个数i是否小于M,若是,则执行生成SSRC的操作,并将所生成的SSRC存储于缓存中,M为正整数;The second processing module 503 is used to determine whether the number i of idle SSRCs in the cache is less than M. If so, an operation of generating SSRCs is performed and the generated SSRCs are stored in the cache, where M is a positive integer;
第三处理模块504,用于将缓存中的第一SSRC分配给视频接入请求,其中,第一
SSRC为当前未被占用的SSRC;The third processing module 504 is configured to assign the first SSRC in the cache to the video access request, wherein the first SSRC is the currently unoccupied SSRC;
第四处理模块505,用于删除缓存中第一SSRC,并记录第一SSRC为被占用状态;The fourth processing module 505 is used to delete the first SSRC in the cache and record that the first SSRC is in an occupied state;
第五处理模块506,用于执行释放锁操作,并指示流媒体服务器以第一SSRC接收视频接入请求对应的视频流。The fifth processing module 506 is used to execute a lock release operation and instruct the streaming media server to receive the video stream corresponding to the video access request with the first SSRC.
由上述实施例可见,该实施例中,预先生成N个不同的视频同步源SSRC,并存储于缓存中,N为正整数;响应于接收到视频接入请求,执行加锁操作;确定缓存中空闲的SSRC的个数i是否小于M,若是,则执行生成SSRC的操作,并将所生成的SSRC存储于缓存中,M为正整数;将缓存中的第一SSRC分配给视频接入请求,其中,第一SSRC为当前未被占用的SSRC;删除缓存中第一SSRC,并记录第一SSRC为被占用状态;执行释放锁操作,并指示流媒体服务器以第一SSRC接收视频接入请求对应的视频流。As can be seen from the above embodiment, in this embodiment, N different video synchronization source SSRCs are pre-generated and stored in the cache, where N is a positive integer; in response to receiving a video access request, a locking operation is performed; it is determined whether the number i of free SSRCs in the cache is less than M, and if so, an operation of generating SSRCs is performed, and the generated SSRCs are stored in the cache, where M is a positive integer; the first SSRC in the cache is allocated to the video access request, wherein the first SSRC is a currently unoccupied SSRC; the first SSRC in the cache is deleted, and the first SSRC is recorded as being in an occupied state; a lock release operation is performed, and the streaming media server is instructed to receive the video stream corresponding to the video access request with the first SSRC.
可见,本申请实施例中,采用预先生成SSRC的方式,在缓存中存放一批备用的空闲SSRC,在收到视频接入请求时,从缓存中选择一个可用的SSRC分配给视频接入请求,而不必每次收到视频接入请求都要执行一次SSRC生成操作,可以加快SSRC的分配速度。由于SSRC的分配速度较快,因此加锁和释放锁之间的时长大大缩短,可以降低分配SSRC时的锁粒度和锁竞争时长,避免出现视频流接入时间过长,甚至接口超时的问题,能够应对高并发量的视频接入请求,提高视频流的接入速度,从而提高视频传输效率。It can be seen that in the embodiment of the present application, a method of pre-generating SSRC is adopted to store a batch of spare idle SSRCs in the cache. When a video access request is received, an available SSRC is selected from the cache and allocated to the video access request, without having to perform an SSRC generation operation every time a video access request is received, which can speed up the allocation of SSRC. Since the allocation speed of SSRC is fast, the time between locking and releasing the lock is greatly shortened, which can reduce the lock granularity and lock competition time when allocating SSRC, avoid the problem of too long video stream access time or even interface timeout, and can cope with high concurrent video access requests, improve the access speed of video streams, and thus improve video transmission efficiency.
可选地,作为一个实施例,视频流传输装置500,还可以包括:Optionally, as an embodiment, the video stream transmission device 500 may further include:
第六处理模块,用于在流媒体服务器以第一SSRC接收视频接入请求对应的视频流失败的情况下,将第一SSRC由被占用状态修改为未被占用状态。The sixth processing module is used to change the first SSRC from an occupied state to an unoccupied state when the streaming media server fails to receive the video stream corresponding to the video access request with the first SSRC.
可选地,作为一个实施例,第二处理模块503,可以包括:Optionally, as an embodiment, the second processing module 503 may include:
第一生成子模块,用于以目标概率值生成一批SSRC,其中,目标概率值与i负相关。The first generation submodule is used to generate a batch of SSRCs with a target probability value, wherein the target probability value is negatively correlated with i.
可选地,作为一个实施例,第一生成子模块,可以包括:Optionally, as an embodiment, the first generation submodule may include:
生成单元,用于以目标概率值生成(N-i)个随机SSRC;A generating unit, for generating (N-i) random SSRCs with a target probability value;
第二处理模块503,可以包括:The second processing module 503 may include:
存储子模块,用于将所生成的(N-i)个SSRC中当前未被占用的第二SSRC存储于缓存中。The storage submodule is used to store the currently unoccupied second SSRC among the generated (N-i) SSRCs in the cache.
可选地,作为一个实施例,生成单元,可以包括:Optionally, as an embodiment, the generating unit may include:
生成子单元,用于生成随机值p,其中,p的取值介于0至1之间;A generating subunit, used for generating a random value p, wherein the value of p is between 0 and 1;
确定子单元,用于确定(i/N)是否小于p,若(i/N)小于p,则生成(N-i)个随机
SSRC。Determine the subunit, used to determine whether (i/N) is less than p. If (i/N) is less than p, then generate (Ni) random SSRC.
可选地,作为一个实施例,第二处理模块503,可以包括:Optionally, as an embodiment, the second processing module 503 may include:
第二生成子模块,用于生成(N-i)个当前未被占用的SSRC。The second generation submodule is used to generate (N-i) currently unoccupied SSRCs.
可选地,作为一个实施例,视频流传输方法可以应用于分布式部署场景;缓存为redis缓存,加锁操作所使用的锁为redis分布式锁,通过数据库记录第一SSRC为被占用状态。Optionally, as an embodiment, the video stream transmission method can be applied to a distributed deployment scenario; the cache is a redis cache, the lock used for the locking operation is a redis distributed lock, and the first SSRC is recorded in an occupied state through a database.
关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
相应于上面的方法实施例,本申请实施例还提供了一种电子设备,包括:存储器,用于存储计算机程序;处理器,用于执行计算机程序时实现上述视频流传输方法的步骤。Corresponding to the above method embodiment, an embodiment of the present application further provides an electronic device, including: a memory for storing a computer program; and a processor for implementing the steps of the above video stream transmission method when executing the computer program.
如图6所示,为电子设备的组成结构示意图,电子设备可以包括:处理器610、存储器620、通信接口630和通信总线640。处理器610、存储器620、通信接口630均通过通信总线640完成相互间的通信。As shown in FIG6 , it is a schematic diagram of the composition structure of an electronic device, which may include: a processor 610, a memory 620, a communication interface 630 and a communication bus 640. The processor 610, the memory 620 and the communication interface 630 all communicate with each other through the communication bus 640.
在本申请实施例中,处理器610可以为中央处理器(Central Processing Unit,CPU)、特定应用集成电路、数字信号处理器、现场可编程门阵列或者其他可编程逻辑器件等。In the embodiment of the present application, the processor 610 can be a central processing unit (CPU), a specific application integrated circuit, a digital signal processor, a field programmable gate array or other programmable logic devices, etc.
处理器610可以调用存储器620中存储的程序,具体的,处理器610可以执行CDN资源调度方法的实施例中的操作。The processor 610 may call a program stored in the memory 620. Specifically, the processor 610 may execute operations in an embodiment of the CDN resource scheduling method.
存储器620中用于存放一个或者一个以上程序,程序可以包括程序代码,程序代码包括计算机操作指令,在本申请实施例中,存储器620中至少存储有用于实现以下功能的程序:The memory 620 is used to store one or more programs, which may include program codes, and the program codes include computer operation instructions. In the embodiment of the present application, the memory 620 at least stores programs for implementing the following functions:
预先生成N个不同的视频同步源SSRC,并存储于缓存中,N为正整数;Generate N different video synchronization sources SSRC in advance and store them in the cache, where N is a positive integer;
响应于接收到视频接入请求,执行加锁操作;In response to receiving the video access request, performing a locking operation;
确定缓存中空闲的SSRC的个数i是否小于M,若是,则执行生成SSRC的操作,并将所生成的SSRC存储于缓存中,M为正整数;Determine whether the number i of free SSRCs in the cache is less than M. If so, perform an operation of generating SSRCs and store the generated SSRCs in the cache, where M is a positive integer;
将缓存中的第一SSRC分配给视频接入请求,其中,第一SSRC为当前未被占用的SSRC;Allocating a first SSRC in the cache to the video access request, wherein the first SSRC is a currently unoccupied SSRC;
删除缓存中第一SSRC,并记录第一SSRC为被占用状态;Delete the first SSRC in the cache and record the first SSRC as being occupied;
执行释放锁操作,并指示流媒体服务器以第一SSRC接收视频接入请求对应的视频流。A lock release operation is performed, and the streaming media server is instructed to receive the video stream corresponding to the video access request with the first SSRC.
可见,本申请实施例中,采用预先生成SSRC的方式,在缓存中存放一批备用的空闲SSRC,在收到视频接入请求时,从缓存中选择一个可用的SSRC分配给视频接入请求,而不必每次收到视频接入请求都要执行一次SSRC生成操作,可以加快SSRC的分配速
度。由于SSRC的分配速度较快,因此加锁和释放锁之间的时长大大缩短,可以降低分配SSRC时的锁粒度和锁竞争时长,避免出现视频流接入时间过长,甚至接口超时的问题,能够应对高并发量的视频接入请求,提高视频流的接入速度,从而提高视频传输效率。It can be seen that in the embodiment of the present application, a method of pre-generating SSRC is adopted to store a batch of spare idle SSRCs in the cache. When a video access request is received, an available SSRC is selected from the cache and allocated to the video access request, without having to perform an SSRC generation operation every time a video access request is received, which can speed up the allocation speed of SSRC. Since SSRC is allocated quickly, the time between locking and releasing the lock is greatly shortened, which can reduce the lock granularity and lock contention time when allocating SSRC, avoid the problem of long video stream access time or even interface timeout, and can handle high-concurrency video access requests, increase the access speed of video streams, and thus improve video transmission efficiency.
在一种可能的实现方式中,存储器620可包括存储程序区和存储数据区,其中,存储程序区可存储操作系统,以及至少一个功能所需的应用程序等;存储数据区可存储使用过程中所创建的数据。In one possible implementation, the memory 620 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function, etc.; the data storage area may store data created during use.
此外,存储器620可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件或其他易失性固态存储器件。In addition, the memory 620 may include a high-speed random access memory and may also include a non-volatile memory, such as at least one disk storage device or other volatile solid-state storage device.
通信接口630可以为通信模块的接口,用于与其他设备或者系统连接。The communication interface 630 may be an interface of a communication module, and is used to connect to other devices or systems.
当然,需要说明的是,图6所示的结构并不构成对本申请实施例中电子设备的限定,在实际应用中电子设备可以包括比图6所示的更多或更少的部件,或者组合某些部件。Of course, it should be noted that the structure shown in FIG. 6 does not constitute a limitation on the electronic device in the embodiment of the present application. In actual applications, the electronic device may include more or fewer components than those shown in FIG. 6 , or combine certain components.
相应于上面的方法实施例,本申请实施例还提供了一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,计算机程序被处理器执行时实现上述视频流传输方法的步骤。Corresponding to the above method embodiment, the embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above-mentioned video stream transmission method are implemented.
此外,需要说明的是:本申请实施例还提供了一种计算机程序产品或计算机程序,该计算机程序产品或者计算机程序可以包括计算机指令,该计算机指令可以存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器可以执行该计算机指令,使得该计算机设备执行前文所对应实施例中视频流传输方法的描述,因此,这里将不再进行赘述。另外,对采用相同方法的有益效果描述,也不再进行赘述。对于本申请所涉及的计算机程序产品或者计算机程序实施例中未披露的技术细节,请参照本申请方法实施例的描述。In addition, it should be noted that: the embodiment of the present application also provides a computer program product or a computer program, which may include computer instructions, and the computer instructions may be stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor may execute the computer instructions so that the computer device executes the description of the video streaming transmission method in the corresponding embodiment of the foregoing text, so it will not be repeated here. In addition, the description of the beneficial effects of adopting the same method will not be repeated. For technical details not disclosed in the computer program product or computer program embodiment involved in this application, please refer to the description of the method embodiment of this application.
本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其它实施例的不同之处,各个实施例之间相同或相似部分互相参见即可。专业人员还可以进一步意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referred to each other. Professionals can also further realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, computer software or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to the function. Whether these functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.
结合本文中所公开的实施例描述的方法或算法的步骤可以直接用硬件、处理器执行
的软件模块,或者二者的结合来实施。软件模块可以置于随机存储器(RAM)、内存、只读存储器(ROM)、电可编程ROM、电可擦除可编程ROM、寄存器、硬盘、可移动磁盘、CD-ROM、或技术领域内所公知的任意其它形式的存储介质中。The steps of the method or algorithm described in the embodiments disclosed herein can be directly executed by hardware or a processor. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的技术方案及其核心思想。应当指出,对于本技术领域的普通技术人员来说,在不脱离本申请原理的前提下,还可以对本申请进行若干改进和修饰,这些改进和修饰也落入本申请权利要求的保护范围内。
Specific examples are used herein to illustrate the principles and implementation methods of the present application, and the description of the above embodiments is only used to help understand the technical solution and core ideas of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.
Claims (15)
- 一种视频流传输方法,其特征在于,所述方法包括:A video stream transmission method, characterized in that the method comprises:预先生成N个不同的视频同步源SSRC,并存储于缓存中,N为正整数;Generate N different video synchronization sources SSRC in advance and store them in the cache, where N is a positive integer;响应于接收到视频接入请求,执行加锁操作;In response to receiving the video access request, performing a locking operation;确定所述缓存中空闲的SSRC的个数i是否小于M,若是,则执行生成SSRC的操作,并将所生成的SSRC存储于所述缓存中,M为正整数;Determine whether the number i of idle SSRCs in the cache is less than M, and if so, perform an operation of generating SSRCs and store the generated SSRCs in the cache, where M is a positive integer;将所述缓存中的第一SSRC分配给所述视频接入请求,其中,所述第一SSRC为当前未被占用的SSRC;Allocating a first SSRC in the cache to the video access request, wherein the first SSRC is a currently unoccupied SSRC;删除所述缓存中所述第一SSRC,并记录所述第一SSRC为被占用状态;Deleting the first SSRC in the cache, and recording that the first SSRC is in an occupied state;执行释放锁操作,并指示流媒体服务器以所述第一SSRC接收所述视频接入请求对应的视频流。A lock release operation is performed, and a streaming media server is instructed to receive a video stream corresponding to the video access request using the first SSRC.
- 根据权利要求1所述的方法,其特征在于,所述指示流媒体服务器以所述第一SSRC接收所述视频接入请求对应的视频流之后,还包括:The method according to claim 1, characterized in that after instructing the streaming media server to receive the video stream corresponding to the video access request with the first SSRC, it also includes:在所述流媒体服务器以所述第一SSRC接收所述视频接入请求对应的视频流失败的情况下,将所述第一SSRC由被占用状态修改为未被占用状态。In the case that the streaming media server fails to receive the video stream corresponding to the video access request with the first SSRC, the first SSRC is changed from an occupied state to an unoccupied state.
- 根据权利要求1所述的方法,其特征在于,所述执行生成SSRC的操作,包括:The method according to claim 1, wherein the step of generating an SSRC comprises:以目标概率值生成一批SSRC,其中,所述目标概率值与所述i负相关。A batch of SSRCs is generated with a target probability value, wherein the target probability value is negatively correlated with the i.
- 根据权利要求3所述的方法,其特征在于,所述以目标概率值生成一批SSRC,包括:The method according to claim 3, wherein generating a batch of SSRCs with a target probability value comprises:以所述目标概率值生成(N-i)个随机SSRC;Generate (N-i) random SSRCs with the target probability value;所述将所生成的SSRC存储于所述缓存中,包括:The storing the generated SSRC in the cache includes:将所生成的所述(N-i)个SSRC中当前未被占用的第二SSRC存储于所述缓存中。The second SSRC that is not currently occupied among the generated (N-i) SSRCs is stored in the buffer.
- 根据权利要求4所述的方法,其特征在于,所述以所述目标概率值生成(N-i)个随机SSRC,包括:The method according to claim 4, characterized in that the generating (N-i) random SSRCs with the target probability value comprises:生成随机值p,其中,所述p的取值介于0至1之间;Generate a random value p, where the value of p is between 0 and 1;确定(i/N)是否小于所述p,若所述(i/N)小于所述p,则生成(N-i)个随机SSRC。Determine whether (i/N) is less than the p, and if the (i/N) is less than the p, generate (N-i) random SSRCs.
- 根据权利要求1所述的方法,其特征在于,所述执行生成SSRC的操作,包括:The method according to claim 1, wherein the step of generating an SSRC comprises:生成(N-i)个当前未被占用的SSRC。Generate (N-i) currently unoccupied SSRCs.
- 根据权利要求1-6任一项所述的方法,其特征在于,所述视频流传输方法应用于分布式部署场景;所述缓存为redis缓存,所述加锁操作所使用的锁为redis分布式锁,通过数据库记录所述第一SSRC为被占用状态。 The method according to any one of claims 1 to 6 is characterized in that the video stream transmission method is applied to a distributed deployment scenario; the cache is a redis cache, the lock used for the locking operation is a redis distributed lock, and the first SSRC is recorded in an occupied state through a database.
- 一种视频流传输装置,其特征在于,所述装置包括:A video stream transmission device, characterized in that the device comprises:预处理模块,用于预先生成N个不同的视频同步源SSRC,并存储于缓存中,N为正整数;A preprocessing module, used for pre-generating N different video synchronization sources SSRC and storing them in a cache, where N is a positive integer;第一处理模块,用于响应于接收到视频接入请求,执行加锁操作;A first processing module, configured to perform a locking operation in response to receiving a video access request;第二处理模块,用于确定所述缓存中空闲的SSRC的个数i是否小于M,若是,则执行生成SSRC的操作,并将所生成的SSRC存储于所述缓存中,M为正整数;A second processing module, configured to determine whether the number i of idle SSRCs in the cache is less than M, and if so, to generate an SSRC and store the generated SSRC in the cache, where M is a positive integer;第三处理模块,用于将所述缓存中的第一SSRC分配给所述视频接入请求,其中,所述第一SSRC为当前未被占用的SSRC;A third processing module, configured to allocate a first SSRC in the cache to the video access request, wherein the first SSRC is a currently unoccupied SSRC;第四处理模块,用于删除所述缓存中所述第一SSRC,并记录所述第一SSRC为被占用状态;a fourth processing module, configured to delete the first SSRC in the cache and record that the first SSRC is in an occupied state;第五处理模块,用于执行释放锁操作,并指示流媒体服务器以所述第一SSRC接收所述视频接入请求对应的视频流。The fifth processing module is used to execute a lock release operation and instruct the streaming media server to receive the video stream corresponding to the video access request with the first SSRC.
- 根据权利要求8所述的装置,其特征在于,所述装置还包括:The device according to claim 8, characterized in that the device further comprises:第六处理模块,用于在所述流媒体服务器以所述第一SSRC接收所述视频接入请求对应的视频流失败的情况下,将所述第一SSRC由被占用状态修改为未被占用状态。The sixth processing module is used to change the first SSRC from an occupied state to an unoccupied state when the streaming media server fails to receive the video stream corresponding to the video access request with the first SSRC.
- 根据权利要求8所述的装置,其特征在于,所述第二处理模块包括:The device according to claim 8, wherein the second processing module comprises:第一生成子模块,用于以目标概率值生成一批SSRC,其中,所述目标概率值与所述i负相关。The first generating submodule is used to generate a batch of SSRCs with a target probability value, wherein the target probability value is negatively correlated with the i.
- 根据权利要求10所述的装置,其特征在于,所述第一生成子模块包括:The device according to claim 10, characterized in that the first generation submodule comprises:生成单元,用于以所述目标概率值生成(N-i)个随机SSRC;A generating unit, configured to generate (N-i) random SSRCs with the target probability value;所述第二处理模块包括:The second processing module comprises:存储子模块,用于将所生成的所述(N-i)个SSRC中当前未被占用的第二SSRC存储于所述缓存中。The storage submodule is used to store the currently unoccupied second SSRC among the generated (N-i) SSRCs in the cache.
- 根据权利要求11所述的装置,其特征在于,所述生成单元包括:The device according to claim 11, characterized in that the generating unit comprises:生成子单元,用于生成随机值p,其中,所述p的取值介于0至1之间;A generating subunit, used to generate a random value p, wherein the value of p is between 0 and 1;确定子单元,用于确定(i/N)是否小于所述p,若所述(i/N)小于所述p,则生成(N-i)个随机SSRC。The determination subunit is used to determine whether (i/N) is less than the p. If the (i/N) is less than the p, (N-i) random SSRCs are generated.
- 根据权利要求8所述的装置,其特征在于,所述第二处理模块包括:The device according to claim 8, wherein the second processing module comprises:第二生成子模块,用于生成(N-i)个当前未被占用的SSRC。The second generation submodule is used to generate (N-i) currently unoccupied SSRCs.
- 一种电子设备,包括存储器、处理器及存储在存储器上的计算机程序,其特征在于,所述处理器执行所述计算机程序以实现权利要求1-7任一项所述的方法。 An electronic device comprises a memory, a processor and a computer program stored in the memory, wherein the processor executes the computer program to implement the method according to any one of claims 1 to 7.
- 一种计算机可读存储介质,其上存储有计算机程序/指令,其特征在于,该计算机程序/指令被处理器执行时实现权利要求1-7任一项所述的方法。 A computer-readable storage medium having a computer program/instruction stored thereon, characterized in that when the computer program/instruction is executed by a processor, the method described in any one of claims 1 to 7 is implemented.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310042919.6A CN116074553B (en) | 2023-01-28 | 2023-01-28 | Video stream transmission method, device, electronic equipment and storage medium |
CN202310042919.6 | 2023-01-28 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2024156239A1 true WO2024156239A1 (en) | 2024-08-02 |
Family
ID=86181592
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2023/140372 WO2024156239A1 (en) | 2023-01-28 | 2023-12-20 | Video streaming transmission method and apparatus, electronic device, and storage medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN116074553B (en) |
WO (1) | WO2024156239A1 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116074553B (en) * | 2023-01-28 | 2023-06-23 | 天翼云科技有限公司 | Video stream transmission method, device, electronic equipment and storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1750505A (en) * | 2004-09-16 | 2006-03-22 | 华为技术有限公司 | Method for identifying sender based on real-time transmission protocol |
US20140111603A1 (en) * | 2012-10-20 | 2014-04-24 | Microsoft Corporation | Routing For Video in Conferencing |
CN104079870A (en) * | 2013-03-29 | 2014-10-01 | 杭州海康威视数字技术股份有限公司 | Video monitoring method and system for single-channel video and multiple-channel audio frequency |
US20170374633A1 (en) * | 2015-03-12 | 2017-12-28 | Huawei Technologies Co., Ltd. | Real-time transport protocol rtp packet transmission method and apparatus |
CN115174539A (en) * | 2022-06-28 | 2022-10-11 | 上海网达软件股份有限公司 | Security video stream transmission method, system, equipment and storage medium |
CN116074553A (en) * | 2023-01-28 | 2023-05-05 | 天翼云科技有限公司 | Video stream transmission method, device, electronic equipment and storage medium |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104660546B (en) * | 2013-11-18 | 2018-01-19 | 北京信威通信技术股份有限公司 | A kind of method of the transmitting-receiving RTP bags based on SSRC |
CN104270594B (en) * | 2014-09-24 | 2018-11-09 | 大唐移动通信设备有限公司 | The method and apparatus that data packet sends and receives |
CN111770067B (en) * | 2020-06-12 | 2022-07-19 | 浪潮通用软件有限公司 | Security video acquisition method, device and system based on Internet of things |
-
2023
- 2023-01-28 CN CN202310042919.6A patent/CN116074553B/en active Active
- 2023-12-20 WO PCT/CN2023/140372 patent/WO2024156239A1/en unknown
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1750505A (en) * | 2004-09-16 | 2006-03-22 | 华为技术有限公司 | Method for identifying sender based on real-time transmission protocol |
US20140111603A1 (en) * | 2012-10-20 | 2014-04-24 | Microsoft Corporation | Routing For Video in Conferencing |
CN104079870A (en) * | 2013-03-29 | 2014-10-01 | 杭州海康威视数字技术股份有限公司 | Video monitoring method and system for single-channel video and multiple-channel audio frequency |
US20170374633A1 (en) * | 2015-03-12 | 2017-12-28 | Huawei Technologies Co., Ltd. | Real-time transport protocol rtp packet transmission method and apparatus |
CN115174539A (en) * | 2022-06-28 | 2022-10-11 | 上海网达软件股份有限公司 | Security video stream transmission method, system, equipment and storage medium |
CN116074553A (en) * | 2023-01-28 | 2023-05-05 | 天翼云科技有限公司 | Video stream transmission method, device, electronic equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN116074553A (en) | 2023-05-05 |
CN116074553B (en) | 2023-06-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108647104B (en) | Request processing method, server and computer readable storage medium | |
CN105511954B (en) | Message processing method and device | |
CN107241281B (en) | Data processing method and device | |
WO2024156239A1 (en) | Video streaming transmission method and apparatus, electronic device, and storage medium | |
US20160371122A1 (en) | File processing workflow management | |
US10455264B2 (en) | Bulk data extraction system | |
CN113918101B (en) | Method, system, equipment and storage medium for writing data cache | |
JP2007079789A (en) | Computer system and event processing method | |
CN107341062B (en) | Data pushing method, device, equipment and storage medium | |
CN104620558A (en) | System and method for supporting message pre-processing in a distributed data grid cluster | |
US9836516B2 (en) | Parallel scanners for log based replication | |
WO2021159831A1 (en) | Programming platform user code running method, platform, node, device and medium | |
US7552232B2 (en) | Speculative method and system for rapid data communications | |
CN108519987A (en) | A kind of data persistence method and apparatus | |
WO2023160092A1 (en) | Method for processing blockchain transactions, and blockchain node and electronic device | |
CN111831408A (en) | Asynchronous task processing method and device, electronic equipment and medium | |
US8775767B2 (en) | Method and system for allocating memory to a pipeline | |
CN110445580A (en) | Data transmission method for uplink and device, storage medium, electronic device | |
CN114218135A (en) | Source end flow control method and system based on Redis cache | |
US6868437B1 (en) | System and method for interprocess communication of remote procedure call messages utilizing shared memory | |
US10110670B2 (en) | Allocation of service endpoints to servers | |
WO2022151766A1 (en) | Io request pipeline processing device, method and system, and storage medium | |
CN112181737B (en) | Message processing method, device, electronic equipment and medium | |
CN114090409A (en) | Message processing method and device | |
CN112003860B (en) | Memory management method, system and medium suitable for remote direct memory access |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 23918239 Country of ref document: EP Kind code of ref document: A1 |