WO2022095423A1 - 视频帧提取方法及相关设备 - Google Patents

视频帧提取方法及相关设备 Download PDF

Info

Publication number
WO2022095423A1
WO2022095423A1 PCT/CN2021/096758 CN2021096758W WO2022095423A1 WO 2022095423 A1 WO2022095423 A1 WO 2022095423A1 CN 2021096758 W CN2021096758 W CN 2021096758W WO 2022095423 A1 WO2022095423 A1 WO 2022095423A1
Authority
WO
WIPO (PCT)
Prior art keywords
bucket
video frame
sequence
double
video
Prior art date
Application number
PCT/CN2021/096758
Other languages
English (en)
French (fr)
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 WO2022095423A1 publication Critical patent/WO2022095423A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/44008Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving operations for analysing video streams, e.g. detecting features or characteristics in the video stream
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/44016Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving splicing one content stream with another content stream, e.g. for substituting a video clip

Definitions

  • the present application relates to the technical field of artificial intelligence and image processing, and in particular, to a video frame extraction method, apparatus, computer equipment, and computer-readable storage medium.
  • Multiple consecutive video frames within a period of time can be used for downstream tasks such as image processing, such as facial expression recognition based on video frames.
  • the number of multiple video frames is usually large, and it is difficult to use all of the multiple video frames for downstream tasks.
  • a first aspect of the present application provides a video frame extraction method, the method comprising:
  • each of the dual bucket groups including a primary bucket and a secondary bucket;
  • a second aspect of the present application provides a computer device comprising a memory and a processor, the memory for storing at least one computer-readable instruction, the processor for executing the at least one computer-readable instruction to Implement the following steps:
  • each of the dual bucket groups including a primary bucket and a secondary bucket;
  • a third aspect of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores at least one computer-readable instruction, and when the at least one computer-readable instruction is executed by a processor, implements the following steps:
  • each of the dual bucket groups including a primary bucket and a secondary bucket;
  • a fourth aspect of the present application provides an apparatus for extracting video frames, the apparatus comprising:
  • an acquisition module for acquiring multiple video frames within a preset time period
  • a storage module configured to store the plurality of video frames in a preset number of dual bucket groups within the preset time period, each of the dual bucket groups including a primary bucket and a secondary bucket;
  • a selection module configured to select a plurality of target video frames to a sequence of video frames from a plurality of the double-barrel groups within the preset time period;
  • the integration module is used for integrating the video frame sequence to obtain the target video frame sequence.
  • the present application acquires multiple video frames within a preset time period; within the preset time period, the multiple video frames are stored in a preset number of dual-bucket groups, each of which includes a main buckets and sub-buckets; selecting a plurality of target video frames from a plurality of the double-bucket groups into a video frame sequence within the preset time period; integrating the video frame sequence. Extracting video frames through multiple double-bucket groups can avoid losing key information, making the extracted video frames more representative than multiple acquired video frames, and improving the accuracy of video frame extraction.
  • FIG. 1 is a flowchart of a video frame extraction method provided by an embodiment of the present application.
  • FIG. 2 is a structural diagram of an apparatus for extracting a video frame provided by an embodiment of the present application.
  • FIG. 3 is a schematic diagram of a computer device provided by an embodiment of the present application.
  • the video frame extraction method of the present application is applied in one or more computer devices.
  • the computer equipment is a device that can automatically perform numerical calculation and/or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (ASICs) , programmable gate array (Field-Programmable Gate Array, FPGA), digital processor (Digital Signal Processor, DSP), embedded equipment, etc.
  • ASICs application specific integrated circuits
  • FPGA Field-Programmable Gate Array
  • DSP Digital Signal Processor
  • the computer equipment may be a desktop computer, a notebook computer, a palmtop computer, a cloud server and other computing equipment.
  • the computer device can perform human-computer interaction with the user through a keyboard, a mouse, a remote control, a touch pad or a voice control device.
  • FIG. 1 is a flowchart of a method for extracting a video frame provided by Embodiment 1 of the present application.
  • the video frame extraction method is applied to computer equipment, and is used for extracting a target video frame sequence from multiple video frames within a preset time period, so as to improve the accuracy of video frame extraction.
  • the video frame extraction method includes:
  • the plurality of video frames are consecutive video frames within the preset time period, and can be used for image processing, such as facial expression recognition based on video frames of faces.
  • the number of the plurality of video frames acquired in the preset time period is usually large, and it is difficult to use all the plurality of video frames for image processing, and it is necessary to extract the plurality of video frames.
  • the acquiring a plurality of video frames within a preset time period includes:
  • a plurality of video frames are captured by the camera device within the preset time period.
  • the preset time period may be 1 second. It can receive 30 video frames pushed by the preset client within 1s.
  • the preset client can capture video frames through the camera device of the preset client.
  • the computer device can receive 30 video frames captured by the preset client within 1s.
  • the computer equipment can capture 30 video frames through the computer equipment within 1s.
  • each bucket group includes a primary bucket and a secondary bucket.
  • a plurality of the two-bucket groups may store the plurality of video frames.
  • the primary bucket and the secondary bucket in the dual-bucket group may be a first-in-first-out data structure, such as a queue, etc., which may store data. for reading a representative video frame from the plurality of video frames from the plurality of double-bucket groups according to the processing capability of the downstream task of the plurality of video frames, avoiding random selection from the plurality of video frames Select some video frames to process.
  • the downstream tasks of the plurality of video frames may be image processing tasks, image recognition tasks, and the like.
  • the two-bucket group may store the plurality of video frames uniformly.
  • the first, third, and fifth video frames may be stored in the main bucket in the dual-bucket group
  • the second, fourth, and sixth video frames may be stored in the sub-bucket in the dual-bucket group.
  • 3 video frames in the main bucket are directly selected for downstream tasks, and 3 video frames in the sub-bucket are discarded.
  • the 3 video frames in the main bucket can also represent the overall content of the 6 video frames.
  • the storing the plurality of video frames in a preset number of dual-bucket groups within the preset time period includes:
  • a remainder calculation is performed according to the number of the plurality of double bucket groups and the second sequence number of the video frame to obtain the third sequence number of the video frame;
  • the video frame is stored to the target double bucket group.
  • performing the remainder calculation according to the number of the multiple double-bucket groups and the second sequence number of the video frame includes:
  • the target remainder is determined as the third sequence number of the video frame.
  • the number of the multiple double-barrel groups is two.
  • the first serial numbers of the four double-bucket groups A, B, C, and D are 1, 2, 3, and 4, respectively.
  • the second sequence numbers of the 8 video frames are generated in the order in which the 8 video frames are acquired; the 8 video frames are respectively a, b, c, d, e, f, g, and h in the order of acquisition;
  • the serial numbers are 1, 2, 3, 4, 5, 6, 7, and 8, respectively.
  • the second sequence number of video frame a is 1, and the number of double-barrel groups is 4; divide the second sequence number of video frame a by the number of double-barrel groups to perform a remainder operation to obtain a remainder of 1, and get the video
  • the third sequence number of frame a is the remainder 1.
  • the second sequence number of video frame b is 2, and the number of double-barrel groups is 4; divide the second sequence number of video frame b by the number of double-barrel groups to perform a remainder operation to obtain a remainder of 2, and get the video
  • the third sequence number of frame b is the remainder 2.
  • the third sequence number of video frame c is 3; the third sequence number of video frame d is 4; the third sequence number of video frame e is 1; the third sequence number of video frame f is 2; the third sequence number of video frame g is 2; The third sequence number is 3; the third sequence number of the video frame h is 4.
  • the target remainder corresponding to video frame d is equal to 0, and the number 4 of the double bucket group is determined as the third sequence number of the video frame d; the target remainder corresponding to the video frame h is equal to 0, and the number 4 of the double bucket group is determined as the video frame.
  • the third sequence number of h is the target remainder corresponding to video frame d is equal to 0
  • the number 4 of the double bucket group is determined as the video frame.
  • the double-bucket group A whose first sequence number is consistent with the third sequence number of the video frame a is determined as the target double-bucket group; the video frame a is stored in the target double-bucket group A.
  • the double-bucket group B whose first sequence number is consistent with the third sequence number of the video frame b is determined as the target double-bucket group; the video frame b is stored in the target double-bucket group B. And so on.
  • the storing the video frame to the target dual bucket group includes:
  • the video frame is stored in the secondary bucket of the target dual-bucket group.
  • the target double-bucket group of video frame a is double-bucket group A; the target double-bucket group of video frame e is double-bucket group A.
  • the fourth sequence number of the video frame a is 1, and the fourth sequence number of the video frame b is 2.
  • the target double-bucket group containing video frame i is double-bucket group A
  • the fourth sequence number of the last video frame in double-bucket group A is 2
  • the video frames to be stored in double-bucket group A are numbered sequentially from 3. It is obtained that the fourth sequence number of the video frame i in the double bucket group A is 3. That is, the video frames are numbered in the order in which they are stored to the target double-bucket group.
  • the video frame a is stored in the main bucket of the dual-bucket group A.
  • the main bucket of the dual-bucket group can be a queue, which is recorded as the first queue.
  • the video frame a is located in the main bucket of the dual-bucket group A. the queue head of the first queue;
  • the video frame e is stored in the secondary bucket of the dual-bucket group A.
  • the secondary bucket of the dual-bucket group can be a queue, which is recorded as the second queue.
  • the video frame e is located in the secondary bucket of the dual-bucket group A.
  • the video frame i is stored in the main bucket of the dual bucket group A, that is, the first queue. At this time, the video frame a is at the queue head of the first queue, and the video frame i is at the first queue. The tail of a queue.
  • the selecting a plurality of target video frames from the plurality of double-bucket groups within the preset time period to a video frame sequence includes:
  • mapping relationships Acquiring a plurality of mapping relationships between the dual-bucket groups and the video frame sequence, where the mapping relationships define the storage order of video frames in the video frame sequence in a plurality of the dual-bucket groups;
  • video frames are selected from the main buckets in the multiple double-bucket groups and stored in the video frame sequence, so that the double-bucket group is obtained from the double-bucket group.
  • Part of the target video frame composed of all the video frames in the main bucket in the group;
  • the mapping relationship select video frames from the sub-buckets in the plurality of double-bucket groups and store them in the video frame sequence, to obtain the double-bucket Part of the target video frame consisting of all or part of the video frames in the sub-bucket in the group.
  • the second sequence numbers of the multiple video frames in the main bucket in the double-bucket group E are 1, 5, 9, and 13 in sequence from the queue head to the queue tail.
  • the second sequence numbers of the multiple video frames in the secondary buckets in the dual-bucket group E are 3, 7, 11, and 15 in sequence from the queue head to the queue tail.
  • the second sequence numbers of the multiple video frames in the main bucket in the dual bucket group F are 2, 6, 10, and 14 in sequence from the queue head to the queue tail.
  • the second sequence numbers of the multiple video frames in the secondary buckets in the dual bucket group F are 4, 8, 12, and 16 in sequence from the head of the queue to the tail of the queue.
  • the sequence numbers of the video frame sequence are 1 to 16; the mapping relationship between the video frame sequence and the two dual bucket groups is that the sequence number of the video frame sequence and the second sequence numbers of the multiple video frames in the main bucket in the dual bucket group are one by one correspond.
  • the mapping relationship defines a storage bit sequence of a plurality of video frames in the double-bucket group in the video frame sequence.
  • the selecting and storing the video frames from the main buckets in the multiple dual-bucket groups according to the mapping relationship to the video frame sequence includes:
  • each double-bucket group in the multiple double-bucket groups is selected one by one;
  • the first video frame of the main bucket in the dual-bucket group in the order of the second sequence number, determine the first video frame of the main bucket in the dual-bucket group as the current video frame, and determine the first video frame of the main bucket in the dual-bucket group as the current video frame,
  • the first element in the video frame subsequence is determined as the current element, wherein the first sequence number is the sequence number of the acquired binocular group, and the second sequence number is obtained according to the plurality of video frames within the preset time period serial number generated sequentially;
  • the first sequence number of the double-bucket group E is 1, and the first sequence number of the double-bucket group F is 2.
  • the double-barrel group E is selected from the two double-barrel groups, and according to the mapping relationship, it is determined that the first video frame subsequence corresponding to the double-barrel group E in the video frame sequence is (element 1, element 5, element 9, element 13).
  • the next video frame of video frame 1 is video frame 5
  • the next video frame of video frame 5 is video frame 9
  • the next video frame of video frame 9 is video frame 9. for video frame 13.
  • the video frame 1 is the video frame with the second sequence number of 1, and so on.
  • the next element of element 1 is element 5
  • the next element of element 5 is element 9
  • the next element of element 9 is element 13.
  • element 1 is the element with sequence number 1, and so on.
  • the current video frame of the main bucket in the dual-bucket group is stored in the current element in the video frame sequence, that is, element 1.
  • the current video frame of the main bucket in the dual-bucket group is stored in the current element in the video frame sequence, that is, element 5. And so on.
  • the selecting, according to the mapping relationship, a video frame from a plurality of sub-buckets in the dual-bucket group to store in the video frame sequence includes:
  • each double-bucket group in the multiple double-bucket groups is selected one by one;
  • the selecting a plurality of target video frames from the plurality of double-bucket groups within the preset time period to a sequence of video frames includes:
  • video frames are selected from the main buckets in the plurality of double-bucket groups and stored in the video frame sequence, so as to obtain Part of target video frames composed of all video frames in the main bucket in the bucket group;
  • the fourth sub-time period in the preset time period select video frames from the sub-buckets in the plurality of the double-bucket groups and store them in the video frame sequence, so that the double-bucket group is obtained by Part of the target video frame composed of all or part of the video frames in the sub-bucket in the bucket group.
  • the selecting, according to the preset number, video frames from the main buckets in the multiple dual-bucket groups and storing them in the video frame sequence includes:
  • first video frame of the main bucket in each dual-bucket group in the order of the second sequence number, determine the first video frame of the main bucket in each dual-bucket group as the current video frame of each dual-bucket group, and set the The first third video frame subsequence in the plurality of third video frame subsequences is determined as the current video frame subsequence, wherein the second sequence number is based on the number of the plurality of video frames in the preset time period. Get the serial number generated sequentially;
  • the current videos of the multiple double-bucket groups are stored in the current video frame subsequence, and the next video frame of the current video frames of each double-bucket group is re-determined as the For the current video frame, the current video subsequence is re-determined according to the current video frame subsequence and the preset number.
  • the preset number is 2.
  • the first sequence number of the double-bucket group G is 1, and the first sequence number of the double-bucket group H is 2.
  • the second sequence numbers of the multiple video frames in the main bucket in the dual bucket group G are 1 and 5 in sequence from the head of the queue to the tail of the queue.
  • the second sequence numbers of the multiple video frames in the secondary buckets in the dual bucket group G are 3 and 7 in sequence from the head of the queue to the tail of the queue.
  • the second sequence numbers of the multiple video frames in the main bucket in the dual bucket group H are 2 and 6 in sequence from the queue head to the queue tail.
  • the second sequence numbers of the multiple video frames in the secondary buckets in the dual bucket group H are 4 and 8 in sequence from the queue head to the queue tail.
  • the video frame sequence is (element 1, element 2, element 3, element 4, element 5, element 6, element 7, element 8).
  • the preset number 2 as the length of each third video frame subsequence
  • four third video frame subsequences are obtained, which are respectively (element 1, element 2), (element 3, element 4), (element 5, Element 6), (element 7, element 8), wherein the sequence numbers of the four third video frame subsequences are 1, 2, 3, and 4 in sequence.
  • Video frame 1 is determined as the current video frame of the double-bucket group G
  • video frame 2 is determined as the current video frame of the double-bucket group H
  • the first third video frame subsequence among the four third video frame subsequences is determined as the current video frame subsequence, ie (element 1, element 2).
  • the current video frames and current video frame subsequences of the two dual-bucket groups are re-determined, that is, the video frame 5 of the main bucket in the dual-bucket group G and the video frame 6 of the main bucket in the dual-bucket group H.
  • the video frame 5 is re-determined as the current video frame of the dual-bucket group G
  • the video frame 6 is re-determined as the current video frame of the dual-bucket group H.
  • the first third video subsequence is the current video subsequence
  • the preset number is 2
  • the third third video subsequence is re-determined as the current video subsequence, ie (element 5, element 6).
  • the re-determined sequence number of the current video subsequence is equal to the sequence number of the current video subsequence plus a preset number.
  • the preset period of time consists of the third sub-period and the fourth sub-period, the third sub-period precedes the fourth sub-period, and the third sub-period is longer than the fourth sub-period.
  • the integrating the sequence of video frames includes:
  • the target video frame sequence may also be stored in a node of a blockchain.
  • the plurality of video frames may be deleted. for the next cycle of video frame extraction.
  • the multiple video frames are multiple facial video frames of the first user
  • the video frame extraction further includes:
  • the plurality of video frames are a plurality of facial video frames of the second user
  • the video frame extraction further comprises:
  • a lying evaluation result of the second user within the preset time period is determined according to the micro-expression feature.
  • the method for extracting video frames in Embodiment 1 acquires multiple video frames within a preset time period; and stores the multiple video frames in a preset number of multiple double-bucket groups within the preset time period, and each The double-bucket group includes a main bucket and a secondary bucket; multiple target video frames are selected from a plurality of the double-bucket groups to a video frame sequence within the preset time period; and the video frame sequence is integrated. Extracting video frames through multiple double-bucket groups can avoid losing key information, making the extracted video frames more representative than multiple acquired video frames, and improving the accuracy of video frame extraction.
  • FIG. 2 is a structural diagram of an apparatus for extracting a video frame provided by Embodiment 2 of the present application.
  • the video frame extracting apparatus 20 is applied to computer equipment.
  • the video frame extraction device 20 is configured to extract a target video frame sequence from a plurality of video frames within a preset time period, so as to improve the accuracy of video frame extraction.
  • the video frame extraction apparatus 20 may include an acquisition module 201 , a storage module 202 , a selection module 203 , and an integration module 204 .
  • the acquiring module 201 is configured to acquire multiple video frames within a preset time period.
  • the plurality of video frames are consecutive video frames within the preset time period, and can be used for image processing, such as facial expression recognition based on video frames of faces.
  • the number of the plurality of video frames acquired in the preset time period is usually large, and it is difficult to use all the plurality of video frames for image processing, and it is necessary to extract the plurality of video frames.
  • the acquiring a plurality of video frames within a preset time period includes:
  • a plurality of video frames are captured by the camera device within the preset time period.
  • the preset time period may be 1 second. It can receive 30 video frames pushed by the preset client within 1s.
  • the preset client can capture video frames through the camera device of the preset client.
  • the computer device can receive 30 video frames captured by the preset client within 1s.
  • the computer equipment can capture 30 video frames through the computer equipment within 1s.
  • the storage module 202 is configured to store the multiple video frames in a preset number of multiple dual bucket groups within the preset time period, and each bucket group includes a primary bucket and a secondary bucket.
  • a plurality of the two-bucket groups may store the plurality of video frames.
  • the primary bucket and the secondary bucket in the dual-bucket group may be a first-in-first-out data structure, such as a queue, etc., which may store data. for reading a representative video frame from the plurality of video frames from the plurality of double-bucket groups according to the processing capability of the downstream task of the plurality of video frames, avoiding random selection from the plurality of video frames Select some video frames to process.
  • the downstream tasks of the plurality of video frames may be image processing tasks, image recognition tasks, and the like.
  • the two-bucket group may store the plurality of video frames uniformly.
  • the first, third, and fifth video frames may be stored in the main bucket in the dual-bucket group
  • the second, fourth, and sixth video frames may be stored in the sub-bucket in the dual-bucket group.
  • 3 video frames in the main bucket are directly selected for downstream tasks, and 3 video frames in the sub-bucket are discarded.
  • the 3 video frames in the main bucket can also represent the overall content of the 6 video frames.
  • the storing the plurality of video frames in a preset number of dual-bucket groups within the preset time period includes:
  • a remainder calculation is performed according to the number of the plurality of double bucket groups and the second sequence number of the video frame to obtain the third sequence number of the video frame;
  • the video frame is stored to the target double bucket group.
  • performing the remainder calculation according to the number of the multiple double-bucket groups and the second sequence number of the video frame includes:
  • the target remainder is determined as the third sequence number of the video frame.
  • the number of the multiple double-barrel groups is two.
  • the first serial numbers of the four double-bucket groups A, B, C, and D are 1, 2, 3, and 4, respectively.
  • the second sequence numbers of the 8 video frames are generated in the order in which the 8 video frames are acquired; the 8 video frames are respectively a, b, c, d, e, f, g, and h in the order of acquisition;
  • the serial numbers are 1, 2, 3, 4, 5, 6, 7, and 8, respectively.
  • the second sequence number of video frame a is 1, and the number of double-barrel groups is 4; divide the second sequence number of video frame a by the number of double-barrel groups to perform a remainder operation to obtain a remainder of 1, and get the video
  • the third sequence number of frame a is the remainder 1.
  • the second sequence number of video frame b is 2, and the number of double-barrel groups is 4; divide the second sequence number of video frame b by the number of double-barrel groups to perform a remainder operation to obtain a remainder of 2, and get the video
  • the third sequence number of frame b is the remainder 2.
  • the third sequence number of video frame c is 3; the third sequence number of video frame d is 4; the third sequence number of video frame e is 1; the third sequence number of video frame f is 2; the third sequence number of video frame g is 2; The third sequence number is 3; the third sequence number of the video frame h is 4.
  • the target remainder corresponding to video frame d is equal to 0, and the number 4 of the double bucket group is determined as the third sequence number of the video frame d; the target remainder corresponding to the video frame h is equal to 0, and the number 4 of the double bucket group is determined as the video frame.
  • the third sequence number of h is the target remainder corresponding to video frame d is equal to 0
  • the number 4 of the double bucket group is determined as the video frame.
  • the double-bucket group A whose first sequence number is consistent with the third sequence number of the video frame a is determined as the target double-bucket group; the video frame a is stored in the target double-bucket group A.
  • the double-bucket group B whose first sequence number is consistent with the third sequence number of the video frame b is determined as the target double-bucket group; the video frame b is stored in the target double-bucket group B. And so on.
  • the storing the video frame to the target dual bucket group includes:
  • the video frame is stored in the secondary bucket of the target dual-bucket group.
  • the target double-bucket group of video frame a is double-bucket group A; the target double-bucket group of video frame e is double-bucket group A.
  • the fourth sequence number of the video frame a is 1, and the fourth sequence number of the video frame b is 2.
  • the target double-bucket group containing video frame i is double-bucket group A
  • the fourth sequence number of the last video frame in double-bucket group A is 2
  • the video frames to be stored in double-bucket group A are numbered sequentially from 3. It is obtained that the fourth sequence number of the video frame i in the double bucket group A is 3. That is, the video frames are numbered in the order in which they are stored to the target double-bucket group.
  • the video frame a is stored in the main bucket of the dual-bucket group A.
  • the main bucket of the dual-bucket group can be a queue, which is recorded as the first queue.
  • the video frame a is located in the main bucket of the dual-bucket group A. the queue head of the first queue;
  • the video frame e is stored in the secondary bucket of the dual-bucket group A.
  • the secondary bucket of the dual-bucket group can be a queue, which is recorded as the second queue.
  • the video frame e is located in the secondary bucket of the dual-bucket group A.
  • the video frame i is stored in the main bucket of the dual bucket group A, that is, the first queue. At this time, the video frame a is at the queue head of the first queue, and the video frame i is at the first queue. The tail of a queue.
  • the selecting module 203 is configured to select a plurality of target video frames from a plurality of the two-bucket groups to a sequence of video frames within the preset time period.
  • the selecting a plurality of target video frames from the plurality of double-bucket groups within the preset time period to a video frame sequence includes:
  • mapping relationship defines the storage order of video frames in the video frame sequence in a plurality of the double-bucket groups
  • video frames are selected from the main buckets in the multiple double-bucket groups and stored in the video frame sequence, so that the double-bucket group is obtained from the double-bucket group.
  • Part of the target video frame composed of all the video frames in the main bucket in the group;
  • the mapping relationship select video frames from the sub-buckets in the plurality of double-bucket groups and store them in the video frame sequence, to obtain the double-bucket Part of the target video frame consisting of all or part of the video frames in the sub-bucket in the group.
  • the second sequence numbers of the multiple video frames in the main bucket in the double-bucket group E are 1, 5, 9, and 13 in sequence from the queue head to the queue tail.
  • the second sequence numbers of the multiple video frames in the secondary buckets in the dual-bucket group E are 3, 7, 11, and 15 in sequence from the queue head to the queue tail.
  • the second sequence numbers of the multiple video frames in the main bucket in the dual bucket group F are 2, 6, 10, and 14 in sequence from the queue head to the queue tail.
  • the second sequence numbers of the multiple video frames in the secondary buckets in the dual bucket group F are 4, 8, 12, and 16 in sequence from the head of the queue to the tail of the queue.
  • the sequence numbers of the video frame sequence are 1 to 16; the mapping relationship between the video frame sequence and the two dual bucket groups is that the sequence number of the video frame sequence and the second sequence numbers of the multiple video frames in the main bucket in the dual bucket group are one by one correspond.
  • the mapping relationship defines a storage bit sequence of a plurality of video frames in the double-bucket group in the video frame sequence.
  • the selecting and storing the video frames from the main buckets in the multiple dual-bucket groups according to the mapping relationship to the video frame sequence includes:
  • each double-bucket group in the multiple double-bucket groups is selected one by one;
  • the first video frame of the main bucket in the dual-bucket group in the order of the second sequence number, determine the first video frame of the main bucket in the dual-bucket group as the current video frame, and determine the first video frame of the main bucket in the dual-bucket group as the current video frame,
  • the first element in the video frame subsequence is determined as the current element, wherein the first sequence number is the sequence number of the acquired binocular group, and the second sequence number is obtained according to the plurality of video frames within the preset time period serial number generated sequentially;
  • the first sequence number of the double-bucket group E is 1, and the first sequence number of the double-bucket group F is 2.
  • the double-barrel group E is selected from the two double-barrel groups, and according to the mapping relationship, it is determined that the first video frame subsequence corresponding to the double-barrel group E in the video frame sequence is (element 1, element 5, element 9, element 13).
  • the next video frame of video frame 1 is video frame 5
  • the next video frame of video frame 5 is video frame 9
  • the next video frame of video frame 9 is video frame 9. for video frame 13.
  • the video frame 1 is the video frame with the second sequence number of 1, and so on.
  • the next element of element 1 is element 5
  • the next element of element 5 is element 9
  • the next element of element 9 is element 13.
  • element 1 is the element with sequence number 1, and so on.
  • the current video frame of the main bucket in the dual-bucket group is stored in the current element in the video frame sequence, that is, element 1.
  • the current video frame of the main bucket in the dual-bucket group is stored in the current element in the video frame sequence, that is, element 5. And so on.
  • the selecting, according to the mapping relationship, a video frame from a plurality of sub-buckets in the dual-bucket group to store in the video frame sequence includes:
  • each double-bucket group in the multiple double-bucket groups is selected one by one;
  • the selecting a plurality of target video frames from the plurality of double-bucket groups within the preset time period to a sequence of video frames includes:
  • video frames are selected from the main buckets in the plurality of double-bucket groups and stored in the video frame sequence, so as to obtain Part of target video frames composed of all video frames in the main bucket in the bucket group;
  • the fourth sub-time period in the preset time period select video frames from the sub-buckets in the plurality of the double-bucket groups and store them in the video frame sequence, so that the double-bucket group is obtained by Part of the target video frame composed of all or part of the video frames in the sub-bucket in the bucket group.
  • the selecting, according to the preset number, video frames from the main buckets in the multiple dual-bucket groups and storing them in the video frame sequence includes:
  • first video frame of the main bucket in each dual-bucket group in the order of the second sequence number, determine the first video frame of the main bucket in each dual-bucket group as the current video frame of each dual-bucket group, and set the The first third video frame subsequence in the plurality of third video frame subsequences is determined as the current video frame subsequence, wherein the second sequence number is based on the number of the plurality of video frames in the preset time period. Get the serial number generated sequentially;
  • the current videos of the multiple double-bucket groups are stored in the current video frame subsequence, and the next video frame of the current video frames of each double-bucket group is re-determined as the For the current video frame, the current video subsequence is re-determined according to the current video frame subsequence and the preset number.
  • the preset number is 2.
  • the first sequence number of the double-bucket group G is 1, and the first sequence number of the double-bucket group H is 2.
  • the second sequence numbers of the multiple video frames in the main bucket in the dual bucket group G are 1 and 5 in sequence from the head of the queue to the tail of the queue.
  • the second sequence numbers of the multiple video frames in the secondary buckets in the dual bucket group G are 3 and 7 in sequence from the head of the queue to the tail of the queue.
  • the second sequence numbers of the multiple video frames in the main bucket in the dual bucket group H are 2 and 6 in sequence from the queue head to the queue tail.
  • the second sequence numbers of the multiple video frames in the secondary buckets in the dual bucket group H are 4 and 8 in sequence from the queue head to the queue tail.
  • the video frame sequence is (element 1, element 2, element 3, element 4, element 5, element 6, element 7, element 8).
  • the preset number 2 as the length of each third video frame subsequence
  • four third video frame subsequences are obtained, which are respectively (element 1, element 2), (element 3, element 4), (element 5, Element 6), (element 7, element 8), wherein the sequence numbers of the four third video frame subsequences are 1, 2, 3, and 4 in sequence.
  • Video frame 1 is determined as the current video frame of the double-bucket group G
  • video frame 2 is determined as the current video frame of the double-bucket group H
  • the first third video frame subsequence among the four third video frame subsequences is determined as the current video frame subsequence, ie (element 1, element 2).
  • the current video frames and current video frame subsequences of the two dual-bucket groups are re-determined, that is, the video frame 5 of the main bucket in the dual-bucket group G and the video frame 6 of the main bucket in the dual-bucket group H.
  • the video frame 5 is re-determined as the current video frame of the dual-bucket group G
  • the video frame 6 is re-determined as the current video frame of the dual-bucket group H.
  • the first third video subsequence is the current video subsequence
  • the preset number is 2
  • the third third video subsequence is re-determined as the current video subsequence, ie (element 5, element 6).
  • the re-determined sequence number of the current video subsequence is equal to the sequence number of the current video subsequence plus a preset number.
  • the preset period of time consists of the third sub-period and the fourth sub-period, the third sub-period precedes the fourth sub-period, and the third sub-period is longer than the fourth sub-period.
  • the integration module 204 is configured to integrate the video frame sequence to obtain a target video frame sequence.
  • the integrating the sequence of video frames includes:
  • the target video frame sequence may also be stored in a node of a blockchain.
  • the plurality of video frames may be deleted. for the next cycle of video frame extraction.
  • the multiple video frames are multiple facial video frames of the first user
  • the video frame extraction further includes:
  • the plurality of video frames are a plurality of facial video frames of the second user
  • the video frame extraction further comprises:
  • a lying evaluation result of the second user within the preset time period is determined according to the micro-expression feature.
  • the video frame extracting apparatus 20 of the second embodiment acquires multiple video frames within a preset time period; and stores the multiple video frames in a preset number of multiple double-bucket groups within the preset time period, each The dual-bucket group includes a main bucket and a secondary bucket; select a plurality of target video frames from a plurality of the dual-bucket groups to a video frame sequence within the preset time period; and integrate the video frame sequence. Extracting video frames through multiple double-bucket groups can avoid losing key information, making the extracted video frames more representative than multiple acquired video frames, and improving the accuracy of video frame extraction.
  • This embodiment provides a computer-readable storage medium, where computer-readable instructions are stored on the computer-readable storage medium.
  • the steps in the above embodiments of the video frame extraction method are implemented. For example, as shown in FIG. Steps 101-104 shown in 1:
  • each of the dual-bucket groups includes a primary bucket and a secondary bucket;
  • an acquisition module 201 configured to acquire multiple video frames within a preset time period
  • a storage module 202 configured to store the multiple video frames in a preset number of multiple dual bucket groups within the preset time period, each of the dual bucket groups including a primary bucket and a secondary bucket;
  • a selection module 203 configured to select a plurality of target video frames to a video frame sequence from a plurality of the double-barrel groups within the preset time period;
  • the integration module 204 is configured to integrate the video frame sequence to obtain a target video frame sequence.
  • FIG. 3 is a schematic diagram of a computer device according to Embodiment 3 of the present application.
  • the computer device 30 includes a memory 301, a processor 302, and computer readable instructions, such as a video frame extraction program, stored in the memory 301 and executable on the processor 302.
  • the processor 302 executes the computer-readable instructions, the steps in the above embodiments of the video frame extraction method are implemented, for example, 101-104 shown in FIG. 1 :
  • each of the dual-bucket groups includes a primary bucket and a secondary bucket;
  • an acquisition module 201 configured to acquire multiple video frames within a preset time period
  • a storage module 202 configured to store the multiple video frames in a preset number of multiple dual bucket groups within the preset time period, each of the dual bucket groups including a primary bucket and a secondary bucket;
  • a selection module 203 configured to select a plurality of target video frames to a video frame sequence from a plurality of the double-barrel groups within the preset time period;
  • the integration module 204 is configured to integrate the video frame sequence to obtain a target video frame sequence.
  • the computer-readable instructions may be divided into one or more modules, and the one or more modules are stored in the memory 301 and executed by the processor 302 to complete the method.
  • the one or more modules may be a series of computer-readable instruction segments capable of accomplishing specific functions, and the instruction segments are used to describe the execution process of the computer-readable instructions in the computer device 30 .
  • the computer-readable instructions may be divided into an acquisition module 201, a storage module 202, a selection module 203, and an integration module 204 in FIG. 2. For specific functions of each module, refer to the second embodiment.
  • the schematic diagram 3 is only an example of the computer device 30, and does not constitute a limitation on the computer device 30, and may include more or less components than the one shown, or combine some components, or different
  • the computer device 30 may also include input and output devices, network access devices, buses, and the like.
  • the so-called processor 302 may be a central processing unit (Central Processing Unit, CPU), or other general-purpose processors, digital signal processors (Digital Signal Processors, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • the general-purpose processor can be a microprocessor or the processor 302 can also be any conventional processor, etc.
  • the processor 302 is the control center of the computer device 30, and uses various interfaces and lines to connect the entire computer device 30. various parts.
  • the memory 301 can be used to store the computer-readable instructions, and the processor 302 implements the instructions by running or executing the computer-readable instructions or modules stored in the memory 301 and calling the data stored in the memory 301.
  • the memory 301 may mainly include a stored program area and a stored data area, wherein the stored program area may store an operating system, an application program required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the storage data area may Data and the like created according to the use of the computer device 30 are stored.
  • the memory 301 may include a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card (Flash Card), at least one disk storage device, a flash memory devices, Read-Only Memory (ROM), Random Access Memory (RAM), or other non-volatile/volatile storage devices.
  • SMC Smart Media Card
  • SD Secure Digital
  • Flash Card Flash Card
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • modules integrated in the computer device 30 are implemented in the form of software function modules and sold or used as independent products, they may be stored in a computer-readable storage medium. Based on this understanding, the present application can implement all or part of the processes in the methods of the above embodiments, and can also be completed by instructing relevant hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium.
  • the computer-readable instructions when executed by the processor, can implement the steps of the above-mentioned method embodiments.
  • the computer-readable instructions include computer-readable instruction codes, and the computer-readable instruction codes may be in source code form, object code form, executable file, or some intermediate form, and the like.
  • the computer-readable medium may include: any entity or device capable of carrying the computer-readable instruction code, recording medium, U disk, removable hard disk, magnetic disk, optical disk, computer memory, read only memory (ROM), random access memory access memory (RAM), etc.
  • the computer-readable storage medium described in this application may be non-volatile or volatile.
  • the computer-usable storage medium may mainly include a stored program area and a stored data area, wherein the stored program area may store an operating system, an application program required by at least one function, and the like; using the created data, etc.
  • the blockchain referred to in this application is a new application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm.
  • Blockchain essentially a decentralized database, is a series of data blocks associated with cryptographic methods. Each data block contains a batch of network transaction information to verify its Validity of information (anti-counterfeiting) and generation of the next block.
  • the blockchain can include the underlying platform of the blockchain, the platform product service layer, and the application service layer.
  • modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist physically alone, or two or more modules may be integrated into one module.
  • the above-mentioned integrated modules can be implemented in the form of hardware, or can be implemented in the form of hardware plus software function modules.
  • the above-mentioned integrated modules implemented in the form of software functional modules may be stored in a computer-readable storage medium.
  • the above-mentioned software function modules are stored in a storage medium, and include several instructions to enable a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (processor) to execute the video frames described in the various embodiments of the present application. Part of the extraction method.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Image Analysis (AREA)
  • Television Signal Processing For Recording (AREA)

Abstract

本申请涉及人工智能及图像处理技术领域,提供一种视频帧提取方法及相关设备。所述视频帧提取方法包括:获取预设时间段内的多个视频帧;在所述预设时间段内将所述多个视频帧存储至预设数量的多个双桶组,每个所述双桶组包括主桶和副桶;在所述预设时间段内从多个所述双桶组中选取多个目标视频帧至视频帧序列;整合所述视频帧序列,得到目标视频帧序列。本申请从预设时间段内的多个视频帧中提取出目标视频帧序列,增加视频帧提取的准确性。此外,本申请还涉及区块链技术,所述目标视频帧序列可存储于区块链中。

Description

视频帧提取方法及相关设备
本申请要求于2020年11月06日提交中国专利局,申请号为202011229588.X申请名称为“视频帧提取方法及相关设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及人工智能及图像处理技术领域,具体涉及一种视频帧提取方法、装置、计算机设备及计算机可读存储介质。
背景技术
一段时间内的连续的多个视频帧,可以被用于图像处理等下游任务,如基于人脸视频帧的表情识别。多个视频帧的数量通常较大,难以将多个视频帧全部用于下游任务。发明人发现如果下游任务的计算能力不足,下游任务就会将多个视频帧的部分视频帧进行随机丢帧,可能造成下游任务的处理结果不准确或者不及时。
如何提升视频帧提取的准确性,以避免随机丢帧,成为待解决的问题。
发明内容
鉴于以上内容,有必要提出一种视频帧提取方法、装置、计算机设备及计算机可读存储介质,其可以从预设时间段内的多个视频帧中提取目标视频帧序列,提升视频帧提取的准确性。
本申请的第一方面提供一种视频帧提取方法,所述方法包括:
获取预设时间段内的多个视频帧;
在所述预设时间段内将所述多个视频帧存储至预设数量的多个双桶组,每个所述双桶组包括主桶和副桶;
在所述预设时间段内从多个所述双桶组中选取多个目标视频帧至视频帧序列;
整合所述视频帧序列,得到目标视频帧序列。
本申请的第二方面提供一种计算机设备,所述计算机设备包括存储器及处理器,所述存储器用于存储至少一个计算机可读指令,所述处理器用于执行所述至少一个计算机可读指令以实现以下步骤:
获取预设时间段内的多个视频帧;
在所述预设时间段内将所述多个视频帧存储至预设数量的多个双桶组,每个所述双桶组包括主桶和副桶;
在所述预设时间段内从多个所述双桶组中选取多个目标视频帧至视频帧序列;
整合所述视频帧序列,得到目标视频帧序列。
本申请的第三方面提供一种计算机可读存储介质,所述计算机可读存储介质存储有至少一个计算机可读指令,所述至少一个计算机可读指令被处理器执行时实现以下步骤:
获取预设时间段内的多个视频帧;
在所述预设时间段内将所述多个视频帧存储至预设数量的多个双桶组,每个所述双桶组包括主桶和副桶;
在所述预设时间段内从多个所述双桶组中选取多个目标视频帧至视频帧序列;
整合所述视频帧序列,得到目标视频帧序列。
本申请的第四方面提供一种视频帧提取装置,所述装置包括:
获取模块,用于获取预设时间段内的多个视频帧;
存储模块,用于在所述预设时间段内将所述多个视频帧存储至预设数量的多个双桶组,每个所述双桶组包括主桶和副桶;
选取模块,用于在所述预设时间段内从多个所述双桶组中选取多个目标视频帧至视频帧序列;
整合模块,用于整合所述视频帧序列,得到目标视频帧序列。
本申请获取预设时间段内的多个视频帧;在所述预设时间段内将所述多个视频帧存储至预设数量的多个双桶组,每个所述双桶组包括主桶和副桶;在所述预设时间段内从多个所述双桶组中选取多个目标视频帧至视频帧序列;整合所述视频帧序列。通过多个双桶组提取视频帧,可以避免丢失关键信息,使得提取出的视频帧相对于获取到的多个视频帧更具有代表性,提升视频帧提取的准确性。
附图说明
图1是本申请实施例提供的视频帧提取方法的流程图。
图2是本申请实施例提供的视频帧提取装置的结构图。
图3是本申请实施例提供的计算机设备的示意图。
具体实施方式
为了能够更清楚地理解本申请的上述目的、特征和优点,下面结合附图和具体实施例对本申请进行详细描述。需要说明的是,在不冲突的情况下,本申请的实施例及实施例中的特征可以相互组合。
在下面的描述中阐述了很多具体细节以便于充分理解本申请,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。
除非另有定义,本文所使用的所有的技术和科学术语与属于本申请的技术领域的技术人员通常理解的含义相同。本文中在本申请的说明书中所使用的术语只是为了描述具体的实施例的目的,不是旨在于限制本申请。
优选地,本申请的视频帧提取方法应用在一个或者多个计算机设备中。所述计算机设备是一种能够按照事先设定或存储的指令,自动进行数值计算和/或信息处理的设备,其硬件包括但不限于微处理器、专用集成电路(Application Specific Integrated Circuit,ASIC)、可编程门阵列(Field-Programmable Gate Array,FPGA)、数字处理器(Digital Signal Processor,DSP)、嵌入式设备等。
所述计算机设备可以是桌上型计算机、笔记本、掌上电脑及云端服务器等计算设备。所述计算机设备可以与用户通过键盘、鼠标、遥控器、触摸板或声控设备等方式进行人机交互。
实施例一
图1是本申请实施例一提供的视频帧提取方法的流程图。所述视频帧提取方法应用于计算机设备,用于从预设时间段内的多个视频帧中提取目标视频帧序列,提升视频帧提取的准确性。
如图1所示,所述视频帧提取方法包括:
101,获取预设时间段内的多个视频帧。
所述多个视频帧是在所述预设时间段内的连续视频帧,可以被用于图像处理,如基于人脸视频帧的表情识别。在所述预设时间段获取的所述多个视频帧的数量通常较大,难以将所述多个视频帧全部用于图像处理,需要对所述多个视频帧进行提取。
在一具体实施例中,所述获取预设时间段内的多个视频帧包括:
在所述预设时间段内接收预设客户端推送的多个视频帧;或
接收预设客户端在所述预设时间段内采集的多个视频帧;或
在所述预设时间段内通过摄像设备采集多个视频帧。
具体地,预设时间段可以是1秒。可以在1s内接收预设客户端推送的30个视频帧。
预设客户端可以通过预设客户端的摄像设备采集视频帧。计算机设备可以接收预设客户端在1s内采集的30个视频帧。
计算机设备可以在1s内通过计算机设备采集30个视频帧。
102,在所述预设时间段内将所述多个视频帧存储至预设数量的多个双桶组,每个所述桶组包括主桶和副桶。
多个所述双桶组可以存储所述多个视频帧。所述双桶组中的主桶、副桶可以是先进先出的数据结构,如队列等,可以存储数据。用于根据所述多个视频帧的下游任务的处理能力,从多个所述双桶组读取所述多个视频帧中的具有代表性的视频帧,避免从所述多个视频帧随机选择一些视频帧进行处理。所述多个视频帧的下游任务可以是图像处理任务、图像识别任务等。
双桶组可以均匀地存储所述多个视频帧。例如,6个视频帧,可以由双桶组中的主桶存储第1、3、5个视频帧,由双桶组中的副桶存储第2、4、6个视频帧。当视频帧过多,下游任务处理能力有限时,直接选取主桶中的3个视频帧进行下游任务,舍弃副桶中的3个视频帧。主桶中的3个视频帧也可以表示6个视频帧的整体内容。
在一具体实施例中,所述在所述预设时间段内将所述多个视频帧存储至预设数量的多个双桶组包括:
获取多个所述双桶组的数量和每个所述双桶组的第一序号;
依获取所述多个视频帧的顺序生成所述多个视频帧的第二序号,其中,所述多个视频帧中的每个视频帧对应一个第二序号;
对于所述多个视频帧中的每个视频帧,根据多个所述双桶组的数量和所述视频帧的第二序号进行取余计算,得到所述视频帧的第三序号;
将第一序号与所述视频帧的第三序号一致的双桶组确定为目标双桶组;
将所述视频帧存储至所述目标双桶组。
具体地,所述根据多个所述双桶组的数量和所述视频帧的第二序号进行取余计算包括:
用所述视频帧的第二序号除以多个所述双桶组的数量以进行取余运算,得到目标余数;
当所述目标余数等于0时,将多个所述双桶组的数量确定为所述视频帧的第三序号;
当所述目标余数不等于0时,将所述目标余数确定为所述视频帧的第三序号。
具体地,多个所述双桶组的数量为2。
例如,获取四个双桶组A、B、C、D,四个双桶组A、B、C、D的第一序号分别为1,2,3,4。
依获取8个视频帧的顺序生成8个视频帧的第二序号;8个视频帧按获取顺序分别为a、b、c、d、e、f、g、h;8个视频帧的第二序号分别为1、2、3、4、5、6、7、8。
对于视频帧a,视频帧a的第二序号为1,双桶组的数量为4;用视频帧a的第二序号除以双桶组的数量以进行取余运算,得到余数1,得到视频帧a的第三序号为余数1。对于视频帧b,视频帧b的第二序号为2,双桶组的数量为4;用视频帧b的第二序号除以双桶组的数量以进行取余运算,得到余数2,得到视频帧b的第三序号为余数2。以此类推,可以得到视频帧c的第三序号为3;视频帧d的第三序号为4;视频帧e的第三序号为1;视频帧f的第三序号为2;视频帧g的第三序号为3;视频帧h的第三序号为4。其中,视频帧d对应的目标余数等于0,将双桶组的数量4确定为视频帧d的第三序号;视频帧h对应的目标余数等于0,将双桶组的数量4确定为视频帧h的第三序号。
将第一序号与视频帧a的第三序号一致的双桶组A确定为目标双桶组;将视频帧a 存储至目标双桶组A。将第一序号与视频帧b的第三序号一致的双桶组B确定为目标双桶组;将视频帧b存储至目标双桶组B。以此类推。
在一具体实施例中,所述将所述视频帧存储至所述目标双桶组包括:
获取所述视频帧在所述目标双桶组的第四序号;
当所述视频帧的第四序号是奇数时,将所述视频帧存储至所述目标双桶组的主桶;
当所述视频帧的第四序号是偶数时,将所述视频帧存储至所述目标双桶组的副桶。
如上例,视频帧a的目标双桶组为双桶组A;视频帧e的目标双桶组为双桶组A。在视频帧a存储至双桶组A之前,双桶组中没有视频帧,将待存储至双桶组A的视频帧从1开始依次编号,得到视频帧在双桶组A的第四序号。其中,视频帧a的第四序号为1,视频帧b的第四序号为2。当存在视频帧i的目标双桶组为双桶组A时,双桶组A中最后一个视频帧的第四序号为2,将待存储至双桶组A的视频帧从3开始依次编号,得到视频帧i视频帧在双桶组A的第四序号为3。即依存储至目标双桶组的顺序对视频帧进行编号。
当视频帧a的第四序号是奇数1时,将视频帧a存储至双桶组A的主桶,双桶组的主桶可以是一个队列,记为第一队列,此时视频帧a位于第一队列的队列头;
当视频帧e的第四序号是偶数2时,将视频帧e存储至双桶组A的副桶,双桶组的副桶可以是一个队列,记为第二队列,此时视频帧e位于第二队列的队列头;
当视频帧i的第四序号是奇数3时,将视频帧i存储至双桶组A的主桶,即第一队列,此时视频帧a位于第一队列的队列头,视频帧i位于第一队列的队列尾。
103,在所述预设时间段内从多个所述双桶组中选取多个目标视频帧至视频帧序列。
在所述预设时间段内从多个所述双桶组中选取多个目标视频帧至视频帧序列,以通过选取目标视频帧得到的视频帧序列代替所述多个视频帧的整体内容。当下游任务的计算能力足够时,可以在处理双桶组中的主桶中的视频帧后,还可以处理双桶组中的副桶中的视频帧;当下游任务的计算能力不足时,可以在处理双桶组中的主桶中的视频帧后,不处理双桶组中的副桶中的视频帧。由于已经处理的双桶组中的主桶中的视频帧能够代表多个视频帧的状态内容,因此,可以避免下游任务受影响。
在一具体实施例中,所述在所述预设时间段内从多个所述双桶组中选取多个目标视频帧至视频帧序列包括:
获取多个所述双桶组与所述视频帧序列的映射关系,所述映射关系定义了多个所述双桶组中的视频帧在所述视频帧序列中的存储位序;
在所述预设时间段中的第一子时间段内,根据所述映射关系从多个所述双桶组中的主桶选取视频帧存储至所述视频帧序列,得到由所述双桶组中的主桶中的全部视频帧组成的部分目标视频帧;
在所述预设时间段中的第二子时间段内,根据所述映射关系从多个所述双桶组中的副桶选取视频帧存储至所述视频帧序列,得到由所述双桶组中的副桶中的全部视频帧或部分视频帧组成的部分目标视频帧。
例如,两个双桶组E、F,双桶组E中主桶中的多个视频帧的第二序号从队列头到队列尾依次为1、5、9、13。双桶组E中副桶中的多个视频帧的第二序号从队列头到队列尾依次为3、7、11、15。双桶组F中主桶中的多个视频帧的第二序号从队列头到队列尾依次为2、6、10、14。双桶组F中副桶中的多个视频帧的第二序号从队列头到队列尾依次为4、8、12、16。视频帧序列的序列号为1至16;视频帧序列与两个双桶组的映射关系为,视频帧序列的序列号与双桶组中主桶中的多个视频帧的第二序号一一对应。所述映射关系定义了多个所述双桶组中的视频帧在所述视频帧序列中的存储位序。
在一具体实施例中,所述根据所述映射关系从多个所述双桶组中的主桶选取视频帧存储至所述视频帧序列包括:
依多个所述双桶组的第一序号的顺序,逐个选取多个所述双桶组中的每个双桶组;
根据所述映射关系确定所述视频帧序列中的与所述双桶组对应的第一视频帧子序列;
依第二序号的顺序获取所述双桶组中的主桶的第一个视频帧,将所述双桶组中的主桶的第一个视频帧确定为当前视频帧,将所述第一视频帧子序列中的第一个元素确定为当前元素,其中,第一序号是获取的双筒组的序号,第二序号是依所述预设时间段内的所述多个视频帧的获取顺序生成的序号;
逐个将所述当前视频帧存储至所述当前元素,依第二序号的顺序将当前视频帧的下一个视频帧重新确定为当前视频帧,将所述当前元素的下一个元素重新确定为当前元素。
如上例,双桶组E的第一序号为1,双桶组F的第一序号为2。依第一序号的顺序从两个双桶组中选取双桶组E,根据映射关系确定视频帧序列中的与双桶组E对应的第一视频帧子序列为(元素1,元素5,元素9,元素13)。依第二序号,在双桶组F中的主桶中,视频帧1的下一个视频帧为视频帧5,视频帧5的下一个视频帧为视频帧9,视频帧9的下一个视频帧为视频帧13。其中视频帧1是第二序号为1的视频帧,以此类推。在双桶组E对应的第一视频帧子序列中,元素1的下一个元素为元素5,元素5的下一个元素为元素9,元素9的下一个元素为元素13。其中元素1是序列号为1的元素,以此类推。
将双桶组中的主桶的当前视频帧,即视频帧1,存储至视频帧序列中的当前元素,即元素1。重新确定当前视频帧和当前元素后,将双桶组中的主桶的当前视频帧,即视频帧5,存储至视频帧序列中的当前元素,即元素5。以此类推。
对于双桶组F的处理,依上述实施例类推。
在一具体实施例中,所述根据所述映射关系从多个所述双桶组中的副桶选取视频帧存储至所述视频帧序列包括:
依多个所述双桶组的第一序号的顺序,逐个选取多个所述双桶组中的每个双桶组;
根据所述映射关系确定所述视频帧序列中的与所述双桶组对应的第二视频帧子序列;
依第二序号的顺序获取所述双桶组中的副桶的第一个视频帧,将所述双桶组中的副桶的第一个视频帧确定为当前视频帧,将所述第二视频帧子序列中的第一个元素确定为当前元素;
逐个将所述当前视频帧存储至所述当前元素,依第二序号的顺序将当前视频帧的下一个视频帧重新确定为当前视频帧,将所述当前元素的下一个元素重新确定为当前元素。
在另一实施例中,所述在所述预设时间段内从多个所述双桶组中选取多个目标视频帧至视频帧序列包括:
在所述预设时间段中的第三子时间段内,根据所述预设数量从多个所述双桶组中的主桶选取视频帧存储至所述视频帧序列,得到由所述双桶组中的主桶中的全部视频帧组成的部分目标视频帧;
在所述预设时间段中的第四子时间段内,根据所述预设数量从多个所述双桶组中的副桶选取视频帧存储至所述视频帧序列,得到由所述双桶组中的副桶中的全部视频帧或部分视频帧组成的部分目标视频帧。
在另一实施例中,所述根据所述预设数量从多个所述双桶组中的主桶选取视频帧存储至所述视频帧序列包括:
根据所述预设数量确定所述视频帧序列中的多个第三视频帧子序列;
依第二序号的顺序获取各个双桶组中的主桶的第一个视频帧,将各个双桶组中的主桶的第一个视频帧确定为各个双桶组的当前视频帧,将所述多个第三视频帧子序列中的第一个第三视频帧子序列确定为当前视频帧子序列,其中,第二序号是依所述预设时间 段内的所述多个视频帧的获取顺序生成的序号;
逐个将多个所述双桶组的当前视频存储至所述当前视频帧子序列,依第二序号的顺序将各个双桶组的当前视频帧的后一个视频帧重新确定为各个双桶组的当前视频帧,根据所述当前视频帧子序列和所述预设数量重新确定当前视频子序列。
例如,预设数量为2。双桶组G的第一序号为1,双桶组H的第一序号为2。双桶组G中主桶中的多个视频帧的第二序号从队列头到队列尾依次为1、5。双桶组G中副桶中的多个视频帧的第二序号从队列头到队列尾依次为3、7。双桶组H中主桶中的多个视频帧的第二序号从队列头到队列尾依次为2、6。双桶组H中副桶中的多个视频帧的第二序号从队列头到队列尾依次为4、8。视频帧序列为(元素1,元素2,元素3,元素4,元素5,元素6,元素7,元素8)。以预设数量2为每个第三视频帧子序列的长度,得到四个第三视频帧子序列,依次分别为(元素1,元素2)、(元素3,元素4)、(元素5,元素6)、(元素7,元素8),其中,四个第三视频帧子序列的序号依次为1、2、3、4。
依第二序号的顺序获取两个双桶组中的主桶的第一个视频帧,即双桶组G中的主桶的视频帧1和双桶组H中的主桶的视频帧2。将视频帧1确定为双桶组G的当前视频帧,将视频帧2确定为双桶组H的当前视频帧。将四个第三视频帧子序列中的第一个第三视频帧子序列确定为当前视频帧子序列,即(元素1,元素2)。
将视频帧1存储至元素1,将视频帧2存储至元素2。重新确定两个双桶组的当前视频帧和当前视频帧子序列,即双桶组G中的主桶的视频帧5和双桶组H中的主桶的视频帧6。将视频帧5重新确定为双桶组G的当前视频帧,将视频帧6重新确定为双桶组H的当前视频帧。第一个第三视频子序列为当前视频子序列,预设数量为2,将第三个第三视频子序列重新确定为当前视频子序列,即(元素5,元素6)。其中,重新确定的当前视频子序列的序号等于当前视频子序列的序号加预设数量。将视频帧5存储至元素5,将视频帧6存储至元素6。
所述预设时间段由所述第三子时间段和所述第四子时间段组成,所述第三子时间段先于所述第四子时间段,所述第三子时间段长于第四子时间段。
104,整合所述视频帧序列,得到目标视频帧序列。
在一具体实施例中,所述整合所述视频帧序列包括:
删除所述视频帧序列中的空元素;或
提取所述视频帧序列中的非空元素,将所述视频帧序列中的非空元素组合为所述目标视频帧序列。
需要强调的是,为进一步保证所述目标视频帧序列的私密和安全性,所述目标视频帧序列还可以存储于一区块链的节点中。
在所述预设时间段之后,可以删除所述多个视频帧。以进行下一周期的视频帧提取。
在另一实施例中,所述多个视频帧是第一用户的多个面部视频帧,所述视频帧提取还包括:
对所述目标视频帧序列进行微表情识别,得到第一微表情特征;
根据所述第一微表情特征确定所述第一用户在所述预设时间段内的情绪状态。
在另一实施例中,所述多个视频帧是第二用户的多个面部视频帧,所述视频帧提取还包括:
对所述目标视频帧序列进行微表情识别,得到微表情特征;
根据所述微表情特征确定所述第二用户在所述预设时间段内的撒谎评估结果。
实施例一的视频帧提取方法获取预设时间段内的多个视频帧;在所述预设时间段内将所述多个视频帧存储至预设数量的多个双桶组,每个所述双桶组包括主桶和副桶;在所述预设时间段内从多个所述双桶组中选取多个目标视频帧至视频帧序列;整合所述视 频帧序列。通过多个双桶组提取视频帧,可以避免丢失关键信息,使得提取出的视频帧相对于获取到的多个视频帧更具有代表性,提升视频帧提取的准确性。
实施例二
图2是本申请实施例二提供的视频帧提取装置的结构图。所述视频帧提取装置20应用于计算机设备。所述视频帧提取装置20用于从预设时间段内的多个视频帧中提取目标视频帧序列,提升视频帧提取的准确性。
如图2所示,所述视频帧提取装置20可以包括获取模块201、存储模块202、选取模块203、整合模块204。
获取模块201,用于获取预设时间段内的多个视频帧。
所述多个视频帧是在所述预设时间段内的连续视频帧,可以被用于图像处理,如基于人脸视频帧的表情识别。在所述预设时间段获取的所述多个视频帧的数量通常较大,难以将所述多个视频帧全部用于图像处理,需要对所述多个视频帧进行提取。
在一具体实施例中,所述获取预设时间段内的多个视频帧包括:
在所述预设时间段内接收预设客户端推送的多个视频帧;或
接收预设客户端在所述预设时间段内采集的多个视频帧;或
在所述预设时间段内通过摄像设备采集多个视频帧。
具体地,预设时间段可以是1秒。可以在1s内接收预设客户端推送的30个视频帧。
预设客户端可以通过预设客户端的摄像设备采集视频帧。计算机设备可以接收预设客户端在1s内采集的30个视频帧。
计算机设备可以在1s内通过计算机设备采集30个视频帧。
存储模块202,用于在所述预设时间段内将所述多个视频帧存储至预设数量的多个双桶组,每个所述桶组包括主桶和副桶。
多个所述双桶组可以存储所述多个视频帧。所述双桶组中的主桶、副桶可以是先进先出的数据结构,如队列等,可以存储数据。用于根据所述多个视频帧的下游任务的处理能力,从多个所述双桶组读取所述多个视频帧中的具有代表性的视频帧,避免从所述多个视频帧随机选择一些视频帧进行处理。所述多个视频帧的下游任务可以是图像处理任务、图像识别任务等。
双桶组可以均匀地存储所述多个视频帧。例如,6个视频帧,可以由双桶组中的主桶存储第1、3、5个视频帧,由双桶组中的副桶存储第2、4、6个视频帧。当视频帧过多,下游任务处理能力有限时,直接选取主桶中的3个视频帧进行下游任务,舍弃副桶中的3个视频帧。主桶中的3个视频帧也可以表示6个视频帧的整体内容。
在一具体实施例中,所述在所述预设时间段内将所述多个视频帧存储至预设数量的多个双桶组包括:
获取多个所述双桶组的数量和每个所述双桶组的第一序号;
依获取所述多个视频帧的顺序生成所述多个视频帧的第二序号,其中,所述多个视频帧中的每个视频帧对应一个第二序号;
对于所述多个视频帧中的每个视频帧,根据多个所述双桶组的数量和所述视频帧的第二序号进行取余计算,得到所述视频帧的第三序号;
将第一序号与所述视频帧的第三序号一致的双桶组确定为目标双桶组;
将所述视频帧存储至所述目标双桶组。
具体地,所述根据多个所述双桶组的数量和所述视频帧的第二序号进行取余计算包括:
用所述视频帧的第二序号除以多个所述双桶组的数量以进行取余运算,得到目标余数;
当所述目标余数等于0时,将多个所述双桶组的数量确定为所述视频帧的第三序号;
当所述目标余数不等于0时,将所述目标余数确定为所述视频帧的第三序号。
具体地,多个所述双桶组的数量为2。
例如,获取四个双桶组A、B、C、D,四个双桶组A、B、C、D的第一序号分别为1,2,3,4。
依获取8个视频帧的顺序生成8个视频帧的第二序号;8个视频帧按获取顺序分别为a、b、c、d、e、f、g、h;8个视频帧的第二序号分别为1、2、3、4、5、6、7、8。
对于视频帧a,视频帧a的第二序号为1,双桶组的数量为4;用视频帧a的第二序号除以双桶组的数量以进行取余运算,得到余数1,得到视频帧a的第三序号为余数1。对于视频帧b,视频帧b的第二序号为2,双桶组的数量为4;用视频帧b的第二序号除以双桶组的数量以进行取余运算,得到余数2,得到视频帧b的第三序号为余数2。以此类推,可以得到视频帧c的第三序号为3;视频帧d的第三序号为4;视频帧e的第三序号为1;视频帧f的第三序号为2;视频帧g的第三序号为3;视频帧h的第三序号为4。其中,视频帧d对应的目标余数等于0,将双桶组的数量4确定为视频帧d的第三序号;视频帧h对应的目标余数等于0,将双桶组的数量4确定为视频帧h的第三序号。
将第一序号与视频帧a的第三序号一致的双桶组A确定为目标双桶组;将视频帧a存储至目标双桶组A。将第一序号与视频帧b的第三序号一致的双桶组B确定为目标双桶组;将视频帧b存储至目标双桶组B。以此类推。
在一具体实施例中,所述将所述视频帧存储至所述目标双桶组包括:
获取所述视频帧在所述目标双桶组的第四序号;
当所述视频帧的第四序号是奇数时,将所述视频帧存储至所述目标双桶组的主桶;
当所述视频帧的第四序号是偶数时,将所述视频帧存储至所述目标双桶组的副桶。
如上例,视频帧a的目标双桶组为双桶组A;视频帧e的目标双桶组为双桶组A。在视频帧a存储至双桶组A之前,双桶组中没有视频帧,将待存储至双桶组A的视频帧从1开始依次编号,得到视频帧在双桶组A的第四序号。其中,视频帧a的第四序号为1,视频帧b的第四序号为2。当存在视频帧i的目标双桶组为双桶组A时,双桶组A中最后一个视频帧的第四序号为2,将待存储至双桶组A的视频帧从3开始依次编号,得到视频帧i视频帧在双桶组A的第四序号为3。即依存储至目标双桶组的顺序对视频帧进行编号。
当视频帧a的第四序号是奇数1时,将视频帧a存储至双桶组A的主桶,双桶组的主桶可以是一个队列,记为第一队列,此时视频帧a位于第一队列的队列头;
当视频帧e的第四序号是偶数2时,将视频帧e存储至双桶组A的副桶,双桶组的副桶可以是一个队列,记为第二队列,此时视频帧e位于第二队列的队列头;
当视频帧i的第四序号是奇数3时,将视频帧i存储至双桶组A的主桶,即第一队列,此时视频帧a位于第一队列的队列头,视频帧i位于第一队列的队列尾。
选取模块203,用于在所述预设时间段内从多个所述双桶组中选取多个目标视频帧至视频帧序列。
在所述预设时间段内从多个所述双桶组中选取多个目标视频帧至视频帧序列,以通过选取目标视频帧得到的视频帧序列代替所述多个视频帧的整体内容。当下游任务的计算能力足够时,可以在处理双桶组中的主桶中的视频帧后,还可以处理双桶组中的副桶中的视频帧;当下游任务的计算能力不足时,可以在处理双桶组中的主桶中的视频帧后,不处理双桶组中的副桶中的视频帧。由于已经处理的双桶组中的主桶中的视频帧能够代表多个视频帧的状态内容,因此,可以避免下游任务受影响。
在一具体实施例中,所述在所述预设时间段内从多个所述双桶组中选取多个目标视频帧至视频帧序列包括:
获取多个所述双桶组与所述视频帧序列的映射关系,所述映射关系定义了多个所述 双桶组中的视频帧在所述视频帧序列中的存储位序;
在所述预设时间段中的第一子时间段内,根据所述映射关系从多个所述双桶组中的主桶选取视频帧存储至所述视频帧序列,得到由所述双桶组中的主桶中的全部视频帧组成的部分目标视频帧;
在所述预设时间段中的第二子时间段内,根据所述映射关系从多个所述双桶组中的副桶选取视频帧存储至所述视频帧序列,得到由所述双桶组中的副桶中的全部视频帧或部分视频帧组成的部分目标视频帧。
例如,两个双桶组E、F,双桶组E中主桶中的多个视频帧的第二序号从队列头到队列尾依次为1、5、9、13。双桶组E中副桶中的多个视频帧的第二序号从队列头到队列尾依次为3、7、11、15。双桶组F中主桶中的多个视频帧的第二序号从队列头到队列尾依次为2、6、10、14。双桶组F中副桶中的多个视频帧的第二序号从队列头到队列尾依次为4、8、12、16。视频帧序列的序列号为1至16;视频帧序列与两个双桶组的映射关系为,视频帧序列的序列号与双桶组中主桶中的多个视频帧的第二序号一一对应。所述映射关系定义了多个所述双桶组中的视频帧在所述视频帧序列中的存储位序。
在一具体实施例中,所述根据所述映射关系从多个所述双桶组中的主桶选取视频帧存储至所述视频帧序列包括:
依多个所述双桶组的第一序号的顺序,逐个选取多个所述双桶组中的每个双桶组;
根据所述映射关系确定所述视频帧序列中的与所述双桶组对应的第一视频帧子序列;
依第二序号的顺序获取所述双桶组中的主桶的第一个视频帧,将所述双桶组中的主桶的第一个视频帧确定为当前视频帧,将所述第一视频帧子序列中的第一个元素确定为当前元素,其中,第一序号是获取的双筒组的序号,第二序号是依所述预设时间段内的所述多个视频帧的获取顺序生成的序号;
逐个将所述当前视频帧存储至所述当前元素,依第二序号的顺序将当前视频帧的下一个视频帧重新确定为当前视频帧,将所述当前元素的下一个元素重新确定为当前元素。
如上例,双桶组E的第一序号为1,双桶组F的第一序号为2。依第一序号的顺序从两个双桶组中选取双桶组E,根据映射关系确定视频帧序列中的与双桶组E对应的第一视频帧子序列为(元素1,元素5,元素9,元素13)。依第二序号,在双桶组F中的主桶中,视频帧1的下一个视频帧为视频帧5,视频帧5的下一个视频帧为视频帧9,视频帧9的下一个视频帧为视频帧13。其中视频帧1是第二序号为1的视频帧,以此类推。在双桶组E对应的第一视频帧子序列中,元素1的下一个元素为元素5,元素5的下一个元素为元素9,元素9的下一个元素为元素13。其中元素1是序列号为1的元素,以此类推。
将双桶组中的主桶的当前视频帧,即视频帧1,存储至视频帧序列中的当前元素,即元素1。重新确定当前视频帧和当前元素后,将双桶组中的主桶的当前视频帧,即视频帧5,存储至视频帧序列中的当前元素,即元素5。以此类推。
对于双桶组F的处理,依上述实施例类推。
在一具体实施例中,所述根据所述映射关系从多个所述双桶组中的副桶选取视频帧存储至所述视频帧序列包括:
依多个所述双桶组的第一序号的顺序,逐个选取多个所述双桶组中的每个双桶组;
根据所述映射关系确定所述视频帧序列中的与所述双桶组对应的第二视频帧子序列;
依第二序号的顺序获取所述双桶组中的副桶的第一个视频帧,将所述双桶组中的副桶的第一个视频帧确定为当前视频帧,将所述第二视频帧子序列中的第一个元素确定为当前元素;
逐个将所述当前视频帧存储至所述当前元素,依第二序号的顺序将当前视频帧的下一个视频帧重新确定为当前视频帧,将所述当前元素的下一个元素重新确定为当前元素。
在另一实施例中,所述在所述预设时间段内从多个所述双桶组中选取多个目标视频帧至视频帧序列包括:
在所述预设时间段中的第三子时间段内,根据所述预设数量从多个所述双桶组中的主桶选取视频帧存储至所述视频帧序列,得到由所述双桶组中的主桶中的全部视频帧组成的部分目标视频帧;
在所述预设时间段中的第四子时间段内,根据所述预设数量从多个所述双桶组中的副桶选取视频帧存储至所述视频帧序列,得到由所述双桶组中的副桶中的全部视频帧或部分视频帧组成的部分目标视频帧。
在另一实施例中,所述根据所述预设数量从多个所述双桶组中的主桶选取视频帧存储至所述视频帧序列包括:
根据所述预设数量确定所述视频帧序列中的多个第三视频帧子序列;
依第二序号的顺序获取各个双桶组中的主桶的第一个视频帧,将各个双桶组中的主桶的第一个视频帧确定为各个双桶组的当前视频帧,将所述多个第三视频帧子序列中的第一个第三视频帧子序列确定为当前视频帧子序列,其中,第二序号是依所述预设时间段内的所述多个视频帧的获取顺序生成的序号;
逐个将多个所述双桶组的当前视频存储至所述当前视频帧子序列,依第二序号的顺序将各个双桶组的当前视频帧的后一个视频帧重新确定为各个双桶组的当前视频帧,根据所述当前视频帧子序列和所述预设数量重新确定当前视频子序列。
例如,预设数量为2。双桶组G的第一序号为1,双桶组H的第一序号为2。双桶组G中主桶中的多个视频帧的第二序号从队列头到队列尾依次为1、5。双桶组G中副桶中的多个视频帧的第二序号从队列头到队列尾依次为3、7。双桶组H中主桶中的多个视频帧的第二序号从队列头到队列尾依次为2、6。双桶组H中副桶中的多个视频帧的第二序号从队列头到队列尾依次为4、8。视频帧序列为(元素1,元素2,元素3,元素4,元素5,元素6,元素7,元素8)。以预设数量2为每个第三视频帧子序列的长度,得到四个第三视频帧子序列,依次分别为(元素1,元素2)、(元素3,元素4)、(元素5,元素6)、(元素7,元素8),其中,四个第三视频帧子序列的序号依次为1、2、3、4。
依第二序号的顺序获取两个双桶组中的主桶的第一个视频帧,即双桶组G中的主桶的视频帧1和双桶组H中的主桶的视频帧2。将视频帧1确定为双桶组G的当前视频帧,将视频帧2确定为双桶组H的当前视频帧。将四个第三视频帧子序列中的第一个第三视频帧子序列确定为当前视频帧子序列,即(元素1,元素2)。
将视频帧1存储至元素1,将视频帧2存储至元素2。重新确定两个双桶组的当前视频帧和当前视频帧子序列,即双桶组G中的主桶的视频帧5和双桶组H中的主桶的视频帧6。将视频帧5重新确定为双桶组G的当前视频帧,将视频帧6重新确定为双桶组H的当前视频帧。第一个第三视频子序列为当前视频子序列,预设数量为2,将第三个第三视频子序列重新确定为当前视频子序列,即(元素5,元素6)。其中,重新确定的当前视频子序列的序号等于当前视频子序列的序号加预设数量。将视频帧5存储至元素5,将视频帧6存储至元素6。
所述预设时间段由所述第三子时间段和所述第四子时间段组成,所述第三子时间段先于所述第四子时间段,所述第三子时间段长于第四子时间段。
整合模块204,用于整合所述视频帧序列,得到目标视频帧序列。
在一具体实施例中,所述整合所述视频帧序列包括:
删除所述视频帧序列中的空元素;或
提取所述视频帧序列中的非空元素,将所述视频帧序列中的非空元素组合为所述目标视频帧序列。
需要强调的是,为进一步保证所述目标视频帧序列的私密和安全性,所述目标视频帧序列还可以存储于一区块链的节点中。
在所述预设时间段之后,可以删除所述多个视频帧。以进行下一周期的视频帧提取。
在另一实施例中,所述多个视频帧是第一用户的多个面部视频帧,所述视频帧提取还包括:
对所述目标视频帧序列进行微表情识别,得到第一微表情特征;
根据所述第一微表情特征确定所述第一用户在所述预设时间段内的情绪状态。
在另一实施例中,所述多个视频帧是第二用户的多个面部视频帧,所述视频帧提取还包括:
对所述目标视频帧序列进行微表情识别,得到微表情特征;
根据所述微表情特征确定所述第二用户在所述预设时间段内的撒谎评估结果。
实施例二的视频帧提取装置20获取预设时间段内的多个视频帧;在所述预设时间段内将所述多个视频帧存储至预设数量的多个双桶组,每个所述双桶组包括主桶和副桶;在所述预设时间段内从多个所述双桶组中选取多个目标视频帧至视频帧序列;整合所述视频帧序列。通过多个双桶组提取视频帧,可以避免丢失关键信息,使得提取出的视频帧相对于获取到的多个视频帧更具有代表性,提升视频帧提取的准确性。
实施例三
本实施例提供一种计算机可读存储介质,该计算机可读存储介质上存储有计算机可读指令,该计算机可读指令被处理器执行时实现上述视频帧提取方法实施例中的步骤,例如图1所示的步骤101-104:
101,获取预设时间段内的多个视频帧;
102,在所述预设时间段内将所述多个视频帧存储至预设数量的多个双桶组,每个所述双桶组包括主桶和副桶;
103,在所述预设时间段内从多个所述双桶组中选取多个目标视频帧至视频帧序列;
104,整合所述视频帧序列,得到目标视频帧序列。
或者,该计算机可读指令被处理器执行时实现上述装置实施例中各模块的功能,例如图2中的模块201-204:
获取模块201,用于获取预设时间段内的多个视频帧;
存储模块202,用于在所述预设时间段内将所述多个视频帧存储至预设数量的多个双桶组,每个所述双桶组包括主桶和副桶;
选取模块203,用于在所述预设时间段内从多个所述双桶组中选取多个目标视频帧至视频帧序列;
整合模块204,用于整合所述视频帧序列,得到目标视频帧序列。
实施例四
图3为本申请实施例三提供的计算机设备的示意图。所述计算机设备30包括存储器301、处理器302以及存储在所述存储器301中并可在所述处理器302上运行的计算机可读指令,例如视频帧提取程序。所述处理器302执行所述计算机可读指令时实现上述视频帧提取方法实施例中的步骤,例如图1所示的101-104:
101,获取预设时间段内的多个视频帧;
102,在所述预设时间段内将所述多个视频帧存储至预设数量的多个双桶组,每个所述双桶组包括主桶和副桶;
103,在所述预设时间段内从多个所述双桶组中选取多个目标视频帧至视频帧序列;
104,整合所述视频帧序列,得到目标视频帧序列。
或者,该计算机可读指令被处理器执行时实现上述装置实施例中各模块的功能,例如图2中的模块201-204:
获取模块201,用于获取预设时间段内的多个视频帧;
存储模块202,用于在所述预设时间段内将所述多个视频帧存储至预设数量的多个双桶组,每个所述双桶组包括主桶和副桶;
选取模块203,用于在所述预设时间段内从多个所述双桶组中选取多个目标视频帧至视频帧序列;
整合模块204,用于整合所述视频帧序列,得到目标视频帧序列。
示例性的,所述计算机可读指令可以被分割成一个或多个模块,所述一个或者多个模块被存储在所述存储器301中,并由所述处理器302执行,以完成本方法。所述一个或多个模块可以是能够完成特定功能的一系列计算机可读指令段,该指令段用于描述所述计算机可读指令在所述计算机设备30中的执行过程。例如,所述计算机可读指令可以被分割成图2中的获取模块201、存储模块202、选取模块203、整合模块204,各模块具体功能参见实施例二。
本领域技术人员可以理解,所述示意图3仅仅是计算机设备30的示例,并不构成对计算机设备30的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如所述计算机设备30还可以包括输入输出设备、网络接入设备、总线等。
所称处理器302可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器302也可以是任何常规的处理器等,所述处理器302是所述计算机设备30的控制中心,利用各种接口和线路连接整个计算机设备30的各个部分。
所述存储器301可用于存储所述计算机可读指令,所述处理器302通过运行或执行存储在所述存储器301内的计算机可读指令或模块,以及调用存储在存储器301内的数据,实现所述计算机设备30的各种功能。所述存储器301可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据计算机设备30的使用所创建的数据等。此外,存储器301可以包括硬盘、内存、插接式硬盘、智能存储卡(Smart Media Card,SMC)、安全数字(Secure Digital,SD)卡、闪存卡(Flash Card)、至少一个磁盘存储器件、闪存器件、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)或其他非易失性/易失性存储器件。
所述计算机设备30集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实现上述实施例方法中的全部或部分流程,也可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一计算机可读存储介质中,该计算机可读指令在被处理器执行时,可实现上述各个方法实施例的步骤。其中,所述计算机可读指令包括计算机可读指令代码,所述计算机可读指令代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读介质可以包括:能够携带所述计算机可读指令代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM)、随机存取存储器(RAM)等。本申请所述计算机可读存储介质可以是非易失性,也可以是易失性。
进一步地,所述计算机可用存储介质可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序等;存储数据区可存储根据 区块链节点的使用所创建的数据等。
本申请所指区块链是分布式数据存储、点对点传输、共识机制、加密算法等计算机技术的新型应用模式。区块链(Blockchain),本质上是一个去中心化的数据库,是一串使用密码学方法相关联产生的数据块,每一个数据块中包含了一批次网络交易的信息,用于验证其信息的有效性(防伪)和生成下一个区块。区块链可以包括区块链底层平台、平台产品服务层以及应用服务层等。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理模块,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用硬件加软件功能模块的形式实现。
上述以软件功能模块的形式实现的集成的模块,可以存储在一个计算机可读取存储介质中。上述软件功能模块存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor)执行本申请各个实施例所述视频帧提取方法的部分步骤。
对于本领域技术人员而言,显然本申请不限于上述示范性实施例的细节,而且在不背离本申请的精神或基本特征的情况下,能够以其他的具体形式实现本申请。因此,无论从哪一点来看,均应将实施例看作是示范性的,而且是非限制性的,本申请的范围由所附权利要求而不是上述说明限定,因此旨在将落在权利要求的等同要件的含义和范围内的所有变化涵括在本申请内。不应将权利要求中的任何附关联图标记视为限制所涉及的权利要求。此外,显然“包括”一词不排除其他模块或步骤,单数不排除复数。本申请中陈述的多个模块或装置也可以由一个模块或装置通过软件或者硬件来实现。第一,第二等词语用来表示名称,而并不表示任何特定的顺序。
最后应说明的是,以上实施例仅用以说明本申请的技术方案而非限制,尽管参照较佳实施例对本申请进行了详细说明,本领域的普通技术人员应当理解,可以对本申请的技术方案进行修改或等同替换,而不脱离本申请技术方案的精神和范围。

