WO2023179161A1 - Video frame rate control method and apparatus, and electronic device and storage medium - Google Patents

Video frame rate control method and apparatus, and electronic device and storage medium Download PDF

Info

Publication number
WO2023179161A1
WO2023179161A1 PCT/CN2022/143524 CN2022143524W WO2023179161A1 WO 2023179161 A1 WO2023179161 A1 WO 2023179161A1 CN 2022143524 W CN2022143524 W CN 2022143524W WO 2023179161 A1 WO2023179161 A1 WO 2023179161A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
frequency
frame extraction
video stream
video
Prior art date
Application number
PCT/CN2022/143524
Other languages
French (fr)
Chinese (zh)
Inventor
曾卫东
Original Assignee
深圳云天励飞技术股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳云天励飞技术股份有限公司 filed Critical 深圳云天励飞技术股份有限公司
Publication of WO2023179161A1 publication Critical patent/WO2023179161A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs
    • H04N21/2343Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
    • H04N21/234381Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements by altering the temporal resolution, e.g. decreasing the frame rate by frame skipping
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs
    • H04N21/23406Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs involving management of server-side video buffer
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs
    • H04N21/2343Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
    • H04N21/234336Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements by media transcoding, e.g. video is transformed into a slideshow of still pictures or audio is converted into text
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/95Computational photography systems, e.g. light-field imaging systems
    • H04N23/951Computational photography systems, e.g. light-field imaging systems by using two or more images to influence resolution, frame rate or aspect ratio

