CN112825081A - Video information processing method and device, electronic equipment, processor and readable medium - Google Patents

Video information processing method and device, electronic equipment, processor and readable medium Download PDF

Info

Publication number
CN112825081A
CN112825081A CN201911143758.XA CN201911143758A CN112825081A CN 112825081 A CN112825081 A CN 112825081A CN 201911143758 A CN201911143758 A CN 201911143758A CN 112825081 A CN112825081 A CN 112825081A
Authority
CN
China
Prior art keywords
video
file
information
directory
fragmentation
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
CN201911143758.XA
Other languages
Chinese (zh)
Other versions
CN112825081B (en
Inventor
邓雄书
陈卫亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yunding Network Technology Beijing Co Ltd
Original Assignee
Yunding Network Technology Beijing Co Ltd
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 Yunding Network Technology Beijing Co Ltd filed Critical Yunding Network Technology Beijing Co Ltd
Priority to CN201911143758.XA priority Critical patent/CN112825081B/en
Publication of CN112825081A publication Critical patent/CN112825081A/en
Application granted granted Critical
Publication of CN112825081B publication Critical patent/CN112825081B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/70Information retrieval; Database structures therefor; File system structures therefor of video data
    • G06F16/71Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/70Information retrieval; Database structures therefor; File system structures therefor of video data
    • G06F16/74Browsing; Visualisation therefor
    • G06F16/743Browsing; Visualisation therefor a collection of video files or sequences

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Software Systems (AREA)
  • Television Signal Processing For Recording (AREA)

Abstract

The embodiment of the application discloses a video information processing method and device, electronic equipment, a processor and a readable medium. One embodiment of the method comprises: performing fragmentation processing on the video information to be processed based on preset fragmentation configuration information to generate at least one video fragmentation file; determining directories respectively corresponding to the at least one video clip file, and storing the at least one video clip file in the corresponding directories; and sending the video fragment file in the at least one video fragment file stored in the corresponding directory to a server. In the embodiment, the video data are subjected to fragmentation processing, and the generated video fragmentation file is stored in the corresponding directory, so that all the video data can be prevented from being stored in the same directory as much as possible, the risk of losing and damaging all the video data due to damage of the directory can be reduced, and the reliability of storing the video data can be improved.

Description

Video information processing method and device, electronic equipment, processor and readable medium
Technical Field
The present invention relates to the field of video information processing technologies, and in particular, to a method and an apparatus for processing video information, an electronic device, a processor, and a computer-readable medium.
Background
In the video monitoring industry, the fact that historical video data can be played as far as possible is a key index for judging whether a monitoring system is reliable or not. At present, due to various abnormal reasons, video data stored in a monitoring system is easily lost, for example, a memory card used for storing the video data in the monitoring system is easily damaged due to sudden power failure, or a part of memory blocks of the memory card are damaged in the process of reading and writing, so that the video data is lost, and the user experience is poor.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a method, an apparatus, an electronic device, a processor and a computer readable medium for processing recorded video information, which can improve the reliability of the storage of the recorded video information.
An embodiment of the present invention provides a video information processing method, including:
performing fragmentation processing on the video information to be processed based on preset fragmentation configuration information to generate at least one video fragmentation file;
determining directories respectively corresponding to the at least one video fragment file, and storing the at least one video fragment file in the corresponding directories;
and sending the video fragment file in the at least one video fragment file stored in the corresponding directory to a server.
Further, the preset fragmentation configuration information includes fragmentation duration; and
the method for carrying out fragment processing on the video information to be processed based on the preset fragment configuration information comprises the following steps:
and carrying out fragmentation processing on the video information to be processed based on the fragmentation duration.
Further, the slicing time length comprises a first slicing time length and a second slicing time length, and the first slicing time length is smaller than the second slicing time length; and
the slicing processing of the video information to be processed based on the slicing duration includes:
if the video information to be processed belongs to a video segment and the video information to be processed is an initial video segment of a target video to which the video information to be processed belongs, performing fragmentation processing on the video information to be processed based on the first fragmentation duration and the second fragmentation duration;
and generating the starting video fragment file of the target video by the video information with the time length extracted from the head of the to-be-processed video information being the first fragment time length.
Further, the performing fragment processing on the video information to be processed based on the fragment duration further includes:
if the video information to be processed belongs to a video segment and the video information to be processed is an end video segment of the target video, performing fragmentation processing on the video information to be processed based on the second fragmentation duration;
and the video fragment file for ending the target video is a video fragment file containing the tail of the to-be-processed video information.
Further, the method further comprises:
generating index information corresponding to a target video fragment file according to file information of the target video fragment file, wherein the target video fragment file comprises the starting video fragment file and/or the ending video fragment file;
and sending the index information corresponding to the target video fragment file to the server.
Further, the determining the directories respectively corresponding to the at least one video clip file includes:
taking each video fragment file in the at least one video fragment file as a video fragment file to be stored, and executing the following directory allocation operations:
determining whether a target directory meeting preset conditions exists in the created directories based on the time information of the video fragment files to be stored;
if the target directory meeting the preset condition exists, taking the target directory as a directory corresponding to the video fragment file to be stored; and
and if the target directory meeting the preset condition does not exist, creating a new directory based on the preset condition, and taking the new directory as the directory corresponding to the video fragment file to be stored.
Further, the sending the video segment file stored in the at least one video segment file in the corresponding directory to the server includes:
and for each determined directory, sequentially searching the video fragment files contained in the at least one video fragment file in each directory, and sending the searched video fragment files to the server.
An embodiment of the present invention provides a video information processing apparatus, including:
the fragment module is used for carrying out fragment processing on the video information to be processed based on preset fragment configuration information so as to generate at least one video fragment file;
the storage module is used for determining directories respectively corresponding to the at least one video fragment file and storing the at least one video fragment file in the corresponding directories; and
and the sending module is used for sending the video fragment files in the at least one video fragment file stored in the corresponding directory to the server.
An embodiment of the present invention provides an electronic device including:
one or more processors;
a storage device having one or more programs stored thereon;
when executed by the one or more processors, the one or more programs cause the one or more processors to implement the video information processing method described above.
An embodiment of the present invention provides a computer-readable medium storing a computer program, wherein the program realizes the above-mentioned video information processing method when executed by a processor.
An embodiment of the present invention provides a processor, where the processor is configured to execute a program, where the program implements the video information processing method when running.
The above embodiments of the present application provide a method, an apparatus, an electronic device, a processor and a readable medium for processing recorded video information, the video information to be processed is processed in a fragmentation mode based on the preset fragmentation configuration information to generate at least one video fragment file, then determining the directories corresponding to the at least one video clip file respectively, and storing the at least one video clip file in the corresponding directories, then sending the video fragment files in the at least one video fragment file stored in the corresponding directory to a server, can avoid storing all the video data in the same directory as much as possible, thus reducing the risk of losing and damaging all the video data caused by the damage of the directory, the reliability of video data storage can be improved, and the stability and fault tolerance of the equipment for realizing the method can be further improved.
Drawings
FIG. 1 is an exemplary system architecture diagram in which some embodiments of the present invention may be applied;
FIG. 2 is a flow chart of a video recording information processing method according to an embodiment of the present invention;
FIG. 3 is a flowchart of a video recording information processing method according to another embodiment of the present invention;
FIG. 4 is a functional block diagram of a video information processing apparatus according to an embodiment of the present invention;
fig. 5 is a functional block diagram of an electronic device according to an embodiment of the present invention.
Description of the main elements
Figure BDA0002281621590000041
Figure BDA0002281621590000051
Detailed Description
The following detailed description will further illustrate the invention in conjunction with the above-described figures.
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It is further noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Referring to fig. 1, an exemplary system architecture to which some embodiments of the video information processing method or apparatus of the present application may be applied is shown.
As shown in fig. 1, the system architecture may include a monitoring device 100 and a server 200. The monitoring device 100 may include, but is not limited to, an image capturing unit 120 (e.g., a camera), a sound capturing unit 130 (e.g., a microphone), a communication unit 140, and the like.
It should be noted that the monitoring device 100 may be installed in a designated area and perform video monitoring on the area. The monitoring device 100 can be a variety of electronic devices with monitoring capabilities including, but not limited to, a smart cat eye, a smart doorbell, a monitoring camera, a smart phone, a tablet computer, and the like.
The communication unit 140 may be a wireless communication module or a wired communication module. The video capture unit 120 and the audio capture unit 130 can be used to capture audio and video data, i.e. video information with audio and video, of the designated area. The communication unit 140 may communicate with the server 200 to enable uploading of the video information to the server 200. The server 200 may be a physical server, a cloud server, or other type of server, and is not particularly limited herein.
For example, after the monitoring device 100 is powered on, the image capturing unit 120 and the sound capturing unit 130 may be started to capture sound and image data, or after the monitoring device 100 is powered on, the image capturing unit 120 and the sound capturing unit 130 may be started to capture sound and image data when an external start instruction or a trigger instruction generated by a trigger module included in the monitoring device 100 itself is received. The monitoring device 100 may also omit the sound collection unit 130, i.e. the monitoring device 100 collects the silent video information.
In an embodiment, after the monitoring device 100 uploads the collected video information to the server 200, the video information may be deleted to save storage space, or when it is detected that the remaining storage space of the monitoring device is smaller than a threshold (for example, the available storage space ratio is smaller than 20%), the previously recorded video information is deleted according to the collection time sequence.
In an embodiment, the video information collected by the monitoring device 100 may also be stored in a relay device (for example, a computer connected to the monitoring device 100) and then uploaded to the server 200 through the relay device.
It should be noted that the video information processing method provided in the embodiment of the present application is generally executed by the monitoring device 100, and accordingly, the video information processing apparatus is generally disposed in the monitoring device 100.
It should be understood that the number of monitoring devices, servers, image capturing units, sound capturing units and communication units in fig. 1 is merely illustrative. Any number of monitoring devices, servers, image acquisition units, sound acquisition units and communication units may be provided as desired.
Fig. 2 is a flowchart illustrating steps of a video recording information processing method according to an embodiment of the present invention. The order of the steps in the flow chart may be changed and some steps may be omitted according to different needs. The video information processing method may be applied to the monitoring apparatus 100 shown in fig. 1.
Referring to fig. 2, the video information processing method may specifically include the following steps.
Step S201, performing fragmentation processing on the video information to be processed based on preset fragmentation configuration information to generate at least one video fragment file.
In an embodiment, the video information to be processed may be a complete video or a video segment. For example, the to-be-processed video information may be a video segment recorded by the monitoring device 100 in real time (e.g., a video segment of 2 minutes, 5 minutes, or 10 minutes currently recorded in real time), or may be a video recorded by the monitoring device 100 for a previous period of time (e.g., a video of the previous day, a video of the previous week, etc.). The preset fragmentation configuration information defines a fragmentation rule for fragmenting the video information to be processed, and further, the video information to be processed can be fragmented into at least one video fragment file. For example, the slicing rule is set according to the length of the video recording information, and the video recording information per a specified time length (for example, 6 seconds, 12 seconds, 30 seconds, 1 minute, or 5 minutes) is a video recording slicing file. Alternatively, the slicing rule may be set according to the size of the video recording information, such as one video recording slice file per video recording information of a specified size (e.g., 5M, 10M, 20M, or 30M, etc.). It should be understood that the specified time length and the specified size may be set according to actual needs, and are not specifically limited herein.
It can be understood that, when the to-be-processed video information is fragmented into a video fragment file, the video fragment file contains all the contents of the to-be-processed video information. When the video information to be processed is fragmented into a plurality of video fragment files, each video fragment file contains part of the content of the video information to be processed, and the plurality of video fragment files can completely constitute the video information to be processed.
Step S203, determining directories corresponding to the at least one video clip file, and storing the at least one video clip file in the corresponding directories.
In an embodiment, when one or more video segment files are obtained according to preset segment configuration information segments, the at least one video segment file may be stored in a corresponding directory. The corresponding relation between the video fragment file and the directory can be set through preset storage configuration information or set manually. The preset storage configuration information may be, for example: at least one video fragment file is defined to be stored in a plurality of directories, or at least one video fragment file is defined to be stored in the same directory.
For example, the directory is created by day, one directory is created every day, and the video fragment files generated every day are stored in the directory created the day, that is, at least one video fragment file generated the day is stored in the same directory. For another example, each directory has a limited file size, such as a directory storing up to 1G of video data. When the remaining storage space of a directory is not enough, a new directory is created to store the video clip files.
In one embodiment, the directory is preferably created on a non-volatile storage medium, so that loss of video data due to sudden power failure can be avoided.
Step S205, sending the video segment file stored in the at least one video segment file in the corresponding directory to the server.
In an embodiment, in order to improve storage security of the video information or save storage space of the monitoring device 100, and facilitate a user to remotely view the video data, a part of or all of the at least one video clip file obtained by the clipping may be sent to the server 200 for storage.
In an embodiment, the video segment file to be uploaded to the server 200 may be specified according to actual requirements. For example, if it is specified that the video segment files in all directories need to be backed up to the server 200, the at least one video segment file stored in the corresponding directory may be sent to the server 200. If it is specified that only the initial video segment file of each piece of video information needs to be backed up to the server 200, the initial video segment file in the at least one video segment file stored in the corresponding directory may be sent to the server 200.
In the method provided by this embodiment, the video information to be processed is fragmented based on the preset fragmentation configuration information to generate at least one video fragment file, then directories respectively corresponding to the at least one video fragment file are determined, the at least one video fragment file is stored in the corresponding directories, and then the video fragment file in the at least one video fragment file stored in the corresponding directory is sent to the server, so that it is possible to avoid storing all video data in the same directory as much as possible, thereby reducing the risk of loss and damage of all video data due to damage of the directory, improving the reliability of video data storage, and further improving the stability and fault tolerance of the device for implementing the method.
FIG. 3 is a flowchart illustrating steps of a video recording information processing method according to another embodiment of the present invention. The order of the steps in the flow chart may be changed and some steps may be omitted according to different needs. The video information processing method may be applied to the monitoring apparatus 100 shown in fig. 1.
Referring to fig. 3, the method for processing recorded video information may specifically include the following steps.
Step S301, the video information to be processed is subjected to fragmentation processing based on the fragmentation duration, so as to generate at least one video fragment file.
In an embodiment, the setting rule of the slicing time duration may also be set and adjusted according to actual requirements, for example, the slicing time duration may include one or more time lengths.
For example, the video information to be processed has a duration of 1 hour, the slicing duration includes a slicing duration, and is 10 minutes, the video information to be processed may be sliced, so as to generate 6 video slicing files.
In an embodiment, the most critical information of the monitoring video may be in the period of time when the video starts, and in order to avoid losing the most critical information of the video, when the video information is fragmented, the fragmentation duration of the most critical video information may be set to be shorter, and the fragmentation duration of the subsequent video information may be set to be longer. For example, the fragmentation duration includes 2 fragmentation durations, which are a first fragmentation duration and a second fragmentation duration, respectively, where the first fragmentation duration is less than the second fragmentation duration, that is, the fragmentation duration of the first video information may be set as the first fragmentation duration, and the fragmentation duration of the subsequent video information may be set as the second fragmentation duration.
In an embodiment, if the to-be-processed video information belongs to a video segment and the to-be-processed video information is a start video segment of a target video to which the to-be-processed video information belongs, that is, the to-be-processed video information may include key video information, at this time, the to-be-processed video information may be fragmented based on the first fragmentation duration and the second fragmentation duration. The starting video fragment file of the target video is generated by the video information with the duration of the first fragment duration extracted from the head of the to-be-processed video information, and the non-starting video fragment file can be generated by the video information with the duration of the second fragment.
In an embodiment, if the video information to be processed belongs to a video segment and the video information to be processed is a starting video segment of a target video to which the video information to be processed belongs, the starting segment with a preset length may be fragmented according to the first fragmentation duration, and the rest may be fragmented according to the second fragmentation duration. For example, the timestamp of the start video segment is from a first time t1 to a second time t2, when video slicing is performed, the video information from the first time t1 to a third time t3 may be sliced according to the first slicing time length, and the video information from the third time t3 to the second time t2 may be sliced according to the second slicing time length, where the third time t3 is located between the first time t1 and the second time t2, and the second time length is greater than the first time length.
In an embodiment, if the to-be-processed video information belongs to a video segment, and the to-be-processed video information is an end video segment of the target video, that is, the to-be-processed video information should not include critical video information, the to-be-processed video information may be directly sliced based on the second slicing duration. It can be understood that, if the to-be-processed video information is an intermediate video segment of the target video (i.e., a video segment that is not a start video segment nor an end video segment), the to-be-processed video information may also be directly fragmented based on the second fragmentation duration.
In an embodiment, if the to-be-processed video information belongs to a video segment, and the to-be-processed video information is an end video segment of the target video, the end video segment file of the target video is a video segment file including a trailer of the to-be-processed video information. The time length of the video fragment file ending is not fixed, and can be changed due to the total length of the video information to be processed and the fragment time length.
In an embodiment, if the video information to be processed is a complete video, the video information to be processed may be sliced based on a first slicing duration and a second slicing duration. Here, the video information of the first fragmentation duration may be extracted from the header of the to-be-processed video information to generate a start video fragment file. For the video information not extracted in the to-be-processed video information, the fragmentation processing may be performed based on a second fragmentation duration. The generated video fragment file containing the trailer of the to-be-processed video information may be referred to as an end video fragment file.
Step S303, determining directories respectively corresponding to the at least one video clip file, and storing the at least one video clip file in the corresponding directories.
In an embodiment, when one or more video segment files are obtained according to preset segment configuration information segments, the at least one video segment file may be stored in a corresponding directory. The corresponding relation between the video fragment file and the directory can be set through preset storage configuration information or set manually. The preset storage configuration information may be, for example: at least one video fragment file is defined to be stored in a plurality of directories, or at least one video fragment file is defined to be stored in the same directory.
In one embodiment, the directories respectively corresponding to the at least one video clip file may be determined by: for each video fragment file in at least one video fragment file, determining whether a target directory meeting preset conditions exists in the created directory based on time information of the video fragment file (e.g., a timestamp corresponding to the video fragment file, or creation time of the video fragment file, etc.), where the preset conditions may be set according to actual requirements, for example, the preset conditions may be that a time period corresponding to the directory includes time information of the video fragment file, or that a time period corresponding to the directory includes time information of the video fragment file and a currently available storage space of the directory is larger than a size of the video fragment file; if the target directory meeting the preset condition exists, the target directory can be used as a directory corresponding to the video fragment file; and if the target directory meeting the preset condition does not exist, creating a new directory based on the preset condition, and taking the new directory as the directory corresponding to the video fragment file.
For example, the directory is created by day, one directory is created every day, and the video fragment files generated every day are stored in the directory created the day, that is, at least one video fragment file generated the day is stored in the same directory. For another example, each directory has a limited file size, such as a directory storing up to 1G of video data. For any video fragment file to be stored, if a directory containing time information of the video fragment file in a corresponding time period exists and the remaining storage space of the directory is insufficient, a new directory can be created to store the video fragment file.
In one embodiment, the directory is preferably created on a non-volatile storage medium, so that loss of video data due to sudden power failure can be avoided. If a plurality of video fragment files are stored in a plurality of directories, the storage of other directories is prevented from being influenced when a single directory is damaged, the reliability of video information storage is improved, and compared with the storage of a single directory, the storage mode of a plurality of directories has relatively fewer video fragment files under each directory, the file searching speed can be improved, and the subsequent uploading time of the video fragment files is shortened.
Alternatively, in the case where the number of storage media for storing the monitoring data is plural, when a new directory is created, the storage medium on which the new directory is located may be different from the storage medium on which the previous directory is located. Therefore, when a certain storage medium fails, the normal use of the directories on other storage media is not influenced, and the reliability of video information storage can be further improved.
Step S305, generating index information corresponding to the target video fragment file according to the file information of the target video fragment file, wherein the target video fragment file comprises a start video fragment file and/or an end video fragment file.
In this embodiment, when the at least one video segment file includes the start video segment file and the end video segment file, index information corresponding to the start video segment file may be generated according to file information of the start video segment file, and index information corresponding to the end video segment file may be generated according to file information of the end video segment file.
When the at least one video segment file includes the start video segment file, index information corresponding to the start video segment file may be generated according to file information of the start video segment file.
When the at least one video segment file includes the end video segment file, index information corresponding to the end video segment file may be generated according to file information of the end video segment file.
In an embodiment, the index information of the to-be-processed video information may at least include index information of a start video segment file and index information of an end video segment file. At this time, index information corresponding to the start video segment file may be generated according to the file information of the start video segment file, and index information corresponding to the end video segment file may be generated according to the file information of the end video segment file, and then index information of the to-be-processed video information may be constructed according to the index information of the start video segment file and the end video segment file. In other embodiments of the present invention, the index information of the video information to be processed may further include index information of other video fragment files, for example, all other video fragment files between the start video fragment file and the end video fragment file may be included, or one or more video fragment files between the start video fragment file and the end video fragment file may be included.
In an embodiment, the index information of the to-be-processed video information may also be stored in an independent directory, that is, the directory does not store the video clip file. At this time, even if the index information is lost, the subsequent uploading operation of the video fragment files is not influenced, only the combination of the video fragment files can be influenced, the single video fragment file is not influenced, and the user can still watch the single video fragment file.
Step S307, sending the video fragment file stored in the at least one video fragment file in the corresponding directory and the index information corresponding to the target video fragment file to the server.
In an embodiment, in order to improve storage security of the video information or save storage space of the monitoring device 100, a part or all of the at least one video fragment file obtained by fragmentation and index information corresponding to the video fragment file may be sent to the server 200 for storage. The video segment file to be uploaded to the server 200 may be specified according to actual requirements. For example, if it is specified that the video segment files in all directories need to be backed up to the server 200, the at least one video segment file stored in the corresponding directory may be sent to the server 200. If it is specified that only the initial video segment file of each piece of video information needs to be backed up to the server 200, the initial video segment file in the at least one video segment file stored in the corresponding directory may be sent to the server 200.
In an embodiment, when uploading the video segment file and/or the index information, a directory in which the video segment file and/or the index information is located may be determined first. For each determined directory, sequentially searching the video segment files contained in the at least one video segment file in each directory, and sending the searched video segment files to server 200.
For example, the searching and uploading method of the video segment file may be as follows: when a video fragment file is searched, the video fragment file is sent to the server 200; or after searching a directory, sending the video fragment files searched under the directory to the server 200 at one time; it is also possible to transmit the searched video clip file to the server 200 at once after searching all directories.
The method provided by this embodiment highlights a step of generating corresponding index information for a target video segment file (a start video segment file and/or an end video segment file), and sending the target video segment file to a server, and sending the index information corresponding to the target video segment file to the server at the same time. Therefore, the method provided in this embodiment not only can achieve the technical effect achieved by the embodiment corresponding to fig. 2, but also can avoid losing key information (for example, information for identifying a start video segment file and an end video segment file of video data) of the video data as much as possible. In addition, the generated index information can facilitate the server to combine a plurality of video fragment files from the same video data into one finished video data.
Referring to fig. 4, the video information processing method disclosed based on the above embodiment correspondingly discloses a video information processing apparatus 11.
The video information processing apparatus 11 may include a fragmentation module 101, a storage module 102, a transmission module 103, and a generation module 104.
The fragmentation module 101 is configured to perform fragmentation processing on the video information to be processed based on preset fragmentation configuration information to generate at least one video fragment file.
The storage module 102 is configured to determine directories respectively corresponding to the at least one video clip file, and store the at least one video clip file in the corresponding directories.
The sending module 103 is configured to send the video segment file in the at least one video segment file stored in the corresponding directory to a server.
In some optional implementation manners of this embodiment, the preset fragmentation configuration information includes a fragmentation duration; the fragmentation module 101 performs fragmentation processing on the video information to be processed based on the fragmentation duration.
In some optional implementation manners of this embodiment, the slicing time duration includes a first slicing time duration and a second slicing time duration, and the first slicing time duration is smaller than the second slicing time duration; if the video information to be processed belongs to a video segment and the video information to be processed is an initial video segment of a target video to which the video information to be processed belongs, the fragmentation module 101 performs fragmentation processing on the video information to be processed based on the first fragmentation duration and the second fragmentation duration; and generating the starting video fragment file of the target video by the video information with the time length extracted from the head of the to-be-processed video information being the first fragment time length.
In some optional implementation manners of this embodiment, the slicing module 101 performs slicing processing on the video information to be processed based on the slicing time duration, and further includes: if the video information to be processed belongs to a video segment and the video information to be processed is an end video segment of the target video, the fragmentation module 101 performs fragmentation processing on the video information to be processed based on the second fragmentation duration; and the video fragment file for ending the target video is a video fragment file containing the tail of the to-be-processed video information.
In some optional implementations of this embodiment, the generating module 104 is configured to generate, according to file information of a target video segment file, index information corresponding to the target video segment file, where the target video segment file includes the start video segment file and/or the end video segment file; and sending the index information corresponding to the target video fragment file to the server.
In some optional implementations of this embodiment, the determining, by the storage module 102, directories respectively corresponding to the at least one video clip file includes: the storage module 102 takes each video segment file in the at least one video segment file as a video segment file to be stored, and executes the following directory allocation operations: determining whether a target directory meeting preset conditions exists in the created directories based on the time information of the video fragment files to be stored; if the target directory meeting the preset condition exists, taking the target directory as a directory corresponding to the video fragment file to be stored; and if the target directory meeting the preset condition does not exist, creating a new directory based on the preset condition, and taking the new directory as the directory corresponding to the video fragment file to be stored.
In some optional implementation manners of this embodiment, the sending module 103 sends the video fragment file in the at least one video fragment file stored in the corresponding directory to the server, where the sending includes: for each determined directory, the sending module 103 sequentially searches the video fragment files included in the at least one video fragment file in each directory, and sends the searched video fragment files to the server.
It should be noted that the video information processing apparatus 11 may be a chip, a component or a module, the video information processing apparatus 11 may include a processor and a memory, the fragmentation module 101, the storage module 102, the sending module 103, the generation module 104, and the like are all stored in the memory as program units, and the processor executes the program units stored in the memory to implement corresponding functions.
The processor may include a kernel, which calls the corresponding program unit from the memory. The kernel can be set to be one or more, and the technical effects of the application, which are described above, can be achieved by adjusting the kernel parameters.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
Referring to fig. 5, the video information processing method disclosed based on the above embodiment correspondingly discloses an electronic device 300.
The electronic device 300 may comprise a memory 10, a processor 20, a computer program 30 stored in said memory 10 and executable on said processor 20. The processor 20 may implement the steps in the above-mentioned video recording information processing method embodiments when executing the computer program 30, for example, steps S201 to S205 shown in fig. 2 or steps S301 to S307 shown in fig. 3. Alternatively, the processor 20 implements the functions of the modules in the embodiment of the video information processing apparatus 11, such as the modules 101 to 104 in fig. 4, when executing the computer program 30.
The computer program 30 may be partitioned into one or more modules that are stored in the memory 10 and executed by the processor 20 to implement the present invention. The one or more modules may be a series of computer program instruction segments capable of performing certain functions, the instruction segments describing the execution of the computer program in the electronic device 300.
It is understood that the diagram is merely an example of the electronic device 300 and does not constitute a limitation of the electronic device 300, and may include more or less components than those shown, or combine some components, or different components, for example, the electronic device 300 may further include a network access device (not shown), a display device (not shown), a communication bus (not shown), and the like.
The Processor 20 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. The general purpose processor may be a microprocessor or the processor 20 may be any conventional processor or the like.
The memory 10 may be used to store the computer program 30 and/or the module, and the processor 20 implements various functions of the electronic device 300 by running or executing the computer program 30 and/or the module stored in the memory 10 and calling data stored in the memory 10. The memory 10 may include high speed random access memory and may also include non-volatile memory such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
An embodiment of the present invention provides a computer-readable medium, on which a computer program is stored, which, when executed by a processor, implements the video information processing method provided in the above method embodiments.
An embodiment of the present invention provides a processor (for example, the processor 20 shown in fig. 5) configured to execute a program, where the program executes to implement the video information processing method provided in the above method embodiments.
An embodiment of the present invention provides a computer program product, which, when executed on a data processing device, enables the data processing device to implement the video information processing method provided in the above method embodiments.
According to the video information processing method, the video information processing device, the electronic equipment, the processor and the computer readable medium, the video information is stored under the corresponding directory in a fragmentation mode, the index information of the video fragment files can be established, one or more video fragment files and the index information of the video fragment files can be uploaded to the server according to actual requirements, the stability and fault tolerance of storage of the video information are improved, and the possibility of omission and damage of the video information is greatly reduced.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, apparatus, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus, computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that other variations and modifications may be made in accordance with the invention and its spirit and scope in accordance with the practice of the invention disclosed herein.

Claims (11)

1. A method for processing video information, the method comprising:
performing fragmentation processing on the video information to be processed based on preset fragmentation configuration information to generate at least one video fragmentation file;
determining directories respectively corresponding to the at least one video fragment file, and storing the at least one video fragment file in the corresponding directories;
and sending the video fragment file in the at least one video fragment file stored in the corresponding directory to a server.
2. The method according to claim 1, wherein the preset fragmentation configuration information comprises a fragmentation duration; and
the method for carrying out fragment processing on the video information to be processed based on the preset fragment configuration information comprises the following steps:
and carrying out fragmentation processing on the video information to be processed based on the fragmentation duration.
3. The method of claim 2, wherein the slicing duration comprises a first slicing duration and a second slicing duration, the first slicing duration being less than the second slicing duration; and
the slicing processing of the video information to be processed based on the slicing duration includes:
if the video information to be processed belongs to a video segment and the video information to be processed is an initial video segment of a target video to which the video information to be processed belongs, performing fragmentation processing on the video information to be processed based on the first fragmentation duration and the second fragmentation duration;
and generating the starting video fragment file of the target video by the video information with the time length extracted from the head of the to-be-processed video information being the first fragment time length.
4. The method of claim 3, wherein the slicing the video information to be processed based on the slicing duration further comprises:
if the video information to be processed belongs to a video segment and the video information to be processed is an end video segment of the target video, performing fragmentation processing on the video information to be processed based on the second fragmentation duration;
and the video fragment file for ending the target video is a video fragment file containing the tail of the to-be-processed video information.
5. The method of claim 4, wherein the method further comprises:
generating index information corresponding to a target video fragment file according to file information of the target video fragment file, wherein the target video fragment file comprises the starting video fragment file and/or the ending video fragment file;
and sending the index information corresponding to the target video fragment file to the server.
6. The method of any of claims 1-5, wherein the determining directories that respectively correspond to the at least one video clip file comprises:
taking each video fragment file in the at least one video fragment file as a video fragment file to be stored, and executing the following directory allocation operations:
determining whether a target directory meeting preset conditions exists in the created directories based on the time information of the video fragment files to be stored;
if the target directory meeting the preset condition exists, taking the target directory as a directory corresponding to the video fragment file to be stored; and
and if the target directory meeting the preset condition does not exist, creating a new directory based on the preset condition, and taking the new directory as the directory corresponding to the video fragment file to be stored.
7. The method according to any one of claims 1 to 5, wherein the sending the video segment file of the at least one video segment file stored in the corresponding directory to the server comprises:
and for each determined directory, sequentially searching the video fragment files contained in the at least one video fragment file in each directory, and sending the searched video fragment files to the server.
8. A video information processing apparatus, characterized in that the apparatus comprises:
the fragment module is used for carrying out fragment processing on the video information to be processed based on preset fragment configuration information so as to generate at least one video fragment file;
the storage module is used for determining directories respectively corresponding to the at least one video fragment file and storing the at least one video fragment file in the corresponding directories; and
and the sending module is used for sending the video fragment files in the at least one video fragment file stored in the corresponding directory to the server.
9. An electronic device, comprising:
one or more processors;
a storage device having one or more programs stored thereon;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the video information processing method of any of claims 1-7.
10. A computer-readable medium, in which a computer program is stored, wherein the program, when executed by a processor, implements the video information processing method according to any one of claims 1 to 7.
11. A processor for executing a program, wherein the program when executed implements the video information processing method according to any one of claims 1 to 7.
CN201911143758.XA 2019-11-20 2019-11-20 Video information processing method, device, electronic equipment, processor and readable medium Active CN112825081B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911143758.XA CN112825081B (en) 2019-11-20 2019-11-20 Video information processing method, device, electronic equipment, processor and readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911143758.XA CN112825081B (en) 2019-11-20 2019-11-20 Video information processing method, device, electronic equipment, processor and readable medium

Publications (2)

Publication Number Publication Date
CN112825081A true CN112825081A (en) 2021-05-21
CN112825081B CN112825081B (en) 2024-06-28

Family

ID=75907288

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911143758.XA Active CN112825081B (en) 2019-11-20 2019-11-20 Video information processing method, device, electronic equipment, processor and readable medium

Country Status (1)

Country Link
CN (1) CN112825081B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113836350A (en) * 2021-09-23 2021-12-24 深圳绿米联创科技有限公司 Video retrieval method, system, device, storage medium and electronic equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101193273A (en) * 2006-11-20 2008-06-04 中兴通讯股份有限公司 A storage and playing method for real time multimedia image information
CN101420603A (en) * 2008-09-05 2009-04-29 中兴通讯股份有限公司 Method for implementing media distribution, positioning by segmented memory and stream media system thereof
CN103051931A (en) * 2011-10-11 2013-04-17 中兴通讯股份有限公司 Method, server, client and system for recording and playing replay program
CN106303290A (en) * 2016-09-29 2017-01-04 努比亚技术有限公司 A kind of terminal and the method obtaining video
CN109302574A (en) * 2017-07-25 2019-02-01 华为技术有限公司 A kind of method and apparatus handling video flowing
CN109729371A (en) * 2018-12-21 2019-05-07 中电福富信息科技有限公司 A kind of direct broadcast time-shift system and method based on HLS protocol multiple management
CN110381382A (en) * 2019-07-23 2019-10-25 腾讯科技(深圳)有限公司 Video takes down notes generation method, device, storage medium and computer equipment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101193273A (en) * 2006-11-20 2008-06-04 中兴通讯股份有限公司 A storage and playing method for real time multimedia image information
CN101420603A (en) * 2008-09-05 2009-04-29 中兴通讯股份有限公司 Method for implementing media distribution, positioning by segmented memory and stream media system thereof
CN103051931A (en) * 2011-10-11 2013-04-17 中兴通讯股份有限公司 Method, server, client and system for recording and playing replay program
CN106303290A (en) * 2016-09-29 2017-01-04 努比亚技术有限公司 A kind of terminal and the method obtaining video
CN109302574A (en) * 2017-07-25 2019-02-01 华为技术有限公司 A kind of method and apparatus handling video flowing
CN109729371A (en) * 2018-12-21 2019-05-07 中电福富信息科技有限公司 A kind of direct broadcast time-shift system and method based on HLS protocol multiple management
CN110381382A (en) * 2019-07-23 2019-10-25 腾讯科技(深圳)有限公司 Video takes down notes generation method, device, storage medium and computer equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113836350A (en) * 2021-09-23 2021-12-24 深圳绿米联创科技有限公司 Video retrieval method, system, device, storage medium and electronic equipment
CN113836350B (en) * 2021-09-23 2024-02-27 深圳绿米联创科技有限公司 Video retrieval method, system, device, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN112825081B (en) 2024-06-28

Similar Documents

Publication Publication Date Title
WO2017096968A1 (en) Log uploading method and apparatus
CN111176967A (en) Query method and device for remote out-of-band SSD log information and BMC
CN110611841B (en) Integration method, terminal and readable storage medium
CN112925759B (en) Data file processing method and device, storage medium and electronic device
CN101542480A (en) Combination journaling/non-journaling file system
US20120131318A1 (en) Server and method for performing data recovery of the server
CN105786539B (en) File downloading method and device
CN113495903A (en) Electric power time sequence database caching method, system, equipment and readable storage medium
CN112825081B (en) Video information processing method, device, electronic equipment, processor and readable medium
CN109918545B (en) Method and device for extracting sensor data
CN112632008A (en) Data fragment transmission method and device and computer equipment
CN109597566B (en) Data reading and storing method and device
CN108509322B (en) Method for avoiding excessive return visit, electronic device and computer readable storage medium
CN103731634A (en) Media monitoring method and media monitoring system
CN106453663B (en) Improved storage expansion method and device based on cloud service
CN110442439B (en) Task process processing method and device and computer equipment
CN106599222B (en) Method and equipment for processing logs in streaming parallel
CN110941597B (en) Method and device for cleaning decompressed file, computing equipment and computer storage medium
CN112565886A (en) Video frame extraction method and device, electronic equipment and readable storage medium
CN111010534A (en) Real-time asynchronous video analysis method and system
CN107832021B (en) Electronic evidence fixing method, terminal equipment and storage medium
CN113038261A (en) Video generation method, device, equipment, system and storage medium
CN110798656A (en) Method, device, medium and equipment for processing monitoring video file
CN115357772A (en) Data processing method and device
CN114327969A (en) Information acquisition method and device, computer equipment and computer storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant