Video frame anti-collision method and device, storage medium and electronic device
By modeling the video stream and analyzing the data volume, it automatically adjusts I frame timing or picture group parameters, solving the video freeze problem caused by I frame collisions in the 5G network, and improving network capacity and video experience.
Patent Information
- Application Number
- CN202310481764.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-27
- Publication Date
- 2024-10-29
AI Technical Summary
In 5G networks, I-frame collisions in video services cause video freezes. Existing solutions such as extending the I-frame period, increasing the priority of video services, or restarting the camera may cause the video experience to deteriorate or other services to be affected.
By modeling each video stream, the total data volume is obtained, and when the total data volume exceeds the network transmission capacity, the anti-collision adjustment of the video I frame is initiated, and the timing arrangement or picture group parameters of the I frame are automatically adjusted to avoid I frame collision. .
It realizes automatic I-frame anti-collision without the need for APP participation, improves network business capacity, avoids video freezes, and smoothly transmits video services.
Smart Images

Figure CN118870035A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the technical field of data transmission, and in particular to a video frame anti-collision method, device, storage medium and electronic device. Background Art
[0002] Camera service is one of the main services in the current network, especially for business to business (ToB) industry application scenarios; while video is widely used in remote control, AI (Artificial Intelligence) quality inspection and other services. Currently, video mainly uses H.264 / 265 codec solution, and video data is subdivided into three types of data frames:
[0003] I frame, Intra-Coded Frame, intra-coded image frame, contains a complete frame of image information and is a key frame;
[0004] P frame, Predictive-Coded Frame, forward predicted frame, expresses the difference with the previous frame (I frame or P frame), and depends on the previous frame data when decoding;
[0005] B frame, Bydirectionally-Coded Frame, bidirectionally predictive coded frame, expresses the difference between the current frame and the previous and next frames, and depends on the data of the previous and next frames when decoding.
[0006] The above three types of data frames can be configured as a group through the Group of Picture (GOP), which is generally an I frame plus a varying number of P frames and B frames. The data volume of the I frame is 5 to 10 times that of the P frame and the B frame. For an H.264 video stream with an average bit rate of 4Mbps, the peak bandwidth during the I frame transmission is as high as 20 to 30Mbps.
[0007] Figure 1 This is a common camera service networking situation in the related technology. In this networking situation, when multiple cameras are carried in the same network, the video encoding algorithm of each camera runs independently, resulting in the possibility of temporal overlap of video I frames and P frames when transmitted through the 5G network, that is, I frame collision occurs (such as Figure 2 After the I-frame collision, the traffic characteristics perceived from the 5G network side will show a spike after the I-frame superposition, as shown in Figure 3 As shown in the figure, the spike may cause the 5G network capacity to exceed the upper limit, resulting in I-frame data loss. I-frames are key frames, and the loss of I-frames will cause video freezes and affect the service experience.
[0008] Regarding the freeze caused by I-frame collision in video services, the methods that have been adopted include:
[0009] 1. Lengthen the I frame period and reduce the number of I frames in the network to reduce the probability of I frame collision. This solution can only alleviate the I frame collision problem. Lengthening the I frame period (adjusting the GOP parameter) will lead to longer video access time and worse experience.
[0010] Second, in 5G networks, the priority of video services is increased. This method can guarantee the network bandwidth when I-frames collide to a certain extent, but it will squeeze other services, resulting in a poor experience for other services, and the overall network performance will not be improved.
[0011] 3. Restart the camera, for example: by providing a software development kit (SDK) or application programming interface (API) interface on the application (APP) side, the APP can call the corresponding interface to restart the camera when the video freezes, so that there is a certain probability that the I frame collision window will be staggered. This method requires API interface integration for the APP, and the APP needs to be modified. Restarting the camera will cause a brief interruption of the video, which will deteriorate the experience. Summary of the invention
[0012] Embodiments of the present invention provide a video frame anti-collision method, device, storage medium and electronic device to at least solve the problem of video freeze caused by I-frame collision of video services in the related art.
[0013] According to one embodiment of the present invention, a video frame anti-collision method is provided, comprising: based on the data transmission characteristics of different video frames, modeling each video stream as a characteristic function, superimposing the characteristic functions of each video stream to obtain the total data volume of all video streams; when the total data volume exceeds the current network transmission capacity, initiating anti-collision adjustment of the video I frame.
[0014] According to another embodiment of the present invention, a video frame anti-collision device is provided, including: an acquisition module, used to model each video stream as a characteristic function based on the data transmission characteristics of different video frames, superimpose the characteristic functions of each video stream, and obtain the total data volume of all video streams; an adjustment module, used to initiate anti-collision adjustment of the video I frame when the total data volume exceeds the current network transmission capacity.
[0015] According to yet another embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any one of the above method embodiments when run.
[0016] According to yet another embodiment of the present invention, there is provided an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0017] Through the above-mentioned embodiments of the present invention, by modeling each video stream to obtain the total data volume of all video streams, when it is determined that the total data volume exceeds the current network transmission capacity, the video I frame anti-collision adjustment is timely performed, and the I frame anti-collision can be automatically performed without the participation of the APP. Therefore, the problem of video freeze caused by I frame collision of video services in the related art can be solved, and the effect of improving the network service capacity can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 It is a schematic diagram of camera business networking under 5G network in related technology;
[0019] Figure 2 is a schematic diagram of I frame collision in the related art;
[0020] Figure 3 It is a schematic diagram of data flow characteristics after I frame collision in the related art;
[0021] Figure 4 It is a hardware structure block diagram of a computer terminal running a video frame anti-collision method according to an embodiment of the present invention;
[0022] Figure 5 is a schematic diagram of camera service networking under a 5G network according to an embodiment of the present invention;
[0023] Figure 6 is a flow chart of a video frame anti-collision method according to an embodiment of the present invention;
[0024] Figure 7 is a structural block diagram of a video frame anti-collision device according to an embodiment of the present invention;
[0025] Figure 8 is a structural block diagram of a video frame anti-collision device according to another embodiment of the present invention;
[0026] Fig. 9 is a flow chart of video I frame collision detection and adjustment according to an embodiment of the present invention;
[0027] Fig.10is a flowchart of a specific process of I-frame collision detection according to an embodiment of the present invention;
[0028] Fig.11 is a schematic diagram of a video service flow after I frame adjustment according to an embodiment of the present invention;
[0029] Fig.12 It is a schematic diagram of smooth transmission of services after I frame collision-free according to an embodiment of the present invention. DETAILED DESCRIPTION
[0030] Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings and in combination with the embodiments.
[0031] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0032] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a computer terminal as an example, Figure 4 1 is a hardware structure block diagram of a computer terminal for running a video frame anti-collision method according to an embodiment of the present invention. Figure 4 As shown, the computer terminal may include one or more ( Figure 4 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor (Microprocessing Unit, MPU) or a programmable logic device (Field Programmable Gate Array, FPGA)) and a memory 104 for storing data, wherein the above-mentioned computer terminal may also include a transmission device 106 and an input and output device 108 for communication functions. It can be understood by those skilled in the art that Figure 4 The structure shown is only for illustration and does not limit the structure of the above-mentioned computer terminal. Figure 4 More or fewer components as shown, or with Figure 4 Different configurations shown.
[0033] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the video frame anti-collision method in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0034] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of a computer terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0035] The embodiments of the present invention are mainly used in the business scenario of accessing cameras based on MEC in 5G networks. Figure 5 is a schematic diagram of camera service networking under a 5G network according to an embodiment of the present invention, and various embodiments of the present invention can be run, such as Figure 5 As shown, the network includes: multiple cameras (for example: IPCam1, IPCam2, IPCam3...IPCamN), customer premises equipment (Customer Premise Equipment, CPE), 5G base station, multi-access edge computing (Multi-access Edge Computing, MEC) platform, local network. Compared with the MEC platform in the related art, the MEC platform in this embodiment deploys visual feature detection service and collision detection control service in addition to the local diversion service.
[0036] In one exemplary embodiment, each IPCam accesses the 5G wireless network through the CPE device, and then uses MEC to realize local diversion of camera data to the enterprise local network, and connects to the video playback APP of the enterprise local network.
[0037] In this embodiment, a video frame anti-collision method running on the above-mentioned computer terminal or network is provided. Figure 6is a flow chart of a video frame anti-collision method according to an embodiment of the present invention. Figure 6 As shown, the process includes the following steps:
[0038] Step S602, based on the data transmission characteristics of different video frames, each video stream is modeled as a characteristic function, and the characteristic functions of each video stream are superimposed to obtain the total data volume of all video streams;
[0039] In this embodiment, different video frames include I frames, P frames and B frames. The data volume of I frames is 5 to 10 of that of P frames and B frames. Based on this data transmission feature, different video frames can be distinguished. Among them, I frames, P frames and B frames can be encoded using H.264 / 265 and the like.
[0040] Before step S602 of this embodiment, the method further includes: obtaining a camera list supporting the ONVIF protocol or the GB28181 protocol, and unifying the following parameters of the cameras in the camera list: picture group parameters, frame rate, wherein the cameras correspond one-to-one to the video streams.
[0041] In step S602 of this embodiment, it includes: determining the cycle period of the video I frame of the video stream according to the picture group and the frame rate; obtaining the reference time through the video feature detection service deployed on the multi-access edge computing MEC platform; identifying the transmission time of the video I frame in each video stream according to the data transmission feature; modeling each video stream according to the cycle period, the reference time and the transmission time to obtain the characteristic function of each video stream.
[0042] In an exemplary embodiment, the characteristic function may be a square wave function, and whether the traffic is transmitted smoothly may be determined based on whether a peak appears in the square wave function.
[0043] In step S602 of the present embodiment, the total data volume of all video streams is obtained, including: identifying the various video streams according to the data transmission characteristics to obtain the average flow of the video I frames, the average flow of the video P frames and the average flow of the video B frames; obtaining the flow of each video stream according to the characteristic function of each video stream, the average flow of the video I frames, and the average flow of the video P frames and the video B frames; superimposing the flow of each video stream to obtain the total data volume.
[0044] Step S604: when the total data volume exceeds the current network transmission capacity, initiate anti-collision adjustment of the video I frame.
[0045] In step S604 of the present embodiment, before initiating anti-collision adjustment of the video I frame, the method also includes: obtaining the amount of data that can be transmitted by the current network through the MEC platform; comparing the total data amount with the amount of data that can be transmitted by the current network, and when the total data amount is greater than the amount of data that can be transmitted by the current network, determining that the total data amount exceeds the current network transmission capacity and the video I frame collides; when the total data amount is less than or equal to the amount of data that can be transmitted by the current network, determining that the video I frame does not collide, or the video I frame collides but does not exceed the current network transmission capacity.
[0046] In an exemplary embodiment, when the total data volume is less than or equal to the data volume that the current network can transmit, the method further includes: a process of cyclically detecting whether the total data volume of the video stream exceeds the current network transmission capacity, until it is detected that the total data volume exceeds the current network transmission capacity, and then entering the anti-collision adjustment process of the video I frame.
[0047] In step S604 of the present embodiment, anti-collision adjustment of the video I frame is initiated, including: when the camera supports I frame editing capability, determining the idle offset position of the I frame of each video stream according to the feature function, the collision video stream list, the reference time, and the I frame offset time of all the video streams relative to the reference time, sending the idle offset position to the camera, and starting the I frame timing editing adjustment of the camera; when the camera does not support I frame editing capability, starting I frame random adjustment by adjusting the picture group parameters of the camera.
[0048] In this embodiment, by properly scheduling I frame timing, I frame cycles with high data volumes are staggered, and I frame collisions of different video streams are reduced or eliminated in the time domain, thereby smoothing the data streams of multiple cameras and improving the network's capacity to carry camera video services.
[0049] In an exemplary embodiment, random adjustment of I frames is initiated by adjusting the picture group parameters of the camera, including: adjusting the picture group parameters to a new picture group, and maintaining the picture group parameters to the new picture group for a preset time period; and restoring the picture group parameters to the original picture group before adjustment after the preset time period.
[0050] In this embodiment, the I frame random adjustment includes multiple times.
[0051] Through the above steps, each video stream is modeled to obtain the total data volume of all video streams, so that when it is determined that the total data volume exceeds the current network transmission capacity, the video I frame anti-collision adjustment is performed in time, and automatic I frame anti-collision can be achieved without the participation of APP. Therefore, the problem of video freeze caused by I frame collision of video services in related technologies can be solved, and the network service capacity can be improved.
[0052] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory / random access memory (ROM / RAM), a magnetic disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0053] In the present embodiment, a video frame anti-collision device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0054] Figure 7 is a structural block diagram of a video frame anti-collision device according to an embodiment of the present invention. Figure 7 As shown, the device includes: an acquisition module 10 and an adjustment module 20.
[0055] An acquisition module 10 is used to model each video stream as a characteristic function based on data transmission characteristics of different video frames, and superimpose the characteristic functions of each video stream to obtain the total data volume of all video streams;
[0056] The adjustment module 20 is used to initiate anti-collision adjustment of the video I frame when the total data volume exceeds the current network transmission capacity.
[0057] Figure 8 is a structural block diagram of a video frame anti-collision device according to another embodiment of the present invention. Figure 8 As shown, the device includes Figure 7 All modules shown, plus:
[0058] The unification module 30 is used to obtain a camera list supporting the ONVIF protocol or the GB28181 protocol, and unify the following parameters of the cameras in the camera list: picture group parameters, frame rate, wherein the cameras correspond one to one with the video streams.
[0059] The acquisition module 10 further includes:
[0060] An identification unit 11 is used to identify the video streams according to the data transmission characteristics, and obtain the average flow rate of the video I frame, the average flow rate of the video P frame and the average flow rate of the video B frame;
[0061] An acquisition unit 12, configured to obtain the flow rate of each video stream according to the characteristic function of each video stream, the average flow rate of the video I frame, and the average flow rates of the video P frame and the video B frame;
[0062] The superimposing unit 13 is used to superimpose the traffic of each video stream and obtain the total data volume.
[0063] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0064] To facilitate the understanding of the technical solution provided by the present invention, a detailed description will be given below in conjunction with embodiments of specific scenarios.
[0065] For the problem of limited video service capacity caused by I frame collision when accessing a camera in a 5G wireless network, an embodiment of the present invention provides a method for improving the video service capacity in the network. In a 5G MEC network environment, the above problem can be solved through a video I frame collision detection process and a video I frame anti-collision adjustment process, thereby greatly improving the network's video service capacity.
[0066] The above method for improving the video service capacity in the network is run on Figure 5 Camera business networking under 5G network, such as Figure 5As shown in the figure, based on the original 5G network, this network adds two services, video feature detection and collision detection control, on the MEC platform. After completing the local diversion of the video service, the MEC platform uses the video feature detection service to perform feature recognition on the I frame, P frame, and B frame in the video service, and obtains the flow characteristics, timing characteristics and other information of the relevant data frames of each camera. Then, according to the flow characteristics, timing characteristics and other information, the summary data collision time width and corresponding data volume are calculated: [T (I-frame interval), D (I-frame Data Sum)] to determine whether an I frame collision occurs, and obtain the 5G network transmission capacity based on MEC to determine whether [T, D] exceeds the network carrying capacity. If it exceeds, the collision is adjusted through the collision detection control service.
[0067] Through the above-mentioned adjusted networking, an I-frame anti-collision mechanism can be automatically provided according to the collision situation of the video service and the capability status of the camera without the need for APP participation, thereby increasing the capacity of the 5G network to support the camera and improving the smooth playback experience of the camera.
[0068] Specifically, the complete process of video I frame collision detection and adjustment is as follows: Fig. 9 As shown, the process includes the following steps:
[0069] Step S901, traverse all cameras in the system and find a list of all cameras that support the onvif or GB28181 protocol.
[0070] Step S902, a command is issued for the list, and parameters such as GOPLength, FPS (Frame Per Second) of all cameras are unified through onvif or other standard interfaces, and are set to GOP1, FPS1.
[0071] Step S903, start the video I frame anti-collision detection program, and return the detection result according to the video I frame anti-collision detection program to further determine whether the I frame collision exceeds the network transmission capacity; and if the I frame collision does not exceed the network transmission capacity, loop to step S901, otherwise execute step S904.
[0072] Specifically, the video feature detection service deployed on the MEC platform continuously detects the characteristics of video services, and models them based on the characteristics such as the I-frame interval and traffic peak of each video service to obtain a square wave function f(t). Fig.10 : is a flowchart of a specific process of I-frame collision detection according to an embodiment of the present invention. Fig.10 As shown, the process includes the following steps:
[0073] Step S1001, calculating the video I frame cycle time T=GOP / FPS according to the video GOP and frame rate (FPS) information.
[0074] Step S1002: The video feature detection service obtains a reference time t0 for calculating the offset time of I frames in all video data streams.
[0075] Step S1003, the video detection service identifies the I frame transmission time td and the average flow rate d1, and the average flow rate d2 of the P / B frame based on the data transmission characteristics.
[0076] Since the data volumes of I-frames, P-frames, B-frames and other types of data frames in video encoding vary greatly, reaching 5 to 10 times, the video detection service only needs to identify td, d1, and d2.
[0077] Step S1004, feature modeling is implemented based on the data transmission characteristics of the video stream, and one video stream is modeled as a square wave function f(T, td, t0) with a period of T and a duty cycle of t1 / T.
[0078] Step S1005, according to the square wave function of feature modeling, the flow of each video channel is obtained as: f(T, td, t0)*d1+d2.
[0079] Step S1006, obtain the current network transmission capacity from the MEC platform and set it to D1.
[0080] Step S1007, determining whether the accumulated traffic of all video streams exceeds the network transmission capacity.
[0081] Specifically, the cumulative traffic Sum of all video streams is calculated based on the data model function;
[0082] If Sum[f(T, td, t0)*d1+d2]>D1, a collision occurs and exceeds the network transmission capacity, and step S1008 is executed;
[0083] If Sum[f(T, td, t0)*d1+d2]≤D1, there is no collision, or there is a collision but it does not exceed the network transmission capacity. No adjustment is required and the process ends.
[0084] Step S1008, providing a collision video stream list and a first I frame deviation list List(tx) of all video streams relative to t0 for subsequent video stream adjustment; wherein the list List(tx) records the offset time of the camera.
[0085] In this embodiment, if no I-frame collision occurs, it is necessary to continuously detect the I-frame collision of the video until an I-frame collision occurs.
[0086] Step S904, determine whether the camera supports 1588 and I frame editing instructions according to the camera's capabilities, if supported, execute step S905, otherwise execute step S907.
[0087] Step S905, when the camera supports I frame editing capability, calculate the I frame idle offset position of each video stream according to the video list returned in step S903, the feature function f(T, td, t0) and the first I frame deviation list List(tx) of the video stream relative to t0, and send the camera to start I frame timing editing adjustment.
[0088] Specifically, the onvif protocol is used to initiate an adjustment of the offset of the camera I frame to the camera, so that the camera adjusts the I frame time according to the offset information, so that the I frame avoids the collision window.
[0089] Step S906: The camera completes the I frame timing adjustment and returns to step S901 to perform loop iterative detection.
[0090] Step S907, adjusting the camera GOP parameters, and starting the random adjustment of the I frame by random delay.
[0091] If the camera does not support I-frame timing arrangement, it is impossible to accurately arrange the I-frame offset of each camera. In this case, the GOP parameter of the camera can be adjusted to allow the camera to perform random adjustments of I-frames until the I-frame collision does not exceed the network transmission capacity. Multiple random adjustments can be initiated.
[0092] Specifically, a GOP adjustment operation is initiated based on standard protocols such as onvif. For example, the camera GOP parameter is adjusted to GOP2, and after waiting for a period of time equal to GOP2 time (length is GOP2 / video frame rate)*Random(1,2), it is adjusted back to the original GOP1 value. Through a GOP adjustment action, I frames are randomly redistributed, thereby reducing the probability of I frame conflicts. Through continuous collision detection, if the collision converges after several iterations, the GOP adjustment is stopped.
[0093] Step S908, after ensuring that the camera has completed adjustment, returns to step S901 for loop iteration.
[0094] Fig.11 is a schematic diagram of a video service flow after I frame adjustment according to an embodiment of the present invention, such as Fig.11 As shown, after the I frame adjustment is completed, there is no temporal overlap of the video I frames. Fig.12 is a schematic diagram of smooth transmission of services after I frame collision-free according to an embodiment of the present invention, such as Fig.12 As shown in the figure, after the I-frame collision adjustment, the traffic characteristics of the overall video service do not have spikes and can be transmitted smoothly.
[0095] Through I-frame anti-collision adjustment, on the one hand, it is possible to avoid network packet loss caused by spikes when transmitting I-frames of multiple camera video streams, thereby ensuring the video experience. On the other hand, after I-frame collision avoidance, more cameras can be supported under the same network conditions, thereby improving network capacity. In addition, compared with the traditional method, the embodiments of the present invention do not require video playback end APP parameters, and do not restart or interrupt the video stream.
[0096] An embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0097] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0098] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0099] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0100] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.
[0101] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0102] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A video frame anti-collision method, characterized in that: include: Based on the data transmission characteristics of different video frames, each video stream is modeled as a characteristic function, and the characteristic functions of each video stream are superimposed to obtain the total data volume of all video streams; When the total data volume exceeds the current network transmission capacity, an anti-collision adjustment of the video I frame is initiated.
2. The method according to claim 1, characterized in that: Before modeling each video stream as a characteristic function based on data transmission characteristics of different video frames, the method further includes: A camera list supporting the ONVIF protocol or the GB28181 protocol is obtained, and the following parameters of the cameras in the camera list are unified: a picture group parameter and a frame rate, wherein the cameras correspond one to one to the video streams.
3. The method according to claim 2, characterized in that Based on the data transmission characteristics of different video frames, each video stream is modeled as a feature function, including: Determine a cycle period of a video I frame of a video stream according to the group of pictures and the frame rate; The benchmark time is obtained through the video feature detection service deployed on the multi-access edge computing MEC platform; Identifying the transmission time of the video I frame in each video stream according to the data transmission feature; Modeling is performed on each video stream according to the cycle period, the reference time and the transmission time to obtain a characteristic function of each video stream.
4. The method according to claim 1, characterized in that: Get the total data volume of all video streams, including: Identify the video streams according to the data transmission characteristics to obtain the average flow rate of the video I frame, the average flow rate of the video P frame and the average flow rate of the video B frame; Obtaining the flow of each video stream according to the characteristic function of each video stream, the average flow of the video I frame, and the average flow of the video P frame and the video B frame; The traffic volume of each video stream is superimposed to obtain the total data volume.
5. The method according to claim 1, characterized in that Before initiating the anti-collision adjustment of the video I frame, the method further includes: Obtain the amount of data that can be transmitted on the current network through the MEC platform; Compare the total data amount with the amount of data that the current network can transmit, and when the total data amount is greater than the amount of data that the current network can transmit, determine that the total data amount exceeds the current network transmission capacity and the video I frames have a collision; when the total data amount is less than or equal to the amount of data that the current network can transmit, determine that the video I frames have not collided, or the video I frames have collided but have not exceeded the current network transmission capacity.
6. The method according to claim 5, characterized in that In a case where the total amount of data is less than or equal to the amount of data that can be transmitted by the current network, the method further includes: A process of cyclically detecting whether the total data volume of the video stream exceeds the current network transmission capacity, until it is detected that the total data volume exceeds the current network transmission capacity, then entering the anti-collision adjustment process of the video I frame.
7. The method according to claim 2, characterized in that Initiating anti-collision adjustment of the video I frame, including: In the case where the camera supports I frame arrangement capability, the idle offset position of the I frame of each of the video streams is determined according to the feature function, the collision video stream list, the reference time, and the I frame offset time of all the video streams relative to the reference time, the idle offset position is sent to the camera, and the I frame timing arrangement adjustment of the camera is started; In the case that the camera does not support I frame arrangement capability, I frame random adjustment is started by adjusting the picture group parameters of the camera.
8. The method according to claim 7, characterized in that By adjusting the picture group parameters of the camera, random adjustment of I frames is started, including: Adjusting the picture group parameters to a new picture group, and maintaining the picture group parameters to the new picture group for a preset time period; After the preset time period has passed, the picture group parameters are restored to the original picture group before adjustment.
9. The method according to claim 7, characterized in that: in, The I frame random adjustment includes multiple times.
10. A video frame anti-collision device, characterized in that: include: An acquisition module is used to model each video stream as a characteristic function based on the data transmission characteristics of different video frames, and superimpose the characteristic functions of each video stream to obtain the total data volume of all video streams; The adjustment module is used to initiate anti-collision adjustment of the video I frame when the total data volume exceeds the current network transmission capacity.
11. The device according to claim 10, characterized in that Also includes: The unification module is used to obtain a camera list supporting the onvif protocol or the GB28181 protocol, and unify the following parameters of the cameras in the camera list: picture group parameters, frame rate, wherein the cameras correspond one to one with the video streams.
12. The device according to claim 10, characterized in that Get modules, including: An identification unit, used to identify the video streams according to the data transmission characteristics, and obtain the average flow rate of the video I frame, the average flow rate of the video P frame and the average flow rate of the video B frame; An acquisition unit, configured to obtain the flow rate of each video stream according to the characteristic function of each video stream, the average flow rate of the video I frame, and the average flow rates of the video P frame and the video B frame; The superposition unit is used to superimpose the traffic of each video stream and obtain the total data volume.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 1 to 9 when executed by a processor.
14. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method described in any one of claims 1 to 9 are implemented.
Citation Information
Patent Citations
An optimized dynamic grouping anti-collision method based on a frame time slot
CN109635611A
Data transmission method based on multiple network cameras and related device
CN111787292A
Video processing method, server and computer readable storage medium
CN113423012A
Video transmission method, device, equipment and computer program product
CN115643366A
Multi-channel video transmission method, device, equipment and medium
CN115802074A