Definitions

  • the present invention relates to the field of video detection technology, and in particular to a video frame rate control method, device, electronic equipment and storage medium.
  • Video structured description technology refers to extracting key information through intelligent analysis of the original video, and performing semantic description of the text to obtain the structured semantic information of the video.
  • video structured description technology video data can be used for target classification and recognition, target posture recognition, target object segmentation, etc.
  • the mainstream camera video streaming service frame extraction method is to extract frames once every few seconds by default or manually configured, and when using different algorithms at the same time, resources are repeatedly consumed for different algorithms.
  • the status of objects in the video stream is different. Therefore, using a fixed frame frequency is not conducive to object recognition. It can be seen that in the existing video frame extraction, there are problems of small difference and low recognition efficiency.
  • Embodiments of the present invention provide a video frame rate control method, aiming to solve the problems of small differences and low recognition efficiency in existing video frame rate control methods.
  • an embodiment of the present invention provides a video frame rate control method.
  • the method includes the following steps:
  • the initial frame decimation frequency is initially modified according to the current event data to determine a target frame decimation frequency for decimating the video stream.
  • an embodiment of the present invention also provides a video frame rate control device, including:
  • the frame extraction module is used to extract frames from the video stream based on the initial frame extraction frequency to obtain video frame data
  • An identification module used to identify the current event data included in the picture encoding data
  • a modification module configured to perform an initial modification to the initial frame extraction frequency according to the current event data to determine a target frame extraction frequency for extracting frames on the video stream.
  • embodiments of the present invention further provide an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor.
  • the processor executes the computer program.
  • embodiments of the present invention also provide a computer-readable storage medium.
  • a computer program is stored on the computer-readable storage medium.
  • the computer program is executed by a processor, the video frame rate provided by the embodiment of the present invention is achieved. Control the steps in the method.
  • the video stream is extracted based on the initial frame extraction frequency to obtain video frame data; the video frame data is encoded to generate picture encoded data; and the current frame included in the picture encoded data is identified.
  • Event data perform an initial modification to the initial frame extraction frequency according to the current event data to determine a target frame extraction frequency for extracting frames on the video stream. Therefore, the embodiment of the present invention can mobilize the algorithm to dynamically redefine the frame interval duration according to the current event data of the video stream, which can not only reduce the resources occupied by low-frequency events, but also increase the number of identifications of high-frequency events, thereby achieving Quickly obtain algorithm materials, and extract frames from subsequent video streams based on the modified target frame frequency. For application in different scenarios, it can improve the algorithm recognition rate of the algorithm training platform.
  • Figure 1 is a schematic structural diagram of a system provided by an embodiment of the present invention.
  • Figure 2 is a flow chart of a video frame rate control method provided by an embodiment of the present invention.
  • Figure 3a is a flow chart of another video frame rate control method provided by an embodiment of the present invention.
  • Figure 3b is a flow chart of another video frame rate control method provided by an embodiment of the present invention.
  • Figure 3c is a flow chart of another video frame rate control method provided by an embodiment of the present invention.
  • Figure 3d is a flow chart of another video frame rate control method provided by an embodiment of the present invention.
  • Figure 4 is a schematic structural diagram of a video frame rate control device provided by an embodiment of the present invention.
  • Figure 5 is a schematic structural diagram of a modification module provided by an embodiment of the present invention.
  • FIG. 6 is a schematic structural diagram of another video frame rate control device provided by an embodiment of the present invention.
  • FIG. 7 is a schematic structural diagram of another video frame rate control device provided by an embodiment of the present invention.
  • Figure 8 is a schematic structural diagram of an electronic device provided by an embodiment of the present invention.
  • the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105.
  • the network 104 is a medium used to provide communication links between the terminal devices 101, 102, 103 and the server 105.
  • Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
  • the terminal devices 101, 102, 103 may be collection devices.
  • the terminal devices 101, 102, and 103 may be cameras with video collection functions, passenger flow cameras, etc.
  • a camera also known as a computer camera, computer eye, electronic eye, etc., is a video input device that is widely used in video conferencing, telemedicine, and real-time monitoring.
  • the server 105 may be a server that provides various services, such as a background server that provides support for video streams and image information collected by the terminal devices 101, 102, and 103.
  • the video frame rate control method provided by the embodiments of the present application is generally executed by a server.
  • a video frame rate control device is generally provided in the server.
  • Figure 2 is a flow chart of a video frame rate control method provided by an embodiment of the present invention. As shown in Figure 2, it includes the following steps:
  • the video frame rate control method provided in this embodiment uses electronic devices in scenarios including but not limited to urban governance, such as road monitoring, personnel identification, environmental monitoring, etc.
  • the above video stream can be collected through a collection device, specifically, it can be a video collected online in real time, or a video saved offline.
  • Collection equipment includes cameras, passenger flow cameras and other image collection equipment that can perform video collection, picture storage and processing.
  • the above-mentioned collection device refers to a camera as an example.
  • the above-mentioned video stream may refer to a video stream that requires frame extraction, decoding, encoding, recognition analysis, etc.
  • Video streaming refers to the transmission of video data. For example, video streaming can be processed as a stable and continuous stream through the network.
  • each video will first form a frame number before extracting frames.
  • the number of frames in a video refers to the amount of pictures transmitted in 1 second. It can also be understood as how many times the graphics processor can refresh per second. It is usually expressed in terms of fps (Frames). Per Second) said.
  • the above-mentioned video frame extraction is to extract several frames at certain intervals from a video, simulating the process of taking a photo at regular intervals and joining them together to form a video.
  • Caching the data after frame extraction can save resources when calling multiple algorithms for the same camera at the same time. It does not need to be obtained from the video stream every time. Obtaining it directly from the cache can save resources.
  • the above-mentioned picture coded data can be obtained after coding the video frame data.
  • the above image encoding data may be data obtained based on base64 encoding.
  • Base64 encoding is a method of encoding data with 64 printable characters. The underlying implementation of any data is binary, so base64 encoding can be performed.
  • Base64 encoding is mainly used in the data transmission process (encoding, decoding).
  • the algorithm warehouse can be called, and the corresponding algorithm can be retrieved from the algorithm warehouse according to the picture encoding data for identification, so as to obtain the current event data included in the picture encoding data.
  • the current event data may refer to the results obtained after analyzing the video stream, such as roads included in the video stream, people and vehicles on the road, road conditions, etc.
  • S204 Modify the initial frame extraction frequency for the first time according to the current event data to determine the target frame extraction frequency for extracting frames on the video stream.
  • the initial frame sampling frequency may also refer to the frame sampling frequency when the camera was last used.
  • the above-mentioned current event data may include specific event content, and the event content may include recognition target, recognition time, recognition location, recognition result, frame extraction frequency during recognition, etc.
  • the corresponding identification can be called to modify the initial frame extraction frequency according to the event content, and finally determine the appropriate target frame extraction frequency to modify and adjust the initial frame extraction frequency, and at the same time record the data of each modification. For example, if the event content is road damage detection, and the frame frequency of the image frames to be obtained is small, the corresponding road damage detection algorithm is modified to obtain a longer time interval for each image frame, because the long-term images of road damage detection are consistent. , the change rate is low.
  • the corresponding algorithm will increase the frequency of frame extraction for identification.
  • the video stream is extracted based on the initial frame frequency to obtain video frame data; the video frame data is encoded to generate picture encoded data; the current event data included in the picture encoded data is identified; according to The current event data makes an initial modification to the initial decimation frequency to determine the target decimation frequency for decimating the video stream. Therefore, the embodiment of the present invention can mobilize the algorithm to dynamically redefine the frame interval duration according to the current event data of the video stream, which can not only reduce the resources occupied by low-frequency events, but also increase the number of identifications of high-frequency events, thereby achieving Quickly obtain algorithm materials, and extract frames from subsequent video streams based on the modified target frame frequency. For application in different scenarios, it can improve the algorithm recognition rate of the algorithm training platform.
  • Figure 3a is a flow chart of another video frame rate control method provided by an embodiment of the present invention. As shown in Figure 3, it includes the following steps:
  • the above historical event data may include image data of video streams previously acquired by the camera, and each image data is matched with a corresponding frame rate.
  • the above historical event content may include person identification, road identification, animal identification, etc.
  • the current event content can be compared with the historical event content.
  • the amount of historical event data is large.
  • event content and historical event content correspond to different recognition algorithms.
  • the recognition algorithms are included in the algorithm bin. Different recognition algorithms can correspond to different recognition objects. For example, when used for person recognition, it can include human body key point recognition algorithms. , human feature recognition algorithms, etc., which can include license plate recognition algorithms when used for road vehicle detection.
  • the above event types may include but are not limited to person identification, vehicle identification, road condition identification, animal identification, etc.
  • Historical event information can be cached in a preset cache area in the background. Of course, the cache time can be set, for example, historical event information within 1 month can be cached.
  • the current time data can be extracted based on the frame extraction frequency corresponding to the historical event content with the highest matching degree.
  • the initial decimation frequency is modified to determine the target decimation frequency for decimating the video stream. In this way, when the same type of event content is encountered again, the recognition speed and accuracy of the algorithm can be accelerated.
  • the initial frame sampling frequency can be based on the preset frame sampling frequency. to modify.
  • FIG. 3b is a flow chart of another video frame rate control method provided by an embodiment of the present invention. After the above step S305, it also includes:
  • the environmental parameters of the camera can refer to the environment where the camera is used, including: day, night, indoors, outdoors, tourist attractions, restaurants, schools, shopping malls, garages, etc. Therefore, the environmental parameters of the camera that collects the video stream can be obtained, and the initial frame rate can be modified based on the environmental parameters.
  • the initial frame extraction frequency of the video stream is modified again to determine the target frame extraction frequency for the video stream.
  • the initial frame rate of the video stream can be modified again by combining the environmental parameters of the camera with the obtained frame rate of the historical event content with the highest matching degree. In this way, adjusting the initial frame extraction frequency in combination with multiple dimensions will help improve the recognition rate of the algorithm in the background, and enable more efficient recognition in the future.
  • FIG. 3c another video frame rate control method flow chart provided by an embodiment of the present invention, after the above step S305, also includes:
  • the camera's built-in performance parameters may refer to the camera's own parameters. Because they are set in different environments, the built-in performance parameters of the corresponding cameras will be adjusted to a certain extent, and the built-in performance parameters corresponding to different models of cameras are also inconsistent, such as: the resolution and video quality of the camera in day and night environments. When it is set up in a garage with lighting conditions, you can choose a relatively low-resolution camera, and when it is used in a shopping mall, you can choose some high-definition cameras.
  • the initial frame rate of the video stream can be modified again by combining the built-in performance parameters of the camera with the frame rate of the historical event content obtained above with the highest matching degree. In this way, adjusting the initial frame extraction frequency in combination with multiple dimensions will help improve the recognition rate of the algorithm in the background, and enable more efficient recognition in the future.
  • FIG. 3d is a flow chart of another video frame rate control method provided by an embodiment of the present invention. It is also possible to modify the initial frame frequency of the video stream by combining the matching degree between the event content of the current event data and the historical event content, the built-in performance parameters of the camera, and the environmental parameters of the camera. By quantifying each modification condition (matching degree, built-in performance parameters and environmental parameters), the quantized value is matched to each of the above conditions, and the initial frame frequency is modified based on the quantized value through the characteristics of the corresponding algorithm. In this way, adjusting the initial frame extraction frequency in combination with more dimensional conditions is more conducive to improving the recognition rate of the algorithm in the background, and allows for more efficient recognition in the future.
  • the recognition time of the algorithm can also be combined. For example, when using the animal recognition algorithm to identify animals in the video stream at night, the initial frame extraction frequency of the video stream is increased. When running algorithms related to human activities during the day, the frequency of the corresponding video stream is increased. Initial decimation frequency. In this way, the frame extraction frequency of the video stream can be increased for application scenarios with a large amount of activity; the frame extraction frequency of the video stream can be reduced for application scenarios with a small amount of activity.
  • the method also includes: re-adjusting the target frame extraction frequency based on the multiple modification data.
  • each modification data will be recorded.
  • Different modification parameters historical event data, environmental parameters, built-in parameters, etc.
  • modifications can also be set.
  • the target frame frequency is adjusted again based on the priority of the comparison parameter, combined with the modification of the weight and/or priority of the comparison parameter, and then used as the final modification data for frame rate modification. This can improve the recognition accuracy of the algorithm.
  • the method also includes: obtaining the event type and event content of the current event data, and adjusting the resolution of the collection device based on the event type and event content of the current event data.
  • the corresponding event type and event content can be analyzed based on the current time data obtained by extracting frames from the video stream.
  • the current camera c is recognized for license plate recognition, and the recognition content includes vehicle entry and exit management in the community at 20 o'clock in the evening.
  • the resolution of camera c can be enhanced to address the impact of the environment on license plate recognition at night. If the same camera c recognizes content at 12 noon, the resolution can be reduced compared to that at night, because the environment itself provides a certain brightness.
  • the historical event content with the highest matching degree is obtained by comparing the event content of the current event data with the historical event content, and the frame extraction frequency of the historical event content with the highest matching degree is used as the event content of the current event data.
  • the target frame extraction frequency is used to extract frames for subsequent video streams, which can improve the algorithm recognition rate of the algorithm training platform for use in different scenarios.
  • the initial frame frequency is modified again by combining the matching degree between the event content of the current event data and the historical event content, the environmental parameters of the camera and/or the built-in parameters of the camera, combining multiple dimensions and using various methods. Realize automatic modification of the initial frame extraction frequency. By dynamically adjusting the frame extraction frequency of the video stream, it can automatically reduce low-frequency repetitive algorithm identification and improve high-frequency algorithm identification for use in different scenarios, greatly improving The algorithm recognition rate of the algorithm training platform is improved.
  • Figure 4 is a module structure diagram of a video frame rate control device provided by an embodiment of the present invention. As shown in Figure 4, the device includes:
  • the frame extraction module 401 is used to extract frames from the video stream based on the initial frame extraction frequency to obtain video frame data;
  • Encoding module 402 is used to encode video frame data and generate picture encoded data
  • the identification module 403 is used to identify the current event data included in the picture encoding data
  • the modification module 404 is configured to first modify the initial frame extraction frequency according to the current event data to determine the target frame extraction frequency for extracting frames on the video stream.
  • the current event data includes event content, and different event content corresponds to different frame extraction frequencies.
  • Figure 5 is a schematic structural diagram of a modification module provided by an embodiment of the present invention.
  • the frame extraction module modification module 404 includes:
  • Acquisition unit 4041 used to obtain historical event content in historical event data
  • Identification unit 4042 used to calculate the matching degree between event content and historical event content
  • the first modification unit 4043 is configured to modify the initial frame extraction frequency of the current event data according to the frame extraction frequency of the historical event content if the matching degree meets the matching degree threshold, so as to determine the target frame extraction frequency for extracting frames for the video stream. ;
  • the second modification unit 4044 is used to perform modifications based on the preset frame extraction frequency if the matching degree does not meet the matching degree threshold.
  • Figure 6 is a schematic structural diagram of another video frame rate control device provided by an embodiment of the present invention.
  • Device 400 also includes:
  • the first acquisition module 405 is used to acquire the environmental parameters of the collection device where the video stream is collected;
  • the first calculation module 406 is used to modify the initial frame extraction frequency of the video stream again according to the matching degree between the event content and the historical event content and the environmental parameters of the collection device to determine the target frame extraction for the video stream. frequency.
  • Figure 7 is a schematic structural diagram of another video frame rate control device provided by an embodiment of the present invention.
  • Device 400 also includes:
  • the second acquisition module 408 is used to acquire the built-in performance parameters of the collection device that collects the video stream;
  • the second calculation module 408 is used to modify the initial frame extraction frequency of the video stream again based on the matching degree between the event content and the historical event content and the built-in performance parameters of the collection device to determine the target frame extraction frequency of the video stream. frame rate.
  • the video frame rate control device provided by the embodiment of the present invention can realize the above-mentioned various implementations of the video frame rate control method, as well as the corresponding beneficial effects. To avoid duplication, they will not be described again here.
  • FIG. 8 is a structural diagram of an electronic device provided by an embodiment of the present invention. As shown in Figure 8, it includes: a processor 801, a memory 802, a network interface 803, and a computer program stored on the memory 802 and capable of running on the processor 801, wherein:
  • the processor 801 is used to call the computer program stored in the memory 802 and perform the following steps:
  • the initial frame decimation frequency is initially modified based on the current event data to determine the target frame decimation frequency for decimating the video stream.
  • the current event data includes event content.
  • Different event contents correspond to different frame extraction frequencies.
  • the processor 801 performs an initial modification of the initial frame extraction frequency based on the current event data to determine the target of frame extraction for the video stream.
  • Frame frequency including:
  • the initial frame extraction frequency of the current event data is modified according to the frame extraction frequency of the historical event content to determine the target frame extraction frequency for the video stream;
  • the processor 801 calculates the matching degree between the event content and the historical event content, it also includes:
  • the initial frame extraction frequency of the video stream is modified again to determine the target frame extraction frequency for the video stream.
  • the processor 801 calculates the matching degree between the event content and the historical event content, it also includes:
  • the initial frame extraction frequency of the video stream is modified again to determine the target frame extraction frequency for the video stream.
  • the processor 801 is also configured to re-adjust the target frame frequency based on the multiple modification data.
  • the processor 801 is also configured to obtain the event type and event content of the current event data, and adjust the resolution of the collection device based on the event type and event content of the current event data.
  • Embodiments of the present invention also provide a computer-readable storage medium.
  • a computer program is stored on the computer-readable storage medium.
  • the computer program is executed by a processor, each process of the video frame rate control method embodiment provided by the embodiment of the present invention is implemented. , and can achieve the same technical effect, so to avoid repetition, they will not be described again here.
  • the electronic device here is a device that can automatically perform numerical calculations and/or information processing according to preset or stored instructions. Its hardware includes but is not limited to microprocessors, special-purpose Integrated circuit (Application Specific Integrated Circuit (ASIC), Programmable Gate Array (Field-Programmable GateArray, FPGA), Digital Signal Processor (DSP), embedded devices, etc.
  • ASIC Application Specific Integrated Circuit
  • FPGA Field-Programmable GateArray
  • DSP Digital Signal Processor
  • the electronic device 800 may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc.
  • the electronic device 800 can perform human-computer interaction with the customer through a keyboard, mouse, remote control, touch pad, or voice-activated device.
  • the memory 802 includes at least one type of readable storage medium.
  • the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory ( SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disks, optical disks, etc.
  • memory 802 may be an internal storage unit of the electronic device, such as a hard drive or memory of the electronic device.
  • the memory 802 may also be an external storage device of the electronic device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), or a secure digital (Secure Digital) device equipped on the electronic device. SD) card, Flash Card, etc.
  • the memory 802 may also include both the internal storage unit of the electronic device and its external storage device.
  • the memory 802 is usually used to store operating systems and various application software installed on electronic devices, such as program codes for video frame rate control methods, etc.
  • the memory 802 can also be used to temporarily store various types of data that have been output or will be output.
  • Processor 801 may be a central processing unit (Central Processing Unit) in some embodiments. Processing Unit (CPU), controller, microcontroller, microprocessor, or other data processing chip.
  • the processor 801 is typically used to control the overall operation of the electronic device.
  • the processor 801 is used to run the program code or process data stored in the memory 801, for example, run the program code of the video frame rate control method.
  • the network interface 803 may include a wireless network interface or a wired network interface.
  • the network interface 803 is generally used to establish a communication connection between the electronic device 800 and other electronic devices.
  • Embodiments of the present invention also provide a computer-readable storage medium.
  • a computer program is stored on the computer-readable storage medium.
  • the computer program is executed by the processor 801, each of the video frame rate control method embodiments provided by the embodiment of the present invention is implemented.
  • the process can achieve the same technical effect. To avoid repetition, it will not be described again here.
  • the process of implementing the video frame rate control method of the embodiment can be completed by instructing relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium.
  • the program When the program is executed, it may include processes such as the embodiments of each method.
  • the storage medium can be a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, ROM) or a random access memory 802 (Random Access Memory, RAM for short), etc.

