A video extraction method, system, device and storage medium based on front-end and back-end
By adopting the front-end and back-end division of labor and collaboration video drawing method on the resource-constrained recorder, analyzing the drawing task file, extracting video image groups and generating video frame files, the performance bottleneck of the recorder in the video drawing process is solved, and a more efficient video drawing effect is achieved.
Patent Information
- Application Number
- CN202510238201.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-03
- Publication Date
- 2025-06-06
- Estimated Expiration
- 2045-03-03
AI Technical Summary
Resource-constrained recorders often experience performance bottlenecks during video drawing, resulting in unstable, inefficient video drawing, and even inability to complete the drawing drawing task.
The front-end and back-end division of labor and cooperation mode is adopted, and the files are parsed by receiving the drawing task files sent by the back-end of the processing platform, and the unique flow number of the drawing task and the drawing time point list are determined. Based on this information, the target video is extracted and the video frame file is generated. The backend of the video drawing platform is responsible for drawing the video frame files, generating unified resource locators for extracting pictures, and integrating these locators.
By accurately obtaining video data related to the drawing task, unnecessary processing of the entire video is avoided, the efficiency of video processing is improved, and by reasonably allocating system resources, the video drawing efficiency of resource-constrained recorders is improved.
Smart Images

Figure CN119743630B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of video data processing, and in particular to a video extraction method, system, device and storage medium based on front-end and back-end. Background Art
[0002] With the continuous advancement and innovation of video technology, recorders have been widely used in many fields such as monitoring and security due to their ability to record video information in real time, greatly improving management efficiency and security levels.
[0003] However, in actual application scenarios, some resource-constrained recorders encounter many challenges when performing video extraction operations. Due to the limitations of hardware performance of such recorders, such as low processor performance and limited memory capacity, these recorders often encounter performance bottlenecks during the video extraction process, resulting in unstable and inefficient video extraction, and even in some cases, the extraction task cannot be completed.
[0004] At present, the traditional solution to the above-mentioned problem of video extraction in resource-constrained recorders is mainly to improve the extraction effect by improving hardware performance; however, this method has obvious disadvantages. On the one hand, improving hardware performance will significantly increase hardware costs, which is unacceptable in application scenarios with strict cost control; on the other hand, in some special application scenarios, such as environments with strict requirements on device size and power consumption, simply improving hardware performance is not applicable. Therefore, how to solve the problem of resource-constrained recorders being unable to extract video is a technical problem that needs to be solved urgently. Summary of the invention
[0005] The present application provides a video extraction method, system, device and storage medium based on the front-end and back-end, which adopts a front-end and back-end division of labor and cooperation mode, can realize the reasonable allocation of system resources, and improve the video extraction efficiency of the recorder with limited resources.
[0006] In the first aspect, the present application provides a video extraction method based on the front-end and back-end, including: receiving an extraction task file sent by a processing platform back-end, parsing the extraction task file, and determining a unique extraction task serial number and an extraction time point list corresponding to the extraction task file; based on the extraction time point list, extracting an image group from a target video, and generating a video frame file based on the extracted target image group; receiving an extracted image uniform resource locator list returned by a video extraction platform back-end, wherein the extracted image uniform resource locator list is obtained by the video extraction platform back-end performing extraction processing on the received video frame file to obtain an extracted image uniform resource locator and integrating the extracted image uniform resource locators; returning the extraction task unique serial number, the extraction time point list and the extracted image uniform resource locator list to the processing platform back-end.
[0007] In a possible implementation, based on the sampling time point list, video frames are extracted from the target video, and based on the extracted video frames, a video frame file is generated, which specifically includes: traversing each sampling time point in the sampling time point list, positioning the target video based on the current sampling time point, determining the target video frame, and obtaining the target image group corresponding to the target video frame, extracting the target image group, integrating the target image group corresponding to each sampling time point, and generating a target video encoding file; obtaining the offset corresponding to each target image group in the target video encoding file, associating the offset corresponding to each target image group with the sampling time point to obtain multiple associated data groups, and generating a target video document file based on the multiple associated data groups; using the target video encoding file and the target video document file as video frame files.
[0008] In one possible implementation, based on the current sampling time point, the target video is positioned to determine the target video frame, and the target image group corresponding to the target video frame is obtained, which specifically includes: obtaining the video frame time point corresponding to each video frame in the target video, respectively calculating the time difference between the current sampling time point and the video frame time point, and obtaining the target video frame time point corresponding to the minimum time difference; based on the target video frame time point, the target video is positioned to determine the target video frame; based on the target video frame, the target image group boundary corresponding to the target video frame is determined, and based on the target image group boundary, the target image group corresponding to the target video frame is obtained.
[0009] In a possible implementation, the received video frame file is subjected to image extraction processing to obtain an extracted picture uniform resource locator, specifically comprising: obtaining a target video document file in the video frame file, and determining the offset corresponding to each target image group from the target video document file; based on the offset, performing image group positioning processing on the target video encoding file in the video frame file to obtain a first image group, and performing format conversion on the first image group to obtain a target format image group; performing image extraction on the target format image group, and obtaining an extracted picture uniform resource locator corresponding to the extracted target format image.
[0010] In a possible implementation, obtaining the extracted image uniform resource locator corresponding to the target format image specifically includes: uploading the target format image to the cloud, so that the cloud generates a unique corresponding extracted image uniform resource locator for the target format image after receiving the target format image; sending a uniform resource locator acquisition request to the target API interface of the cloud, so that the cloud returns the extracted image uniform resource locator corresponding to the target format image after receiving the uniform resource locator acquisition request.
[0011] In the second aspect, the present application provides a video extraction system based on the front-end and back-end, including: a video extraction processing platform front-end, wherein the video extraction processing platform front-end includes a task parsing module, a video extraction module and a video extraction processing module; wherein the task parsing module is used to receive the extraction task file sent by the processing platform back-end, parse and process the extraction task file, and determine the extraction task unique serial number and extraction time point list corresponding to the extraction task file; the video extraction module is used to extract the image group of the target video based on the extraction time point list, and extract the image group based on the extraction The target image group is obtained to generate a video frame file; the video abstraction processing module is used to receive the extracted image uniform resource locator list returned by the video abstraction platform backend, wherein the extracted image uniform resource locator list is obtained by the video abstraction platform backend performing abstraction processing on the received video frame file to obtain the extracted image uniform resource locator and integrating the extracted image uniform resource locator; the video abstraction processing module is used to return the unique serial number of the abstraction task, the abstraction time point list and the extracted image uniform resource locator list to the processing platform backend.
[0012] In one possible implementation, the present application provides a front-end and back-end based video abstraction system, which also includes: a processing platform back-end and a video abstraction platform back-end; wherein the processing platform back-end is connected to the video abstraction processing platform front-end, and the video abstraction processing platform front-end is connected to the video abstraction platform back-end.
[0013] In a possible implementation, the processing platform backend includes a task issuing module and a task result processing module, and the video abstraction platform backend includes a picture extraction module and a picture extraction processing module; wherein the task issuing module is used to send the abstraction task file to the task parsing module; the task result processing module is used to receive the unique serial number of the abstraction task, the abstraction time point list and the extracted picture uniform resource locator list returned by the video abstraction processing module; the picture extraction module is used to perform abstraction processing on the received video frame file to obtain the extracted picture uniform resource locator, and integrate the extracted picture uniform resource locator to obtain the extracted picture uniform resource locator list; the picture extraction processing module is used to return the extracted picture uniform resource locator list to the video abstraction processing module.
[0014] In a third aspect, an embodiment of the present application further provides a computer device, which includes a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the above method when executing the computer program.
[0015] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program can implement the above method when executed by a processor.
[0016] The embodiments of the present application provide a video extraction method, system, device and storage medium based on front-end and back-end, which have the following advantages over the prior art:
[0017] By receiving the extraction task file sent by the back end of the processing platform, parsing the extraction task file, determining the extraction task unique serial number and the extraction time point list corresponding to the extraction task file; based on the extraction time point list, extracting the image group of the target video, and generating a video frame file based on the extracted target image group; receiving the extracted picture uniform resource locator list returned by the back end of the video extraction platform, wherein the extracted picture uniform resource locator list is obtained by the back end of the video extraction platform performing extraction processing on the received video frame file to obtain the extracted picture uniform resource locator, and integrating the extracted picture uniform resource locator; and sending it to the processing The back end of the processing platform returns the unique serial number of the extraction task, the extraction time point list and the extracted picture uniform resource locator list; compared with the prior art, the technical solution of the present application can accurately obtain the video data related to the extraction task through the extraction time point list, avoids unnecessary processing of the entire video, and improves the efficiency of video processing; and the back end of the video extraction platform is responsible for extracting the video frame file and generating the extracted picture uniform resource locator, and the front end of the video extraction processing platform receives the extracted picture uniform resource locator list. This mode of division of labor and cooperation between the front and back ends can achieve the reasonable allocation of system resources and improve the video extraction efficiency of resource-constrained recorders. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0019] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0020] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0021] Figure 1 This is a flow chart of an embodiment of a video extraction method based on front-end and back-end provided by the present application;
[0022] Figure 2 It is a structural schematic diagram of an embodiment of a video extraction system based on front-end and back-end provided by the present application;
[0023] Figure 3This is another structural schematic diagram of an embodiment of a video extraction system based on front-end and back-end provided by the present application;
[0024] Figure 4 It is a structural schematic diagram of an electronic device provided by this application. DETAILED DESCRIPTION
[0025] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0026] The disclosure below provides many different embodiments or examples to realize the different structures of the present application. In order to simplify the disclosure of the present application, the parts and settings of specific examples are described below. Of course, they are only examples, and the purpose is not to limit the present application. In addition, the present application can repeat reference numbers and / or letters in different examples. This repetition is for the purpose of simplification and clarity, and does not itself indicate the relationship between the various embodiments and / or settings discussed.
[0027] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.
[0028] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0029] It should be further understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0030] As used in this specification and the appended claims, the term "if" may be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrases "if it is determined" or "if [described condition or event] is detected" may be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.
[0031] Example 1, see Figure 1 , Figure 1 This is a flow chart of an embodiment of a video extraction method based on the front-end and back-end provided by the present application. Figure 1 As shown, the method includes steps 101 to 104, which are specifically as follows:
[0032] Step 101: receiving a drawing task file sent by a backend of a processing platform, parsing the drawing task file, and determining a unique drawing task serial number and a drawing time point list corresponding to the drawing task file.
[0033] In one embodiment, when the processing platform backend receives a drawing task generation request, it generates a drawing task file based on the drawing time point list carried in the drawing task generation request, and generates a unique drawing task unique serial number that is unique to the drawing task file.
[0034] Specifically, the unique serial number of the drawing task is a unique identifier for each drawing task file; in actual application scenarios, multiple drawing task files may exist at the same time. Through the unique serial number of the drawing task, the system can clearly identify and distinguish different drawing task files.
[0035] Specifically, the picture extraction time point list is the specific time points set by the user at which pictures need to be extracted from the video.
[0036] In one embodiment, after generating the extraction task file including the extraction time point list and the unique serial number of the extraction task, the processing platform backend sends the extraction task file to the video extraction processing platform front end through the transmission control protocol.
[0037] Specifically, the Transmission Control Protocol TCP is a connection-oriented, reliable transmission protocol; using TCP to send the extraction task file can ensure that the extraction task file arrives at the front end of the video extraction processing platform intactly and accurately; during the data transmission process, TCP will segment, number, confirm and retransmit the extraction task file; for example, if a transmission data segment is lost or damaged during the transmission process, the TCP protocol will automatically detect and require the sender to resend the data segment until the receiver successfully receives the complete and correct extraction task file.
[0038] In one embodiment, after the front end of the video extraction processing platform receives the extraction task file, it obtains the file format corresponding to the extraction task file, and parses the extraction task file based on the parsing rules corresponding to the file format to obtain the unique serial number of the extraction task and the extraction time point list corresponding to the extraction task file.
[0039] Specifically, the file format includes but is not limited to JSON, XML, custom text format, etc.; wherein, the file format can be determined based on the file extension of the drawing task file; for example, when the file extension is .json, the file format is JSON, and when the file extension is .xml, the file format is XML.
[0040] Preferably, when the file format corresponding to the image extraction task file is JSON, the file content corresponding to the image extraction task file is read based on the file reading API, and the read file content is parsed based on the JSON parsing instruction to obtain the unique serial number of the image extraction task and the image extraction time point list.
[0041] In one embodiment, after parsing to obtain the unique serial number of the drawing task and the drawing time point list corresponding to the drawing task file, the unique serial number of the drawing task and the drawing time point list are also verified. If the verification result is a verification failure, the drawing task file is re-acquired or the display file is incorrect.
[0042] Specifically, when the unique serial number of the drawing task and the drawing time point list are verified, the unique serial number of the drawing task is compared with the preset unique serial number format of the drawing task, and each drawing time point in the drawing time point list is compared with the preset drawing time point format. If the unique serial number of the drawing task satisfies the preset unique serial number format of the drawing task, and each drawing time point in the drawing time point list satisfies the preset drawing time point format, then the verification result of the unique serial number of the drawing task and the drawing time point list is determined to be successful verification; otherwise, the verification result of the unique serial number of the drawing task and the drawing time point list is determined to be failed verification.
[0043] Step 102: Based on the image extraction time point list, image groups are extracted from the target video, and a video frame file is generated based on the extracted target image groups.
[0044] In one embodiment, each sampling time point in the sampling time point list is traversed, and based on the current sampling time point, the target video is positioned, the target video frame is determined, and the target image group corresponding to the target video frame is obtained, the target image group is extracted, and the target image group corresponding to each sampling time point is integrated to generate a target video encoding file.
[0045] Specifically, based on the current sampling time point, the target video is positioned and processed to determine the target video frame, and when the target image group corresponding to the target video frame is obtained, the video frame time point corresponding to each video frame in the target video is obtained, and the time difference between the current sampling time point and the video frame time point is calculated respectively, and the target video frame time point corresponding to the minimum time difference is obtained; based on the target video frame time point, the target video is positioned and processed to determine the target video frame; based on the target video frame, the target image group boundary corresponding to the target video frame is determined, and based on the target image group boundary, the target image group corresponding to the target video frame is obtained.
[0046] Specifically, the group of pictures GOP is composed of a series of related video frames, starting with a key frame I frame, and including a number of predicted frames P frames and predicted frames B frames.
[0047] Specifically, based on the target video frame, when determining the target image group boundary corresponding to the target video frame, based on the target video frame, a forward search method is adopted to determine the first position of the previous key frame, and the first position of the previous key frame is used as the starting point of the target image group boundary; based on the target video frame, a backward search method is adopted to determine the next key frame, and the previous video frame of the next key frame is obtained, and the second position corresponding to the previous video frame is used as the end point of the target image group boundary; based on the starting point and the end point, the target image group boundary corresponding to the target video frame is determined.
[0048] Specifically, all video frames within the boundary of the target image group are acquired from the target video, and all the video frames are used as the target image group corresponding to the target video frame.
[0049] Specifically, a target image group corresponding to each target video frame is extracted from the target video, and all target image groups are sorted based on the order of the extraction time points corresponding to each target video frame, and a target video encoding file is generated based on the target image group sequence.
[0050] Specifically, the target video encoding file is an h264 file.
[0051] In one embodiment, the offset corresponding to each target image group in the target video encoding file is obtained, the offset corresponding to each target image group is associated with the image extraction time point to obtain multiple associated data groups, and a target video document file is generated based on the multiple associated data groups.
[0052] Specifically, since the target image group corresponding to each target image frame is stored at a different position in the target video encoding file, the position of each target image group in the target video encoding file is determined by the offset.
[0053] Specifically, since the sampling time point is a time set according to the actual sampling demand, the offset corresponding to each target image group is associated with the sampling time point, which can determine at which sampling time points the content of the corresponding target image group can be obtained; when performing subsequent video sampling, the system can quickly locate the target image group based on the target video document file, and then extract the corresponding video frame from the target video encoding file for sampling operation, which greatly improves the efficiency and accuracy of sampling; for example, during actual sampling, the target image group data is read directly from the target offset position of the target video encoding file according to the associated data recorded in the target video document file, avoiding traversal and search of the entire video file, saving time and computing resources.
[0054] Preferably, the data format of the associated data group can be expressed as (drawing time point, offset).
[0055] In one embodiment, the target video encoding file and the target video document file are used as video frame files.
[0056] Step 103: Receive the extracted picture uniform resource locator list returned by the video abstraction platform backend, wherein the extracted picture uniform resource locator list is obtained by the video abstraction platform backend performing abstraction processing on the received video frame file to obtain the extracted picture uniform resource locators and integrating the extracted picture uniform resource locators.
[0057] In one embodiment, after generating a video frame file, the front end of the video extraction processing platform sends the unique serial number of the extraction task, the extraction time point list and the video frame file to the back end of the video extraction platform, so that the back end of the video extraction platform performs the extraction operation after receiving the unique serial number of the extraction task, the extraction time point list and the video frame file.
[0058] In one embodiment, the back end of the video extraction platform performs extraction processing on the received video frame file, and when obtaining the extracted picture uniform resource locator, the target video document file in the video frame file is obtained, and the offset corresponding to each target image group is determined from the target video document file; based on the offset, the target video encoding file in the video frame file is image group positioning processing is performed to obtain a first image group, and the first image group is format converted to obtain a target format image group; image extraction is performed on the target format image group, and the extracted picture uniform resource locator corresponding to the extracted target format image is obtained.
[0059] Specifically, since the target video encoding file is a file in a video encoding format, such as H264, etc., it is set up for efficient storage and transmission of video; and when performing image extraction, it is converted into an image format, such as jpeg or PNG, etc., which is more suitable for image display and processing; therefore, in this embodiment, it is necessary to convert the format of the first image group to obtain the target format image group.
[0060] Specifically, when extracting images from the target format image group, ffmpeg software is used to perform cyclic extraction on the target format image group, and the extracted target format images are uploaded to the cloud, and the extracted picture uniform resource locator corresponding to the target format image is obtained based on the cloud interface.
[0061] In one embodiment, when obtaining the extracted image uniform resource locator corresponding to the target format image, the target format image is uploaded to the cloud so that the cloud generates a unique corresponding extracted image uniform resource locator for the target format image after receiving the target format image; and a uniform resource locator acquisition request is sent to the target API interface of the cloud so that the cloud returns the extracted image uniform resource locator corresponding to the target format image after receiving the uniform resource locator acquisition request.
[0062] In one embodiment, after receiving the extracted image uniform resource locators returned from the cloud, the back end of the video extraction platform will integrate all the extracted image uniform resource locators, generate an extracted image uniform resource locator list, and send the unique serial number of the extraction task, the extraction time point list and the extracted image uniform resource locator list to the front end of the video extraction processing platform.
[0063] Step 104: Return the unique serial number of the image extraction task, the image extraction time point list and the extracted image uniform resource locator list to the back end of the processing platform.
[0064] In one embodiment, after completing the extraction task, the front end of the video extraction processing platform also returns the unique serial number of the extraction task, the extraction time point list and the extracted image uniform resource locator list to the back end of the processing platform, so that after receiving the unique serial number of the extraction task, the extraction time point list and the extracted image uniform resource locator list, the back end of the processing platform associates the extraction task with its internally stored extraction task based on the unique serial number of the extraction task, and uses the extraction time point list and the extracted image uniform resource locator list as the extraction task result of the target extraction task, and saves the extraction task result.
[0065] Example 2, see Figure 2 , Figure 2 1 is a schematic diagram of the structure of an embodiment of a video extraction system based on the front-end and back-end provided by the present application. Corresponding to the above-mentioned video extraction method based on the front-end and back-end, the present application also provides a video extraction system based on the front-end and back-end. The video extraction system based on the front-end and back-end includes a module for executing the above-mentioned video extraction method based on the front-end and back-end, and the video extraction system based on the front-end and back-end can be configured in a desktop computer, a tablet computer, a laptop computer, and other terminals. Specifically, the video extraction system based on the front-end and back-end includes a video extraction processing platform front end 201, wherein the video extraction processing platform front end 201 includes a task parsing module 2011, a video extraction module 2012 and a video extraction processing module 2013.
[0066] The task parsing module 2011 is used to receive the image extraction task file sent by the back end of the processing platform, parse the image extraction task file, and determine the unique serial number of the image extraction task and the image extraction time point list corresponding to the image extraction task file.
[0067] The video extraction module 2012 is used to extract image groups from the target video based on the extraction time point list, and generate a video frame file based on the extracted target image groups.
[0068] The video abstraction processing module 2013 is used to receive the extracted image uniform resource locator list returned by the video abstraction platform backend, wherein the extracted image uniform resource locator list is obtained by the video abstraction platform backend performing abstraction processing on the received video frame file to obtain the extracted image uniform resource locator and integrating the extracted image uniform resource locators.
[0069] The video extraction processing module 2013 is used to return the unique serial number of the extraction task, the extraction time point list and the extracted picture uniform resource locator list to the back end of the processing platform.
[0070] In one embodiment, the video extraction module 2012 is used to extract video frames of the target video based on the extraction time point list, and generate a video frame file based on the extracted video frames, specifically including: traversing each extraction time point in the extraction time point list, positioning the target video based on the current extraction time point, determining the target video frame, and obtaining the target image group corresponding to the target video frame, extracting the target image group, integrating the target image group corresponding to each extraction time point, and generating a target video encoding file; obtaining the offset corresponding to each target image group in the target video encoding file, associating the offset corresponding to each target image group with the extraction time point to obtain multiple associated data groups, and generating a target video document file based on the multiple associated data groups; using the target video encoding file and the target video document file as video frame files.
[0071] In one embodiment, the video extraction module 2012 is used to perform positioning processing on the target video based on the current sampling time point, determine the target video frame, and obtain the target image group corresponding to the target video frame, specifically including: obtaining the video frame time point corresponding to each video frame in the target video, respectively calculating the time difference between the current sampling time point and the video frame time point, and obtaining the target video frame time point corresponding to the minimum time difference; performing positioning processing on the target video based on the target video frame time point to determine the target video frame; based on the target video frame, determining the target image group boundary corresponding to the target video frame, and based on the target image group boundary, obtaining the target image group corresponding to the target video frame.
[0072] In one embodiment, the task parsing module 2011 is connected to the video extraction module 2012, and the video extraction module 2012 is connected to the video extraction processing module 2013.
[0073] In one embodiment, the video abstraction system based on the front-end and back-end provided by the present application also includes: a processing platform back-end 202 and a video abstraction platform back-end 203.
[0074] In one embodiment, the processing platform back end 202 is connected to the video abstraction processing platform front end 201, and the video abstraction processing platform front end 201 is connected to the video abstraction platform back end 203.
[0075] In one embodiment, the processing platform backend 202 includes a task issuing module 2021 and a task result processing module 2022 , and the video extraction platform backend 203 includes an image extraction module 2031 and an image extraction processing module 2032 .
[0076] In one embodiment, the task issuing module 2021 is connected to the task result processing module 2022 .
[0077] In one embodiment, the image extraction module 2031 is connected to the image extraction processing module 2032 .
[0078] In one embodiment, the task issuing module 2021 is used to send the image extraction task file to the task parsing module.
[0079] In one embodiment, the task result processing module 2022 is used to receive the unique serial number of the extraction task, the extraction time point list and the extracted picture uniform resource locator list returned by the video extraction processing module.
[0080] In one embodiment, the picture extraction module 2031 is used to perform picture extraction processing on the received video frame file to obtain extracted picture uniform resource locators, and integrate the extracted picture uniform resource locators to obtain an extracted picture uniform resource locator list.
[0081] In one embodiment, the picture extraction processing module 2032 is used to return the extracted picture uniform resource locator list to the video extraction processing module.
[0082] In one embodiment, the image extraction module 2031 is used to perform image extraction processing on the received video frame file to obtain an extracted image uniform resource locator, specifically including: obtaining a target video document file in the video frame file, and determining the offset corresponding to each target image group from the target video document file; based on the offset, performing image group positioning processing on the target video encoding file in the video frame file to obtain a first image group, and performing format conversion on the first image group to obtain a target format image group; performing image extraction on the target format image group, and obtaining an extracted image uniform resource locator corresponding to the extracted target format image.
[0083] In one embodiment, the image extraction module 2031 is used to obtain the extracted image uniform resource locator corresponding to the target format image, specifically including: uploading the target format image to the cloud, so that the cloud generates a unique corresponding extracted image uniform resource locator for the target format image after receiving the target format image; sending a uniform resource locator acquisition request to the target API interface of the cloud, so that the cloud returns the extracted image uniform resource locator corresponding to the target format image after receiving the uniform resource locator acquisition request.
[0084] like Figure 3 As shown, Figure 3It is another structural schematic diagram of an embodiment of a video extraction system based on the front-end and back-end provided by the present application.
[0085] In one embodiment, when the processing platform back end 202 is connected to the video abstraction processing platform front end 201, the task issuing module 2021 is connected to the task parsing module 2011; the video abstraction processing module 2013 is connected to the task result processing module 2022.
[0086] In one embodiment, when the video abstraction processing platform front end 201 is connected to the video abstraction platform back end 203, the video abstraction processing module 2013 is connected to the picture extraction module 2031 and the picture extraction processing module 2032 respectively.
[0087] The video extraction system based on the front-end and back-end can implement the video extraction method based on the front-end and back-end of the method embodiment. The options in the method embodiment are also applicable to this embodiment and will not be described in detail here.
[0088] like Figure 4 As shown, Figure 4 It is a structural diagram of an electronic device provided by the present application; it includes a processor 111, a communication interface 112, a memory 113 and a communication bus 114, wherein the processor 111, the communication interface 112, and the memory 113 communicate with each other through the communication bus 114, and the memory 113 is used to store computer programs.
[0089] In one embodiment of the present application, the processor 111 is used to implement the front-end and back-end based video extraction method provided by any one of the aforementioned method embodiments when executing the program stored in the memory 113.
[0090] It is understood by those skilled in the art that all or part of the processes in the method for implementing the above embodiment can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a storage medium, which is a computer-readable storage medium. The computer program is executed by at least one processor in the computer system to implement the process steps of the embodiment of the above method.
[0091] Therefore, an embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the front-end and back-end based video extraction method provided in any of the aforementioned method embodiments are implemented.
[0092] The storage medium is a physical, non-transient storage medium, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disk, etc., which can store program codes. The computer-readable storage medium can be non-volatile or volatile.
[0093] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0094] In the several embodiments provided in the present application, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are only schematic. For example, the division of each unit is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.
[0095] The steps in the method of the embodiment of the present application can be adjusted in order, combined and deleted according to actual needs. The units in the system of the embodiment of the present application can be combined, divided and deleted according to actual needs. In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0096] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, terminal, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application.
[0097] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0098] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
[0099] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A video extraction method based on front-end and back-end, characterized in that: include: Receive the image extraction task file sent by the back end of the processing platform, parse and process the image extraction task file, and determine the unique serial number of the image extraction task and the image extraction time point list corresponding to the image extraction task file; Based on the image extraction time point list, extracting image groups from the target video, and generating a video frame file based on the extracted target image groups; Receive a list of extracted picture uniform resource locators returned by a backend of a video extraction platform, wherein the list of extracted picture uniform resource locators is obtained by the backend of the video extraction platform performing extraction processing on the received video frame file to obtain the extracted picture uniform resource locators, and integrating the extracted picture uniform resource locators; Returning the unique serial number of the image extraction task, the image extraction time point list and the extracted image uniform resource locator list to the back end of the processing platform; The method of extracting video frames from a target video based on the extraction time point list and generating a video frame file based on the extracted video frames specifically includes: Traversing each sampling time point in the sampling time point list, positioning the target video based on the current sampling time point, determining the target video frame, and obtaining the target image group corresponding to the target video frame, extracting the target image group, integrating the target image group corresponding to each sampling time point, and generating a target video encoding file; Obtaining the offset corresponding to each target image group in the target video encoding file, associating the offset corresponding to each target image group with the image extraction time point to obtain multiple associated data groups, and generating a target video document file based on the multiple associated data groups; The target video encoding file and the target video document file are used as video frame files.
2. The method according to claim 1, characterized in that Based on the current image extraction time point, the target video is positioned, the target video frame is determined, and the target image group corresponding to the target video frame is obtained, which specifically includes: Obtain the video frame time point corresponding to each video frame in the target video, calculate the time difference between the current sampling time point and the video frame time point, and obtain the target video frame time point corresponding to the minimum value of the time difference; Performing positioning processing on the target video based on the target video frame time point to determine the target video frame; Based on the target video frame, a target image group boundary corresponding to the target video frame is determined, and based on the target image group boundary, a target image group corresponding to the target video frame is acquired.
3. The method according to claim 1, characterized in that: The received video frame file is subjected to image extraction processing to obtain an extracted image uniform resource locator, specifically including: Acquire a target video document file from the video frame file, and determine the offset corresponding to each target image group from the target video document file; Based on the offset, performing image group positioning processing on the target video encoding file in the video frame file to obtain a first image group, and performing format conversion on the first image group to obtain a target format image group; Image extraction is performed on the target format image group, and an extracted picture uniform resource locator corresponding to the extracted target format image is obtained.
4. The method according to claim 3, characterized in that Obtaining the extracted picture uniform resource locator corresponding to the target format image, specifically including: Uploading the target format image to the cloud, so that the cloud generates a unique corresponding extracted picture uniform resource locator for the target format image after receiving the target format image; A uniform resource locator acquisition request is sent to the target API interface of the cloud, so that the cloud returns the extracted image uniform resource locator corresponding to the target format image after receiving the uniform resource locator acquisition request.
5. A video extraction system based on front-end and back-end, characterized in that: include: A video extraction processing platform front end, wherein the video extraction processing platform front end includes a task parsing module, a video extraction module and a video extraction processing module; The task parsing module is used to receive the image extraction task file sent by the back end of the processing platform, parse the image extraction task file, and determine the unique serial number of the image extraction task and the image extraction time point list corresponding to the image extraction task file; The video extraction module is used to extract image groups from the target video based on the image extraction time point list, and generate a video frame file based on the extracted target image groups; The video abstraction processing module is used to receive the extracted picture uniform resource locator list returned by the video abstraction platform backend, wherein the extracted picture uniform resource locator list is obtained by the video abstraction platform backend performing abstraction processing on the received video frame file to obtain the extracted picture uniform resource locator and integrating the extracted picture uniform resource locator; The video image extraction processing module is used to return the unique serial number of the image extraction task, the image extraction time point list and the extracted picture uniform resource locator list to the back end of the processing platform; Among them, the video extraction module is used to extract video frames of the target video based on the extraction time point list, and generate a video frame file based on the extracted video frames, specifically including: traversing each extraction time point in the extraction time point list, positioning the target video based on the current extraction time point, determining the target video frame, and obtaining the target image group corresponding to the target video frame, extracting the target image group, integrating the target image group corresponding to each extraction time point, and generating a target video encoding file; obtaining the offset corresponding to each target image group in the target video encoding file, associating the offset corresponding to each target image group with the extraction time point to obtain multiple associated data groups, and generating a target video document file based on the multiple associated data groups; using the target video encoding file and the target video document file as video frame files.
6. The system according to claim 5, characterized in that Also includes: Processing platform backend and video extraction platform backend; Among them, the back end of the processing platform is connected to the front end of the video abstraction processing platform, and the front end of the video abstraction processing platform is connected to the back end of the video abstraction platform.
7. The system according to claim 5, characterized in that The processing platform backend includes a task issuing module and a task result processing module, and the video extraction platform backend includes a picture extraction module and a picture extraction processing module; The task sending module is used to send the image extraction task file to the task parsing module; The task result processing module is used to receive the unique serial number of the image extraction task, the image extraction time point list and the extracted picture uniform resource locator list returned by the video image extraction processing module; The picture extraction module is used to extract the received video frame file to obtain the extracted picture uniform resource locator, and integrate the extracted picture uniform resource locators to obtain an extracted picture uniform resource locator list; The picture extraction processing module is used to return the extracted picture uniform resource locator list to the video extraction processing module.
8. A computer device, characterized in that: The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the method according to any one of claims 1 to 4 when executing the computer program.
9. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 4 can be implemented.
Citation Information
Patent Citations
Video stream frame extraction method and device
CN104980817A
Webpage picture acquisition method and system based on Chrome browser
CN110532455A