CN113411544A - Video fragment file sending method and device, storage medium and electronic device - Google Patents

Video fragment file sending method and device, storage medium and electronic device Download PDF

Info

Publication number
CN113411544A
CN113411544A CN202110450557.5A CN202110450557A CN113411544A CN 113411544 A CN113411544 A CN 113411544A CN 202110450557 A CN202110450557 A CN 202110450557A CN 113411544 A CN113411544 A CN 113411544A
Authority
CN
China
Prior art keywords
video
file
fragment
files
target
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.)
Pending
Application number
CN202110450557.5A
Other languages
Chinese (zh)
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.)
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Original Assignee
Qingdao Haier Technology Co Ltd
Haier Smart Home 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 Qingdao Haier Technology Co Ltd, Haier Smart Home Co Ltd filed Critical Qingdao Haier Technology Co Ltd
Priority to CN202110450557.5A priority Critical patent/CN113411544A/en
Publication of CN113411544A publication Critical patent/CN113411544A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0893Assignment of logical groups to network elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Multimedia (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The invention provides a method and a device for sending a video fragment file, a storage medium and an electronic device, wherein the method for sending the video fragment file comprises the following steps: monitoring a target area through an image acquisition device; under the condition that it is monitored that a target object appearing in a target area meets a preset condition, acquiring a video file of the target area within a preset time period; the video file is subjected to fragmentation processing to obtain a plurality of video fragment files, the video fragment files are sent to a server, so that the server determines a target video fragment file corresponding to a video query request from the video fragment files under the condition that the server receives the video query request of a client, and the target video fragment file is sent to the client.

Description

Video fragment file sending method and device, storage medium and electronic device
Technical Field
The present invention relates to the field of communications, and in particular, to a method and an apparatus for sending a video slice file, a storage medium, and an electronic apparatus.
Background
With the development of science and technology, people's safety awareness is greatly improved, and video monitoring technology is applied to various scenes. But with the support of larger screen resolutions by monitoring devices, and limitations on video encoding techniques, video files are becoming larger and larger. Although the network bandwidth is also getting larger and larger, the fluctuation and bandwidth of the network situation are not infinite, in the prior art, the video monitoring end directly sends the video files obtained by monitoring to the client, which results in long time consumption for sending the files, and meanwhile, some video files are not important and are not necessarily directly sent to the client, and if all the video files obtained by monitoring are directly sent to the client, the life of the user is interfered.
Aiming at the problems that in the related art, video files obtained through monitoring are directly sent to a client, and due to the fact that the files are too large, time consumption for sending the files is long, and interference is caused to users, an effective solution is not provided.
Disclosure of Invention
The embodiment of the invention provides a method and a device for sending video fragment files, a storage medium and an electronic device, and aims to solve the problems that in the related art, the sending time of the files is long and the interference to users is caused due to the fact that the files are too large, the video files obtained through monitoring are directly sent to a client.
According to an embodiment of the present invention, a method for sending a video clip file is provided, which is applied to an image capturing device, and includes: monitoring a target area through an image acquisition device; under the condition that it is monitored that a target object appearing in a target area meets a preset condition, acquiring a video file of the target area within a preset time period; the video file is subjected to fragmentation processing to obtain a plurality of video fragment files, the video fragment files are sent to a server, so that the server determines a target video fragment file corresponding to a video query request from the video fragment files under the condition that the server receives the video query request of a client, and the target video fragment file is sent to the client.
Further, the slicing processing is performed on the video file to obtain a plurality of video slicing files, and the method comprises the following steps: performing fragmentation processing on the video file according to a preset file size through a video fragmentation technology to obtain a plurality of fragmented videos; sequentially carrying out packaging processing and definition processing on the plurality of segmented videos; and generating the plurality of video fragment files according to the plurality of fragment videos subjected to the packaging processing and the definition processing.
Further, after acquiring the video file of the target area within a preset time period, the method further includes: carrying out fragment processing on the video files to obtain the video duration of each video fragment file in the plurality of video fragment files and the index information of each video fragment file; and sending the plurality of video fragment files, the video duration of each video fragment file in the plurality of video files and the index information of each video fragment file to a server.
According to another embodiment of the present invention, there is provided a method for sending a video clip file, which is applied to a server, and includes: receiving a plurality of video fragment files sent by an image acquisition device, wherein the plurality of video fragment files are obtained by the image acquisition device after fragment processing is performed on the obtained video files under the condition that it is monitored that a target object appearing in a target area meets a preset condition, and the video files are corresponding to the target area within a preset time period; under the condition of receiving a video query request of a client, responding to the video query request, determining a target video fragment file corresponding to the video query request from the plurality of video fragment files, and sending the target video fragment file to the client.
Further, before responding to the video query request, determining a target video fragment file corresponding to the video query request from the plurality of video fragment files, and sending the target video fragment file to the client, the method further includes: receiving the fragment information sent by the image acquisition device, wherein the fragment information comprises: the video duration of each video clip file in the plurality of video files and the index information of each video clip file; generating the plurality of video fragment files and the storage directory of the fragment information according to the index information; and storing the plurality of video fragment files and the fragment information in a database corresponding to a server according to the storage directory.
Further, after the plurality of video segment files and the segment information are stored in a database corresponding to a server according to the storage directory, the method further includes: and determining a uniform resource locator corresponding to the target video fragment file, and sending the uniform resource locator to a client, so that the client plays the target video fragment file according to the uniform resource locator after acquiring the uniform resource locator.
According to another embodiment of the present invention, there is also provided a video clip file transmitting apparatus applied to an image capturing device, including: the monitoring module is used for monitoring the target area through the image acquisition device; the device comprises an acquisition module, a storage module and a processing module, wherein the acquisition module is used for acquiring a video file of a target area within a preset time period under the condition that a target object appearing in the target area is monitored to meet a preset condition; the processing module is used for carrying out fragment processing on the video files to obtain a plurality of video fragment files, and sending the video fragment files to the server, so that the server determines a target video fragment file corresponding to a video query request from the video fragment files under the condition that the server receives the video query request from a client, and sends the target video fragment file to the client.
According to another embodiment of the present invention, there is also provided a video clip file transmitting apparatus, applied to a server, including: the receiving module is used for receiving a plurality of video fragment files sent by an image acquisition device, wherein the video fragment files are obtained by the image acquisition device after fragment processing is performed on the obtained video files under the condition that a target object appearing in a target area is monitored to meet a preset condition, and the video files are corresponding to the target area within a preset time period; the sending module is used for responding to a video query request under the condition that the video query request of a client is received, determining a target video fragment file corresponding to the video query request from the plurality of video fragment files, and sending the target video fragment file to the client.
According to yet another embodiment of the invention, there is also provided a computer-readable storage medium comprising a stored program, wherein the program when executed performs the method described in any of the above.
According to yet another embodiment of the present invention, there is also provided an electronic apparatus comprising a memory having a computer program stored therein and a processor arranged to perform the method described in any one of the above by means of the computer program.
According to the invention, the target area is monitored through the image acquisition device; under the condition that it is monitored that a target object appearing in a target area meets a preset condition, acquiring a video file of the target area within a preset time period; the video file is subjected to fragmentation processing to obtain a plurality of video fragment files, the video fragment files are sent to a server, so that the server determines a target video fragment file corresponding to a video query request from the video fragment files under the condition that the server receives the video query request of a client, and the target video fragment file is sent to the client. That is to say, the present invention may acquire a video file of a target area within a preset time period when it is monitored that a target object appearing in the target area meets a preset condition, then perform fragmentation processing on the video file to obtain a plurality of video fragment files, and send the plurality of video fragment files to a server, and send the target video fragment file to a client when the server receives a video query request from the client. Therefore, by adopting the technical scheme, the problems that in the related technology, the video file obtained by monitoring is directly sent to the client, the file is too large, the time consumption for sending the file is long, and the interference to the user is caused are solved, so that the file can be uploaded quickly, and the interference to the user is avoided.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a block diagram of a hardware structure of an image capturing device for a method for sending a video slice file according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating a method for transmitting a video clip file according to an embodiment of the present invention (i);
fig. 3 is a flowchart illustrating a method for transmitting a video clip file according to an embodiment of the present invention (ii)
Fig. 4 is a schematic diagram of a method for transmitting a video slice file according to an embodiment of the present invention;
fig. 5 is a schematic diagram of playing a video slice file according to an embodiment of the present invention;
fig. 6 is a block diagram (one) of a transmitting apparatus of a video clip file according to an embodiment of the present invention;
fig. 7 is a block diagram (ii) of a transmitting apparatus of a video clip file according to an embodiment of the present invention.
Detailed Description
The invention will be described in detail hereinafter with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
The method provided by the embodiment of the application can be executed in an image acquisition device or a similar operation device. Taking an image acquisition device as an example, fig. 1 is a block diagram of a hardware structure of an image acquisition device for a method for sending a video slice file according to an embodiment of the present invention. As shown in fig. 1, the image capturing device may include one or more processors 102 (only one is shown in fig. 1), where the processors 102 may include, but are not limited to, a Microprocessor (MPU) or a Programmable Logic Device (PLD), and a memory 104 for storing data, and in an exemplary embodiment, the image capturing device may further include a transmission device 106 for communication function and an input/output device 108. It will be understood by those skilled in the art that the structure shown in fig. 1 is only an illustration and is not intended to limit the structure of the image capturing apparatus. For example, the image capture device may also include more or fewer components than shown in FIG. 1, or have a different configuration with equivalent functionality to that shown in FIG. 1 or with more functionality than that shown in FIG. 1.
The memory 104 may be used to store a computer program, for example, a software program and a module of an application software, such as a computer program corresponding to the method for transmitting the video slice file in the embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, so as to implement the method described above. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely from the processor 102, which may be connected to the image acquisition device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used for receiving or transmitting data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the image capturing apparatus. In one example, the transmission device 106 includes a Network adapter (NIC), which can be connected to other Network devices through a base station so as to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
In this embodiment, a method for sending a video clip file is provided, and is applied to the above-mentioned image capturing device, and fig. 2 is a schematic flow chart (a) of a method for sending a video clip file according to an embodiment of the present invention, where the flow includes the following steps:
step S202: monitoring a target area through an image acquisition device;
step S204: under the condition that it is monitored that a target object appearing in a target area meets a preset condition, acquiring a video file of the target area within a preset time period;
step S206: the video file is subjected to fragmentation processing to obtain a plurality of video fragment files, the video fragment files are sent to a server, so that the server determines a target video fragment file corresponding to a video query request from the video fragment files under the condition that the server receives the video query request of a client, and the target video fragment file is sent to the client.
According to the invention, the target area is monitored through the image acquisition device; under the condition that it is monitored that a target object appearing in a target area meets a preset condition, acquiring a video file of the target area within a preset time period; the video file is subjected to fragmentation processing to obtain a plurality of video fragment files, the video fragment files are sent to a server, so that the server determines a target video fragment file corresponding to a video query request from the video fragment files under the condition that the server receives the video query request of a client, and the target video fragment file is sent to the client. That is to say, the present invention may acquire a video file of a target area within a preset time period when it is monitored that a target object appearing in the target area meets a preset condition, then perform fragmentation processing on the video file to obtain a plurality of video fragment files, and send the plurality of video fragment files to a server, and send the target video fragment file to a client when the server receives a video query request from the client. Therefore, by adopting the technical scheme, the problems that in the related technology, the video file obtained by monitoring is directly sent to the client, the file is too large, the time consumption for sending the file is long, and the interference to the user is caused are solved, so that the file can be uploaded quickly, and the interference to the user is avoided.
In step S202, the slicing processing is performed on the video file to obtain a plurality of video slicing files, including: performing fragmentation processing on the video file according to a preset file size through a video fragmentation technology to obtain a plurality of fragmented videos; sequentially carrying out packaging processing and definition processing on the plurality of segmented videos; and generating the plurality of video fragment files according to the plurality of fragment videos subjected to the packaging processing and the definition processing.
It should be noted that, in the embodiment of the present invention, the video file may be subjected to the fragmentation processing according to a preset time duration, so as to obtain a plurality of fragmented videos. The user can perform the slicing processing on the video file according to the preset time length or the preset file size according to the specific scene setting. And after the plurality of sliced videos are subjected to packaging processing and definition processing, generating a plurality of video sliced files according to the processed plurality of sliced videos.
Optionally, the embodiment of the present invention further provides an implementation scheme for monitoring a target area through an image acquisition device: monitoring a target area through an image acquisition device, comprising: monitoring the target area by at least one of the following techniques: human shape detection technology, motion detection technology, face recognition technology and face occlusion monitoring technology.
It should be noted that the image capturing device monitors the target area, and the target area is monitored by using a biometric identification technology. The invention can monitor the target area through physiological characteristic recognition technology, for example, the invention can use face recognition technology and face shielding monitoring technology; the invention can also monitor the target area through a behavior characteristic identification technology, for example, the invention can use a human shape detection technology and a movement detection technology.
After step S204, that is, after acquiring the video file of the target area within the preset time period, the method further includes: carrying out fragment processing on the video files to obtain the video duration of each video fragment file in the plurality of video fragment files and the index information of each video fragment file; and sending the plurality of video fragment files, the video duration of each video fragment file in the plurality of video files and the index information of each video fragment file to a server.
It should be noted that the target area is monitored by the image acquisition device, and when it is monitored that the target object appearing in the target area meets the preset condition, the video file of the target area in the preset time period is acquired. Under the condition of obtaining the video files, carrying out fragmentation processing on the video files to obtain a plurality of video fragmentation files, the video duration of each video fragmentation file in the plurality of video fragmentation files and the index information of each video fragmentation file.
It should be noted that, in the present invention, under the condition that it is monitored that a target object appearing in a target area meets a preset condition, a video file of the target area within a preset time period is obtained, and the video file is subjected to fragmentation processing to obtain a plurality of video fragment files; the invention can also monitor the target area through the biological characteristic recognition technology to generate a video file; and under the condition that the video file meets a preset threshold value, carrying out fragment processing on the video file through a video fragment technology to generate a video fragment file.
Optionally, a target area is monitored through a human shape detection technology and a motion detection technology to generate a first video file, wherein the video file includes the first video file, a second video file and a third video file; or monitoring a target area through a face recognition technology and a face shielding detection technology to generate the second video file; or monitoring the target area through a human shape detection technology, a motion detection technology, a face recognition technology and a face shielding detection technology to generate a third video file.
Optionally, when a first video file meets a first preset condition, performing fragmentation processing on the first video file through a video fragmentation technology to generate a first video fragmentation file, where the preset condition includes the first preset condition, a second preset condition, and a third preset condition, and the video fragmentation file includes the first video fragmentation file, a second video fragmentation file, and a second video fragmentation file; under the condition that the second video file meets the second preset condition, carrying out fragment processing on the second video file through a video fragment technology to generate the second video fragment file; and under the condition that the third video file meets the third preset condition, carrying out fragment processing on the third video file through a video fragment technology to generate the third video fragment file.
Optionally, when the video file meets a preset condition, the video file is sliced by the video slicing technology to generate the video slicing file and slicing information, where the slicing information includes video duration and index information of the video slicing file; and sending the video fragment file and the fragment information to a server.
In this embodiment, a method for sending a video clip file is provided, and applied to the server, and fig. 3 is a schematic flow chart (ii) of a method for sending a video clip file according to an embodiment of the present invention, where the flow chart includes the following steps:
step S302: receiving a plurality of video fragment files sent by an image acquisition device, wherein the plurality of video fragment files are obtained by the image acquisition device after fragment processing is performed on the obtained video files under the condition that it is monitored that a target object appearing in a target area meets a preset condition, and the video files are corresponding to the target area within a preset time period;
step S304: under the condition of receiving a video query request of a client, responding to the video query request, determining a target video fragment file corresponding to the video query request from the plurality of video fragment files, and sending the target video fragment file to the client.
According to the invention, a plurality of video fragment files sent by an image acquisition device are received, wherein the plurality of video fragment files are obtained after the image acquisition device carries out fragment processing on the obtained video files under the condition that the image acquisition device monitors that a target object appearing in a target area meets a preset condition, and the video files are corresponding to the target area within a preset time period; under the condition of receiving a video query request of a client, responding to the video query request, determining a target video fragment file corresponding to the video query request from the plurality of video fragment files, and sending the target video fragment file to the client. That is to say, the video slicing method and device can receive a plurality of video slicing files sent by an image acquisition device, respond to a video query request when the video query request of a client is received, determine a target video slicing file corresponding to the video query request from the plurality of video slicing files, and send the target video slicing file to the client. Therefore, by adopting the technical scheme, the problems that in the related technology, the video file obtained by monitoring is directly sent to the client, the file is too large, the time consumption for sending the file is long, and the interference to the user is caused are solved, so that the file can be uploaded quickly, and the interference to the user is avoided.
In response to the video query request, before determining a target video fragment file corresponding to the video query request from the plurality of video fragment files and sending the target video fragment file to the client, the method further includes: receiving the fragment information sent by the image acquisition device, wherein the fragment information comprises: the video duration of each video clip file in the plurality of video files and the index information of each video clip file; generating the plurality of video fragment files and the storage directory of the fragment information according to the index information; and storing the plurality of video fragment files and the fragment information in a database corresponding to a server according to the storage directory.
It should be noted that, the fragment information sent by the image acquisition device is received, where the fragment information includes: a video duration of each of the plurality of video files and index information of each of the plurality of video clip files. And then generating a storage directory of the plurality of video fragment files and the fragment information according to the index information, storing the plurality of video fragment files and the fragment information in a database corresponding to a server according to the storage directory, and generating uniform resource locators of the video fragment files in the database when the plurality of video fragment files and the fragment information are stored in the database.
After the video fragment files and the fragment information are stored in a database corresponding to a server according to the storage directory, the method further includes: and determining a uniform resource locator corresponding to the target video fragment file, and sending the uniform resource locator to a client, so that the client plays the target video fragment file according to the uniform resource locator after acquiring the uniform resource locator.
It should be noted that, in the case of receiving a video query request from a client, in response to the video query request, a target video fragment file corresponding to the video query request is determined from the plurality of video fragment files, and the target video fragment file is sent to the client. And simultaneously, sending the uniform resource locator corresponding to the target video fragment file to a client so that the client plays the target video fragment file according to the uniform resource locator after acquiring the uniform resource locator.
It should be noted that the manner in which the client plays the target video segment file according to the uniform resource locator is played in an online on-demand manner, and the present invention may also be played in a local play manner.
It should be noted that the present invention can also generate a video playing file according to the target video slicing file, and then play the video playing file.
Optionally, the video playing file is played according to a local playing mode: acquiring the video fragment file and the fragment information from the server through the client to generate a video playing file and play the video playing file; or playing the video playing file according to an online on-demand mode: and on the server, generating the video playing file according to the video fragment file and the fragment information, and acquiring the uniform resource locator through the client to play the video playing file.
Optionally, under the condition that the video playing file is played according to a local playing mode, a local access object of the video playing file is generated according to the video playing file; and under the condition that the video playing file is played according to an online on-demand mode, generating an online access object of the video playing file according to the video playing file.
Optionally, a file demultiplexing object is generated according to the video playing file; acquiring file demultiplexing data according to the file demultiplexing object and the file access object, wherein the file access object comprises the local access object and the online access object; and after carrying out data preprocessing on the file demultiplexing data, playing the file demultiplexing data subjected to the data preprocessing, wherein the data preprocessing comprises data decoding processing and data rendering processing.
In order to better understand the above technical solution, the following alternative flow chart is used to explain the whole flow of the transmission method of the video slice file.
Fig. 4 is a schematic diagram (one) of a method for sending a video slice file according to an embodiment of the present invention, as shown in fig. 4:
s402: the image acquisition device monitors a target area through a biological feature recognition technology, and acquires a video file of the target area within a preset time period under the condition that a target object appearing in the target area is monitored to meet a preset condition;
s404: the image acquisition device divides the video file into segments according to the setting: carrying out fragment processing on the video file to obtain a plurality of video fragment files;
s406: the image acquisition device uploads video file fragments, video duration and fragment information to the server;
s408: the server stores the video fragment files and the fragment information in a database corresponding to the server according to the storage directory;
s410: the client side sends a video query request to the server to acquire a video clip list, and the server returns a response acquisition list result to the client side;
s412: the client side downloads video file fragments concurrently, obtains the video fragment duration, the fragment index and the total duration, and obtains a local storage path;
s414: the client constructs an m3u8 file by using the information of S410;
s416: the client plays the m3u8 file using the player.
Fig. 5 is a schematic diagram (ii) of a method for sending a video slice file according to an embodiment of the present invention, as shown in fig. 5:
s502: creating a file access object, wherein the online access object and the offline access object judge whether the video file is an m3u8 file;
s504: when the video file is an m3u8 file, an m3u8 demuxer object is created;
s506: resolving the m3u8 file;
s508: acquiring file demultiplexing data, and if the acquisition fails, sequentially opening the next video file by the index + 1;
s510: when the video file is not an m3u8 file, creating a normal demuxer object;
s512: opening a video file;
s514: acquiring a file demultiplexing object, and acquiring file demultiplexing data according to the file demultiplexing object and the file access object;
s516: decoding the video slice file;
s518: and rendering the video fragment file.
According to the invention, the target area is monitored through the image acquisition device; under the condition that it is monitored that a target object appearing in a target area meets a preset condition, acquiring a video file of the target area within a preset time period; the video file is subjected to fragmentation processing to obtain a plurality of video fragment files, the video fragment files are sent to a server, so that the server determines a target video fragment file corresponding to a video query request from the video fragment files under the condition that the server receives the video query request of a client, and the target video fragment file is sent to the client. That is to say, the present invention may acquire a video file of a target area within a preset time period when it is monitored that a target object appearing in the target area meets a preset condition, then perform fragmentation processing on the video file to obtain a plurality of video fragment files, and send the plurality of video fragment files to a server, and send the target video fragment file to a client when the server receives a video query request from the client. Therefore, by adopting the technical scheme, the problems that in the related technology, the video file obtained by monitoring is directly sent to the client, the file is too large, the time consumption for sending the file is long, and the interference to the user is caused are solved, so that the file can be uploaded quickly, and the interference to the user is avoided.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer terminal, or a network device) to execute the method according to the embodiments of the present invention.
In this embodiment, a sending apparatus for video clip files is further provided, and the apparatus is used to implement the foregoing embodiments and preferred embodiments, and the description already made is omitted for brevity. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 6 is a block diagram (one) of a transmitting apparatus for video clip files, applied to an image capturing apparatus, according to an embodiment of the present invention; as shown in fig. 6, includes:
a monitoring module 62, configured to monitor the target area through an image acquisition device;
an obtaining module 64, configured to obtain a video file of a target area within a preset time period when it is monitored that a target object appearing in the target area meets a preset condition;
the processing module 66 is configured to perform fragment processing on the video file to obtain a plurality of video fragment files, and send the plurality of video fragment files to a server, so that the server determines a target video fragment file corresponding to a video query request from the plurality of video fragment files and sends the target video fragment file to the client when receiving the video query request from the client.
According to the invention, the target area is monitored through the image acquisition device; under the condition that it is monitored that a target object appearing in a target area meets a preset condition, acquiring a video file of the target area within a preset time period; the video file is subjected to fragmentation processing to obtain a plurality of video fragment files, the video fragment files are sent to a server, so that the server determines a target video fragment file corresponding to a video query request from the video fragment files under the condition that the server receives the video query request of a client, and the target video fragment file is sent to the client. That is to say, the present invention may acquire a video file of a target area within a preset time period when it is monitored that a target object appearing in the target area meets a preset condition, then perform fragmentation processing on the video file to obtain a plurality of video fragment files, and send the plurality of video fragment files to a server, and send the target video fragment file to a client when the server receives a video query request from the client. Therefore, by adopting the technical scheme, the problems that in the related technology, the video file obtained by monitoring is directly sent to the client, the file is too large, the time consumption for sending the file is long, and the interference to the user is caused are solved, so that the file can be uploaded quickly, and the interference to the user is avoided.
Optionally, the processing module 66 is further configured to perform the fragment processing on the video file according to a preset file size through a video fragment technology to obtain a plurality of fragment videos; sequentially carrying out packaging processing and definition processing on the plurality of segmented videos; and generating the plurality of video fragment files according to the plurality of fragment videos subjected to the packaging processing and the definition processing.
It should be noted that, in the embodiment of the present invention, the video file may be subjected to the fragmentation processing according to a preset time duration, so as to obtain a plurality of fragmented videos. The user can perform the slicing processing on the video file according to the preset time length or the preset file size according to the specific scene setting. And after the plurality of sliced videos are subjected to packaging processing and definition processing, generating a plurality of video sliced files according to the processed plurality of sliced videos.
Optionally, the monitoring module 62 is further configured to monitor the target area by at least one of the following techniques: human shape detection technology, motion detection technology, face recognition technology and face occlusion monitoring technology.
It should be noted that the image capturing device monitors the target area, and the target area is monitored by using a biometric identification technology. The invention can monitor the target area through physiological characteristic recognition technology, for example, the invention can use face recognition technology and face shielding monitoring technology; the invention can also monitor the target area through a behavior characteristic identification technology, for example, the invention can use a human shape detection technology and a movement detection technology.
Optionally, the obtaining module 64 is further configured to perform fragment processing on the video file to obtain a video duration of each of the plurality of video fragment files and index information of each of the plurality of video fragment files; and sending the plurality of video fragment files, the video duration of each video fragment file in the plurality of video files and the index information of each video fragment file to a server.
It should be noted that the target area is monitored by the image acquisition device, and when it is monitored that the target object appearing in the target area meets the preset condition, the video file of the target area in the preset time period is acquired. Under the condition of obtaining the video files, carrying out fragmentation processing on the video files to obtain a plurality of video fragmentation files, the video duration of each video fragmentation file in the plurality of video fragmentation files and the index information of each video fragmentation file.
It should be noted that, in the present invention, under the condition that it is monitored that a target object appearing in a target area meets a preset condition, a video file of the target area within a preset time period is obtained, and the video file is subjected to fragmentation processing to obtain a plurality of video fragment files; the invention can also monitor the target area through the biological characteristic recognition technology to generate a video file; and under the condition that the video file meets a preset threshold value, carrying out fragment processing on the video file through a video fragment technology to generate a video fragment file.
Optionally, the obtaining module 64 is further configured to monitor the target area through a human shape detection technology and a motion detection technology to generate a first video file, where the video file includes the first video file, a second video file, and a third video file; or monitoring a target area through a face recognition technology and a face shielding detection technology to generate the second video file; or monitoring the target area through a human shape detection technology, a motion detection technology, a face recognition technology and a face shielding detection technology to generate a third video file.
Optionally, the obtaining module 64 is further configured to, when the first video file meets a first preset condition, perform fragmentation processing on the first video file through a video fragmentation technology to generate a first video fragmentation file, where the preset condition includes the first preset condition, a second preset condition, and a third preset condition, and the video fragmentation file includes the first video fragmentation file, a second video fragmentation file, and a second video fragmentation file; under the condition that the second video file meets the second preset condition, carrying out fragment processing on the second video file through a video fragment technology to generate the second video fragment file; and under the condition that the third video file meets the third preset condition, carrying out fragment processing on the third video file through a video fragment technology to generate the third video fragment file.
Optionally, the obtaining module 64 is further configured to perform fragmentation processing on the video file through the video fragmentation technology under the condition that the video file meets a preset condition, so as to generate the video fragmentation file and fragmentation information, where the fragmentation information includes video duration and index information of the video fragmentation file; and sending the video fragment file and the fragment information to a server.
Fig. 7 is a block diagram of a transmitting apparatus of a video clip file according to an embodiment of the present invention (ii), applied to a server; as shown in fig. 7, includes:
the receiving module 70 is configured to receive a plurality of video fragment files sent by an image acquisition device, where the video fragment files are obtained by the image acquisition device after performing fragment processing on an acquired video file when it is monitored that a target object appearing in a target area meets a preset condition, and the video file is a video file corresponding to the target area within a preset time period;
a sending module 72, configured to, in a case that a video query request of a client is received, respond to the video query request, determine a target video fragment file corresponding to the video query request from the multiple video fragment files, and send the target video fragment file to the client.
According to the invention, a plurality of video fragment files sent by an image acquisition device are received, wherein the plurality of video fragment files are obtained after the image acquisition device carries out fragment processing on the obtained video files under the condition that the image acquisition device monitors that a target object appearing in a target area meets a preset condition, and the video files are corresponding to the target area within a preset time period; under the condition of receiving a video query request of a client, responding to the video query request, determining a target video fragment file corresponding to the video query request from the plurality of video fragment files, and sending the target video fragment file to the client. That is to say, the video slicing method and device can receive a plurality of video slicing files sent by an image acquisition device, respond to a video query request when the video query request of a client is received, determine a target video slicing file corresponding to the video query request from the plurality of video slicing files, and send the target video slicing file to the client. Therefore, by adopting the technical scheme, the problems that in the related technology, the video file obtained by monitoring is directly sent to the client, the file is too large, the time consumption for sending the file is long, and the interference to the user is caused are solved, so that the file can be uploaded quickly, and the interference to the user is avoided.
Optionally, the receiving module 70 is further configured to receive fragment information sent by the image capturing apparatus, where the fragment information includes: the video duration of each video clip file in the plurality of video files and the index information of each video clip file; generating the plurality of video fragment files and the storage directory of the fragment information according to the index information; and storing the plurality of video fragment files and the fragment information in a database corresponding to a server according to the storage directory.
It should be noted that, the fragment information sent by the image acquisition device is received, where the fragment information includes: a video duration of each of the plurality of video files and index information of each of the plurality of video clip files. And then generating a storage directory of the plurality of video fragment files and the fragment information according to the index information, storing the plurality of video fragment files and the fragment information in a database corresponding to a server according to the storage directory, and generating uniform resource locators of the video fragment files in the database when the plurality of video fragment files and the fragment information are stored in the database.
Optionally, the sending module 70 is further configured to determine a uniform resource locator corresponding to the target video fragment file, and send the uniform resource locator to the client, so that the client plays the target video fragment file according to the uniform resource locator after obtaining the uniform resource locator.
It should be noted that, in the case of receiving a video query request from a client, in response to the video query request, a target video fragment file corresponding to the video query request is determined from the plurality of video fragment files, and the target video fragment file is sent to the client. And simultaneously, sending the uniform resource locator corresponding to the target video fragment file to a client so that the client plays the target video fragment file according to the uniform resource locator after acquiring the uniform resource locator.
It should be noted that the manner in which the client plays the target video segment file according to the uniform resource locator is played in an online on-demand manner, and the present invention may also be played in a local play manner.
It should be noted that the present invention can also generate a video playing file according to the target video slicing file, and then play the video playing file.
Optionally, the sending module 70 is further configured to play the video playing file according to a local playing mode: acquiring the video fragment file and the fragment information from the server through the client to generate a video playing file and play the video playing file; or playing the video playing file according to an online on-demand mode: and on the server, generating the video playing file according to the video fragment file and the fragment information, and acquiring the uniform resource locator through the client to play the video playing file.
Optionally, the sending module 70 is further configured to generate a local access object of the video playing file according to the video playing file under the condition that the video playing file is played according to a local playing mode; and under the condition that the video playing file is played according to an online on-demand mode, generating an online access object of the video playing file according to the video playing file.
Optionally, the sending module 70 is further configured to generate a file demultiplexing object according to the video playing file; acquiring file demultiplexing data according to the file demultiplexing object and the file access object, wherein the file access object comprises the local access object and the online access object; and after carrying out data preprocessing on the file demultiplexing data, playing the file demultiplexing data subjected to the data preprocessing, wherein the data preprocessing comprises data decoding processing and data rendering processing.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
Embodiments of the present invention also provide a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
Further, in the present embodiment, the above-mentioned storage medium may be configured to store a computer program for executing the steps of:
s1, monitoring the target area through an image acquisition device;
s2, acquiring a video file of a target area within a preset time period under the condition that it is monitored that a target object appearing in the target area meets a preset condition;
s3, carrying out fragment processing on the video files to obtain a plurality of video fragment files, and sending the video fragment files to a server, so that the server determines a target video fragment file corresponding to a video query request from the video fragment files under the condition that the server receives the video query request from a client, and sends the target video fragment file to the client.
Further, in the present embodiment, the storage medium may include, but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Embodiments of the present invention also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
Further, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
Further, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, monitoring the target area through an image acquisition device;
s2, acquiring a video file of a target area within a preset time period under the condition that it is monitored that a target object appearing in the target area meets a preset condition;
s3, carrying out fragment processing on the video files to obtain a plurality of video fragment files, and sending the video fragment files to a server, so that the server determines a target video fragment file corresponding to a video query request from the video fragment files under the condition that the server receives the video query request from a client, and sends the target video fragment file to the client.
Further, in this embodiment, reference may be made to the examples described in the above embodiments and optional implementation manners for specific examples, and details of this embodiment are not repeated herein.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and further, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method for sending video slicing files is applied to image acquisition equipment and is characterized by comprising the following steps:
monitoring a target area through an image acquisition device;
under the condition that it is monitored that a target object appearing in a target area meets a preset condition, acquiring a video file of the target area within a preset time period;
the video file is subjected to fragmentation processing to obtain a plurality of video fragment files, the video fragment files are sent to a server, so that the server determines a target video fragment file corresponding to a video query request from the video fragment files under the condition that the server receives the video query request of a client, and the target video fragment file is sent to the client.
2. The method for sending the video slicing file according to claim 1, wherein the slicing processing is performed on the video file to obtain a plurality of video slicing files, and the method comprises the following steps:
performing fragmentation processing on the video file according to a preset file size through a video fragmentation technology to obtain a plurality of fragmented videos;
sequentially carrying out packaging processing and definition processing on the plurality of segmented videos;
and generating the plurality of video fragment files according to the plurality of fragment videos subjected to the packaging processing and the definition processing.
3. The method for sending the video slice file according to claim 1, wherein after the video file of the target area within a preset time period is obtained, the method further comprises:
carrying out fragment processing on the video files to obtain the video duration of each video fragment file in the plurality of video fragment files and the index information of each video fragment file;
and sending the plurality of video fragment files, the video duration of each video fragment file in the plurality of video files and the index information of each video fragment file to a server.
4. A method for sending video slicing files is applied to a server and is characterized by comprising the following steps:
receiving a plurality of video fragment files sent by an image acquisition device, wherein the plurality of video fragment files are obtained by the image acquisition device after fragment processing is performed on the obtained video files under the condition that it is monitored that a target object appearing in a target area meets a preset condition, and the video files are corresponding to the target area within a preset time period;
under the condition of receiving a video query request of a client, responding to the video query request, determining a target video fragment file corresponding to the video query request from the plurality of video fragment files, and sending the target video fragment file to the client.
5. The method according to claim 4, wherein before determining, in response to the video query request, a target video slice file corresponding to the video query request from among the plurality of video slice files and sending the target video slice file to the client, the method further comprises:
receiving the fragment information sent by the image acquisition device, wherein the fragment information comprises: the video duration of each video clip file in the plurality of video files and the index information of each video clip file;
generating the plurality of video fragment files and the storage directory of the fragment information according to the index information;
and storing the plurality of video fragment files and the fragment information in a database corresponding to a server according to the storage directory.
6. The method according to claim 5, wherein after the video slice files and the slice information are stored in a database corresponding to a server according to the storage directory, the method further comprises:
and determining a uniform resource locator corresponding to the target video fragment file, and sending the uniform resource locator to a client, so that the client plays the target video fragment file according to the uniform resource locator after acquiring the uniform resource locator.
7. A sending device of video fragment files is applied to image acquisition equipment and is characterized by comprising the following components:
the monitoring module is used for monitoring the target area through the image acquisition device;
the device comprises an acquisition module, a storage module and a processing module, wherein the acquisition module is used for acquiring a video file of a target area within a preset time period under the condition that a target object appearing in the target area is monitored to meet a preset condition;
the processing module is used for carrying out fragment processing on the video files to obtain a plurality of video fragment files, and sending the video fragment files to the server, so that the server determines a target video fragment file corresponding to a video query request from the video fragment files under the condition that the server receives the video query request from a client, and sends the target video fragment file to the client.
8. A sending device of video fragment files is applied to a server and is characterized by comprising the following components:
the receiving module is used for receiving a plurality of video fragment files sent by an image acquisition device, wherein the video fragment files are obtained by the image acquisition device after fragment processing is performed on the obtained video files under the condition that a target object appearing in a target area is monitored to meet a preset condition, and the video files are corresponding to the target area within a preset time period;
the sending module is used for responding to a video query request under the condition that the video query request of a client is received, determining a target video fragment file corresponding to the video query request from the plurality of video fragment files, and sending the target video fragment file to the client.
9. A computer-readable storage medium, comprising a stored program, wherein the program is operable to perform the method of any one of claims 1 to 6.
10. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method of any of claims 1 to 6 by means of the computer program.
CN202110450557.5A 2021-04-25 2021-04-25 Video fragment file sending method and device, storage medium and electronic device Pending CN113411544A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110450557.5A CN113411544A (en) 2021-04-25 2021-04-25 Video fragment file sending method and device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110450557.5A CN113411544A (en) 2021-04-25 2021-04-25 Video fragment file sending method and device, storage medium and electronic device