Abstract

The present invention relates to the technical field of video detection, and in particular to a video frame rate control method and apparatus, and an electronic device and a storage medium. The video frame rate control method comprises: performing frame extraction on a video stream on the basis of an initial frame extraction frequency, so as to obtain video frame data; performing coding processing on the video frame data, so as to generate picture coding data; identifying current event data which is comprised in the picture coding data; and performing primary modification on the initial frame extraction frequency according to the current event data, so as to determine a target frame extraction frequency for performing frame extraction on the video stream. By means of the present invention, an algorithm can be called according to the current event data of a video stream to dynamically redefine a frame extraction interval duration, such that not only can resources which are occupied by low-frequency events be reduced, but the identification quantity of high-frequency events can also be increased; and frame extraction is performed on the subsequent video stream according to a target frame extraction frequency which is obtained after modification, such that an algorithm identification rate of an algorithm training platform can be improved in different application scenarios.

Description

一种视频帧率控制方法、装置、电子设备及存储介质A video frame rate control method, device, electronic equipment and storage medium 技术领域Technical field
本申请要求于2022年3月22日提交中国专利局,申请号为202210283048.2、发明名称为“一种视频帧率控制方法、装置、电子设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。 This application requests the priority of the Chinese patent application submitted to the China Patent Office on March 22, 2022, with the application number 202210283048.2 and the invention title "A video frame rate control method, device, electronic equipment and storage medium", all of which The contents are incorporated into this application by reference.
本发明涉及视频检测技术领域,尤其涉及一种视频帧率控制方法、装置、电子设备及存储介质。The present invention relates to the field of video detection technology, and in particular to a video frame rate control method, device, electronic equipment and storage medium.
背景技术Background technique
视频结构化描述技术是指,通过对原始视频进行智能分析,提取出关键信息,并进行文本的语义描述,得到视频的结构化语义信息。通过视频结构化描述技术可以对视频数据进行目标分类识别、目标姿态识别、目标物体分割等。Video structured description technology refers to extracting key information through intelligent analysis of the original video, and performing semantic description of the text to obtain the structured semantic information of the video. Through video structured description technology, video data can be used for target classification and recognition, target posture recognition, target object segmentation, etc.
现有技术中,主流的摄像头视频流服务抽帧方式都是默认多少秒抽帧一次或者手动去配置,且同一时间运用不同算法时一直在针对不同算法重复消耗资源。实际上,针对在不同的运用场景中时,视频流中的对象的状态是不同的,因此,使用固定的抽帧频率并不利于对象的识别。可见,在现有的视频抽帧中,存在差异性小、识别效率低的问题。In the existing technology, the mainstream camera video streaming service frame extraction method is to extract frames once every few seconds by default or manually configured, and when using different algorithms at the same time, resources are repeatedly consumed for different algorithms. In fact, in different application scenarios, the status of objects in the video stream is different. Therefore, using a fixed frame frequency is not conducive to object recognition. It can be seen that in the existing video frame extraction, there are problems of small difference and low recognition efficiency.
技术解决方案Technical solutions
本发明实施例提供一种视频帧率控制方法,旨在解决现有的视频帧率控制方法中存在差异性小、识别效率低的问题。Embodiments of the present invention provide a video frame rate control method, aiming to solve the problems of small differences and low recognition efficiency in existing video frame rate control methods.
第一方面,本发明实施例提供一种视频帧率控制方法,所述方法包括以下步骤:In a first aspect, an embodiment of the present invention provides a video frame rate control method. The method includes the following steps:
基于初始抽帧频率对视频流进行抽帧,得到视频帧数据;Extract frames from the video stream based on the initial frame extraction frequency to obtain video frame data;
识别所述图片编码数据中包括的当前事件数据;identifying current event data included in the picture encoded data;
根据所述当前事件数据对所述初始抽帧频率进行初次修改,以确定对所述视频流进行抽帧的目标抽帧频率。The initial frame decimation frequency is initially modified according to the current event data to determine a target frame decimation frequency for decimating the video stream.
第二方面,本发明实施例还提供一种视频帧率控制装置,包括:In a second aspect, an embodiment of the present invention also provides a video frame rate control device, including:
抽帧模块,用于基于初始抽帧频率对视频流进行抽帧,得到视频帧数据;The frame extraction module is used to extract frames from the video stream based on the initial frame extraction frequency to obtain video frame data;
识别模块,用于识别所述图片编码数据中包括的当前事件数据;An identification module, used to identify the current event data included in the picture encoding data;
修改模块,用于根据所述当前事件数据对所述初始抽帧频率进行初次修改,以确定对所述视频流进行抽帧的目标抽帧频率。A modification module, configured to perform an initial modification to the initial frame extraction frequency according to the current event data to determine a target frame extraction frequency for extracting frames on the video stream.
第三方面,本发明实施例还提供一种电子设备,包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现本发明实施例提供的视频帧率控制方法中的步骤。In a third aspect, embodiments of the present invention further provide an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor. The processor executes the computer program. When implementing the steps in the video frame rate control method provided by the embodiment of the present invention.
第四方面,本发明实施例还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现本发明实施例提供的视频帧率控制方法中的步骤。In a fourth aspect, embodiments of the present invention also provide a computer-readable storage medium. A computer program is stored on the computer-readable storage medium. When the computer program is executed by a processor, the video frame rate provided by the embodiment of the present invention is achieved. Control the steps in the method.
在本发明实施例中,通过基于初始抽帧频率对视频流进行抽帧,得到视频帧数据;对所述视频帧数据进行编码处理,生成图片编码数据;识别所述图片编码数据中包括的当前事件数据;根据所述当前事件数据对所述初始抽帧频率进行初次修改,以确定对所述视频流进行抽帧的目标抽帧频率。所以,本发明实施例可以根据视频流的当前事件数据去调动算法动态的重新定义抽帧间隔时长,不仅可以降低低频的事件占用的资源,还可以去提高高频的事件的识别数,从而达到快速的获取算法素材,根据修改后得到的目标抽帧频率对后续的视频流进行抽帧,针对运用在不同场景下,能提升算法训练平台的算法识别率。In the embodiment of the present invention, the video stream is extracted based on the initial frame extraction frequency to obtain video frame data; the video frame data is encoded to generate picture encoded data; and the current frame included in the picture encoded data is identified. Event data: perform an initial modification to the initial frame extraction frequency according to the current event data to determine a target frame extraction frequency for extracting frames on the video stream. Therefore, the embodiment of the present invention can mobilize the algorithm to dynamically redefine the frame interval duration according to the current event data of the video stream, which can not only reduce the resources occupied by low-frequency events, but also increase the number of identifications of high-frequency events, thereby achieving Quickly obtain algorithm materials, and extract frames from subsequent video streams based on the modified target frame frequency. For application in different scenarios, it can improve the algorithm recognition rate of the algorithm training platform.
附图说明Description of the drawings
下面将对本申请实施例中所需要使用的附图作介绍。The drawings needed to be used in the embodiments of this application will be introduced below.
图1是本发明实施例提供一种系统结构示意图;Figure 1 is a schematic structural diagram of a system provided by an embodiment of the present invention;
图2是本发明实施例提供的一种视频帧率控制方法的流程图;Figure 2 is a flow chart of a video frame rate control method provided by an embodiment of the present invention;
图3a是本发明实施例提供的另一种视频帧率控制方法的流程图;Figure 3a is a flow chart of another video frame rate control method provided by an embodiment of the present invention;
图3b是本发明实施例提供的另一种视频帧率控制方法的流程图;Figure 3b is a flow chart of another video frame rate control method provided by an embodiment of the present invention;
图3c是本发明实施例提供的另一种视频帧率控制方法的流程图;Figure 3c is a flow chart of another video frame rate control method provided by an embodiment of the present invention;
图3d是本发明实施例提供的另一种视频帧率控制方法的流程图;Figure 3d is a flow chart of another video frame rate control method provided by an embodiment of the present invention;
图4是本发明实施例提供的一种视频帧率控制装置的结构示意图;Figure 4 is a schematic structural diagram of a video frame rate control device provided by an embodiment of the present invention;
图5是本发明实施例提供的修改模块的结构示意图;Figure 5 is a schematic structural diagram of a modification module provided by an embodiment of the present invention;
图6是本发明实施例提供的另一种视频帧率控制装置的结构示意图;Figure 6 is a schematic structural diagram of another video frame rate control device provided by an embodiment of the present invention;
图7是本发明实施例提供的另一种视频帧率控制装置的结构示意图;Figure 7 is a schematic structural diagram of another video frame rate control device provided by an embodiment of the present invention;
图8是本发明实施例提供的一种电子设备的结构示意图。Figure 8 is a schematic structural diagram of an electronic device provided by an embodiment of the present invention.
本发明的实施方式Embodiments of the invention
下面结合附图对本申请的实施例进行描述。The embodiments of the present application are described below with reference to the accompanying drawings.
如图1所示,系统架构100可以包括终端设备101、102、103,网络104和服务器105。网络104用以在终端设备101、102、103和服务器105之间提供通信链路的介质。网络104可以包括各种连接类型,例如有线、无线通信链路或者光纤电缆等等。As shown in Figure 1, the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is a medium used to provide communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
用户可以使用终端设备101、102、103通过网络104与服务器105交互,以接收或发送消息等。终端设备101、102、103可以为采集设备。终端设备101、102、103可以是具有视频采集功能的摄像头、客流相机等。摄像头又称为电脑相机、电脑眼、电子眼等,是一种视频输入设备,被广泛的运用于视频会议,远程医疗及实时监控等方面。Users can use terminal devices 101, 102, 103 to interact with the server 105 through the network 104 to receive or send messages, etc. The terminal devices 101, 102, and 103 may be collection devices. The terminal devices 101, 102, and 103 may be cameras with video collection functions, passenger flow cameras, etc. A camera, also known as a computer camera, computer eye, electronic eye, etc., is a video input device that is widely used in video conferencing, telemedicine, and real-time monitoring.
服务器105可以是提供各种服务的服务器,例如对终端设备101、102、103采集到的视频流、图像信息提供支持的后台服务器。The server 105 may be a server that provides various services, such as a background server that provides support for video streams and image information collected by the terminal devices 101, 102, and 103.
需要说明的是,本申请实施例所提供的一种视频帧率控制方法一般由服务器执行,相应地,一种视频帧率控制装置一般设置于服务器中。It should be noted that the video frame rate control method provided by the embodiments of the present application is generally executed by a server. Correspondingly, a video frame rate control device is generally provided in the server.
应该理解,图1中的终端设备、网络和服务器的数目仅仅是示意性的。根据实现需要,可以具有任意数目的终端设备、网络和服务器。It should be understood that the number of terminal devices, networks and servers in Figure 1 is only illustrative. Depending on implementation needs, there can be any number of end devices, networks, and servers.
如图2所示,图2是本发明实施例提供的一种视频帧率控制方法的流程图,如图2所示,包括以下步骤:As shown in Figure 2, Figure 2 is a flow chart of a video frame rate control method provided by an embodiment of the present invention. As shown in Figure 2, it includes the following steps:
S201、基于初始抽帧频率对视频流进行抽帧,得到视频帧数据。S201. Extract frames from the video stream based on the initial frame extraction frequency to obtain video frame data.
其中,本实施例提供的一种视频帧率控制方法所运用的电子设备使用的场景包括但不限于城市治理,例如道路监测、人员识别、环境监测等。其中,上述视频流可以是通过采集设备采集得到,具体可以是在线实时采集到的视频,也可以是离线保存的视频。采集设备包括摄像头、客流相机等具有可以进行视频采集及图片保存、处理等功能的图像采集设备。在本实施例中,上述采集设备作为示例指摄像头。上述的视频流可以是指需要进行抽帧、解码、编码、识别分析等的视频流。视频流是指视频数据的传输,例如,视频流能够被作为一个稳定的和连续的流通过网络处理。Among them, the video frame rate control method provided in this embodiment uses electronic devices in scenarios including but not limited to urban governance, such as road monitoring, personnel identification, environmental monitoring, etc. Among them, the above video stream can be collected through a collection device, specifically, it can be a video collected online in real time, or a video saved offline. Collection equipment includes cameras, passenger flow cameras and other image collection equipment that can perform video collection, picture storage and processing. In this embodiment, the above-mentioned collection device refers to a camera as an example. The above-mentioned video stream may refer to a video stream that requires frame extraction, decoding, encoding, recognition analysis, etc. Video streaming refers to the transmission of video data. For example, video streaming can be processed as a stable and continuous stream through the network.
上述通过摄像头获取到视频流之后,可以对视频流进行视频抽帧,抽帧会得到上述的视频帧数据。具体的,每个视频在抽帧之前,都会先形成帧数。视频的帧数指在1秒钟时间里传输的图片的量,也可以理解为图形处理器每秒钟能够刷新几次,通常用fps(Frames Per Second)表示。上述视频抽帧就是在一段视频中,通过间隔一定帧抽取若干帧的方式,模拟每隔一段时间拍摄一张照片并接合起来形成视频的过程。起始可以预先设置摄像头的初始抽帧频率区控制抽帧,通过设置的初始抽帧频率去对视频流进行抽帧,同时还会进行缓存。将抽帧后的数据进行缓存可以针对同一个摄像头在同一时间调用多个算法时,不用每次都从视频流中去获取,直接从缓存中获取可以节省资源。After the video stream is obtained through the camera, video frames can be extracted from the video stream, and frame extraction will obtain the above-mentioned video frame data. Specifically, each video will first form a frame number before extracting frames. The number of frames in a video refers to the amount of pictures transmitted in 1 second. It can also be understood as how many times the graphics processor can refresh per second. It is usually expressed in terms of fps (Frames). Per Second) said. The above-mentioned video frame extraction is to extract several frames at certain intervals from a video, simulating the process of taking a photo at regular intervals and joining them together to form a video. Initially, you can pre-set the initial frame extraction frequency area of the camera to control frame extraction, and use the set initial frame extraction frequency to extract frames from the video stream and cache them at the same time. Caching the data after frame extraction can save resources when calling multiple algorithms for the same camera at the same time. It does not need to be obtained from the video stream every time. Obtaining it directly from the cache can save resources.
S202、对视频帧数据进行编码处理,生成图片编码数据。S202. Encode the video frame data to generate image encoding data.
具体的,对视频帧数据进行编码处理后便可以得到上述图片编码数据。上述图片编码数据可以是基于base64编码得到的数据。base64编码是将数据用64个可打印的字符进行编码的方式,任何数据底层实现都是二进制,所以都可以进行base64编码,base64编码主要用在数据传输过程中(编码、解码)。Specifically, the above-mentioned picture coded data can be obtained after coding the video frame data. The above image encoding data may be data obtained based on base64 encoding. Base64 encoding is a method of encoding data with 64 printable characters. The underlying implementation of any data is binary, so base64 encoding can be performed. Base64 encoding is mainly used in the data transmission process (encoding, decoding).
S203、识别图片编码数据中包括的当前事件数据。S203. Identify the current event data included in the picture encoding data.
其中,可以通过调用算法仓,根据图片编码数据去算法仓中调取对应的算法进行识别,以获取图片编码数据中包括的当前事件数据。当前事件数据可以指对视频流进行分析后得到的结果,例如:视频流中包括的道路、道路上的人、车、道路的情况等。Among them, the algorithm warehouse can be called, and the corresponding algorithm can be retrieved from the algorithm warehouse according to the picture encoding data for identification, so as to obtain the current event data included in the picture encoding data. The current event data may refer to the results obtained after analyzing the video stream, such as roads included in the video stream, people and vehicles on the road, road conditions, etc.
S204、根据当前事件数据对初始抽帧频率进行初次修改,以确定对视频流进行抽帧的目标抽帧频率。S204. Modify the initial frame extraction frequency for the first time according to the current event data to determine the target frame extraction frequency for extracting frames on the video stream.
其中,初始抽帧频率也可以指摄像头上一次运用时的抽帧频率。上述当前事件数据中可以包括有具体的事件内容,事件内容可以包括识别目标、识别时间、识别地点、识别结果、识别时的抽帧频率等。根据事件内容可以调取对应的识别根据事件内容对初始抽帧频率进行修改,最终来确定合适的目标抽帧频率,来对初始抽帧频率进行修改调整,同时对每次修改的数据进行记录。例如:事件内容为道路破损检测,需要获取的图像帧的抽帧频率较小,则对应道路破损检测算法修改为每次获取图像帧的时间间隔可以更长,因道路破损检测长时间的图像一致,变化率低。当然,事件内容包括流动性大、变换程度高的数据时,对应的算法就会提高抽帧频率进行识别。再例如:当摄像头设置在商场、城市交通道路场景,在短时间内通过识别算法识别到有大量的人员出现在视频流中,或者有大量的车辆出现在视频流中,则可以提高初始抽帧频率。Among them, the initial frame sampling frequency may also refer to the frame sampling frequency when the camera was last used. The above-mentioned current event data may include specific event content, and the event content may include recognition target, recognition time, recognition location, recognition result, frame extraction frequency during recognition, etc. According to the event content, the corresponding identification can be called to modify the initial frame extraction frequency according to the event content, and finally determine the appropriate target frame extraction frequency to modify and adjust the initial frame extraction frequency, and at the same time record the data of each modification. For example, if the event content is road damage detection, and the frame frequency of the image frames to be obtained is small, the corresponding road damage detection algorithm is modified to obtain a longer time interval for each image frame, because the long-term images of road damage detection are consistent. , the change rate is low. Of course, when the event content includes data with high fluidity and high degree of transformation, the corresponding algorithm will increase the frequency of frame extraction for identification. Another example: when the camera is set in a shopping mall or urban traffic scene, and a large number of people appear in the video stream or a large number of vehicles appear in the video stream through the recognition algorithm in a short period of time, the initial frame extraction can be improved. frequency.
在本发明实施例中,通过基于初始抽帧频率对视频流进行抽帧,得到视频帧数据;对视频帧数据进行编码处理,生成图片编码数据;识别图片编码数据中包括的当前事件数据;根据当前事件数据对初始抽帧频率进行初次修改,以确定对视频流进行抽帧的目标抽帧频率。所以,本发明实施例可以根据视频流的当前事件数据去调动算法动态的重新定义抽帧间隔时长,不仅可以降低低频的事件占用的资源,还可以去提高高频的事件的识别数,从而达到快速的获取算法素材,根据修改后得到的目标抽帧频率对后续的视频流进行抽帧,针对运用在不同场景下,能提升算法训练平台的算法识别率。In the embodiment of the present invention, the video stream is extracted based on the initial frame frequency to obtain video frame data; the video frame data is encoded to generate picture encoded data; the current event data included in the picture encoded data is identified; according to The current event data makes an initial modification to the initial decimation frequency to determine the target decimation frequency for decimating the video stream. Therefore, the embodiment of the present invention can mobilize the algorithm to dynamically redefine the frame interval duration according to the current event data of the video stream, which can not only reduce the resources occupied by low-frequency events, but also increase the number of identifications of high-frequency events, thereby achieving Quickly obtain algorithm materials, and extract frames from subsequent video streams based on the modified target frame frequency. For application in different scenarios, it can improve the algorithm recognition rate of the algorithm training platform.
如图3a所示,图3a是本发明实施例提供的另一种视频帧率控制方法的流程图,如图3所示,包括以下步骤:As shown in Figure 3a, Figure 3a is a flow chart of another video frame rate control method provided by an embodiment of the present invention. As shown in Figure 3, it includes the following steps:
S301、基于初始抽帧频率对视频流进行抽帧,得到视频帧数据。S301. Extract frames from the video stream based on the initial frame extraction frequency to obtain video frame data.
S302、对视频帧数据进行编码处理,生成图片编码数据。S302. Encode the video frame data to generate image encoding data.
S303、识别图片编码数据中包括的当前事件数据。S303. Identify the current event data included in the picture encoding data.
S304、获取历史事件数据中的历史事件内容。S304. Obtain the historical event content in the historical event data.
其中,上述历史事件数据可以包括摄像头在之前所获取的视频流的图像数据,每个图像数据匹配有对应的抽帧帧率。上述历史事件内容可以包括人员识别、道路识别、动物识别等等。The above historical event data may include image data of video streams previously acquired by the camera, and each image data is matched with a corresponding frame rate. The above historical event content may include person identification, road identification, animal identification, etc.
S305、计算事件内容与历史事件内容的匹配度。S305. Calculate the matching degree between the event content and the historical event content.
其中,获取到当前的事件内容之后,为了便于修改对应的抽帧频率,可以将当前的事件内容与历史事件内容进行比较。历史事件数据量大,在进行识别比较时,可以优选判断当前的事件内容所属的事件类型,然后根据事件类型再去锁定历史事件数据中对应同类型的历史事件内容,然后再将当前的事件内容与同类型的历史事件内容进行逐一比较,筛选出匹配度最高的历史事件内容。Among them, after obtaining the current event content, in order to facilitate modification of the corresponding frame extraction frequency, the current event content can be compared with the historical event content. The amount of historical event data is large. When performing identification and comparison, it is best to determine the event type to which the current event content belongs, and then lock the corresponding historical event content of the same type in the historical event data according to the event type, and then add the current event content Compare it one by one with historical event content of the same type and filter out the historical event content with the highest matching degree.
更具体的,事件内容以及历史事件内容对应有不同的识别算法,识别算法包含在算法仓中,针对不同识别物体可以对应不同的识别算法,例如:用于人员识别时可以包括人体关键点识别算法、人体特征识别算法等,用于道路车辆检测时可以包括车牌识别算法等。上述的事件类型可以包括但不限于人员识别、车辆识别、道路情况识别、动物识别等等。历史事件信息可以缓存在后台预设的缓存区中,当然,可以设置缓存时间,例如对1个月内的历史事件信息进行缓存。More specifically, event content and historical event content correspond to different recognition algorithms. The recognition algorithms are included in the algorithm bin. Different recognition algorithms can correspond to different recognition objects. For example, when used for person recognition, it can include human body key point recognition algorithms. , human feature recognition algorithms, etc., which can include license plate recognition algorithms when used for road vehicle detection. The above event types may include but are not limited to person identification, vehicle identification, road condition identification, animal identification, etc. Historical event information can be cached in a preset cache area in the background. Of course, the cache time can be set, for example, historical event information within 1 month can be cached.
S306、若匹配度满足匹配度阈值,则根据历史事件内容的抽帧频率对当前事件数据的初始抽帧频率进行修改,以确定对视频流进行抽帧的目标抽帧频率。S306. If the matching degree meets the matching degree threshold, modify the initial frame extraction frequency of the current event data according to the frame extraction frequency of the historical event content to determine the target frame extraction frequency for extracting frames for the video stream.
其中,筛选出匹配度最高的历史事件内容之后,可以与预设的匹配度阈值进行比较,若满足匹配度阈值,则可以基于匹配度最高的历史事件内容对应的抽帧频率对当前时间数据的初始抽帧频率进行修改,以确定对视频流进行抽帧的目标抽帧频率。这样,当再次遇到同类型的事件内容时,可以加快算法的识别速度以及准确率。Among them, after filtering out the historical event content with the highest matching degree, it can be compared with the preset matching degree threshold. If the matching degree threshold is met, the current time data can be extracted based on the frame extraction frequency corresponding to the historical event content with the highest matching degree. The initial decimation frequency is modified to determine the target decimation frequency for decimating the video stream. In this way, when the same type of event content is encountered again, the recognition speed and accuracy of the algorithm can be accelerated.
S308、若匹配度不满足匹配度阈值,则基于预设的抽帧频率进行修改,以确定对视频流进行抽帧的目标抽帧频率。S308. If the matching degree does not meet the matching degree threshold, modify the frame extraction frequency based on the preset frame extraction frequency to determine the target frame extraction frequency for extracting frames for the video stream.
当然,若匹配度最高的历史事件内容的匹配度依然不满足匹配度阈值,可能说明同一摄像头还未识别过/识别数据较少,此时,可以基于预设的抽帧频率对初始抽帧频率进行修改。Of course, if the matching degree of the historical event content with the highest matching degree still does not meet the matching degree threshold, it may mean that the same camera has not yet been recognized/the recognition data is small. In this case, the initial frame sampling frequency can be based on the preset frame sampling frequency. to modify.
作为另一种可能的实施例方式,结合图3b所示,图3b是本发明实施例提供的另一种视频帧率控制方法在的流程图,在上述步骤S305之后,还包括:As another possible embodiment, as shown in FIG. 3b , FIG. 3b is a flow chart of another video frame rate control method provided by an embodiment of the present invention. After the above step S305, it also includes:
308、获取采集视频流的采集设备所在的环境参数。308. Obtain the environmental parameters of the collection device that collects the video stream.
其中,因采集设备(摄像头)设置的应用场景不同,所以摄像头的环境参数可指摄像头所应用的环境,包括:白天、夜晚、室内、室外、旅游景区、餐厅、学校、商场、车库等等。因此,可以获取采集视频流的摄像头所在的环境参数,结合环境参数进行初始帧率的修改。Among them, due to the different application scenarios of the collection equipment (camera), the environmental parameters of the camera can refer to the environment where the camera is used, including: day, night, indoors, outdoors, tourist attractions, restaurants, schools, shopping malls, garages, etc. Therefore, the environmental parameters of the camera that collects the video stream can be obtained, and the initial frame rate can be modified based on the environmental parameters.
309、根据事件内容与历史事件内容的匹配度,以及采集设备的环境参数,对视频流的初始抽帧频率进行再次修改,以确定对视频流进行抽帧的目标抽帧频率。309. According to the matching degree between the event content and the historical event content, and the environmental parameters of the collection device, the initial frame extraction frequency of the video stream is modified again to determine the target frame extraction frequency for the video stream.
在获取到摄像头的环境参数后,可以结合摄像头的环境参数与上述得到的匹配度最高的历史事件内容的抽帧帧率对视频流的初始抽帧帧率再次进行修改。这样结合多个维度调整初始抽帧频率有利于后台提升算法的识别率,后续可进行更高效的识别。After obtaining the environmental parameters of the camera, the initial frame rate of the video stream can be modified again by combining the environmental parameters of the camera with the obtained frame rate of the historical event content with the highest matching degree. In this way, adjusting the initial frame extraction frequency in combination with multiple dimensions will help improve the recognition rate of the algorithm in the background, and enable more efficient recognition in the future.
作为另一种可能的实施例方式,结合图3c所示,本发明实施例提供的另一种视频帧率控制方法流程图,在上述步骤S305之后,还包括:As another possible embodiment, as shown in FIG. 3c , another video frame rate control method flow chart provided by an embodiment of the present invention, after the above step S305, also includes:
310、获取采集视频流的采集设备的内置性能参数。310. Obtain the built-in performance parameters of the collection device that collects video streams.
其中,摄像头的内置性能参数可以指摄像头的自身参数。因设置在不同的环境中,因此对应摄像头的内置性能参数会进行一定程度的调节,且针对不同型号的摄像头对应的内置性能参数也不一致,例如:摄像头在白天、黑夜环境中的分辨率、视频中的亮度等,设置在有照明条件的车库时可以选择分辨率相对低一些的摄像头,用在商场时便可以选择一些高清摄像头。Among them, the camera's built-in performance parameters may refer to the camera's own parameters. Because they are set in different environments, the built-in performance parameters of the corresponding cameras will be adjusted to a certain extent, and the built-in performance parameters corresponding to different models of cameras are also inconsistent, such as: the resolution and video quality of the camera in day and night environments. When it is set up in a garage with lighting conditions, you can choose a relatively low-resolution camera, and when it is used in a shopping mall, you can choose some high-definition cameras.
311、根据事件内容与历史事件内容的匹配度,以及采集设备的内置性能参数,对视频流的初始抽帧频率进行再次修改,以确定对视频流进行抽帧的目标抽帧频率。311. Based on the matching degree between the event content and the historical event content and the built-in performance parameters of the collection device, modify the initial frame extraction frequency of the video stream again to determine the target frame extraction frequency for the video stream.
在获取到摄像头的内置性能参数后,可以结合摄像头的内置性能参数与上述得到的匹配度最高的历史事件内容的抽帧帧率对视频流的初始抽帧帧率再次进行修改。这样,结合多个维度调整初始抽帧频率有利于后台提升算法的识别率,后续可进行更高效的识别。After obtaining the built-in performance parameters of the camera, the initial frame rate of the video stream can be modified again by combining the built-in performance parameters of the camera with the frame rate of the historical event content obtained above with the highest matching degree. In this way, adjusting the initial frame extraction frequency in combination with multiple dimensions will help improve the recognition rate of the algorithm in the background, and enable more efficient recognition in the future.
作为另一种可能的实施例方式,结合图3d所示,图3d为本发明实施例提供的另一种视频帧率控制方法的流程图。还可以是结合当前事件数据的事件内容与历史事件内容的匹配度、摄像头的内置性能参数、摄像头的环境参数同时对视频流的初始抽帧频率进行修改。通过将每个修改条件(匹配度、内置性能参数和环境参数)进行量化,分别对应上述每个条件匹配量化值,基于量化值通过对应算法的特性去修改初始抽帧频率。这样,结合更多维度的条件调整初始抽帧频率更有利于后台提升算法的识别率,后续可进行更高效的识别。As another possible embodiment, as shown in FIG. 3d , FIG. 3d is a flow chart of another video frame rate control method provided by an embodiment of the present invention. It is also possible to modify the initial frame frequency of the video stream by combining the matching degree between the event content of the current event data and the historical event content, the built-in performance parameters of the camera, and the environmental parameters of the camera. By quantifying each modification condition (matching degree, built-in performance parameters and environmental parameters), the quantized value is matched to each of the above conditions, and the initial frame frequency is modified based on the quantized value through the characteristics of the corresponding algorithm. In this way, adjusting the initial frame extraction frequency in combination with more dimensional conditions is more conducive to improving the recognition rate of the algorithm in the background, and allows for more efficient recognition in the future.
此外,还可结合算法的识别时间,如晚上运用动物识别算法对视频流中的动物识别时,提高对视频流的初始抽帧频率,白天运行与人员活动相关的算法时,提高对应视频流的初始抽帧频率。这样,能够实现针对活动量大的应用场景,提高对视频流的抽帧频率;活动量较小的应用场景,则可以降低对视频流的抽帧频率。In addition, the recognition time of the algorithm can also be combined. For example, when using the animal recognition algorithm to identify animals in the video stream at night, the initial frame extraction frequency of the video stream is increased. When running algorithms related to human activities during the day, the frequency of the corresponding video stream is increased. Initial decimation frequency. In this way, the frame extraction frequency of the video stream can be increased for application scenarios with a large amount of activity; the frame extraction frequency of the video stream can be reduced for application scenarios with a small amount of activity.
可选的,方法还包括:根据多次修改数据对目标抽帧频率进行再次调整。Optionally, the method also includes: re-adjusting the target frame extraction frequency based on the multiple modification data.
当对初始抽帧频率进行多次修改后,每次的修改数据都会进行记录,可以给不同的修改参对照数(历史事件数据、环境参数、内置参数等)匹配一权重,同时还可以设置修改对照参数的优先级,结合修改对照参数的权重和/或优先级对目标抽帧频率再次进行调整后再作为最终的修改数据进行帧率修改。这样可以提高算法的识别准确率。When the initial frame frequency is modified multiple times, each modification data will be recorded. Different modification parameters (historical event data, environmental parameters, built-in parameters, etc.) can be matched with a weight, and modifications can also be set. The target frame frequency is adjusted again based on the priority of the comparison parameter, combined with the modification of the weight and/or priority of the comparison parameter, and then used as the final modification data for frame rate modification. This can improve the recognition accuracy of the algorithm.
可选的,参考图3d所示,方法还包括:获取当前事件数据的事件类型与事件内容,基于当前事件数据的事件类型与事件内容调整采集设备的分辨率。Optionally, as shown in Figure 3d, the method also includes: obtaining the event type and event content of the current event data, and adjusting the resolution of the collection device based on the event type and event content of the current event data.
其中,可以根据对视频流的抽帧得到的当前时间数据,分析所对应的事件类型以及事件内容,例如:识别到当前摄像头c用于车牌识别,识别内容包括在晚上20点进行小区车辆进出管理,针对夜晚车牌识别时环境带来的影响可以增强摄像头c的分辨率,若同一摄像头c识别内容为在中午12点,则可以相对夜晚的将分辨率降低,因环境本身提供一定的亮度。Among them, the corresponding event type and event content can be analyzed based on the current time data obtained by extracting frames from the video stream. For example, the current camera c is recognized for license plate recognition, and the recognition content includes vehicle entry and exit management in the community at 20 o'clock in the evening. The resolution of camera c can be enhanced to address the impact of the environment on license plate recognition at night. If the same camera c recognizes content at 12 noon, the resolution can be reduced compared to that at night, because the environment itself provides a certain brightness.
在本发明实施例中,通过根据当前事件数据的事件内容与历史事件内容进行比较获取匹配度最高的历史事件内容,将匹配度最高的历史事件内容的抽帧频率作为对当前事件数据的事件内容的修改数据,去调动算法动态的重新定义抽帧间隔时长,不仅可以降低低频的事件占用的资源,还可以去提高高频的事件的识别数,从而达到快速的获取算法素材,根据修改后得到的目标抽帧频率对后续的视频流进行抽帧,针对运用在不同场景下,能提升算法训练平台的算法识别率。其次,通过基于初始抽帧频率对视频流进行抽帧并缓存,可以针对同一个摄像头在同一时间调用多个算法时,不用每次都从视频流中去获取,直接从缓存中获取可以节省资源。此外,通过结合当前事件数据的事件内容与历史事件内容的匹配度、摄像头的环境参数和/或摄像头的内置参数对初始抽帧频率进行再次修改,结合了多个维度,通过多种方式都可以实现对初始抽帧频率的自动修改,通过对视频流的抽帧频率进行动态调整,可以针对运用在不同场景下,自动的降低低频重复的算法识别和提升高频的算法识别,极大的提升了算法训练平台的算法识别率。In the embodiment of the present invention, the historical event content with the highest matching degree is obtained by comparing the event content of the current event data with the historical event content, and the frame extraction frequency of the historical event content with the highest matching degree is used as the event content of the current event data. Modify the data to mobilize the algorithm to dynamically redefine the frame interval duration, which can not only reduce the resources occupied by low-frequency events, but also increase the number of identifications of high-frequency events, thereby achieving rapid acquisition of algorithm materials. According to the modified The target frame extraction frequency is used to extract frames for subsequent video streams, which can improve the algorithm recognition rate of the algorithm training platform for use in different scenarios. Secondly, by extracting frames from the video stream based on the initial frame extraction frequency and caching it, when multiple algorithms are called for the same camera at the same time, there is no need to obtain them from the video stream each time. Obtaining them directly from the cache can save resources. . In addition, the initial frame frequency is modified again by combining the matching degree between the event content of the current event data and the historical event content, the environmental parameters of the camera and/or the built-in parameters of the camera, combining multiple dimensions and using various methods. Realize automatic modification of the initial frame extraction frequency. By dynamically adjusting the frame extraction frequency of the video stream, it can automatically reduce low-frequency repetitive algorithm identification and improve high-frequency algorithm identification for use in different scenarios, greatly improving The algorithm recognition rate of the algorithm training platform is improved.
如图4所示,图4是本发明实施例提供的一种视频帧率控制装置的模块结构图,如图4所示,装置包括:As shown in Figure 4, Figure 4 is a module structure diagram of a video frame rate control device provided by an embodiment of the present invention. As shown in Figure 4, the device includes:
抽帧模块401,用于基于初始抽帧频率对视频流进行抽帧,得到视频帧数据;The frame extraction module 401 is used to extract frames from the video stream based on the initial frame extraction frequency to obtain video frame data;
编码模块402,用于对视频帧数据进行编码处理,生成图片编码数据;Encoding module 402 is used to encode video frame data and generate picture encoded data;
识别模块403,用于识别图片编码数据中包括的当前事件数据;The identification module 403 is used to identify the current event data included in the picture encoding data;
修改模块404,用于根据当前事件数据对初始抽帧频率进行初次修改,以确定对视频流进行抽帧的目标抽帧频率。The modification module 404 is configured to first modify the initial frame extraction frequency according to the current event data to determine the target frame extraction frequency for extracting frames on the video stream.
可选的,当前事件数据包括事件内容,不同的事件内容对应不同的抽帧频率。如图5所示,图5是本发明实施例提供的修改模块的结构示意图。其中,抽帧模块修改模块404包括:Optionally, the current event data includes event content, and different event content corresponds to different frame extraction frequencies. As shown in Figure 5, Figure 5 is a schematic structural diagram of a modification module provided by an embodiment of the present invention. Among them, the frame extraction module modification module 404 includes:
获取单元4041,用于获取历史事件数据中的历史事件内容;Acquisition unit 4041, used to obtain historical event content in historical event data;
识别单元4042,用于计算事件内容与历史事件内容的匹配度;Identification unit 4042, used to calculate the matching degree between event content and historical event content;
第一修改单元4043,用于若匹配度满足匹配度阈值,则根据历史事件内容的抽帧频率对当前事件数据的初始抽帧频率进行修改,以确定对视频流进行抽帧的目标抽帧频率;The first modification unit 4043 is configured to modify the initial frame extraction frequency of the current event data according to the frame extraction frequency of the historical event content if the matching degree meets the matching degree threshold, so as to determine the target frame extraction frequency for extracting frames for the video stream. ;
第二修改单元4044,用于若匹配度不满足匹配度阈值,则基于预设的抽帧频率进行修改。The second modification unit 4044 is used to perform modifications based on the preset frame extraction frequency if the matching degree does not meet the matching degree threshold.
可选的,如图6所示,图6是本发明实施例提供的另一种视频帧率控制装置的结构示意图。装置400还包括:Optionally, as shown in Figure 6, Figure 6 is a schematic structural diagram of another video frame rate control device provided by an embodiment of the present invention. Device 400 also includes:
第一获取模块405,用于获取采集视频流的采集设备所在的环境参数;The first acquisition module 405 is used to acquire the environmental parameters of the collection device where the video stream is collected;
第一计算模块406,用于根据事件内容与历史事件内容的匹配度,以及采集设备的环境参数,对视频流的初始抽帧频率进行再次修改,以确定对视频流进行抽帧的目标抽帧频率。The first calculation module 406 is used to modify the initial frame extraction frequency of the video stream again according to the matching degree between the event content and the historical event content and the environmental parameters of the collection device to determine the target frame extraction for the video stream. frequency.
可选的,如图7所示,图7是本发明实施例提供的另一种视频帧率控制装置的结构示意图。装置400还包括:Optionally, as shown in Figure 7, Figure 7 is a schematic structural diagram of another video frame rate control device provided by an embodiment of the present invention. Device 400 also includes:
第二获取模块408,用于获取采集视频流的采集设备的内置性能参数;The second acquisition module 408 is used to acquire the built-in performance parameters of the collection device that collects the video stream;
第二计算模块408,用于根据事件内容与历史事件内容的匹配度,以及采集设备的内置性能参数,对视频流的初始抽帧频率进行再次修改,以确定对视频流进行抽帧的目标抽帧频率。The second calculation module 408 is used to modify the initial frame extraction frequency of the video stream again based on the matching degree between the event content and the historical event content and the built-in performance parameters of the collection device to determine the target frame extraction frequency of the video stream. frame rate.
本发明实施例提供的视频帧率控制装置能够实现上述的视频帧率控制方法各个实施方式,以及相应有益效果,为避免重复,这里不再赘述。The video frame rate control device provided by the embodiment of the present invention can realize the above-mentioned various implementations of the video frame rate control method, as well as the corresponding beneficial effects. To avoid duplication, they will not be described again here.
如图8所示,图8为本发明实施例提供的一种电子设备的结构图。如图8所示,包括:处理器801、存储器802、网络接口803及存储在存储器802上并可在处理器801上运行的计算机程序,其中:As shown in FIG. 8 , FIG. 8 is a structural diagram of an electronic device provided by an embodiment of the present invention. As shown in Figure 8, it includes: a processor 801, a memory 802, a network interface 803, and a computer program stored on the memory 802 and capable of running on the processor 801, wherein:
处理器801用于调用存储器802存储的计算机程序,执行如下步骤:The processor 801 is used to call the computer program stored in the memory 802 and perform the following steps:
基于初始抽帧频率对视频流进行抽帧,得到视频帧数据;Extract frames from the video stream based on the initial frame extraction frequency to obtain video frame data;
对视频帧数据进行编码处理,生成图片编码数据;Encode the video frame data to generate image encoding data;
识别图片编码数据中包括的当前事件数据;Identify current event data included in the picture encoding data;
根据当前事件数据对初始抽帧频率进行初次修改,以确定对视频流进行抽帧的目标抽帧频率。The initial frame decimation frequency is initially modified based on the current event data to determine the target frame decimation frequency for decimating the video stream.
可选的,当前事件数据包括事件内容,不同的事件内容对应不同的抽帧频率,处理器801执行的根据当前事件数据对初始抽帧频率进行初次修改,以确定对视频流进行抽帧的目标抽帧频率,包括:Optionally, the current event data includes event content. Different event contents correspond to different frame extraction frequencies. The processor 801 performs an initial modification of the initial frame extraction frequency based on the current event data to determine the target of frame extraction for the video stream. Frame frequency, including:
获取历史事件数据中的历史事件内容;Obtain historical event content in historical event data;
计算事件内容与历史事件内容的匹配度;Calculate the matching degree between event content and historical event content;
若匹配度满足匹配度阈值,则根据历史事件内容的抽帧频率对当前事件数据的初始抽帧频率进行修改,以确定对视频流进行抽帧的目标抽帧频率;If the matching degree meets the matching degree threshold, the initial frame extraction frequency of the current event data is modified according to the frame extraction frequency of the historical event content to determine the target frame extraction frequency for the video stream;
若匹配度不满足匹配度阈值,则基于预设的抽帧频率进行修改,以确定对视频流进行抽帧的目标抽帧频率。If the matching degree does not meet the matching degree threshold, modifications are made based on the preset frame extraction frequency to determine the target frame extraction frequency for extracting frames for the video stream.
可选的,处理器801执行的计算事件内容与历史事件内容的匹配度之后,还包括:Optionally, after the processor 801 calculates the matching degree between the event content and the historical event content, it also includes:
获取采集视频流的采集设备所在的环境参数;Obtain the environmental parameters of the collection device that collects the video stream;
根据事件内容与历史事件内容的匹配度,以及采集设备的环境参数,对视频流的初始抽帧频率进行再次修改,以确定对视频流进行抽帧的目标抽帧频率。Based on the matching degree between the event content and the historical event content and the environmental parameters of the collection device, the initial frame extraction frequency of the video stream is modified again to determine the target frame extraction frequency for the video stream.
可选的,处理器801执行的计算事件内容与历史事件内容的匹配度之后,还包括:Optionally, after the processor 801 calculates the matching degree between the event content and the historical event content, it also includes:
获取采集视频流的采集设备的内置性能参数;Obtain the built-in performance parameters of the collection device that collects the video stream;
根据事件内容与历史事件内容的匹配度,以及采集设备的内置性能参数,对视频流的初始抽帧频率进行再次修改,以确定对视频流进行抽帧的目标抽帧频率。Based on the matching degree between the event content and the historical event content, and the built-in performance parameters of the collection device, the initial frame extraction frequency of the video stream is modified again to determine the target frame extraction frequency for the video stream.
可选的,处理器801还用于执行根据多次修改数据对目标抽帧频率进行再次调整。Optionally, the processor 801 is also configured to re-adjust the target frame frequency based on the multiple modification data.
可选的,处理器801还用于执行获取当前事件数据的事件类型与事件内容,基于当前事件数据的事件类型与事件内容调整采集设备的分辨率。Optionally, the processor 801 is also configured to obtain the event type and event content of the current event data, and adjust the resolution of the collection device based on the event type and event content of the current event data.
本发明实施例还提供一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,该计算机程序被处理器执行时实现本发明实施例提供的视频帧率控制方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。Embodiments of the present invention also provide a computer-readable storage medium. A computer program is stored on the computer-readable storage medium. When the computer program is executed by a processor, each process of the video frame rate control method embodiment provided by the embodiment of the present invention is implemented. , and can achieve the same technical effect, so to avoid repetition, they will not be described again here.
需要指出的是,图中仅示出了具有组件的801-803,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。其中,本技术领域技术人员可以理解,这里的电子设备是一种能够按照事先设定或存储的指令,自动进行数值计算和/或信息处理的设备,其硬件包括但不限于微处理器、专用集成电路(Application Specific Integrated Circuit,ASIC)、可编程门阵列(Field-Programmable GateArray,FPGA)、数字处理器(Digital Signal Processor,DSP)、嵌入式设备等。It should be noted that only 801-803 with components are shown in the figure, but it should be understood that implementation of all illustrated components is not required, and more or fewer components may be implemented instead. Among them, those skilled in the art can understand that the electronic device here is a device that can automatically perform numerical calculations and/or information processing according to preset or stored instructions. Its hardware includes but is not limited to microprocessors, special-purpose Integrated circuit (Application Specific Integrated Circuit (ASIC), Programmable Gate Array (Field-Programmable GateArray, FPGA), Digital Signal Processor (DSP), embedded devices, etc.
电子设备800可以是桌上型计算机、笔记本、掌上电脑及云端服务器等计算设备。电子设备800可以与客户通过键盘、鼠标、遥控器、触摸板或声控设备等方式进行人机交互。The electronic device 800 may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The electronic device 800 can perform human-computer interaction with the customer through a keyboard, mouse, remote control, touch pad, or voice-activated device.
存储器802至少包括一种类型的可读存储介质,可读存储介质包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘等。在一些实施例中,存储器802可以是电子设备的内部存储单元,例如该电子设备的硬盘或内存。在另一些实施例中,存储器802也可以是电子设备的外部存储设备,例如该电子设备上配备的插接式硬盘,智能存储卡(Smart Media Card, SMC),安全数字(Secure Digital, SD)卡,闪存卡(Flash Card)等。当然,存储器802还可以既包括电子设备的内部存储单元也包括其外部存储设备。本实施例中,存储器802通常用于存储安装于电子设备的操作系统和各类应用软件,例如视频帧率控制方法的程序代码等。此外,存储器802还可以用于暂时地存储已经输出或者将要输出的各类数据。The memory 802 includes at least one type of readable storage medium. The readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory ( SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disks, optical disks, etc. In some embodiments, memory 802 may be an internal storage unit of the electronic device, such as a hard drive or memory of the electronic device. In other embodiments, the memory 802 may also be an external storage device of the electronic device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), or a secure digital (Secure Digital) device equipped on the electronic device. SD) card, Flash Card, etc. Of course, the memory 802 may also include both the internal storage unit of the electronic device and its external storage device. In this embodiment, the memory 802 is usually used to store operating systems and various application software installed on electronic devices, such as program codes for video frame rate control methods, etc. In addition, the memory 802 can also be used to temporarily store various types of data that have been output or will be output.
处理器801在一些实施例中可以是中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器、或其他数据处理芯片。该处理器801通常用于控制电子设备的总体操作。本实施例中,处理器801用于运行存储器801中存储的程序代码或者处理数据,例如运行视频帧率控制方法的程序代码。Processor 801 may be a central processing unit (Central Processing Unit) in some embodiments. Processing Unit (CPU), controller, microcontroller, microprocessor, or other data processing chip. The processor 801 is typically used to control the overall operation of the electronic device. In this embodiment, the processor 801 is used to run the program code or process data stored in the memory 801, for example, run the program code of the video frame rate control method.
网络接口803可包括无线网络接口或有线网络接口,该网络接口803通常用于在电子设备800与其他电子设备之间建立通信连接。The network interface 803 may include a wireless network interface or a wired network interface. The network interface 803 is generally used to establish a communication connection between the electronic device 800 and other electronic devices.
本发明实施例还提供一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,该计算机程序被处理器801执行时实现本发明实施例提供的视频帧率控制方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。Embodiments of the present invention also provide a computer-readable storage medium. A computer program is stored on the computer-readable storage medium. When the computer program is executed by the processor 801, each of the video frame rate control method embodiments provided by the embodiment of the present invention is implemented. The process can achieve the same technical effect. To avoid repetition, it will not be described again here.
本领域普通技术人员可以理解实现实施例视频帧率控制方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如各方法的实施例的流程。其中,存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存取存储器802(Random Access Memory,简称RAM)等。Those of ordinary skill in the art can understand that all or part of the process of implementing the video frame rate control method of the embodiment can be completed by instructing relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium. When the program is executed, it may include processes such as the embodiments of each method. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, ROM) or a random access memory 802 (Random Access Memory, RAM for short), etc.
本申请的说明书和权利要求书或上述附图中的术语“第一”、“第二”等是用于区别不同对象,而不是用于描述特定顺序。在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。The terms "first", "second", etc. in the description and claims of this application or the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific sequence. Reference herein to "an embodiment" means that a particular feature, structure or characteristic described in connection with the embodiment can be included in at least one embodiment of the present application. The appearances of this phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those skilled in the art understand, both explicitly and implicitly, that the embodiments described herein may be combined with other embodiments.
以上所揭露的仅为本发明较佳实施例而已,当然不能以此来限定本发明之权利范围,因此依本发明权利要求所作的等同变化,仍属本发明所涵盖的范围。What is disclosed above is only the preferred embodiment of the present invention. Of course, it cannot be used to limit the scope of the present invention. Therefore, equivalent changes made according to the claims of the present invention still fall within the scope of the present invention.

