CN114007102A - Video processing method, video processing device, electronic equipment and storage medium - Google Patents
Video processing method, video processing device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN114007102A CN114007102A CN202111262450.4A CN202111262450A CN114007102A CN 114007102 A CN114007102 A CN 114007102A CN 202111262450 A CN202111262450 A CN 202111262450A CN 114007102 A CN114007102 A CN 114007102A
- Authority
- CN
- China
- Prior art keywords
- video
- processing
- task
- processed
- video stream
- 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
Links
- 238000012545 processing Methods 0.000 title claims abstract description 491
- 238000003672 processing method Methods 0.000 title claims abstract description 25
- 238000004458 analytical method Methods 0.000 claims abstract description 103
- 238000000034 method Methods 0.000 claims abstract description 93
- 230000008569 process Effects 0.000 claims description 62
- 238000012163 sequencing technique Methods 0.000 claims description 14
- 238000004590 computer program Methods 0.000 claims description 10
- 238000001514 detection method Methods 0.000 claims description 4
- 238000005516 engineering process Methods 0.000 description 16
- 238000010586 diagram Methods 0.000 description 9
- 230000005540 biological transmission Effects 0.000 description 5
- 238000004891 communication Methods 0.000 description 4
- 230000008901 benefit Effects 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000006243 chemical reaction Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 238000004886 process control Methods 0.000 description 2
- 238000011160 research Methods 0.000 description 2
- 230000003213 activating effect Effects 0.000 description 1
- 230000004913 activation Effects 0.000 description 1
- 230000001174 ascending effect Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/232—Content retrieval operation locally within server, e.g. reading video streams from disk arrays
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/234—Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
- H04N21/23418—Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving operations for analysing video streams, e.g. detecting features or characteristics
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Databases & Information Systems (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
The present disclosure provides a video processing method, apparatus, electronic device, and storage medium, wherein the method comprises: acquiring task processing parameters of a video processing task; the task processing parameter is used for indicating a video address identifier of a video stream to be processed and a processing time period of the video stream to be processed; determining a target storage path of the video stream to be processed in a storage space based on the task processing parameters, wherein the storage space contains historical video streams acquired on a plurality of historical acquisition dates; determining the video stream to be processed in the historical video stream stored in the target storage path, and creating a video processing queue of the video stream to be processed; and performing video analysis processing on the video stream to be processed according to the video processing queue.
Description
Technical Field
The present disclosure relates to the field of security technologies, and in particular, to a video processing method and apparatus, an electronic device, and a storage medium.
Background
In the existing security technology, generally, a video analysis server can only process security videos in real time, but cannot process historical security videos. Before the video analysis server performs real-time processing on the security video, a user can generally perform a task needing processing in advance, so that the security video is processed in real time according to the task. Therefore, the existing security technology has a small video processing range and a single processing mode. Aiming at the increasingly rich user video analysis requirements, the existing security technology cannot meet the use requirements of users.
Disclosure of Invention
The embodiment of the disclosure at least provides a video processing method and device, electronic equipment and a storage medium.
The embodiment of the present disclosure provides a video processing method, which is applied to a video parsing server, and includes: acquiring task processing parameters of a video processing task; the task processing parameter is used for indicating a video address identifier of a video stream to be processed and a processing time period of the video stream to be processed; determining a target storage path of the video stream to be processed in a storage space based on the task processing parameters; the storage space contains historical video streams acquired on a plurality of historical acquisition dates; and determining the video stream to be processed in the historical video stream stored in the target storage path, and performing video analysis processing on the video stream to be processed.
In this embodiment of the present disclosure, after the video parsing server obtains the task processing parameter of the video processing task, the video parsing server may determine, based on the task processing parameter, a target storage path of the to-be-processed video stream in a storage space of the video parsing server, determine the to-be-processed video stream in the historical video stream stored in the target storage path, and further perform video parsing on the to-be-processed video stream. The storage space is distributed for the video stream in the video analysis server, the video stream can be stored, on the basis, the historical video stream can be processed according to the user requirement through a mode of processing the video stream to be processed based on the task processing parameters, so that the problem that the historical video stream cannot be analyzed in the prior security technology is solved, the offline intelligent analysis of the video stream can be started according to the user requirement, and the use requirement of a user can be better met.
In an optional embodiment, the determining, based on the task processing parameter, a target storage path of the to-be-processed video stream in a storage space includes: determining an endpoint time for the processing period, wherein the endpoint time comprises: a start time and an end time; respectively generating corresponding sub storage paths for the starting time and the ending time in the endpoint time; and connecting the sub storage paths through a first connection identifier to obtain a target storage path of the video stream to be processed.
As can be seen from the above description, by respectively generating the sub storage paths for the start time and the end time in the end time of the processing time period for processing the video stream to be processed, and connecting the sub storage paths through the first connection identifier, a target storage path of the video stream to be processed is obtained, and the video stream stored in the storage space in any time period can be intercepted, so that the intercepting efficiency of the video stream is improved.
In an optional implementation manner, the generating corresponding sub storage paths for the start time and the end time of the endpoint time respectively includes: determining the video address identification of the video stream to be processed; and determining a target total directory in the storage space; the target general directory comprises a plurality of storage directories for storing historical video streams; and connecting the target total directory, the video address identifier and the endpoint time through a second connection identifier to respectively obtain the sub storage paths corresponding to the starting time and the ending time in the endpoint time.
As can be seen from the above description, by generating the sub storage path for the endpoint time of the processing time period for processing the video stream to be processed, the target storage path of the video stream to be processed is obtained, and the video stream stored in the storage space in any time period can be intercepted, so as to improve the intercepting efficiency of the video stream.
In an optional implementation manner, the obtaining task processing parameters of the video processing task includes: polling a target task list according to a preset polling interval, wherein the target task list is a list which is issued by a cloud server and contains video processing tasks of each video analysis server; and searching a video processing task matched with the current video analysis server in the target task list, and determining the task processing parameters based on the determined matched video processing task.
In the embodiment of the disclosure, the video parsing servers poll the target task list according to the preset polling interval to determine the matched video processing task, so that the video processing task matched with each video parsing server can be rapidly and accurately determined, and the distribution efficiency of the video processing task is improved.
In an optional implementation manner, the performing video parsing processing on the video stream to be processed includes: and creating a video processing queue of the video stream to be processed, and performing video analysis processing on the video stream to be processed according to the video processing queue.
In the embodiment of the present disclosure, a video processing queue of a to-be-processed video stream may be created, and video parsing processing may be performed on the to-be-processed video stream according to the processing queue, so as to improve processing efficiency of the to-be-processed video stream.
In an optional embodiment, the creating a video processing queue of the to-be-processed video stream includes: determining the acquisition time of each video stream to be processed; and sequencing the video streams to be processed according to the acquisition time to obtain a target sequencing sequence, and creating the video processing queue based on the target sequencing sequence.
In the embodiment of the disclosure, the video stream to be processed is sequenced according to the acquisition time of the video stream to be processed to obtain the target sequencing sequence, and the video processing queue is created according to the target sequencing sequence, so that the server can process the video stream to be processed in sequence, and the processing efficiency of the video stream to be processed is improved.
In an optional implementation manner, the performing video parsing processing on the to-be-processed video stream according to the video processing queue includes: creating at least one video processing process; and sequentially scheduling the video streams to be processed in the video processing queue to the at least one video processing process so as to perform video analysis processing on the video streams to be processed through the at least one video processing process.
In the embodiment of the disclosure, by creating at least one video processing process, each to-be-processed video stream in the video processing queue is concurrently processed by the at least one video processing process, so that the processing efficiency of the to-be-processed video stream can be improved.
In an optional embodiment, the method further comprises: determining the number of processing cores in a current video analysis server; determining a number of the at least one video processing process based on the number of processing cores.
In the embodiment of the disclosure, the number of video processing processes can be determined according to the number of processing cores in the server, so that the processing capacity of the server is better utilized, and the processing speed of the video stream to be processed is improved.
In an optional embodiment, the method further comprises: responding to a state acquisition request aiming at the video processing task, and acquiring the task processing progress of the video processing task at the current moment; and feeding back the task processing progress to the user through the cloud server.
The task processing progress of the video processing task can be obtained through the state obtaining request, and the feedback is carried out on the user through the cloud server, so that the user can know the task processing progress, and the use experience of the user is improved.
In an optional embodiment, the method further comprises: before acquiring task processing parameters of a video processing task, acquiring a real-time video stream, and storing the real-time video stream in a corresponding storage directory, wherein the storage space comprises a plurality of storage directories, and each storage directory is used for storing the real-time video stream acquired in a plurality of continuous acquisition periods corresponding to acquisition dates.
In the embodiment of the disclosure, by allocating a storage space for the real-time video stream in the video parsing server and storing the real-time video stream through the network space, a link of video stream transmission between the video parsing server and the NVR can be omitted, so that time for data transmission is saved, and efficiency of video parsing processing of the video stream by the video parsing server is accelerated.
The embodiment of the disclosure provides another video processing method, which is applied to a cloud server and includes: detecting a video processing requirement input by a user, and creating a corresponding video processing task based on the video processing requirement; adding task information of the video processing task in a target task list, wherein the task information is used for indicating task processing parameters of the video processing task; responding to a polling request of a video analysis server for the target task list, and sending the target task list to the video analysis server so that the video analysis server carries out video analysis processing on historical video streams according to task processing parameters in the target task list.
Through the mode of processing the video stream to be processed based on the task processing parameters, the historical video stream can be processed according to the user requirements, so that the problem that the historical video stream cannot be analyzed in the existing security technology is solved, and then the offline intelligent analysis of the video stream can be started according to the user requirements, so that the use requirements of users can be better met.
In an optional embodiment, the method further comprises: detecting a control instruction of a user for the video processing task, wherein the control instruction comprises any one of: a stop instruction, a start instruction, a timing instruction; and sending the control instruction to a video analysis server corresponding to the video processing task, so that the corresponding video analysis server executes corresponding control operation on the video processing task according to the control instruction.
In the embodiment of the disclosure, after detecting the control instruction of the user for the video processing task, the cloud server can send the control instruction to the corresponding video parsing server, so as to realize remote control on the video processing task process, increase flexibility when executing the video processing task, meet the requirement of task process control of the user, and improve the use experience of the user.
An embodiment of the present disclosure further provides a video processing apparatus including: the acquisition module is used for acquiring task processing parameters of the video processing task; the task processing parameter is used for indicating a video address identifier of a video stream to be processed and a processing time period of the video stream to be processed; the first determining module is used for determining a target storage path of the video stream to be processed in the storage space based on the task processing parameters; the storage space contains historical video streams acquired on a plurality of historical acquisition dates; the second determining module is used for determining the video stream to be processed in the historical video stream stored in the target storage path; and the analysis module is used for carrying out video analysis processing on the video stream to be processed.
An embodiment of the present disclosure further provides another video processing apparatus, including: the detection module is used for detecting a video processing requirement input by a user and creating a corresponding video processing task based on the video processing requirement; the video processing system comprises an adding module, a processing module and a processing module, wherein the adding module is used for adding task information of the video processing task in a target task list, and the task information is used for indicating task processing parameters of the video processing task; and the sending module is used for responding to a polling request of a video analysis server for the target task list, and sending the target task list to the video analysis server so that the video analysis server carries out video analysis processing on historical video streams according to task processing parameters in the target task list.
An embodiment of the present disclosure further provides an electronic device, including: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory communicating via the bus when the electronic device is running, the machine-readable instructions when executed by the processor performing the steps of the first aspect described above, or any possible implementation of the first aspect.
Embodiments of the present disclosure also provide a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to perform the steps in the first aspect or any one of the possible implementation manners of the first aspect.
In this embodiment of the present disclosure, after the video parsing server obtains the task processing parameter of the video processing task, a target storage path of the to-be-processed video stream may be determined in a storage space of the video parsing server based on the task processing parameter, and the to-be-processed video stream is determined in the historical video stream stored in the target storage path, so as to perform video parsing on the to-be-processed video stream. The storage space is distributed for the video stream in the video analysis server, the video stream can be stored, on the basis, the historical video stream can be processed according to the user requirement through a mode of processing the video stream to be processed based on the task processing parameters, so that the problem that the historical video stream cannot be analyzed in the prior security technology is solved, the offline intelligent analysis of the video stream can be started according to the user requirement, and the use requirement of a user can be better met.
In order to make the aforementioned objects, features and advantages of the present disclosure more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings required for use in the embodiments will be briefly described below, and the drawings herein incorporated in and forming a part of the specification illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the technical solutions of the present disclosure. It is appreciated that the following drawings depict only certain embodiments of the disclosure and are therefore not to be considered limiting of its scope, for those skilled in the art will be able to derive additional related drawings therefrom without the benefit of the inventive faculty.
Fig. 1 shows a flow chart of a video processing method provided by an embodiment of the present disclosure;
fig. 2 shows a flowchart of a process for acquiring task processing parameters of a video processing task provided by an embodiment of the present disclosure;
fig. 3 is a flowchart illustrating a process of determining a target storage path of a video stream to be processed in a storage space based on the task processing parameters according to an embodiment of the present disclosure;
FIG. 4 is a flow chart illustrating a process of creating a video processing queue of pending video streams provided by an embodiment of the present disclosure;
FIG. 5 is a diagram illustrating a feedback format of task processing progress provided by an embodiment of the present disclosure;
fig. 6 shows a flow chart of another video processing method provided by an embodiment of the present disclosure;
fig. 7 shows a schematic diagram of a video processing apparatus provided by an embodiment of the present disclosure;
fig. 8 shows a schematic diagram of another video processing apparatus provided by an embodiment of the present disclosure;
fig. 9 shows a schematic diagram of an electronic device provided by an embodiment of the disclosure;
fig. 10 shows a schematic diagram of another electronic device provided by an embodiment of the disclosure.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present disclosure more clear, the technical solutions of the embodiments of the present disclosure will be described clearly and completely with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are only a part of the embodiments of the present disclosure, not all of the embodiments. The components of the embodiments of the present disclosure, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present disclosure, presented in the figures, is not intended to limit the scope of the claimed disclosure, but is merely representative of selected embodiments of the disclosure. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the disclosure without making creative efforts, shall fall within the protection scope of the disclosure.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
The term "and/or" herein merely describes an associative relationship, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the term "at least one" herein means any one of a plurality or any combination of at least two of a plurality, for example, including at least one of A, B, C, and may mean including any one or more elements selected from the group consisting of A, B and C.
Research shows that in the existing security technology, generally, a video analysis server can only process security videos in real time, but cannot process historical security videos. Before the video analysis server performs real-time processing on the security video, a user can usually issue a task needing to be processed in advance, so that the security video is processed in real time according to the task. Therefore, the existing security technology has a small security video processing range and a single processing mode. Aiming at the increasingly rich user video analysis requirements, the existing security technology cannot meet the use requirements of users.
Based on the above research, in the embodiment of the present disclosure, after the video parsing server obtains the task processing parameter of the video processing task, a target storage path of the video stream to be processed may be determined in a storage space of the video parsing server based on the task processing parameter, and the video stream to be processed is determined in the historical video stream stored in the target storage path, so as to perform video parsing on the video stream to be processed. The storage space is distributed for the video stream in the video analysis server, the video stream can be stored, on the basis, the historical video stream can be processed according to the user requirement through a mode of processing the video stream to be processed based on the task processing parameters, so that the problem that the historical video stream cannot be analyzed in the prior security technology is solved, the offline intelligent analysis of the video stream can be started according to the user requirement, and the use requirement of a user can be better met.
To facilitate understanding of the present embodiment, a detailed description is first provided for a video processing method disclosed in the embodiments of the present disclosure, and an execution subject of the video processing method provided in the embodiments of the present disclosure is generally an electronic device with certain computing capability. Specifically, the technical field of security and protection is designed, video streams collected by at least one camera device in a security and protection area can be stored in a storage space of a video analysis server according to the use requirements of users, historical video streams of the security and protection area are obtained, the historical video streams in the storage space are analyzed according to the video processing requirements of the users, and therefore complete security and protection measures are provided for the security and protection area.
Referring to fig. 1, a flowchart of a video processing method provided in the embodiment of the present disclosure is applied to a video parsing server, and the method includes steps S101 to S107, where:
s101: acquiring task processing parameters of a video processing task; the task processing parameter is used for indicating a video address identifier of a video stream to be processed and a processing time period of the video stream to be processed.
In the embodiment of the present disclosure, after detecting a video processing task for a historical video stream, the video parsing server may obtain a task processing parameter corresponding to the video processing task. The video processing task may be a video processing task sent by a user to a video parsing server through a cloud server.
During specific implementation, the cloud server can detect the video processing requirement of the user, and after the video processing requirement is detected, the video processing requirement is analyzed, so that a corresponding video processing task is generated. After the video analysis server obtains the video processing task, the video analysis server can obtain task processing parameters in the video processing task.
S103: determining a target storage path of the video stream to be processed in a storage space based on the task processing parameters; the storage space contains historical video streams acquired on a plurality of historical acquisition dates.
In the embodiment of the present disclosure, after the task processing parameters of the video processing task are obtained, a target storage path of the video stream to be processed may be generated according to a preset storage path generation rule.
Here, the target storage path is used to indicate a storage location of the video stream to be processed in a storage space, where the storage space contains a historical video stream acquired by the camera device corresponding to the video parsing server within a historical acquisition date.
For the video analysis server, a corresponding camera device is allocated to the video analysis server in advance, and at this time, the video analysis server may store the video stream acquired by the corresponding camera device and perform video analysis processing on the stored video stream.
In the embodiment of the present disclosure, the image capturing device is a network camera with network communication capability, and after acquiring a real-time video, the image capturing device may transmit the acquired real-time video to a target server through a network, and store the real-time video in a corresponding network address, where the network address may be understood as an address indicated by the video address identifier. Then, the video analysis server can acquire the real-time video stream acquired by the corresponding camera device in the target server, and store the acquired real-time video stream in a local storage space.
S105: and determining the video stream to be processed in the historical video streams stored under the target storage path.
In the embodiment of the present disclosure, after the target storage path is determined, a search may be performed according to the target storage path, so as to find the corresponding to-be-processed video stream in the storage space. Here, the video stream to be processed may include a plurality of video clips.
For example, if the processing period is 2021.10.20-2021.10.22, the video stream to be processed includes a plurality of video segments with history acquisition dates of 2021.10.20, 2021.10.21 and 2021.10.22.
S107: and carrying out video analysis processing on the video stream to be processed.
In the embodiment of the present disclosure, after the video stream to be processed is determined, video parsing processing may be performed on a historical video stream in the video stream to be processed based on the task processing parameter of the video processing task.
Here, the task processing parameter may be used to indicate specific task content of the video parsing task, for example, the specific task content may be a task such as face recognition, trajectory tracking, and the like, in addition to the video address identification and the processing period.
It should be noted that, in the existing security technology, since the Video parsing server cannot store the historical Video stream, after the camera device collects the Video data, the Video stream data is often stored in an NVR (Network Video Recorder).
One possible application scenario of the video processing method provided in the technical solution of the present disclosure will be described below with reference to the above steps. Suppose that the video processing method is applied to a security scene, which can be security equipment installed in an XX shop of M corporation. If 5 camera devices are installed in the XX store, each camera device transmits the acquired real-time video stream to the target server, and at this time, the video resolution server can acquire the corresponding video stream according to the video stream address.
In a specific use scene, the camera device can collect video streams of security areas which need to be monitored for users. For example, the security area may be the area of the XX store that the user wants to monitor.
Specifically, when a user wants to perform video parsing on a historical video stream corresponding to the security area, a corresponding video processing task may be set by the cloud server, and a task processing parameter of the video processing task is set, so that the historical video stream corresponding to the video processing task is determined according to the task processing parameter.
For example, when a user wants to acquire a motion trail of an XX customer according to a historical video stream, a camera device which may acquire the motion trail of the XX customer can be determined by the task processing parameters, so as to obtain a video address identifier of a to-be-processed video stream containing the XX customer video frame in a storage space. The time period in which the customer XX is likely to be present in the XX shop can also be determined by the task processing parameters, so as to obtain the processing period corresponding to the video stream to be processed. And then, determining a target storage path of the video stream to be processed in the storage space according to the video address identifier and the processing time interval, determining the video stream to be processed in the historical video stream stored in the target storage path, and performing video analysis processing on the video stream to be processed to obtain the motion track of the XX customer.
In this embodiment of the present disclosure, after the video parsing server obtains the task processing parameter of the video processing task, the video parsing server may determine, based on the task processing parameter, a target storage path of the to-be-processed video stream in a storage space of the video parsing server, determine the to-be-processed video stream in the historical video stream stored in the target storage path, and further perform video parsing on the to-be-processed video stream. The storage space is distributed for the video stream in the video analysis server, the video stream can be stored, on the basis, the historical video stream can be processed according to the user requirement through a mode of processing the video stream to be processed based on the task processing parameters, so that the problem that the historical video stream cannot be analyzed in the prior security technology is solved, the offline intelligent analysis of the video stream can be started according to the user requirement, and the use requirement of a user can be better met.
In an alternative embodiment, the method further comprises the steps of:
before acquiring task processing parameters of a video processing task, acquiring a real-time video stream, and storing the real-time video stream in a corresponding storage directory, wherein the storage space comprises a plurality of storage directories, and each storage directory is used for storing the real-time video stream acquired in a plurality of continuous acquisition periods corresponding to acquisition dates.
In the embodiment of the present disclosure, since the video parsing server cannot store the historical video stream, a storage space may be set for the video parsing server, so that the video parsing server stores the real-time video stream in a corresponding directory in the storage space after acquiring the real-time video stream.
In specific implementation, the video storage parameters can be acquired, the storage capacity is estimated according to the video storage parameters, and then the corresponding storage space is allocated to the real-time video stream according to the estimated storage capacity. Wherein the video storage parameters include at least one of: video storage time, video storage path number (i.e., the number of cameras), and video resolution.
The process of estimating storage capacity from video storage parameters can be described as follows: firstly, estimating the storage capacity required by the video stream in unit time according to the video storage path number and the video resolution, and further determining the size of the storage space corresponding to the real-time video stream allocation according to the storage capacity required by the video stream in unit time and the video storage time length.
In the embodiment of the present disclosure, the storage space set for the video parsing server may be a local disk of the video parsing server or an independent network video recorder.
According to the description, the video analysis server can only analyze the real-time video stream acquired in real time, and when the historical video stream needs to be analyzed, the historical video stream stored in the NVR can only be acquired through the network, so that the acquired historical video stream is analyzed. However, the video stream transmitted between the video parsing server and the NVR is easily affected by network factors such as network bandwidth, so that the transmission efficiency of the video stream between the video parsing server and the NVR is reduced, and the processing efficiency of the video parsing server on the video stream is reduced.
In the embodiment of the disclosure, by allocating a storage space for the video stream in the video parsing server and storing the video stream through the network space, a link of video stream transmission between the video parsing server and the NVR can be omitted, so that data transmission time is saved, and further, the efficiency of video parsing processing of the video stream by the video parsing server is improved.
In the embodiment of the present disclosure, as shown in fig. 2, a process of acquiring task processing parameters of a video processing task in S101 is specifically as follows:
s1011: polling a target task list according to a preset polling interval, wherein the target task list is a list which is issued by a cloud server and contains video processing tasks of each video analysis server.
In the embodiment of the disclosure, the cloud server issues the video processing task to the plurality of video analysis servers in a target task list manner. And acquiring the corresponding video processing task by polling the target task list aiming at each video analysis server. The target task list comprises a plurality of video processing tasks and identification information of a video analysis server corresponding to each video processing task.
In specific implementation, the video parsing server may obtain the target task list from the cloud server at intervals, and then determine whether the target task list includes its own video processing task by searching for the identification information in the target task list.
For example, if the preset polling interval is 10min, the video parsing server performs query operation on the target task list every 10min, and then determines whether the target task list includes its own video processing task in a manner of searching for identification information in the target task list.
It should be noted that different preset polling intervals can be set for each video resolution server according to the use frequency of the video resolution servers, so that the problem of slow query efficiency caused by the fact that a plurality of video resolution servers query the target task list at the same time is solved.
S1012: and searching a video processing task matched with the current video analysis server in the target task list, and determining the task processing parameters based on the determined matched video processing task.
In the embodiment of the present disclosure, when the video parsing server searches for the matched video processing task in the target task list, the video processing task can be searched according to the identification information.
Specifically, after the video resolution server finds the identification information corresponding to the video resolution server in the target task list, the video processing task corresponding to the identification information can be determined as the video processing task matched with the video resolution server.
Here, after the matching video processing task is determined, a task processing parameter corresponding to the video processing task may also be determined. The task processing parameter may include a video address identifier of a to-be-processed video stream corresponding to the video processing task and a processing period of the to-be-processed video stream.
In addition, the video processing parameter may also include an account to which the video stream to be processed belongs (e.g., a camera device to which the video stream to be processed belongs), a processing time of the video stream to be processed, and an activation parameter for activating the video processing task.
As can be seen from the above description, in the embodiment of the present disclosure, the video parsing server may rapidly and accurately determine the video processing task matched with each video parsing server by polling the target task list according to the preset polling interval and then determining the matched video processing task, so as to improve the allocation efficiency of the video processing task.
In this embodiment of the disclosure, as shown in fig. 3, a process of determining a target storage path of the to-be-processed video stream in the storage space based on the task processing parameter in S103 is specifically as follows:
s1031: determining an endpoint time for the processing period, wherein the endpoint time comprises: a start time and an end time.
In the embodiment of the present disclosure, when determining a target storage path of a to-be-processed video stream, first, a time range of the to-be-processed video stream needs to be located according to a processing time period in a task processing parameter.
Specifically, the endpoint time of the processing period of the video stream to be processed in the task processing parameter, including the start time and the end time, may be determined.
For example, when the processing period is 2021.10.20-2021.10.22, the endpoint times of the processing period of the video stream to be processed are 20/10/2021 and 24/22/2021, wherein 0/10/20/2021 is the starting time of the endpoint time, and 24/10/22/2021 is the ending time of the endpoint time.
S1032: and respectively generating corresponding sub storage paths for the starting time and the ending time in the endpoint time.
In the embodiment of the present disclosure, after the endpoint time is determined, corresponding sub storage paths are respectively generated for the start time and the end time of the endpoint time.
In specific implementation, the target total directory, the video address identifier and the endpoint time may be processed according to a preset path conversion format, so as to generate a corresponding sub-storage path. Here, the target summary directory includes a plurality of storage directories for storing the historical video streams.
Taking the starting time of the endpoint time as an example, assuming that the starting time is 0 point at 10/20/2021, the video address is marked as sample _ camera _ id, and the target total directory is data0/video, at this time, data0/video, sample _ camera _ id and 0 point at 20/10/2021, the starting time can be processed according to the preset path conversion format, so as to obtain the sub storage path with the following format: "/data 0/video/sample _ camera _ id/2021_09_ 01/".
In the storage space of the embodiment of the present disclosure, a corresponding storage directory may be allocated to each acquisition date, and in any one storage directory, video streams acquired in a plurality of acquisition periods may be stored. Wherein, the collection date may be xx year yy month zz days, and the collection period may be each hour in the collection date, for example, 0 hour-1 hour is one collection period, and 1 hour to 2 hours are one collection period.
Based on this, in the embodiment of the present disclosure, a specific collection period of a specific collection date may also be included in the above-mentioned endpoint time, for example, the starting time is 10 months, 20 days, and 3 points in 2021. At this time, the sub storage path may be represented as a storage path of the following format: "/data 0/video/sample _ \
camera_id/2021_09_01_03/”。
S1033: and connecting the sub storage paths through a first connection identifier to obtain a target storage path of the video stream to be processed.
In the embodiment of the present disclosure, after determining the sub storage path corresponding to the endpoint time of the processing time period, the sub storage path may be connected through the first connection identifier, so as to obtain the target storage path of the video stream to be processed.
Here, for each endpoint time, a corresponding sub-storage path is generated for each endpoint time in the manner described above, and is not described one by one here.
Specifically, the first connection identifier may be a symbol, and besides, the first connection identifier may also be other types of symbols, which is not specifically limited in this disclosure so as to be implemented as a standard.
As can be seen from the above description, by generating the sub storage path for the endpoint time of the processing time period for processing the video stream to be processed, and connecting the sub storage paths through the first connection identifier, the video stream stored in the storage space in any time period can be intercepted in a manner of obtaining the target storage path of the video stream to be processed, so as to improve the intercepting efficiency of the video stream.
In an optional implementation manner, in step S1032, generating the corresponding sub storage path for the endpoint time specifically includes the following processes:
(1) determining the video address identifier of the video stream to be processed; and determining a target total directory in the storage space; the target general directory comprises a plurality of storage directories for storing historical video streams;
(2) and connecting the target total directory, the video address identifier and the endpoint time through a second connection identifier to respectively obtain the sub storage paths corresponding to the starting time and the ending time in the endpoint time.
In the embodiment of the present disclosure, in addition to storing the video stream, other types of data may also be stored in the storage space, at this time, a total directory for storing the historical video stream in the storage space, that is, a target total directory may be determined, for example, the target total directory may be: data 0/video/.
After the video address identifier of the video stream to be processed and the target total directory in the storage space are determined, the target total directory, the video address identifier and the endpoint time can be connected to obtain a sub-storage path corresponding to the endpoint time. For example, the connection process may be to connect the target total directory, the video address identifier, and the endpoint time through the second connection identifier.
Specifically, the first connection identifier may be "/", and after the target total directory, the video address identifier, and the endpoint time are connected, the obtained sub storage path corresponding to the start time may be: "/data 0/video/sample _ camera _ id/2021_10_ 20/".
It should be understood that, when the target storage path corresponding to the to-be-processed video stream is determined according to the sub storage path corresponding to the endpoint time, the sub storage path corresponding to the start time and the sub storage path corresponding to the end time may be connected through the first connection identifier, so as to obtain the target storage path.
For example, the target storage path may be: "[/data 0/video/sample _ camera _ id/2021_09_01/,/data0/video/sample _ camera _ id/2021_09_ 02/]".
As can be seen from the above description, by generating the sub storage path for the endpoint time of the processing time period for processing the video stream to be processed, the target storage path of the video stream to be processed is obtained, and the video stream stored in the storage space in any time period can be intercepted, so as to improve the intercepting efficiency of the video stream.
In an optional embodiment, performing video parsing on the video stream to be processed includes the following steps:
and creating a video processing queue of the video stream to be processed, and performing video analysis processing on the video stream to be processed according to the video processing queue.
In specific implementation, before parsing a video stream to be processed, the number of the video stream to be processed needs to be determined, and if the number of the video streams to be processed is multiple, a video processing queue of the video stream to be processed is created.
Specifically, since in the storage space, the historical video streams may be stored according to the collection dates, where the historical video stream of each collection date corresponds to at least one storage directory.
In an optional implementation manner, if the processing period of the to-be-processed video stream includes a plurality of capture dates, the number of the to-be-processed video streams is determined to be multiple. For example, when the time range is 2020.10.20-2020.10.22, and the time range includes three acquisition dates of 10.20,20.21 and 10.22, the number of the video streams to be processed is determined to be multiple.
In another optional embodiment, the storage directory corresponding to the historical video stream on each acquisition date further includes a plurality of sub-storage directories, where each storage directory includes N sub-storage directories, and each sub-storage directory respectively stores the historical video stream acquired in each continuous acquisition period (e.g., each hour) on the acquisition date. Then, if the processing period corresponds to a plurality of capturing periods, it is determined that the number of the to-be-processed video streams is plural.
As can be seen from the above description, in the embodiment of the present disclosure, a video processing queue of a to-be-processed video stream may be created, and video parsing processing may be performed on the to-be-processed video stream according to the processing queue, so as to improve processing efficiency of the to-be-processed video stream.
Here, when the number of the to-be-processed video streams is multiple, as shown in fig. 4, a process of creating a video processing queue of the to-be-processed video streams in S105 is specifically as follows:
s1051: and determining the acquisition time of each video stream to be processed.
In the embodiment of the present disclosure, when the capture time of each to-be-processed video stream is determined, the timestamp of each to-be-processed video stream may be obtained, so that the capture time of the to-be-processed video stream is determined according to the timestamp. The timestamp is a digital sequence generated according to the acquisition time of the video stream to be processed, and the acquisition time of the video stream to be processed can be restored according to the digital sequence.
S1052: and sequencing the video streams to be processed according to the acquisition time to obtain a target sequencing sequence, and creating the video processing queue based on the target sequencing sequence.
In the embodiment of the present disclosure, when the plurality of to-be-processed video streams are sorted by the acquisition time, the sorting order may be selected according to the video parsing requirement of the user. For example, an ascending order may be selected, that is, the multiple video streams to be processed are arranged according to the acquisition time from morning to evening; alternatively, the descending order may be selected, that is, the plurality of video streams to be processed are arranged according to the acquisition time from late to early.
As can be seen from the above description, in the embodiment of the present disclosure, the video stream to be processed is sorted according to the acquisition time of the video stream to be processed to obtain the target sorting sequence, and the video processing queue is created according to the target sorting sequence, so that the server can process the video stream to be processed in sequence, and the processing efficiency of the video stream to be processed is improved.
In the embodiment of the present disclosure, after the video processing queue of the video stream to be processed is determined, video parsing processing may be performed on a historical video stream in the video stream to be processed according to the video processing queue. It should be understood that the order of video parsing processing on the video stream to be processed should be the order of the video processing queue.
In an optional implementation manner, in S107, performing video parsing processing on the video stream to be processed according to the video processing queue specifically includes the following processes:
s1071: at least one video processing process is created.
S1072: and sequentially scheduling the video streams to be processed in the video processing queue to the at least one video processing process so as to perform video analysis processing on the video streams to be processed through the at least one video processing process.
In the embodiment of the present disclosure, first, at least one video processing procedure may be created, where the number of the at least one video processing procedure may be determined in a manner described below, specifically including the following processes:
(1) determining the number of processing cores in the current video analysis server;
(2) determining a number of the at least one video processing process based on the number of processing cores.
In this embodiment of the present disclosure, when performing video parsing on the video stream to be processed, the number of the at least one video processing process needs to be determined first. Specifically, the determination may be made according to the processing capability of the video parsing server. For example, the determination may be made according to the number of processing cores of the video parsing server.
Specifically, the number of the at least one video processing process may be equal to the number of processing cores in the current video parsing server, or the number of the at least one video processing process may be smaller than the number of processing cores in the current video parsing server.
For example, if the number of processing cores of the video parsing server is 4, that is, if the video parsing server is a 4-core server, the number of the video processing processes may be 4, or less than 4. So that each processing core can perform a video processing process or not.
As can be seen from the above description, in the embodiment of the present disclosure, the number of video processing processes may be determined according to the number of processing cores in the server, so as to better utilize the processing capability of the server and improve the processing speed of the video stream to be processed.
After the number of the at least one video processing process is determined and the at least one video processing process is created, the video streams to be processed in the video processing queue may be scheduled to the video processing process, so that the at least one video processing process can perform video parsing on the allocated video streams to be processed at the same time.
For example, if the number of the video processing processes is 4, then the 4 video processing processes may be respectively scheduled with 4 to-be-processed video streams according to the order of the to-be-processed video streams in the video processing queue, for example, a first to-be-processed video stream is scheduled to the first video processing process, a second to-be-processed video stream is scheduled to the second video processing process, a third to-be-processed video stream is scheduled to the third video processing process, and a fourth to-be-processed video stream is scheduled to the fourth video processing process. By the processing mode, each video processing process can simultaneously perform video analysis processing on the 4 distributed video streams to be processed respectively, so that the video processing speed of the video streams to be processed is increased.
As can be seen from the above description, in the embodiment of the present disclosure, by creating at least one video processing process, so that each to-be-processed video stream in the video processing queue is concurrently processed by the at least one video processing process, the processing efficiency of the to-be-processed video stream may be improved.
In an optional embodiment, the method further comprises the process of:
(1) responding to a state acquisition request aiming at the video processing task, and acquiring the task processing progress of the video processing task at the current moment;
(2) and feeding back the task processing progress to the user through the cloud server.
When the video analysis server carries out video analysis processing on the video stream to be processed, the user can also obtain the task state of the video processing task through the state obtaining request. For example, after detecting the state acquisition requirement of the user, the cloud server may send a state acquisition request for acquiring a task state of the video processing task to the video parsing server.
When detecting the state acquisition request of the user, the video analysis server can acquire the task processing progress of the video processing task at the current moment. The task processing progress may include a total progress of the video processing task at the current time and/or a sub-progress of each video processing process.
After the task processing progress is determined, the task processing progress can be fed back to the user through the cloud server. Specifically, as shown in fig. 5, a feedback format of the task processing progress is shown, and a data format of the task processing progress is a percentage format. Wherein, the total progress of the task processing progress is 24%, the video processing task comprises 4 video processing progresses, A1、A2、A3、A4The sub-schedules corresponding to the 4 video processing schedules are respectively as follows: a. the165% of A231% of A30% of A4Is 0%.
As can be seen from the above description, in the embodiment of the present disclosure, the task processing progress of the video processing task may be obtained through the state obtaining request, and the feedback may be performed to the user through the cloud server, so that the user may know the task processing progress, and the use experience of the user is improved.
Referring to fig. 6, a flowchart of a video processing method provided in the embodiment of the present disclosure is applied to a cloud server, and the method includes steps S601 to S605, where:
s601: detecting a video processing requirement input by a user, and creating a corresponding video processing task based on the video processing requirement.
During specific implementation, the cloud server can detect the video processing requirement of the user, and after the video processing requirement is detected, the video processing requirement is analyzed, so that a corresponding video processing task is generated. After the video analysis server obtains the video processing task, the video analysis server can obtain task processing parameters in the video processing task.
For example, if the video processing requirements of the user are: "to parse the video stream at XX store XX position in 2020, 10 month and 20 days", at this time, a video processing task may be established in which the processing period is 2020, 10 month and 20 days, and the video parsing processing is performed on the video stream to be processed at XX store XX position.
S603: adding task information of the video processing task in a target task list, wherein the task information is used for indicating task processing parameters of the video processing task.
S605: responding to a polling request of a video analysis server for the target task list, and sending the target task list to the video analysis server so that the video analysis server carries out video analysis processing on historical video streams according to task processing parameters in the target task list.
In the embodiment of the disclosure, the cloud server issues the video processing task to the plurality of video analysis servers in a target task list manner. And acquiring the corresponding video processing task by polling the target task list aiming at each video analysis server. The target task list comprises a plurality of video processing tasks and identification information of a video analysis server corresponding to each video processing task.
In specific implementation, the video parsing server may obtain the target task list from the cloud server at intervals, and then determine whether the target task list includes its own video processing task by searching for the identification information in the target task list.
For example, if the preset polling interval is 10min, the video parsing server performs query operation on the target task list every 10min, and then determines whether the target task list includes its own video processing task in a manner of searching for identification information in the target task list.
It should be noted that different preset polling intervals can be set for each video resolution server according to the use frequency of the video resolution servers, so that the problem of slow query efficiency caused by the fact that a plurality of video resolution servers query the target task list at the same time is solved.
Specifically, after the video resolution server finds the identification information corresponding to the video resolution server in the target task list, the video processing task corresponding to the identification information can be determined as the video processing task matched with the video resolution server.
In the embodiment of the disclosure, the historical video stream can be processed according to the user requirement by processing the video stream to be processed based on the task processing parameter, so that the problem that the historical video stream cannot be analyzed in the prior security technology is solved, and then the offline intelligent analysis of the video stream can be started according to the user requirement, so as to better meet the use requirement of the user.
In an optional embodiment, the method further comprises the process of:
(1) and detecting a control instruction of a user for the video processing task, wherein the control instruction comprises any one of: stop command, start command, timing command.
(2) And sending the control instruction to a video analysis server corresponding to the video processing task, so that the corresponding video analysis server executes corresponding control operation on the video processing task according to the control instruction.
In the embodiment of the present disclosure, after a control instruction of a user for a video processing task is detected, the video processing task corresponding to the control instruction may be determined, and identification information of a video parsing server corresponding to the video processing task is determined.
Here, after the identification information is determined, the control command may be sent to a corresponding video parsing server according to the identification information.
The stop instruction may include a pause instruction for the video processing task or a pause instruction, where if the stop instruction is the pause instruction, the video parsing server may continue to execute the video processing task after detecting the start instruction for the video processing task.
In addition, the start instruction may be an instruction instructing the video resolution server to execute the video processing task.
In addition, the timing instruction may be an instruction instructing the video processing server to execute the video processing task according to a processing time. For example, if the processing time included in the timing command is 15:00 today, the video parsing server will execute the video processing task at 15:00 today.
As can be seen from the above description, in the embodiment of the present disclosure, after detecting a control instruction of a user for a video processing task, the cloud server may send the control instruction to a corresponding video parsing server, so as to implement remote control on a video processing task process, increase flexibility when executing the video processing task, meet a requirement of task process control of the user, and improve user experience.
In summary, in the embodiment of the present disclosure, the video parsing server directly searches and parses the historical video stream stored in the storage space, so as to solve the problem that the historical video stream cannot be directly parsed in the prior art, expand the application range of the scheme, and better meet the use requirements of the user.
It will be understood by those skilled in the art that in the method of the present invention, the order of writing the steps does not imply a strict order of execution and any limitations on the implementation, and the specific order of execution of the steps should be determined by their function and possible inherent logic.
Based on the same inventive concept, a video processing apparatus corresponding to the video processing method is also provided in the embodiments of the present disclosure, and since the principle of the apparatus in the embodiments of the present disclosure for solving the problem is similar to the video processing method described above in the embodiments of the present disclosure, the implementation of the apparatus may refer to the implementation of the method, and repeated details are not described again.
Referring to fig. 7, a schematic diagram of a video processing apparatus according to an embodiment of the present disclosure is shown, where the apparatus includes: an acquisition module 71, a first determination module 72, a second determination module 73, and an analysis module 74; wherein,
an obtaining module 71, configured to obtain task processing parameters of a video processing task; the task processing parameter is used for indicating a video address identifier of a video stream to be processed and a processing time period of the video stream to be processed;
a first determining module 72, configured to determine a target storage path of the to-be-processed video stream in a storage space based on the task processing parameter; the storage space contains historical video streams acquired on a plurality of historical acquisition dates;
a second determining module 73, configured to determine the video stream to be processed from the historical video streams stored in the target storage path;
and the parsing module 74 is configured to perform video parsing on the video stream to be processed.
In this embodiment of the present disclosure, after the video parsing server obtains the task processing parameter of the video processing task, the video parsing server may determine, based on the task processing parameter, a target storage path of the to-be-processed video stream in a storage space of the video parsing server, determine the to-be-processed video stream in the historical video stream stored in the target storage path, and further perform video parsing on the to-be-processed video stream. The storage space is distributed for the video stream in the video analysis server, the video stream can be stored, on the basis, the historical video stream can be processed according to the user requirement through a mode of processing the video stream to be processed based on the task processing parameters, so that the problem that the historical video stream cannot be analyzed in the prior security technology is solved, the offline intelligent analysis of the video stream can be started according to the user requirement, and the use requirement of a user can be better met.
In one possible implementation, the first determining module 72 is further configured to:
determining an endpoint time for the processing period, wherein the endpoint time comprises: a start time and an end time; respectively generating corresponding sub storage paths for the starting time and the ending time in the endpoint time; and connecting the sub storage paths through a first connection identifier to obtain a target storage path of the video stream to be processed.
In one possible implementation, the first determining module 72 is further configured to:
determining the video address identification of the video stream to be processed; and determining a target total directory in the storage space; the target general directory comprises a plurality of storage directories for storing historical video streams; and connecting the target total directory, the video address identifier and the endpoint time through a second connection identifier to respectively obtain the sub storage paths corresponding to the starting time and the ending time in the endpoint time.
In a possible implementation, the obtaining module 72 is further configured to:
polling a target task list according to a preset polling interval, wherein the target task list is a list which is issued by a cloud server and contains video processing tasks of each video analysis server; and searching a video processing task matched with the current video analysis server in the target task list, and determining the task processing parameters based on the determined matched video processing task.
In a possible implementation, the parsing module 74 is further configured to:
and creating a video processing queue of the video stream to be processed, and performing video analysis processing on the video stream to be processed according to the video processing queue.
In a possible implementation, the parsing module 74 is further configured to:
determining the acquisition time of each video stream to be processed; and sequencing the video streams to be processed according to the acquisition time to obtain a target sequencing sequence, and creating the video processing queue based on the target sequencing sequence.
In a possible implementation, the parsing module 74 is further configured to:
creating at least one video processing process; and sequentially scheduling the video streams to be processed in the video processing queue to the at least one video processing process so as to perform video analysis processing on the video streams to be processed through the at least one video processing process.
In a possible implementation, the parsing module 74 is further configured to:
determining the number of processing cores in a current video analysis server; determining a number of the at least one video processing process based on the number of processing cores.
In one possible embodiment, the apparatus is further configured to:
responding to a state acquisition request aiming at the video processing task, and acquiring the task processing progress of the video processing task at the current moment; and feeding back the task processing progress to the user through the cloud server.
In one possible embodiment, the apparatus is further configured to:
before acquiring task processing parameters of a video processing task, acquiring a real-time video stream, and storing the real-time video stream in a corresponding storage directory, wherein the storage space comprises a plurality of storage directories, and each storage directory is used for storing the real-time video stream acquired in a plurality of continuous acquisition periods corresponding to acquisition dates.
Referring to fig. 8, a schematic diagram of another video processing apparatus provided in an embodiment of the present disclosure is shown, where the apparatus includes: a detection module 81, an adding module 82, and a sending module 83; wherein,
the detection module 81 is configured to detect a video processing requirement input by a user, and create a corresponding video processing task based on the video processing requirement;
an adding module 82, configured to add task information of the video processing task in a target task list, where the task information is used to indicate a task processing parameter of the video processing task;
the sending module 83 is configured to send the target task list to the video resolution server in response to a polling request of the video resolution server for the target task list, so that the video resolution server performs video resolution processing on a historical video stream according to task processing parameters in the target task list.
In the embodiment of the disclosure, the historical video stream can be processed according to the user requirement by processing the video stream to be processed based on the task processing parameter, so that the problem that the historical video stream cannot be analyzed in the prior security technology is solved, and then the offline intelligent analysis of the video stream can be started according to the user requirement, so as to better meet the use requirement of the user.
In one possible embodiment, the apparatus is further configured to:
detecting a control instruction of a user for the video processing task, wherein the control instruction comprises any one of: a stop instruction, a start instruction, a timing instruction; and sending the control instruction to a video analysis server corresponding to the video processing task, so that the corresponding video analysis server executes corresponding control operation on the video processing task according to the control instruction.
The description of the processing flow of each module in the device and the interaction flow between the modules may refer to the related description in the above method embodiments, and will not be described in detail here.
Corresponding to the video processing method in fig. 1, an embodiment of the present disclosure further provides an electronic device 900, as shown in fig. 9, a schematic structural diagram of the electronic device 900 provided in the embodiment of the present disclosure includes:
a processor 91, a memory 92, and a bus 93; the memory 92 is used for storing execution instructions and includes a memory 921 and an external memory 922; the memory 921 is also referred to as an internal memory, and is configured to temporarily store operation data in the processor 91 and data exchanged with an external memory 922 such as a hard disk, the processor 91 exchanges data with the external memory 922 through the memory 921, and when the electronic apparatus 900 operates, the processor 91 communicates with the memory 92 through the bus 93, so that the processor 91 executes the following instructions:
acquiring task processing parameters of a video processing task; the task processing parameter is used for indicating a video address identifier of a video stream to be processed and a processing time period of the video stream to be processed;
determining a target storage path of the video stream to be processed in a storage space based on the task processing parameters; the storage space contains historical video streams acquired on a plurality of historical acquisition dates;
determining the video stream to be processed in the historical video stream stored in the target storage path, and creating a video processing queue of the video stream to be processed;
and performing video analysis processing on the video stream to be processed according to the video processing queue.
Corresponding to the video processing method in fig. 1, another electronic device 1000 is further provided in the embodiment of the present disclosure, as shown in fig. 10, a schematic structural diagram of the electronic device 1000 provided in the embodiment of the present disclosure includes:
a processor 101, a memory 102, and a bus 103; the storage 102 is used for storing execution instructions and includes a memory 1021 and an external storage 1022; the memory 1021 is also called an internal memory, and is used for temporarily storing the operation data in the processor 101 and the data exchanged with the external memory 1022 such as a hard disk, the processor 101 exchanges data with the external memory 1022 through the memory 1021, and when the electronic device 1000 operates, the processor 101 communicates with the memory 102 through the bus 103, so that the processor 101 executes the following instructions:
detecting a video processing requirement input by a user, and creating a corresponding video processing task based on the video processing requirement;
adding task information of the video processing task in a target task list, wherein the task information is used for indicating task processing parameters of the video processing task;
responding to a polling request of a video analysis server for the target task list, and sending the target task list to the video analysis server so that the video analysis server carries out video analysis processing on historical video streams according to task processing parameters in the target task list.
The embodiments of the present disclosure also provide a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to perform the steps of the video processing method described in the above method embodiments. The storage medium may be a volatile or non-volatile computer-readable storage medium.
The embodiments of the present disclosure also provide a computer program product, where the computer program product carries a program code, and instructions included in the program code may be used to execute the steps of the video processing method in the foregoing method embodiments, which may be referred to specifically in the foregoing method embodiments, and are not described herein again.
The computer program product may be implemented by hardware, software or a combination thereof. In an alternative embodiment, the computer program product is embodied in a computer storage medium, and in another alternative embodiment, the computer program product is embodied in a Software product, such as a Software Development Kit (SDK), or the like.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the system and the apparatus described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. In the several embodiments provided in the present disclosure, it should be understood that the disclosed system, apparatus, and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present disclosure may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such understanding, the technical solution of the present disclosure may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing an electronic device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present disclosure. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
Finally, it should be noted that: the above-mentioned embodiments are merely specific embodiments of the present disclosure, which are used for illustrating the technical solutions of the present disclosure and not for limiting the same, and the scope of the present disclosure is not limited thereto, and although the present disclosure is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive of the technical solutions described in the foregoing embodiments or equivalent technical features thereof within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present disclosure, and should be construed as being included therein. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.
Claims (16)
1. A video processing method is applied to a video parsing server, and comprises the following steps:
acquiring task processing parameters of a video processing task; the task processing parameter is used for indicating a video address identifier of a video stream to be processed and a processing time period of the video stream to be processed;
determining a target storage path of the video stream to be processed in a storage space based on the task processing parameters; the storage space contains historical video streams acquired on a plurality of historical acquisition dates;
and determining the video stream to be processed in the historical video stream stored in the target storage path, and performing video analysis processing on the video stream to be processed.
2. The method of claim 1, wherein the determining a target storage path of the video stream to be processed in a storage space based on the task processing parameter comprises:
determining an endpoint time for the processing period, wherein the endpoint time comprises: a start time and an end time;
respectively generating corresponding sub storage paths for the starting time and the ending time in the endpoint time;
and connecting the sub storage paths through a first connection identifier to obtain a target storage path of the video stream to be processed.
3. The method according to claim 2, wherein the generating corresponding sub-storage paths for the start time and the end time of the endpoint time respectively comprises:
determining the video address identification of the video stream to be processed; and determining a target total directory in the storage space; the target general directory comprises a plurality of storage directories for storing historical video streams;
and connecting the target total directory, the video address identifier and the endpoint time through a second connection identifier to respectively obtain the sub storage paths corresponding to the starting time and the ending time in the endpoint time.
4. The method according to any one of claims 1 to 3, wherein the obtaining task processing parameters of the video processing task comprises:
polling a target task list according to a preset polling interval, wherein the target task list is a list which is issued by a cloud server and contains video processing tasks of each video analysis server;
and searching a video processing task matched with the current video analysis server in the target task list, and determining the task processing parameters based on the determined matched video processing task.
5. The method according to claim 1, wherein the performing video parsing on the video stream to be processed comprises:
and creating a video processing queue of the video stream to be processed, and performing video analysis processing on the video stream to be processed according to the video processing queue.
6. The method of claim 5, wherein the creating the video processing queue for the pending video stream comprises:
determining the acquisition time of each video stream to be processed;
and sequencing the video streams to be processed according to the acquisition time to obtain a target sequencing sequence, and creating the video processing queue based on the target sequencing sequence.
7. The method according to claim 5 or 6, wherein said performing video parsing processing on said video stream to be processed according to said video processing queue comprises:
creating at least one video processing process;
and sequentially scheduling the video streams to be processed in the video processing queue to the at least one video processing process so as to perform video analysis processing on the video streams to be processed through the at least one video processing process.
8. The method of claim 7, further comprising:
determining the number of processing cores in a current video analysis server;
determining a number of the at least one video processing process based on the number of processing cores.
9. The method according to any one of claims 1 to 8, further comprising:
responding to a state acquisition request aiming at the video processing task, and acquiring the task processing progress of the video processing task at the current moment;
and feeding back the task processing progress to the user through the cloud server.
10. The method according to any one of claims 1 to 9, further comprising:
before acquiring task processing parameters of a video processing task, acquiring a real-time video stream, and storing the real-time video stream in a corresponding storage directory, wherein the storage space comprises a plurality of storage directories, and each storage directory is used for storing the real-time video stream acquired in a plurality of continuous acquisition periods corresponding to acquisition dates.
11. A video processing method is applied to a cloud server and comprises the following steps:
detecting a video processing requirement input by a user, and creating a corresponding video processing task based on the video processing requirement;
adding task information of the video processing task in a target task list, wherein the task information is used for indicating task processing parameters of the video processing task;
responding to a polling request of a video analysis server for the target task list, and sending the target task list to the video analysis server so that the video analysis server carries out video analysis processing on historical video streams according to task processing parameters in the target task list.
12. The method of claim 11, further comprising:
detecting a control instruction of a user for the video processing task, wherein the control instruction comprises any one of: a stop instruction, a start instruction, a timing instruction;
and sending the control instruction to a video analysis server corresponding to the video processing task, so that the corresponding video analysis server executes corresponding control operation on the video processing task according to the control instruction.
13. A video processing apparatus, comprising:
the acquisition module is used for acquiring task processing parameters of the video processing task; the task processing parameter is used for indicating a video address identifier of a video stream to be processed and a processing time period of the video stream to be processed;
the first determining module is used for determining a target storage path of the video stream to be processed in the storage space based on the task processing parameters; the storage space contains historical video streams acquired on a plurality of historical acquisition dates;
the second determining module is used for determining the video stream to be processed in the historical video stream stored in the target storage path;
and the analysis module is used for carrying out video analysis processing on the video stream to be processed.
14. A video processing apparatus, comprising:
the detection module is used for detecting a video processing requirement input by a user and creating a corresponding video processing task based on the video processing requirement;
the video processing system comprises an adding module, a processing module and a processing module, wherein the adding module is used for adding task information of the video processing task in a target task list, and the task information is used for indicating task processing parameters of the video processing task;
and the sending module is used for responding to a polling request of a video analysis server for the target task list, and sending the target task list to the video analysis server so that the video analysis server carries out video analysis processing on historical video streams according to task processing parameters in the target task list.
15. An electronic device, comprising: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory communicating over the bus when the electronic device is operating, the machine-readable instructions when executed by the processor performing the steps of the video processing method according to any one of claims 1 to 12.
16. A computer-readable storage medium, having stored thereon a computer program which, when being executed by a processor, carries out the steps of the video processing method according to any one of claims 1 to 12.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111262450.4A CN114007102A (en) | 2021-10-28 | 2021-10-28 | Video processing method, video processing device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111262450.4A CN114007102A (en) | 2021-10-28 | 2021-10-28 | Video processing method, video processing device, electronic equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114007102A true CN114007102A (en) | 2022-02-01 |
Family
ID=79924560
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111262450.4A Pending CN114007102A (en) | 2021-10-28 | 2021-10-28 | Video processing method, video processing device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114007102A (en) |
Citations (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101483761A (en) * | 2008-01-10 | 2009-07-15 | 上海诚丰数码科技有限公司 | Intelligent video monitoring system based on complete IP network |
CN103813141A (en) * | 2014-01-17 | 2014-05-21 | 国电南瑞科技股份有限公司 | Video comprehensive monitoring system and monitoring method based on stream media |
CN107911739A (en) * | 2017-10-25 | 2018-04-13 | 北京川上科技有限公司 | A kind of video acquiring method, device, terminal device and storage medium |
CN108337482A (en) * | 2018-02-08 | 2018-07-27 | 北京信息科技大学 | The storage method and system of monitor video |
CN108377363A (en) * | 2018-02-07 | 2018-08-07 | 特斯联(北京)科技有限公司 | A kind of monitor video acquisition methods based on event triggering |
CN108419058A (en) * | 2018-05-29 | 2018-08-17 | 陕西大航联科电子技术有限公司 | Video monitoring system based on Internet of things |
CN109996022A (en) * | 2017-12-29 | 2019-07-09 | 浙江宇视科技有限公司 | Monitoring storage expansion method and video monitoring system |
CN110213672A (en) * | 2019-07-04 | 2019-09-06 | 腾讯科技(深圳)有限公司 | Video generation, playback method, system, device, storage medium and equipment |
WO2019228148A1 (en) * | 2018-05-31 | 2019-12-05 | 西安中兴新软件有限责任公司 | Image processing method and device, and storage medium |
CN110858879A (en) * | 2018-08-23 | 2020-03-03 | 浙江宇视科技有限公司 | Video stream processing method, device and computer readable storage medium |
CN110933455A (en) * | 2019-12-16 | 2020-03-27 | 云粒智慧科技有限公司 | Video screening method and device, electronic equipment and storage medium |
CN111225170A (en) * | 2018-11-27 | 2020-06-02 | 浙江宇视科技有限公司 | Video complementary recording method and device |
CN111988665A (en) * | 2020-09-04 | 2020-11-24 | 上海世茂物联网科技有限公司 | Video cutting method, device, system, equipment and storage medium |
CN112866808A (en) * | 2020-12-31 | 2021-05-28 | 北京市商汤科技开发有限公司 | Video processing method and device, electronic equipment and storage medium |
CN113286174A (en) * | 2021-05-21 | 2021-08-20 | 浙江商汤科技开发有限公司 | Video frame extraction method and device, electronic equipment and computer readable storage medium |
CN113423018A (en) * | 2021-08-24 | 2021-09-21 | 腾讯科技(深圳)有限公司 | Game data processing method, device and storage medium |
-
2021
- 2021-10-28 CN CN202111262450.4A patent/CN114007102A/en active Pending
Patent Citations (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101483761A (en) * | 2008-01-10 | 2009-07-15 | 上海诚丰数码科技有限公司 | Intelligent video monitoring system based on complete IP network |
CN103813141A (en) * | 2014-01-17 | 2014-05-21 | 国电南瑞科技股份有限公司 | Video comprehensive monitoring system and monitoring method based on stream media |
CN107911739A (en) * | 2017-10-25 | 2018-04-13 | 北京川上科技有限公司 | A kind of video acquiring method, device, terminal device and storage medium |
CN109996022A (en) * | 2017-12-29 | 2019-07-09 | 浙江宇视科技有限公司 | Monitoring storage expansion method and video monitoring system |
CN108377363A (en) * | 2018-02-07 | 2018-08-07 | 特斯联(北京)科技有限公司 | A kind of monitor video acquisition methods based on event triggering |
CN108337482A (en) * | 2018-02-08 | 2018-07-27 | 北京信息科技大学 | The storage method and system of monitor video |
CN108419058A (en) * | 2018-05-29 | 2018-08-17 | 陕西大航联科电子技术有限公司 | Video monitoring system based on Internet of things |
WO2019228148A1 (en) * | 2018-05-31 | 2019-12-05 | 西安中兴新软件有限责任公司 | Image processing method and device, and storage medium |
CN110858879A (en) * | 2018-08-23 | 2020-03-03 | 浙江宇视科技有限公司 | Video stream processing method, device and computer readable storage medium |
CN111225170A (en) * | 2018-11-27 | 2020-06-02 | 浙江宇视科技有限公司 | Video complementary recording method and device |
CN110213672A (en) * | 2019-07-04 | 2019-09-06 | 腾讯科技(深圳)有限公司 | Video generation, playback method, system, device, storage medium and equipment |
CN110933455A (en) * | 2019-12-16 | 2020-03-27 | 云粒智慧科技有限公司 | Video screening method and device, electronic equipment and storage medium |
CN111988665A (en) * | 2020-09-04 | 2020-11-24 | 上海世茂物联网科技有限公司 | Video cutting method, device, system, equipment and storage medium |
CN112866808A (en) * | 2020-12-31 | 2021-05-28 | 北京市商汤科技开发有限公司 | Video processing method and device, electronic equipment and storage medium |
CN113286174A (en) * | 2021-05-21 | 2021-08-20 | 浙江商汤科技开发有限公司 | Video frame extraction method and device, electronic equipment and computer readable storage medium |
CN113423018A (en) * | 2021-08-24 | 2021-09-21 | 腾讯科技(深圳)有限公司 | Game data processing method, device and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11797168B1 (en) | Binning information associated with ranges of time | |
US20100223446A1 (en) | Contextual tracing | |
CN108073625B (en) | System and method for metadata information management | |
US10567557B2 (en) | Automatically adjusting timestamps from remote systems based on time zone differences | |
CN103118051B (en) | A kind of method and apparatus that Information issued process is monitored | |
CN103488793A (en) | User behavior monitoring method based on information retrieval | |
CN108600779B (en) | Target object operation method and device based on video content | |
CN112559475A (en) | Data real-time capturing and transmitting method and system | |
CN108228709A (en) | Date storage method and system, electronic equipment, program and medium | |
CN102893261B (en) | The idle conversion method of sampling and system thereof | |
CN113391901A (en) | RPA robot management method, device, equipment and storage medium | |
CN114223189A (en) | Duration statistical method and device, electronic equipment and computer readable medium | |
CN108228432A (en) | A kind of distributed link tracking, analysis method and server, global scheduler | |
CN112506969A (en) | BMC address query method, system, equipment and readable storage medium | |
CN109033312A (en) | Method and apparatus for obtaining information | |
CN104038654A (en) | Relay Apparatus, Client Apparatus, And Method | |
CN106940710B (en) | Information pushing method and device | |
JP2013120579A (en) | Work result management method, work result management program and management server related to software development | |
JP2016024486A (en) | Data utilization system and control method therefor | |
CN116048946B (en) | Performance detection method, host and storage medium | |
CN114007102A (en) | Video processing method, video processing device, electronic equipment and storage medium | |
CN110909072B (en) | Data table establishment method, device and equipment | |
CN110011845A (en) | Log collection method and system | |
CN111368104A (en) | Information processing method, device and equipment | |
CN111817867A (en) | Method and system for multi-log collaborative analysis in distributed environment |
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 |