Publications (1)

Publication Number Publication Date
CN113411544A true CN113411544A (en) 2021-09-17

Family

ID=77677696

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110450557.5A Pending CN113411544A (en) 2021-04-25 2021-04-25 Video fragment file sending method and device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN113411544A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113810778A (en) * 2021-10-21 2021-12-17 深圳Tcl新技术有限公司 Monitoring video processing method and device, storage medium and electronic equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150208103A1 (en) * 2012-08-08 2015-07-23 National University Of Singapore System and Method for Enabling User Control of Live Video Stream(s)
CN107801050A (en) * 2017-11-02 2018-03-13 中国地质大学(北京) For the method, apparatus and server handled video monitoring data
CN108235151A (en) * 2017-12-29 2018-06-29 北京奇虎科技有限公司 A kind of method and apparatus of net cast
CN110120113A (en) * 2019-04-29 2019-08-13 北京睿家科技有限公司 Data processing method and device, access control equipment and access control system
CN110213616A (en) * 2018-05-15 2019-09-06 腾讯科技(深圳)有限公司 Video providing method, acquisition methods, device and equipment
CN110636340A (en) * 2019-09-30 2019-12-31 普联技术有限公司 Video file uploading method and storage device
CN112468776A (en) * 2020-11-19 2021-03-09 青岛海尔科技有限公司 Video monitoring processing method and device, storage medium and electronic device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150208103A1 (en) * 2012-08-08 2015-07-23 National University Of Singapore System and Method for Enabling User Control of Live Video Stream(s)
CN107801050A (en) * 2017-11-02 2018-03-13 中国地质大学(北京) For the method, apparatus and server handled video monitoring data
CN108235151A (en) * 2017-12-29 2018-06-29 北京奇虎科技有限公司 A kind of method and apparatus of net cast
CN110213616A (en) * 2018-05-15 2019-09-06 腾讯科技(深圳)有限公司 Video providing method, acquisition methods, device and equipment
CN110120113A (en) * 2019-04-29 2019-08-13 北京睿家科技有限公司 Data processing method and device, access control equipment and access control system
CN110636340A (en) * 2019-09-30 2019-12-31 普联技术有限公司 Video file uploading method and storage device
CN112468776A (en) * 2020-11-19 2021-03-09 青岛海尔科技有限公司 Video monitoring processing method and device, storage medium and electronic device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113810778A (en) * 2021-10-21 2021-12-17 深圳Tcl新技术有限公司 Monitoring video processing method and device, storage medium and electronic equipment