Claims (10)

  1. 一种视频帧率控制方法,其特征在于,所述方法包括以下步骤:A video frame rate control method, characterized in that the method includes the following steps:
    基于初始抽帧频率对视频流进行抽帧,得到视频帧数据;Extract frames from the video stream based on the initial frame extraction frequency to obtain video frame data;
    对所述视频帧数据进行编码处理,生成图片编码数据;Encoding the video frame data to generate picture encoding data;
    识别所述图片编码数据中包括的当前事件数据;identifying current event data included in the picture encoded data;
    根据所述当前事件数据对所述初始抽帧频率进行初次修改,以确定对所述视频流进行抽帧的目标抽帧频率。The initial frame decimation frequency is initially modified according to the current event data to determine a target frame decimation frequency for decimating the video stream.
  2. 如权利要求1所述的方法,其特征在于,所述当前事件数据包括事件内容,不同的所述事件内容对应不同的抽帧频率,所述根据所述当前事件数据对所述初始抽帧频率进行初次修改,以确定对所述视频流进行抽帧的目标抽帧频率,包括:The method of claim 1, wherein the current event data includes event content, different event contents correspond to different frame extraction frequencies, and the initial frame extraction frequency is determined according to the current event data. Make an initial modification to determine the target frame frequency for decimating the video stream, including:
    获取历史事件数据中的历史事件内容;Obtain historical event content in historical event data;
    计算所述事件内容与所述历史事件内容的匹配度;Calculate the matching degree between the event content and the historical event content;
    若所述匹配度满足匹配度阈值,则根据所述历史事件内容的抽帧频率对所述当前事件数据的初始抽帧频率进行修改,以确定对所述视频流进行抽帧的目标抽帧频率;If the matching degree meets the matching degree threshold, the initial frame extraction frequency of the current event data is modified according to the frame extraction frequency of the historical event content to determine the target frame extraction frequency for extracting frames for the video stream. ;
    若所述匹配度不满足匹配度阈值,则基于预设的抽帧频率进行修改,以确定对所述视频流进行抽帧的目标抽帧频率。If the matching degree does not meet the matching degree threshold, modification is made based on the preset frame extraction frequency to determine the target frame extraction frequency for extracting frames on the video stream.
  3. 如权利要求2所述的方法,其特征在于,所述计算所述事件内容与历史事件内容的匹配度之后,还包括:The method of claim 2, wherein after calculating the matching degree between the event content and historical event content, it further includes:
    获取采集所述视频流的采集设备所在的环境参数;Obtain the environmental parameters of the collection device that collects the video stream;
    根据所述事件内容与所述历史事件内容的匹配度,以及所述采集设备的环境参数,对所述视频流的初始抽帧频率进行再次修改,以确定对所述视频流进行抽帧的所述目标抽帧频率。According to the matching degree between the event content and the historical event content, and the environmental parameters of the collection device, the initial frame extraction frequency of the video stream is modified again to determine the frame extraction frequency of the video stream. The target frame frequency.
  4. 如权利要求2所述的方法,其特征在于,所述计算所述事件内容与历史事件内容的匹配度之后,还包括:The method of claim 2, wherein after calculating the matching degree between the event content and historical event content, it further includes:
    获取采集所述视频流的采集设备的内置性能参数;Obtain the built-in performance parameters of the collection device that collects the video stream;
    根据所述事件内容与所述历史事件内容的匹配度,以及所述采集设备的内置性能参数,对所述视频流的初始抽帧频率进行再次修改,以确定对所述视频流进行抽帧的所述目标抽帧频率。According to the matching degree between the event content and the historical event content and the built-in performance parameters of the collection device, the initial frame extraction frequency of the video stream is modified again to determine the frame extraction frequency of the video stream. The target frame frequency.
  5. 如权利要求1所述的方法,其特征在于,所述方法还包括:The method of claim 1, further comprising:
    根据多次修改数据对所述目标抽帧频率进行再次调整。The target frame frequency is adjusted again based on the multiple modification data.
  6. 如权利要求2所述的方法,其特征在于,所述方法还包括:The method of claim 2, further comprising:
    获取所述当前事件数据的事件类型与事件内容,基于所述当前事件数据的事件类型与事件内容调整所述采集设备的分辨率。Obtain the event type and event content of the current event data, and adjust the resolution of the collection device based on the event type and event content of the current event data.
  7. 一种视频帧率控制装置,其特征在于,包括:A video frame rate control device, characterized by including:
    抽帧模块,用于基于初始抽帧频率对视频流进行抽帧,得到视频帧数据;The frame extraction module is used to extract frames from the video stream based on the initial frame extraction frequency to obtain video frame data;
    编码模块,用于对所述视频帧数据进行编码处理,生成图片编码数据;An encoding module, used to encode the video frame data and generate picture encoding data;
    识别模块,用于识别所述图片编码数据中包括的当前事件数据;An identification module, used to identify the current event data included in the picture encoding data;
    修改模块,用于根据所述当前事件数据对所述初始抽帧频率进行初次修改,以确定对所述视频流进行抽帧的目标抽帧频率。A modification module, configured to perform an initial modification to the initial frame extraction frequency according to the current event data to determine a target frame extraction frequency for extracting frames on the video stream.
  8. 如权利要求7所述的装置,其特征在于,所述修改模块包括:The device of claim 7, wherein the modification module includes:
    获取单元,用于获取历史事件数据中的历史事件内容;The acquisition unit is used to obtain the historical event content in the historical event data;
    识别单元,用于计算所述事件内容与历史事件内容的匹配度;An identification unit, used to calculate the matching degree between the event content and the historical event content;
    第一修改单元,用于若所述匹配度满足匹配度阈值,则根据所述历史事件内容的抽帧频率对所述当前事件数据的初始抽帧频率进行修改,以确定对所述视频流进行抽帧的目标抽帧频率;A first modification unit configured to modify the initial frame extraction frequency of the current event data according to the frame extraction frequency of the historical event content if the matching degree satisfies the matching degree threshold, to determine whether to perform processing on the video stream. The target frame sampling frequency;
    第二修改单元,用于若所述匹配度不满足匹配度阈值,则基于预设的抽帧频率进行修改。The second modification unit is configured to modify the matching degree based on the preset frame extraction frequency if the matching degree does not meet the matching degree threshold.
  9. 一种电子设备,其特征在于,包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如权利要求1至6中任一项所述的一种视频帧率控制方法中的步骤。An electronic device, characterized in that it includes: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements claim 1 The steps in a video frame rate control method described in any one of to 6.
  10. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至6中任一项所述的一种视频帧率控制方法中的步骤。A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the method of any one of claims 1 to 6 is implemented. Steps in the video frame rate control method.
