Video stream management method and device based on intelligent computing power and medium
Through the intelligent computing resource management platform, multi-protocol streaming, hybrid transcoding, intelligent streaming push and multi-process streaming push technologies are adopted to solve the problems of low resource utilization efficiency and poor stability in video stream management and streaming push in ministerial video network monitoring, and achieve stable, flexible and standardized push of video streams.
Patent Information
- Application Number
- CN202411618519.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-13
- Publication Date
- 2025-03-07
AI Technical Summary
The prior art is difficult to meet the application needs of ministerial video network monitoring, especially in the management and streaming process of video streaming, there are problems of low resource utilization efficiency and poor stability.
The video stream management method based on intelligent computing power is adopted, and the video streaming management and pushing is achieved through technologies such as multi-protocol streaming, hybrid transcoding, intelligent streaming and multi-process streaming. This method can determine the resource number based on the received superior platform review application, select appropriate streaming protocol and transcoding mode, generate standard video streams, and push them to the superior platform through multiple processes.
It realizes the stable, flexible and standardized push of video streams, maximizes the use of physical resources, improves the stability and resource utilization efficiency of the system, and meets the needs of ministerial-level video network monitoring.
Smart Images

Figure CN119583523A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of audio and video streaming technology, and more specifically, to a video stream management method, device and medium based on intelligent computing power. Background Art
[0002] In recent years, video surveillance technology has been widely used in various fields of society, especially in road information collection. As a key means, it provides road managers with indispensable real-time control capabilities by virtue of its real-time and intuitive nature. The main applications of this technology are reflected in the following aspects:
[0003] First, it supports traffic guidance. Through remote video monitoring, this application can collect road condition information and weather information in real time, providing solid data support for traffic guidance.
[0004] Secondly, the technology has the function of post-event evidence collection. This application stores video image data of daily work and vehicles entering and leaving roads, toll station lanes, toll booths and other areas, so as to query and collect evidence in emergencies such as traffic accidents and vehicle clearance.
[0005] Furthermore, video surveillance plays an important role in emergency command. In the event of sudden traffic accidents, it can monitor in real time and provide timely and accurate information support for remote emergency command.
[0006] Finally, the technology also enables work supervision, which forms an invisible supervision on toll collectors, prompting them to strictly discipline themselves and provide better services.
[0007] However, how to meet the application needs of department-level video network monitoring has become a technical problem that needs to be solved urgently. Summary of the invention
[0008] In view of the deficiencies in the prior art, the present invention provides a video stream management method, device and medium based on intelligent computing power.
[0009] According to one aspect of the present invention, a video stream management method based on intelligent computing power is provided, comprising:
[0010] Determine the resource number for application based on the application received from the superior platform;
[0011] Determine the video source to be applied for according to the application resource number, and obtain the video stream from the video platform according to the pull stream protocol corresponding to the video source;
[0012] Determine the push mode of the video stream. If the push mode does not require transcoding, use multiple processes to push the video stream to the upper-level platform.
[0013] If the streaming mode requires transcoding, select the transcoding mode based on the current status of physical computing resources;
[0014] According to the requirements of the access application, the video stream is transcoded according to the transcoding mode to generate a standard video stream, and the standard video stream is pushed to the superior platform using multiple processes.
[0015] Optionally, the streaming protocols include GB28181, Onvif, RTSP, private protocols and SDK.
[0016] Optionally, determining a streaming mode of the video stream includes:
[0017] If the access request is for a non-4M bitstream, the push mode of the video stream is determined to require transcoding;
[0018] If the access request is for 4M bitstream, but the original video bitstream is not 4M bitstream, the push mode of the video stream is determined to require transcoding;
[0019] If the access request is for a 4M bitstream and the original video is a 4M bitstream, the push mode of the video stream is determined to be no need for transcoding.
[0020] Optionally, the transcoding mode includes a GPU transcoding mode, a CPU transcoding mode, and a CPU+GPU hybrid transcoding mode.
[0021] Optionally, the video stream is transcoded according to the transcoding mode according to the requirements of the access application to generate a standard video stream, including:
[0022] When the requirement of the access application is that the road traffic condition is smooth and the traffic volume is sparse, the video stream is transcoded according to the GPU transcoding mode to generate a standard video stream;
[0023] When the access application requires a major holiday, a historical peak congestion period, or when real-time congestion detection triggers an alarm, the video stream is transcoded according to the CPU transcoding mode to generate a standard video stream;
[0024] When the requirements of the review application involve complex scenarios such as major accident handling, comprehensive support in special periods, and comprehensive emergency command and dispatch, the video stream is transcoded according to the CPU+GPU hybrid transcoding mode to generate a standard video stream.
[0025] According to another aspect of the present invention, there is provided a video stream management device based on intelligent computing power, comprising:
[0026] The determination module is used to determine the application resource number according to the application received from the upper-level platform;
[0027] The acquisition module is used to determine the video source to be applied for according to the application resource number, and obtain the video stream from the video platform according to the pull stream protocol corresponding to the video source;
[0028] The push module is used to determine the push mode of the video stream. If the push mode does not require transcoding, the video stream is pushed to the upper platform using multiple processes;
[0029] A selection module is used to select a transcoding mode according to the current status of physical computing resources if the streaming mode requires transcoding;
[0030] The generation module is used to transcode the video stream according to the transcoding mode in accordance with the requirements of the access application, generate a standard video stream, and use multiple processes to push the standard video stream to the superior platform.
[0031] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the storage medium stores a computer program, and the computer program is used to execute the method described in any one of the above aspects of the present invention.
[0032] According to another aspect of the present invention, an electronic device is provided, comprising: a processor; a memory for storing instructions executable by the processor; the processor is configured to read the executable instructions from the memory and execute the instructions to implement the method described in any one of the above aspects of the present invention.
[0033] Therefore, the video stream management method based on intelligent computing power provided by the present invention has the capabilities of multi-protocol streaming, hybrid transcoding, intelligent streaming and multi-process streaming, which can maximize the use of physical resources and provide stable, flexible and standard video stream support services for the top-level platform. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] A more complete understanding of exemplary embodiments of the present invention may be obtained by referring to the following drawings:
[0035] Figure 1 is a flowchart of a video stream management method based on intelligent computing power provided by an exemplary embodiment of the present invention;
[0036] Figure 2 It is a schematic diagram of the implementation structure of a video stream management method based on intelligent computing power provided by an exemplary embodiment of the present invention;
[0037] Figure 3 It is a schematic diagram of compatibility of multi-protocol streaming protocols provided by an exemplary embodiment of the present invention;
[0038] Figure 4 It is a schematic diagram of handling abnormal multi-protocol streaming provided by an exemplary embodiment of the present invention;
[0039] Figure 5 It is a schematic diagram of an intelligent selection streaming mode provided by an exemplary embodiment of the present invention;
[0040] Figure 6 It is a logical schematic diagram of CPU+GPU hybrid transcoding provided by an exemplary embodiment of the present invention;
[0041] Figure 7 is a schematic diagram of low-load GPU transcoding provided by an exemplary embodiment of the present invention;
[0042] Figure 8 is a schematic diagram of high-load hybrid transcoding provided by an exemplary embodiment of the present invention;
[0043] Fig. 9 is a schematic diagram of overload hybrid transcoding provided by an exemplary embodiment of the present invention;
[0044] Fig.10 It is a logical structure diagram of a multi-process streaming diagram provided by an exemplary embodiment of the present invention;
[0045] Fig.11 This is a schematic diagram of independent operation of multi-process streaming provided by an exemplary embodiment of the present invention;
[0046] Fig.12 This is a schematic diagram of handling multi-process streaming exceptions provided by an exemplary embodiment of the present invention;
[0047] Fig.13 This is a schematic diagram of multi-process streaming computing resource allocation provided by an exemplary embodiment of the present invention;
[0048] Fig.14 It is a schematic diagram of multi-process streaming resource expansion provided by an exemplary embodiment of the present invention;
[0049] Fig.15 is a structural diagram of a video stream management device based on intelligent computing power provided by an exemplary embodiment of the present invention;
[0050] Fig.16 This is a structure of an electronic device provided by an exemplary embodiment of the present invention. DETAILED DESCRIPTION
[0051] Below, the exemplary embodiments according to the present invention will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments of the present invention, and it should be understood that the present invention is not limited to the exemplary embodiments described here.
[0052] It should be noted that the relative arrangement of components and steps, the numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present invention unless specifically stated otherwise.
[0053] Those skilled in the art can understand that the terms "first" and "second" in the embodiments of the present invention are only used to distinguish different steps, devices or modules, etc., and neither represent any specific technical meaning nor indicate the necessary logical order between them.
[0054] It should also be understood that, in the embodiments of the present invention, “plurality” may refer to two or more than two, and “at least one” may refer to one, two or more than two.
[0055] It should also be understood that any component, data or structure mentioned in the embodiments of the present invention can generally be understood as one or more, unless explicitly limited or otherwise indicated in the context.
[0056] In addition, the term "and / or" in the present invention is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in the present invention generally indicates that the associated objects before and after are in an "or" relationship.
[0057] It should also be understood that the description of the various embodiments of the present invention focuses on the differences between the various embodiments, and the same or similar aspects thereof can be referenced to each other, and for the sake of brevity, they will not be described one by one.
[0058] At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.
[0059] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses.
[0060] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered part of the specification.
[0061] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.
[0062] Embodiments of the present invention can be applied to electronic devices such as terminal devices, computer systems, servers, etc., which can operate with many other general or special computing system environments or configurations. Examples of well-known terminal devices, computing systems, environments and / or configurations suitable for use with electronic devices such as terminal devices, computer systems, servers, etc. include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, handheld or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, network personal computers, small computer systems, large computer systems, and distributed cloud computing technology environments including any of the above systems, etc.
[0063] Electronic devices such as terminal devices, computer systems, servers, etc. can be described in the general context of computer system executable instructions (such as program modules) executed by computer systems. Generally, program modules can include routines, programs, object programs, components, logic, data structures, etc., which perform specific tasks or implement specific abstract data types. Computer systems / servers can be implemented in a distributed cloud computing environment, where tasks are performed by remote processing devices linked through a communication network. In a distributed cloud computing environment, program modules can be located on local or remote computing system storage media including storage devices.
[0064] Exemplary Methods
[0065] Figure 1 FIG. 1 is a flow chart of a video stream management method based on intelligent computing power provided by an exemplary embodiment of the present invention. This embodiment can be applied to electronic devices, such as Figure 1 As shown, the video stream management method 100 based on intelligent computing power includes the following steps:
[0066] Step 101, determine the application resource number according to the application received from the upper-level platform;
[0067] Step 102, determining the video source to be applied for according to the application resource number, and obtaining the video stream from the video platform according to the stream pulling protocol corresponding to the video source;
[0068] Step 103, determining the push mode of the video stream, and if the push mode does not require transcoding, using multiple processes to push the video stream to the upper platform;
[0069] Step 104: If the streaming mode requires transcoding, select the transcoding mode according to the current status of physical computing resources;
[0070] Step 105, transcode the video stream according to the transcoding mode according to the requirements of the access application, generate a standard video stream, and use multiple processes to push the standard video stream to the superior platform.
[0071] Specifically, in view of how to meet the application requirements of ministerial-level video network monitoring in the background technology, this application has built a cloud platform to realize the aggregation and networking application of video monitoring equipment resources along the national highways through cloud services. In order to connect with camera equipment of different manufacturers and models, this application adopts a unified and standard video compression format and transmission protocol to push the video stream to the provincial cloud platform or ministerial cloud platform. At the same time, in order to ensure the stability of the system, this application has carried out relevant testing work.
[0072] The present invention is based on an intelligent computing resource management platform, and has the capabilities of multi-protocol streaming, hybrid transcoding, intelligent streaming and multi-process streaming. It can make the most of physical resources and provide stable, flexible and standard video streaming support services for the top-level platform.
[0073] refer to Figure 2 As shown, the specific execution process is as follows:
[0074] 1. Access application: After receiving the access application from the upper-level platform, the streaming service is started, and the video resource application will be made to the video platform according to the application resource number;
[0075] 2. Multi-protocol streaming: According to application requirements, different protocols are used according to different video sources to obtain video streams from the video platform;
[0076] 3. Intelligent streaming mode adaptation: After obtaining the video stream, the platform determines the streaming mode. If transcoding is not required, it will jump to step 5 to directly stream, saving transcoding resources; if transcoding is required, it will go to step 4;
[0077] 4. CPU+GPU transcoding adaptation: When the streaming determines that the video needs to be transcoded, the transcoding mode (GPU transcoding, CPU+GPU hybrid transcoding) is automatically selected according to the current status of physical computing resources, and the video is transcoded according to the access application requirements to generate a standard video stream;
[0078] 5. Multi-process streaming: Apply for the streaming process for this application, establish an independent streaming process, and push the standard stream to the superior platform.
[0079] 1. Technical solution for multi-protocol pull:
[0080] In promoting the overall layout of information construction in various units, we are faced with the challenge of effectively integrating various centers. In this process, the systems and equipment in each area need to be smoothly connected with different manufacturers, platforms, and equipment. Therefore, the system must support standard protocols such as GB28181, Onvif, and RTSP to ensure compatibility. In certain situations, the system should also have the ability to support manufacturer private protocols to meet the needs of different scenarios, such as Figure 3 shown.
[0081] The advantages of using multi-protocol streaming are as follows:
[0082] 1. In terms of ease of deployment, the system, with its excellent flexibility and adaptability, can perform meticulous analysis and judgment on various on-site environments. It can independently select the most appropriate communication protocol for different manufacturers' platforms and equipment to achieve seamless docking. This process does not require tedious manual settings, and the system completes it autonomously, greatly improving deployment efficiency and speed. This intelligent deployment method not only saves human resources, but also reduces the risk of errors, making the system more stable and efficient.
[0083] 2. In terms of stability, the system also demonstrates excellent performance. When the video platform encounters a failure or transmission delay is serious, the system can respond quickly and automatically switch to the direct-connected camera without manual intervention, ensuring system stability and reliability. In addition, the system supports a variety of protocols, such as Onvif, RTSP, etc., which can be flexibly selected according to actual conditions to ensure the stability and smoothness of video transmission. This highly intelligent system design enables the video surveillance system to cope with various emergencies with ease, ensuring the continuity and effectiveness of video surveillance, such as Figure 4 shown.
[0084] 2. Technical solutions for intelligent streaming mode adaptation:
[0085] According to the new version of the "Implementation Plan for Optimizing and Improving Video Monitoring on National Highways", it is necessary to ensure that the same camera can push streams at 128k for 24 hours without interruption, and support pushing 1M, 4M and original bitrates according to needs. In actual applications, most cameras use 1080P resolution and 4M bitrate, and use 264 encoding technology, such as Figure 5 shown.
[0086] 1. When the upper-level system requests to access non-4M code streams, the system transcodes and compresses according to the conventional strategy and pushes it to the upper-level platform.
[0087] 2. When the upper system requests to access the 4M code stream, the system will automatically detect and confirm whether the received code stream meets the requirements of 264 encoding, 1080P resolution and 4M code stream. Once confirmed, the system will directly push the original code stream to the upper system without additional transcoding processing. This optimization solution significantly reduces the consumption of transcoding resources, thereby improving the stability and operating efficiency of the entire system.
[0088] 3. Technical solution of CPU+GPU hybrid transcoding:
[0089] The system has a highly intelligent monitoring mechanism that can track and monitor the operating status of the central processing unit (CPU) and graphics processing unit (GPU) in real time. The system conducts in-depth analysis and evaluation of the utilization of these two core components to fully understand their performance and working status. On this basis, the system also incorporates real-time road traffic data and historical holiday road congestion information. Through comprehensive data analysis, the system can more accurately predict and judge potential traffic conditions, thereby realizing dynamic allocation of GPU and CPU resources.
[0090] This intelligent resource allocation mechanism flexibly adjusts the system resource allocation strategy based on actual needs and expected goals. During peak traffic hours or on certain holidays, when traffic volume increases, the system will automatically allocate more resources to the GPU to meet the high demand for graphics processing and computing, ensuring that the user experience is not affected. During periods of low traffic volume, the system will reduce its reliance on GPU resources and instead make greater use of CPU resources to optimize energy consumption and improve the overall operating efficiency of the system. Through this intelligent resource management solution, the system always maintains an efficient operating state, ensuring the rational use of resources and the optimization of costs. The logic diagram is as follows Figure 6 shown.
[0091] When the superior reviews the video, refer to Figure 7 As shown, the scheduling strategy process is as follows:
[0092] 1. When the road traffic condition is judged to be smooth and the traffic volume is sparse, the system performs monitoring and analysis based on AI computing power. Given that the platform GPU computing power load is at a low level at this time, the system will directly select the GPU transcoding solution to improve efficiency.
[0093] 2.Reference Figure 8 As shown in the figure, during major holidays, historical peak congestion periods, or when real-time congestion detection triggers an alarm, AI computing power monitoring and analysis will show that the GPU computing power in the system is close to the critical point. To ensure stable operation of the system, the platform will quickly switch to CPU transcoding mode to effectively balance the computing power load and avoid resource bottlenecks.
[0094] 3.Reference Fig. 9 As shown in the figure, for complex scenarios involving major accident handling, comprehensive support during special periods, and comprehensive emergency command and dispatch, since such scenarios require multi-party coordination and many triggering factors, once the utilization of the platform's GPU and CPU reaches the critical value, the system will automatically enable backup computing resources to meet the superior's temporary review needs. At the same time, the system will feedback the current status to the superior: "Due to the current resource shortage, the review request will reach a critical point. Please release unnecessary preview resources in time."
[0095] 4. Technical solution for multi-process streaming service:
[0096] By implementing multi-process technology, an independent process is assigned to each video stream to achieve efficient resource utilization. This is intended to give full play to the synergy between multi-core processors and processes, thereby significantly improving the efficiency of video streaming. This method effectively utilizes computer hardware resources, making the push of video streams faster and more stable, thereby optimizing the user's viewing experience. In addition, the parallel processing capability of multiple processes enables the entire system to show higher reliability and robustness, and maintain excellent performance even under high load conditions. In summary, the use of multi-process technology for video stream push not only improves efficiency, but also significantly enhances the stability and reliability of the system. It is an extremely effective technical strategy.
[0097] The application value of multi-process streaming includes:
[0098] 1. With the widespread popularity of personal cars, road pressure has increased significantly and traffic incidents have occurred frequently. When responding to emergency situations such as event alerts, remote dispatch and emergency command, multiple units need to work together, which puts higher requirements on the concurrent stability of video on demand, such as Fig.11 shown.
[0099] In order to optimize concurrent processing capabilities, a unique architecture design is adopted: ensuring that each service process responsible for video streaming runs independently, avoiding the sharing of memory resources, and effectively solving the lock competition problem between multiple processes. This design not only successfully avoids the common performance bottlenecks in multi-threaded programs, but also significantly simplifies the complexity of data synchronization between different processes, so that the efficiency of multi-task parallel processing is significantly improved. When faced with a situation where the number of tasks increases sharply, each independent process can operate in parallel without interfering with each other, thereby efficiently responding to a large number of concurrent requests and ensuring the continuous and stable operation of the system.
[0100] 2. In view of the wide distribution of global monitoring points and the popularization of the network, each unit has diversified its attention to monitoring events. In order to avoid resource conflicts, a multi-process management mode is introduced to independently and isolatedly handle various transcoding applications. This measure ensures that monitoring resources between different events do not interfere with each other, and guarantees the stable and efficient operation of the monitoring system. Fig.12 shown.
[0101] Each streaming process runs independently in its own memory space and does not interfere with each other. Even if a process crashes due to an exception, it will not directly cause a chain reaction on other processes. This design ensures that when a process terminates due to an error or exception, it only affects the streaming task it is responsible for, thereby greatly reducing the impact on the entire system and significantly improving the robustness and stability of the system. This is undoubtedly crucial for maintaining the continuous availability of services.
[0102] 3. The operation requirements of each stage of system operation are different, and the computing power is significantly affected by dynamic, random and human factors. During major events or special periods, the demand for video review surges, while daily monitoring is relatively stable. Resource optimization strategies can achieve efficient and dynamic allocation of system resources to ensure that the system performance is maximized in various situations, such as Fig.13 shown.
[0103] To improve resource utilization efficiency, on the technical level, by effectively utilizing the multi-core processor capabilities of modern computers, multiple streaming processes can be run simultaneously, or multiplexing technology can be used to optimize resource utilization. This not only fully utilizes hardware resources and reduces idle CPU and GPU resources, but also reduces the resource consumption of a single task while ensuring streaming quality, significantly improving the resource utilization efficiency of the entire system.
[0104] 4. When facing special events such as multi-regional congestion, road section event monitoring and alarm, and large-scale emergency response drills, resource retrieval may encounter bottlenecks. In order to maintain the stability of video calls, the platform will perform intelligent self-optimization and dynamic expansion based on the actual situation of current computing resources, thereby ensuring the efficiency and smoothness of the entire video call process. Fig.14 shown.
[0105] To optimize system scalability, the system has the ability to perceive the CPU and GPU load in real time, so that it can dynamically adjust the number of streaming processes. When the hardware resource utilization rate increases, the system will automatically increase the number of processes to cope with the increase in workload; when the resource utilization rate is low, the number of processes will be reduced accordingly to effectively avoid resource waste. This intelligent expansion strategy not only enables the system to self-optimize according to actual work needs and resource conditions, but also significantly enhances the system's elastic scaling capabilities, greatly improves management efficiency, and significantly reduces the need for manual intervention.
[0106] Thus, the intelligent computing power resource management method provided by the present invention, after receiving the application for access from the superior platform, starts the stream pulling service, and applies for video resources to the video platform according to the application resource number; according to the application requirements, different protocols are adopted according to different video sources to obtain video streams from the video platform; after obtaining the video stream, the platform judges the push stream mode, and if no transcoding is required, jumps into step 5 to directly push the stream, saving transcoding resources; if transcoding is required, the transcoding mode selection (GPU transcoding, CPU+GPU hybrid transcoding) is automatically performed according to the current status of physical computing power resources, and video transcoding is performed according to the application requirements to generate a standard video stream; an independent push stream process is established to push a standard stream to the superior platform. The present invention has the capabilities of multi-protocol stream pulling, hybrid transcoding, intelligent push stream and multi-process push stream, which can make the most of physical resources and provide stable, flexible and standard video stream support services for the top-level platform.
[0107] Exemplary Devices
[0108] Fig.15 FIG. 1 is a schematic diagram of the structure of a video stream management device based on intelligent computing power provided by an exemplary embodiment of the present invention. Fig.15 As shown, the apparatus 1500 comprises:
[0109] The determination module 1510 is used to determine the application resource number according to the received upper-level platform access application;
[0110] The acquisition module 1520 is used to determine the video source to be applied for according to the application resource number, and obtain the video stream from the video platform according to the pull stream protocol corresponding to the video source;
[0111] The push module 1530 is used to determine the push mode of the video stream. If the push mode does not require transcoding, the video stream is pushed to the upper platform using multiple processes;
[0112] A selection module 1540 is used to select a transcoding mode according to the current status of physical computing resources if the streaming mode requires transcoding;
[0113] The generation module 1550 is used to transcode the video stream according to the transcoding mode according to the requirements of the access application, generate a standard video stream, and use multiple processes to push the standard video stream to the superior platform.
[0114] Optionally, the streaming protocols include GB28181, Onvif, RTSP, private protocols and SDK.
[0115] Optionally, the push module 1530 determines the push mode of the video stream, including:
[0116] The first determination submodule is used to determine that the push mode of the video stream requires transcoding if the access request is for a non-4M code stream;
[0117] The second determination submodule is used to determine that the push mode of the video stream requires transcoding if the access application is a 4M code stream, but the original video code stream is not a 4M code stream;
[0118] The third determination submodule is used to determine that the push mode of the video stream does not require transcoding if the access application is a 4M code stream and the original video is a 4M code stream.
[0119] Optionally, the transcoding mode includes a GPU transcoding mode, a CPU transcoding mode, and a CPU+GPU hybrid transcoding mode.
[0120] Optionally, the generating module 1550 includes:
[0121] The first generation submodule is used to transcode the video stream according to the GPU transcoding mode to generate a standard video stream when the requirement of the access application is that the road traffic condition is smooth and the traffic volume is sparse;
[0122] The second generation submodule is used to transcode the video stream according to the CPU transcoding mode to generate a standard video stream when the access application requires a major holiday, a historical peak congestion period, or a real-time congestion detection triggers an alarm;
[0123] The third generation sub-module is used to transcode the video stream according to the CPU+GPU hybrid transcoding mode to generate a standard video stream when the requirements of the review application involve complex scenarios such as major accident handling, comprehensive support in special periods, and comprehensive emergency command and dispatch.
[0124] Exemplary Electronic Devices
[0125] Fig.16 This is a structure of an electronic device provided by an exemplary embodiment of the present invention. Fig.16 As shown, the electronic device 160 includes one or more processors 161 and a memory 162 .
[0126] The processor 161 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device to perform desired functions.
[0127] The memory 162 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 161 may run the program instructions to implement the methods of the software programs of the various embodiments of the present invention described above and / or other desired functions. In one example, the electronic device may also include: an input device 163 and an output device 164, which are interconnected via a bus system and / or other forms of connection mechanisms (not shown).
[0128] In addition, the input device 163 may also include, for example, a keyboard, a mouse, and the like.
[0129] The output device 164 can output various information to the outside, and can include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto.
[0130] Of course, to simplify, Fig.16 Only some of the components related to the present invention in the electronic device are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, the electronic device may further include any other appropriate components according to specific application conditions.
[0131] Exemplary computer program products and computer-readable storage media
[0132] In addition to the above-mentioned methods and devices, an embodiment of the present invention may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps of the method according to various embodiments of the present invention described in the above-mentioned "Exemplary Method" section of this specification.
[0133] The computer program product may be written in any combination of one or more programming languages to write program code for performing the operations of the embodiments of the present invention, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0134] In addition, an embodiment of the present invention may also be a computer-readable storage medium having computer program instructions stored thereon, which, when executed by a processor, enable the processor to execute the steps of the method according to various embodiments of the present invention described in the above “Exemplary Method” section of this specification.
[0135] The computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, system or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0136] The basic principle of the present invention is described above in conjunction with specific embodiments. However, it should be pointed out that the advantages, strengths, effects, etc. mentioned in the present invention are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. must be possessed by each embodiment of the present invention. In addition, the specific details disclosed above are only for the purpose of illustration and facilitation of understanding, rather than limitation, and the above details do not limit the present invention to being implemented by adopting the above specific details.
[0137] Each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the system embodiment, since it basically corresponds to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0138] The block diagrams of the devices, systems, equipment, and systems involved in the present invention are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagram. As will be appreciated by those skilled in the art, these devices, systems, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including", "comprising", "having", etc. are open words, referring to "including but not limited to", and can be used interchangeably with them. The words "or" and "and" used here refer to the words "and / or" and can be used interchangeably with them, unless the context clearly indicates otherwise. The word "such as" used here refers to the phrase "such as but not limited to", and can be used interchangeably with it.
[0139] The method and system of the present invention may be implemented in many ways. For example, the method and system of the present invention may be implemented by software, hardware, firmware or any combination of software, hardware, firmware. The above order of steps for the method is only for illustration, and the steps of the method of the present invention are not limited to the order specifically described above, unless otherwise specifically stated. In addition, in some embodiments, the present invention may also be implemented as a program recorded in a recording medium, which includes machine-readable instructions for implementing the method according to the present invention. Thus, the present invention also covers a recording medium storing a program for executing the method according to the present invention.
[0140] It should also be noted that in the system, device and method of the present invention, each component or each step can be decomposed and / or recombined. These decompositions and / or recombinations should be regarded as equivalent schemes of the present invention. The above description of the disclosed aspects is provided to enable any technician in the field to make or use the present invention. Various modifications to these aspects are very obvious to those skilled in the art, and the general principles defined here can be applied to other aspects without departing from the scope of the present invention. Therefore, the present invention is not intended to be limited to the aspects shown here, but in accordance with the widest range consistent with the principles and novel features disclosed here.
[0141] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present invention to the forms disclosed herein. Although a number of example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.
Claims
1. A video stream management method based on intelligent computing power, characterized in that: include: Determine the resource number for application based on the application received from the superior platform; Determine the video source to be applied for according to the application resource number, and obtain the video stream from the video platform according to the stream pulling protocol corresponding to the video source; Determine the push streaming mode of the video stream, and if the push streaming mode does not require transcoding, use multiple processes to push the video stream to the upper-level platform; If the streaming mode requires transcoding, the transcoding mode is selected according to the current status of physical computing resources; According to the requirements of the access application, the video stream is transcoded according to the transcoding mode to generate a standard video stream, and the standard video stream is pushed to the upper-level platform using multiple processes.
2. The method according to claim 1, characterized in that The streaming protocols include GB28181, Onvif, RTSP, private protocols and SDK.
3. The method according to claim 1, characterized in that Determining the streaming mode of the video stream includes: If the access request is for a non-4M code stream, determining that the streaming mode of the video stream requires transcoding; If the access request is a 4M code stream, but the original video code stream is not a 4M code stream, it is determined that the push streaming mode of the video stream requires transcoding; If the access request is a 4M code stream and the original video is a 4M code stream, it is determined that the push streaming mode of the video stream does not require transcoding.
4. The method according to claim 1, characterized in that: The transcoding modes include GPU transcoding mode, CPU transcoding mode and CPU+GPU hybrid transcoding mode.
5. The method according to claim 4, characterized in that Transcoding the video stream according to the transcoding mode according to the requirements of the access application to generate a standard video stream, including: When the requirement of the access application is that the road traffic condition is smooth and the traffic volume is sparse, transcoding the video stream according to the GPU transcoding mode to generate a standard video stream; When the access application requires a major holiday, a historical peak congestion period, or a real-time congestion detection triggers an alarm, the video stream is transcoded according to the CPU transcoding mode to generate a standard video stream; When the requirements of the review application involve complex scenarios such as major accident handling, comprehensive support in special periods, and comprehensive emergency command and dispatch, the video stream is transcoded according to the CPU+GPU hybrid transcoding mode to generate a standard video stream.
6. A video stream management device based on intelligent computing power, characterized in that: include: The determination module is used to determine the application resource number according to the application received from the upper-level platform; An acquisition module, used to determine the video source to be applied for according to the application resource number, and obtain the video stream from the video platform according to the stream pulling protocol corresponding to the video source; A push module, used to determine the push mode of the video stream, and if the push mode does not require transcoding, the video stream is pushed to the upper platform using multiple processes; A selection module, for selecting a transcoding mode according to the current status of physical computing resources if the streaming mode requires transcoding; A generation module is used to transcode the video stream according to the transcoding mode in accordance with the requirements of the access application, generate a standard video stream, and use multiple processes to push the standard video stream to the upper platform.
7. The device according to claim 6, characterized in that The streaming protocols include GB28181, Onvif, RTSP, private protocols and SDK.
8. The device according to claim 6, characterized in that The push module determines the push mode of the video stream, including: A first determination submodule is used to determine that the push streaming mode of the video stream requires transcoding if the access request is a non-4M code stream; The second determination submodule is used to determine that the push streaming mode of the video stream requires transcoding if the access request is a 4M code stream, but the original video code stream is a non-4M code stream; The third determination submodule is used to determine that the push streaming mode of the video stream does not require transcoding if the access application is a 4M code stream and the original video is a 4M code stream.
9. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and the computer program is used to execute the method according to any one of claims 1 to 5.
10. An electronic device, characterized in that: The electronic device comprises: processor; a memory for storing instructions executable by the processor; The processor is used to read the executable instructions from the memory and execute the instructions to implement the method described in any one of claims 1 to 5.