Claims (20)

  1. 一种视频帧提取方法,其中,所述视频帧提取方法包括:
    获取预设时间段内的多个视频帧;
    在所述预设时间段内将所述多个视频帧存储至预设数量的多个双桶组,每个所述双桶组包括主桶和副桶;
    在所述预设时间段内从多个所述双桶组中选取多个目标视频帧至视频帧序列;
    整合所述视频帧序列,得到目标视频帧序列。
  2. 如权利要求1所述的视频帧提取方法,其中,所述在所述预设时间段内将所述多个视频帧存储至预设数量的多个双桶组包括:
    获取多个所述双桶组的数量和每个所述双桶组的第一序号;
    依获取所述多个视频帧的顺序生成所述多个视频帧的第二序号,其中,所述多个视频帧中的每个视频帧对应一个第二序号;
    对于所述多个视频帧中的每个视频帧,根据多个所述双桶组的数量和所述视频帧的第二序号进行取余计算,得到所述视频帧的第三序号;
    将所述第一序号与所述视频帧的第三序号一致的双桶组确定为目标双桶组;
    将所述视频帧存储至所述目标双桶组。
  3. 如权利要求2所述的视频帧提取方法,其中,所述将所述视频帧存储至所述目标双桶组包括:
    获取所述视频帧在所述目标双桶组的第四序号;
    当所述视频帧的第四序号是奇数时,将所述视频帧存储至所述目标双桶组的主桶;
    当所述视频帧的第四序号是偶数时,将所述视频帧存储至所述目标双桶组的副桶。
  4. 如权利要求1所述的视频帧提取方法,其中,所述在所述预设时间段内从多个所述双桶组中选取多个目标视频帧至视频帧序列包括:
    获取多个所述双桶组与所述视频帧序列的映射关系,所述映射关系定义了多个所述双桶组中的视频帧在所述视频帧序列中的存储位序;
    在所述预设时间段中的第一子时间段内,根据所述映射关系从多个所述双桶组中的主桶选取视频帧存储至所述视频帧序列,得到由所述双桶组中的主桶中的全部视频帧组成的部分目标视频帧;
    在所述预设时间段中的第二子时间段内,根据所述映射关系从多个所述双桶组中的副桶选取视频帧存储至所述视频帧序列,得到由所述双桶组中的副桶中的全部视频帧或部分视频帧组成的部分目标视频帧。
  5. 如权利要求4所述的视频帧提取方法,其中,所述根据所述映射关系从多个所述双桶组中的主桶选取视频帧存储至所述视频帧序列包括:
    依多个所述双桶组的第一序号的顺序,逐个选取多个所述双桶组中的每个双桶组;
    根据所述映射关系确定所述视频帧序列中的与所述双桶组对应的第一视频帧子序列;
    依第二序号的顺序获取所述双桶组中的主桶的第一个视频帧,将所述双桶组中的主桶的第一个视频帧确定为当前视频帧,将所述第一视频帧子序列中的第一个元素确定为当前元素,其中,第一序号是获取的双筒组的序号,第二序号是依所述预设时间段内的所述多个视频帧的获取顺序生成的序号;
    逐个将所述当前视频帧存储至所述当前元素,依第二序号的顺序将当前视频帧的下一个视频帧重新确定为当前视频帧,将所述当前元素的下一个元素重新确定为当前元素。
  6. 如权利要求1所述的视频帧提取方法,其中,所述在所述预设时间段内从多个所述双桶组中选取多个目标视频帧至视频帧序列包括:
    在所述预设时间段中的第三子时间段内,根据所述预设数量从多个所述双桶组中的主桶 选取视频帧存储至所述视频帧序列,得到由所述双桶组中的主桶中的全部视频帧组成的部分目标视频帧;
    在所述预设时间段中的第四子时间段内,根据所述预设数量从多个所述双桶组中的副桶选取视频帧存储至所述视频帧序列,得到由所述双桶组中的副桶中的全部视频帧或部分视频帧组成的部分目标视频帧。
  7. 如权利要求6所述的视频帧提取方法,其中,所述根据所述预设数量从多个所述双桶组中的主桶选取视频帧存储至所述视频帧序列包括:
    根据所述预设数量确定所述视频帧序列中的多个第三视频帧子序列;
    依第二序号的顺序获取各个双桶组中的主桶的第一个视频帧,将各个双桶组中的主桶的第一个视频帧确定为各个双桶组的当前视频帧,将所述多个第三视频帧子序列中的第一个第三视频帧子序列确定为当前视频帧子序列,其中,第二序号是依所述预设时间段内的所述多个视频帧的获取顺序生成的序号;
    逐个将多个所述双桶组的当前视频存储至所述当前视频帧子序列,依第二序号的顺序将各个双桶组的当前视频帧的后一个视频帧重新确定为各个双桶组的当前视频帧,根据所述当前视频帧子序列和所述预设数量重新确定当前视频子序列。
  8. 一种计算机设备,其中,所述计算机设备包括存储器及处理器,所述存储器用于存储至少一个计算机可读指令,所述处理器用于执行所述至少一个计算机可读指令以实现以下步骤:
    获取预设时间段内的多个视频帧;
    在所述预设时间段内将所述多个视频帧存储至预设数量的多个双桶组,每个所述双桶组包括主桶和副桶;
    在所述预设时间段内从多个所述双桶组中选取多个目标视频帧至视频帧序列;
    整合所述视频帧序列,得到目标视频帧序列。
  9. 如权利要求8所述的计算机设备,其中,所述处理器执行所述至少一个计算机可读指令以实现所述在所述预设时间段内将所述多个视频帧存储至预设数量的多个双桶组时,具体包括:
    获取多个所述双桶组的数量和每个所述双桶组的第一序号;
    依获取所述多个视频帧的顺序生成所述多个视频帧的第二序号,其中,所述多个视频帧中的每个视频帧对应一个第二序号;
    对于所述多个视频帧中的每个视频帧,根据多个所述双桶组的数量和所述视频帧的第二序号进行取余计算,得到所述视频帧的第三序号;
    将所述第一序号与所述视频帧的第三序号一致的双桶组确定为目标双桶组;
    将所述视频帧存储至所述目标双桶组。
  10. 如权利要求9所述的计算机设备,其中,所述处理器执行所述至少一个计算机可读指令以实现所述将所述视频帧存储至所述目标双桶组时,具体包括:
    获取所述视频帧在所述目标双桶组的第四序号;
    当所述视频帧的第四序号是奇数时,将所述视频帧存储至所述目标双桶组的主桶;
    当所述视频帧的第四序号是偶数时,将所述视频帧存储至所述目标双桶组的副桶。
  11. 如权利要求8所述的计算机设备,其中,所述处理器执行所述至少一个计算机可读指令以实现所述在所述预设时间段内从多个所述双桶组中选取多个目标视频帧至视频帧序列时,具体包括:
    获取多个所述双桶组与所述视频帧序列的映射关系,所述映射关系定义了多个所述双桶组中的视频帧在所述视频帧序列中的存储位序;
    在所述预设时间段中的第一子时间段内,根据所述映射关系从多个所述双桶组中的主桶选取视频帧存储至所述视频帧序列,得到由所述双桶组中的主桶中的全部视频帧组 成的部分目标视频帧;
    在所述预设时间段中的第二子时间段内,根据所述映射关系从多个所述双桶组中的副桶选取视频帧存储至所述视频帧序列,得到由所述双桶组中的副桶中的全部视频帧或部分视频帧组成的部分目标视频帧。
  12. 如权利要求11所述的计算机设备,其中,所述处理器执行所述至少一个计算机可读指令以实现所述根据所述映射关系从多个所述双桶组中的主桶选取视频帧存储至所述视频帧序列时,具体包括:
    依多个所述双桶组的第一序号的顺序,逐个选取多个所述双桶组中的每个双桶组;
    根据所述映射关系确定所述视频帧序列中的与所述双桶组对应的第一视频帧子序列;
    依第二序号的顺序获取所述双桶组中的主桶的第一个视频帧,将所述双桶组中的主桶的第一个视频帧确定为当前视频帧,将所述第一视频帧子序列中的第一个元素确定为当前元素,其中,第一序号是获取的双筒组的序号,第二序号是依所述预设时间段内的所述多个视频帧的获取顺序生成的序号;
    逐个将所述当前视频帧存储至所述当前元素,依第二序号的顺序将当前视频帧的下一个视频帧重新确定为当前视频帧,将所述当前元素的下一个元素重新确定为当前元素。
  13. 如权利要求8所述的计算机设备,其中,所述处理器执行所述至少一个计算机可读指令以实现所述在所述预设时间段内从多个所述双桶组中选取多个目标视频帧至视频帧序列时,具体包括:
    在所述预设时间段中的第三子时间段内,根据所述预设数量从多个所述双桶组中的主桶选取视频帧存储至所述视频帧序列,得到由所述双桶组中的主桶中的全部视频帧组成的部分目标视频帧;
    在所述预设时间段中的第四子时间段内,根据所述预设数量从多个所述双桶组中的副桶选取视频帧存储至所述视频帧序列,得到由所述双桶组中的副桶中的全部视频帧或部分视频帧组成的部分目标视频帧。
  14. 一种计算机可读存储介质,其中,所述计算机可读存储介质存储有至少一个计算机可读指令,所述至少一个计算机可读指令被处理器执行时实现以下步骤:
    获取预设时间段内的多个视频帧;
    在所述预设时间段内将所述多个视频帧存储至预设数量的多个双桶组,每个所述双桶组包括主桶和副桶;
    在所述预设时间段内从多个所述双桶组中选取多个目标视频帧至视频帧序列;
    整合所述视频帧序列,得到目标视频帧序列。
  15. 如权利要求14所述的存储介质,其中,所述至少一个计算机可读指令被所述处理器执行以实现所述在所述预设时间段内将所述多个视频帧存储至预设数量的多个双桶组时,具体包括:
    获取多个所述双桶组的数量和每个所述双桶组的第一序号;
    依获取所述多个视频帧的顺序生成所述多个视频帧的第二序号,其中,所述多个视频帧中的每个视频帧对应一个第二序号;
    对于所述多个视频帧中的每个视频帧,根据多个所述双桶组的数量和所述视频帧的第二序号进行取余计算,得到所述视频帧的第三序号;
    将所述第一序号与所述视频帧的第三序号一致的双桶组确定为目标双桶组;
    将所述视频帧存储至所述目标双桶组。
  16. 如权利要求15所述的存储介质,其中,所述至少一个计算机可读指令被所述处理器执行以实现所述将所述视频帧存储至所述目标双桶组时,具体包括:
    获取所述视频帧在所述目标双桶组的第四序号;
    当所述视频帧的第四序号是奇数时,将所述视频帧存储至所述目标双桶组的主桶;
    当所述视频帧的第四序号是偶数时,将所述视频帧存储至所述目标双桶组的副桶。
  17. 如权利要求14所述的存储介质,其中,所述至少一个计算机可读指令被所述处理器执行以实现所述在所述预设时间段内从多个所述双桶组中选取多个目标视频帧至视频帧序列时,具体包括:
    获取多个所述双桶组与所述视频帧序列的映射关系,所述映射关系定义了多个所述双桶组中的视频帧在所述视频帧序列中的存储位序;
    在所述预设时间段中的第一子时间段内,根据所述映射关系从多个所述双桶组中的主桶选取视频帧存储至所述视频帧序列,得到由所述双桶组中的主桶中的全部视频帧组成的部分目标视频帧;
    在所述预设时间段中的第二子时间段内,根据所述映射关系从多个所述双桶组中的副桶选取视频帧存储至所述视频帧序列,得到由所述双桶组中的副桶中的全部视频帧或部分视频帧组成的部分目标视频帧。
  18. 如权利要求17所述的存储介质,其中,所述至少一个计算机可读指令被所述处理器执行以实现所述根据所述映射关系从多个所述双桶组中的主桶选取视频帧存储至所述视频帧序列时,具体包括:
    依多个所述双桶组的第一序号的顺序,逐个选取多个所述双桶组中的每个双桶组;
    根据所述映射关系确定所述视频帧序列中的与所述双桶组对应的第一视频帧子序列;
    依第二序号的顺序获取所述双桶组中的主桶的第一个视频帧,将所述双桶组中的主桶的第一个视频帧确定为当前视频帧,将所述第一视频帧子序列中的第一个元素确定为当前元素,其中,第一序号是获取的双筒组的序号,第二序号是依所述预设时间段内的所述多个视频帧的获取顺序生成的序号;
    逐个将所述当前视频帧存储至所述当前元素,依第二序号的顺序将当前视频帧的下一个视频帧重新确定为当前视频帧,将所述当前元素的下一个元素重新确定为当前元素。
  19. 如权利要求14所述的存储介质,其中,所述至少一个计算机可读指令被所述处理器执行以实现所述在所述预设时间段内从多个所述双桶组中选取多个目标视频帧至视频帧序列时,具体包括:
    在所述预设时间段中的第三子时间段内,根据所述预设数量从多个所述双桶组中的主桶选取视频帧存储至所述视频帧序列,得到由所述双桶组中的主桶中的全部视频帧组成的部分目标视频帧;
    在所述预设时间段中的第四子时间段内,根据所述预设数量从多个所述双桶组中的副桶选取视频帧存储至所述视频帧序列,得到由所述双桶组中的副桶中的全部视频帧或部分视频帧组成的部分目标视频帧。
  20. 一种视频帧提取装置,其中,所述视频帧提取装置包括:
    获取模块,用于获取预设时间段内的多个视频帧;
    存储模块,用于在所述预设时间段内将所述多个视频帧存储至预设数量的多个双桶组,每个所述双桶组包括主桶和副桶;
    选取模块,用于在所述预设时间段内从多个所述双桶组中选取多个目标视频帧至视频帧序列;
    整合模块,用于整合所述视频帧序列,得到目标视频帧序列。