PCT/CN2022/143524 2022-03-22 2022-12-29 Video frame rate control method and apparatus, and electronic device and storage medium WO2023179161A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210283048.2A CN114679607B (en) 2022-03-22 2022-03-22 Video frame rate control method and device, electronic equipment and storage medium
CN202210283048.2 2022-03-22

Publications (1)

Publication Number Publication Date
WO2023179161A1 true WO2023179161A1 (en) 2023-09-28

Family

ID=82075128

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/143524 WO2023179161A1 (en) 2022-03-22 2022-12-29 Video frame rate control method and apparatus, and electronic device and storage medium

Country Status (2)

Country Link
CN (1) CN114679607B (en)
WO (1) WO2023179161A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114679607B (en) * 2022-03-22 2024-03-05 深圳云天励飞技术股份有限公司 Video frame rate control method and device, electronic equipment and storage medium
CN115761571A (en) * 2022-10-26 2023-03-07 北京百度网讯科技有限公司 Video-based target retrieval method, device, equipment and storage medium
CN117372934A (en) * 2023-12-07 2024-01-09 中国广电四川网络股份有限公司 Video analysis processing method, system, equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180308330A1 (en) * 2017-04-20 2018-10-25 David Lee Selinger Automatic threat detection based on video frame delta information in compressed video streams
CN111064924A (en) * 2019-11-26 2020-04-24 天津易华录信息技术有限公司 Video monitoring method and system based on artificial intelligence
CN112883782A (en) * 2021-01-12 2021-06-01 上海肯汀通讯科技有限公司 Method, device, equipment and storage medium for identifying putting behaviors
CN113573061A (en) * 2020-04-29 2021-10-29 安徽华米健康科技有限公司 Video frame extraction method, device and equipment
CN113691721A (en) * 2021-07-28 2021-11-23 浙江大华技术股份有限公司 Synthesis method and device of time-lapse video, computer equipment and medium
CN113963307A (en) * 2020-07-02 2022-01-21 上海际链网络科技有限公司 Method and device for identifying content on target and acquiring video, storage medium and computer equipment
CN114679607A (en) * 2022-03-22 2022-06-28 深圳云天励飞技术股份有限公司 Video frame rate control method and device, electronic equipment and storage medium