Similar Documents

Publication Publication Date Title
EP3550892B1 (en) Method for network slice selection, user equipment, and network device
CN105915953B (en) Method, device, system, server and storage medium for live video identification
CN110636294B (en) Video decoding method and device, and video encoding method and device
WO2019184822A1 (en) Multi-media file processing method and device, storage medium and electronic device
CN106571942B (en) Configuration data updating method, client and server
CN111565225A (en) Figure action track determination method and device
CN107911668B (en) Wireless image transmission system and method
CN110650357B (en) Video decoding method and device
CN110519607B (en) Video decoding method and device, and video encoding method and device
CN113411544A (en) Video fragment file sending method and device, storage medium and electronic device
CN110996137B (en) Video processing method and device
CN114222086A (en) Method, system, medium and electronic device for scheduling audio and video code stream
CN108683900B (en) Image data processing method and device
CN114466224B (en) Video data encoding and decoding method and device, storage medium and electronic equipment
CN104462422A (en) Object processing method and device
CN107306199B (en) Network element data playback method and device
CN114143616A (en) Target video processing method and system, storage medium and electronic device
CN113422929A (en) Image data processing method, image data processing device, storage medium, and electronic device
CN115190352A (en) Video data storage method and device, computer readable storage medium and electronic equipment
CN110545431B (en) Video decoding method and device, video encoding method and device
CN110677692B (en) Video decoding method and device and video encoding method and device
CN112911349A (en) Video transmitting method and device, storage medium and electronic device
CN112929706A (en) Video data playback method, device, storage medium, and electronic device
CN112422961A (en) Data transmission method and device, display equipment and computer readable storage medium
CN112836089A (en) Method and device for confirming motion trail, storage medium and electronic device

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20210917

RJ01 Rejection of invention patent application after publication