PCT/CN2021/096758 2020-11-06 2021-05-28 视频帧提取方法及相关设备 WO2022095423A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011229588.X 2020-11-06
CN202011229588.XA CN112383819B (zh) 2020-11-06 2020-11-06 视频帧提取方法及相关设备

Publications (1)

Publication Number Publication Date
WO2022095423A1 true WO2022095423A1 (zh) 2022-05-12

Family

ID=74578195

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/096758 WO2022095423A1 (zh) 2020-11-06 2021-05-28 视频帧提取方法及相关设备

Country Status (2)

Country Link
CN (1) CN112383819B (zh)
WO (1) WO2022095423A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112383819B (zh) * 2020-11-06 2022-03-11 平安科技(深圳)有限公司 视频帧提取方法及相关设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6943834B1 (en) * 1998-02-06 2005-09-13 Canon Kabushiki Kaisha Apparatus and method of converting image data to video signals
JP2006325020A (ja) * 2005-05-19 2006-11-30 Canon Inc データ処理装置及びデータ処理方法
CN104408429A (zh) * 2014-11-28 2015-03-11 北京奇艺世纪科技有限公司 一种视频代表帧提取方法及装置
CN110267062A (zh) * 2019-07-26 2019-09-20 深圳Tcl新技术有限公司 拼装视频帧的优化方法、装置、可读存储介质及系统
CN112383819A (zh) * 2020-11-06 2021-02-19 平安科技(深圳)有限公司 视频帧提取方法及相关设备

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104038832A (zh) * 2014-02-22 2014-09-10 小米科技有限责任公司 一种播放视频的方法及装置
US10067944B2 (en) * 2017-01-09 2018-09-04 Splunk, Inc. Cache aware searching of buckets in remote storage
CN110532425B (zh) * 2019-08-19 2022-04-01 深圳市网心科技有限公司 视频数据分布式存储方法、装置、计算机设备及存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6943834B1 (en) * 1998-02-06 2005-09-13 Canon Kabushiki Kaisha Apparatus and method of converting image data to video signals
JP2006325020A (ja) * 2005-05-19 2006-11-30 Canon Inc データ処理装置及びデータ処理方法
CN104408429A (zh) * 2014-11-28 2015-03-11 北京奇艺世纪科技有限公司 一种视频代表帧提取方法及装置
CN110267062A (zh) * 2019-07-26 2019-09-20 深圳Tcl新技术有限公司 拼装视频帧的优化方法、装置、可读存储介质及系统
CN112383819A (zh) * 2020-11-06 2021-02-19 平安科技(深圳)有限公司 视频帧提取方法及相关设备