Family Cites Families (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8179983B2 (en) * 2008-05-20 2012-05-15 Broadcom Corporation Video processing system with layered video coding for fast channel change and methods for use therewith
US9621930B2 (en) * 2010-05-07 2017-04-11 Deutsche Telekom Ag Distributed transcoding of video frames for transmission in a communication network
CN105100886B (en) * 2014-04-22 2019-03-15 腾讯科技(北京)有限公司 Distribution control method and device, the server and system of network media information
US9787900B2 (en) * 2015-12-16 2017-10-10 Gopro, Inc. Dynamic synchronization of frame rate to a detected cadence in a time lapse image sequence
US10986400B2 (en) * 2016-08-04 2021-04-20 Microsoft Technology Licensing. LLC Compact video representation for video event retrieval and recognition
CN107707931B (en) * 2016-08-08 2021-09-10 阿里巴巴集团控股有限公司 Method and device for generating interpretation data according to video data, method and device for synthesizing data and electronic equipment
CN107172354B (en) * 2017-06-21 2020-04-03 深圳市万普拉斯科技有限公司 Video processing method and device, electronic equipment and storage medium
CN108875538B (en) * 2018-03-05 2022-07-08 北京旷视科技有限公司 Attribute detection method, device and system and storage medium
CN111523347A (en) * 2019-02-01 2020-08-11 北京奇虎科技有限公司 Image detection method and device, computer equipment and storage medium
CN110086985B (en) * 2019-03-25 2021-03-30 华为技术有限公司 Recording method for delayed photography and electronic equipment
CN110505454B (en) * 2019-08-29 2020-11-10 西安电子科技大学 Video supply system and method based on scene mode and user perception requirement
US11678029B2 (en) * 2019-12-17 2023-06-13 Tencent Technology (Shenzhen) Company Limited Video labeling method and apparatus, device, and computer-readable storage medium
US20210352207A1 (en) * 2020-05-08 2021-11-11 Kepler Vision Technologies B.V. Method for adapting the quality and/or frame rate of a live video stream based upon pose
EP3907652A1 (en) * 2020-05-08 2021-11-10 Kepler Vision Technologies B.V. Method for adapting the quality and/or frame rate of a live video stream based upon pose
CN114079820A (en) * 2020-08-19 2022-02-22 安霸国际有限合伙企业 Interval shooting video generation centered on an event/object of interest input on a camera device by means of a neural network
CN112560723B (en) * 2020-12-22 2023-10-17 中电海康集团有限公司 Fall detection method and system based on morphological recognition and speed estimation
CN113542777B (en) * 2020-12-25 2022-06-21 腾讯科技(深圳)有限公司 Live video editing method and device and computer equipment
CN113518256B (en) * 2021-07-23 2023-08-08 腾讯科技(深圳)有限公司 Video processing method, video processing device, electronic equipment and computer readable storage medium
CN113609956A (en) * 2021-07-30 2021-11-05 北京百度网讯科技有限公司 Training method, recognition method, device, electronic equipment and storage medium
CN113792622A (en) * 2021-08-27 2021-12-14 深圳市商汤科技有限公司 Frame rate adjusting method and device, electronic equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180308330A1 (en) * 2017-04-20 2018-10-25 David Lee Selinger Automatic threat detection based on video frame delta information in compressed video streams
CN111064924A (en) * 2019-11-26 2020-04-24 天津易华录信息技术有限公司 Video monitoring method and system based on artificial intelligence
CN113573061A (en) * 2020-04-29 2021-10-29 安徽华米健康科技有限公司 Video frame extraction method, device and equipment
CN113963307A (en) * 2020-07-02 2022-01-21 上海际链网络科技有限公司 Method and device for identifying content on target and acquiring video, storage medium and computer equipment
CN112883782A (en) * 2021-01-12 2021-06-01 上海肯汀通讯科技有限公司 Method, device, equipment and storage medium for identifying putting behaviors
CN113691721A (en) * 2021-07-28 2021-11-23 浙江大华技术股份有限公司 Synthesis method and device of time-lapse video, computer equipment and medium
CN114679607A (en) * 2022-03-22 2022-06-28 深圳云天励飞技术股份有限公司 Video frame rate control method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN114679607A (en) 2022-06-28
CN114679607B (en) 2024-03-05

Similar Documents

Publication Publication Date Title
WO2023179161A1 (en) Video frame rate control method and apparatus, and electronic device and storage medium
CN108491822B (en) Face detection duplication-removing method based on limited cache of embedded equipment
WO2019237821A1 (en) Method and apparatus for transmitting scene image of virtual scene, computer device and computer readable storage medium
CN110610510B (en) Target tracking method and device, electronic equipment and storage medium
WO2017005149A1 (en) Game acceleration method and device
CN104137146B (en) For the method and system of the Video coding of the noise filtering of Utilization prospects Object Segmentation
CN101631237A (en) Video monitoring data storing and managing system
CN104751639A (en) Big-data-based video structured license plate recognition system and method
WO2022166625A1 (en) Method for information pushing in vehicle travel scenario, and related apparatus
CN111935663B (en) Sensor data stream processing method, device, medium and electronic equipment
CN113378616A (en) Video analysis method, video analysis management method and related equipment
WO2019047663A1 (en) Video format-based end-to-end automatic driving data storage method and device
CN112235598B (en) Video structured processing method and device and terminal equipment
US11095901B2 (en) Object manipulation video conference compression
CN116778415A (en) Crowd counting network model for unmanned aerial vehicle and counting method
CN110598644A (en) Multimedia playing control method and device and electronic equipment
CN115002516A (en) System, method, electronic device, storage medium, and program product for video processing
Singla et al. HEVC based tampered video database development for forensic investigation
CN111541864B (en) Digital retina software defined camera method and system
CN114373150A (en) Factory monitoring method and device, electronic equipment and storage medium
CN113051415B (en) Image storage method, device, equipment and storage medium
CN116052047B (en) Moving object detection method and related equipment thereof
CN117609545A (en) Video data structuring method and related device based on semantic features
CN111062337B (en) People stream direction detection method and device, storage medium and electronic equipment
CN117221391B (en) Intelligent camera pushing method, device and equipment based on visual semantic big model

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22933208

Country of ref document: EP

Kind code of ref document: A1