Also Published As

Publication number Publication date
CN112383819B (zh) 2022-03-11
CN112383819A (zh) 2021-02-19

Similar Documents

Publication Publication Date Title
US20230126005A1 (en) Consistent filtering of machine learning data
US20200356901A1 (en) Target variable distribution-based acceptance of machine learning test data sets
JP7059370B2 (ja) ブロックチェーン上の大量トランザクション性能を最適化するための方法、装置、コンピュータ・プログラムおよびコンピュータ・プログラムを記録したコンピュータ可読記憶媒体
CN111881210B (zh) 数据同步方法、装置、内网服务器及介质
US11100420B2 (en) Input processing for machine learning
US10459888B2 (en) Method, apparatus and system for data analysis
US20170212781A1 (en) Parallel execution of blockchain transactions
JP7133647B2 (ja) データ処理方法、装置及びコンピュータ読み取り可能な記憶媒体
JP2018522343A (ja) 意思決定モデルを構築する方法、コンピュータデバイス及び記憶デバイス
JP4948276B2 (ja) データベース検索装置及びデータベース検索プログラム
WO2022105172A1 (zh) Pdf文档跨页表格合并方法、装置、电子设备及存储介质
JP2008250722A (ja) 文書検索システム、文書番号部分列取得装置、および文書検索方法
CN111797351A (zh) 页面数据管理方法、装置、电子设备及介质
CN110209714A (zh) 报表生成方法、装置、计算机设备及计算机可读存储介质
WO2022095423A1 (zh) 视频帧提取方法及相关设备
CN112711398A (zh) 埋点文件生成方法、装置、设备及存储介质
WO2021139242A1 (zh) 演示文稿生成方法、装置、设备及存储介质
US9213759B2 (en) System, apparatus, and method for executing a query including boolean and conditional expressions
CN114372060A (zh) 数据存储方法、装置、设备及存储介质
CN112819305A (zh) 业务指标分析方法、装置、设备及存储介质
CN110909072B (zh) 一种数据表建立方法、装置及设备
CN115114297A (zh) 数据轻量存储及查找方法、装置、电子设备及存储介质
CN114692204A (zh) 数据查询方法、装置、设备及存储介质
CN113032610B (zh) 档案管理方法、装置、设备及计算机可读存储介质
CN114238296A (zh) 产品指标数据展示方法、装置、设备及存储介质

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: 21888126

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21888126

Country of ref document: EP

Kind code of ref document: A1