Embodiment
In order to make purpose of the present invention, technical scheme and advantage clearer, below in conjunction with drawings and Examples, the present invention is further elaborated.Should be appreciated that specific embodiment described herein only in order to explain the present invention, is not intended to limit the present invention.
Fig. 1 shows the dynamic object recognition methods schematic flow sheet that first embodiment of the invention provides, and comprises step S101, step S102 and step S103, and details are as follows:
Step S101 identifies by a described k computing node a described n video file is carried out object to n video file of computing node distribution of k distributed deployment, and described k and n are natural number, and described k is not more than described n.
Unlike the prior art, video file is not to be processed by an equipment (station server etc.), but is distributed to the computing node of several distributed deployments.Short or can handle in the short time with the ability of computing node the time when the video file duration, can directly n video file be distributed to the computing node of k distributed deployment.If the video file duration is long or can't handle the long video file of these durations in the short time with the ability of computing node the time, then N video file can be partitioned into the individual sub-video file of n, wherein, N and n are natural number, and N is less than n.Concrete dividing method can be, each video file in N the video file is intercepted video flowing by section, and the starting and ending of every section video flowing made mark constantly, so, every section video flowing with starting and ending mark can be considered as the sub-video file in the embodiment of the invention; Each sub-video file is the unique identification name of imparting system also.Video file is divided into the sub-video file can also adopts additive method, the present invention does not limit this.
After N video file being partitioned into n sub-video file, sending n sub-video file to k the computing node of cutting apart gained and identify by a described k computing node described n sub-video file carried out object.
In embodiments of the present invention, computing node is the equipment with computing function, can be general computer, also can be special-purpose data processing equipment, and it comprises a central processing unit at least.K computing node can be independent of the functional module of divided video file and be distributed deployment, this distributed deployment can be implemented according to the framework of cloud system, be that computing node receives the task of distributing, after task is finished, final result or intermediate object program are recycled to the equipment with higher level function, for example, control node etc.
Further, in embodiments of the present invention, sending n sub-video file can be the control node that is independent of k computing node to k computing node.
Step S102 receives n the video file finishing object identification that a described k computing node returns.
After k computing node finished object identification to n video file or sub-video file, can pass through network, for example, n video file or sub-video file that Ethernets etc. will be finished object identification are recycled to the control node, and this control node also is that n video file of transmission or sub-video file are to the control node of k computing node.
Step S103 processes the described result who finishes n video file of object identification.
If n video file is that the computing node that directly is distributed to k distributed deployment carries out object identification, then controlling node can be that a direct upwards node reports result or is kept at local for far call.If N video file is partitioned into n sub-video file, after then controlling node and receiving n sub-video file finishing object identification, it is merged obtains N video file.Owing to be that each video file is made mark constantly by section intercepting video flowing and to the starting and ending of every section video flowing when N video file being divided into n sub-video file, therefore, when merging n sub-video file, can according to start mark and the end mark of every section video flowing, in turn the connection of sub-video file can be obtained original video file.From above-mentioned dynamic object recognition methods as can be known, video file is distributed to the computing node of distributed deployment, by the computing node that is in distributed deployment these video files is carried out object identification and returns several video files of finishing object identification.Because the computing node of distributed deployment is parallel processing when carrying out object identification, therefore, on the one hand, the video data that need to analyze for magnanimity, can dispose abundant computing node processes, the disposal ability of the computing node that these are abundant can far be more than the disposal ability of individual server, on the other hand, owing to be parallel processing, the Distributed Calculation node can be identified fast to dynamic object in the video file, greatly reduce recognition time, improved the effective rate of utilization of video resource.
As an embodiment who N video file is partitioned into n sub-video file, can be the additional information according to video file, N video file is partitioned into the sub-video file that n duration equates fully.Particularly, N video file can be divided into M task according to the additional information of video file, form M task list, this M task be distributed to the individual control node of M ' or be averagely allocated to M control node; The individual control node of described M ' or M control node will distribute the video file that comprises in the task of gained further to be divided into the sub-video file that the individual duration of n ' equates fully separately, wherein, M, n ' and M ' are natural number, and M is less than N, M ' is less than M, and the additional information of video file comprises the information such as the processing priority of each video file in N the video file and handling duration.
Need to prove, in the above-described embodiments, when N video file is divided into M task, each task can comprise the video file of equal amount, also can comprise the video file that does not wait, when M task being distributed to the control node, can be to distribute the mode of at least one task to distribute according to a control node, for example, M task distributed to the individual control node of M ', M ' also can distribute the mode of a task to distribute according to a control node less than M, is about to M task and is averagely allocated to M control node.It is fixed that the quantity of the computing node that the concrete method of salary distribution can connect according to the control node or its disposal ability are come, for example, if the quantity of the computing node that each control node connects equates or its disposal ability is identical, then can distribute the mode of a task to distribute according to a control node, if the quantity of the computing node that each control node connects is unequal and/or its disposal ability is not identical, then can distribute the mode of at least one task to distribute according to a control node, the control node that the quantity of the computing node that namely connects is more and/or its disposal ability is stronger is some tasks of overabsorption suitably.
As another embodiment that N video file is partitioned into n sub-video file, can be the additional information according to described video file, a described N video file is partitioned into the sub-video file that n duration not exclusively equates.Particularly, N video file can be divided into M task according to the additional information of video file, form M task list, this M task be distributed to the individual control node of M ' or be averagely allocated to M control node; The individual control node of described M ' or M control node will distribute the video file that comprises in the task of gained further to be divided into the sub-video file that the individual duration of n ' not exclusively equates separately, wherein, M, n ' and M ' are natural number, and M is less than N, M ' is less than M, the additional information of video file is identical with previous embodiment, namely comprises the information such as the processing priority of each video file in N the video file and handling duration.
Similar with previous embodiment, when N video file is divided into M task, each task can comprise the video file of equal amount, also can comprise the video file that does not wait, when M task being distributed to the control node, can be to distribute the mode of at least one task to distribute according to a control node, also can distribute the mode of a task to distribute according to a control node, be about to M task and be averagely allocated to M control node.Different from previous embodiment is in the present embodiment, when the control node will distribute the video file that comprises in the task of gained further to be divided into the sub-video file separately, needn't require the duration of sub-video file fully equal.This partitioning scheme can use in the not identical situation of the disposal ability of each computing node, and for example, two computing nodes that control node Nc connects are computing node N
1With computing node N
2, at computing node N
1Disposal ability be better than computing node N
2The prerequisite of disposal ability under, video file V is being divided into sub-video file V
1With sub-video file V
2The time, can consider sub-video file V
1Cut apart longerly, with sub-video file V
2Cut apart shortly, so, when receiving at the same time the sub-video file, computing node N
1With computing node N
2Can handle simultaneously the sub-video file.
For the dynamic object recognition methods that illustrates that clearly the embodiment of the invention provides, below provide a specific embodiment.
What suppose to carry out dynamic object identification is to comprise video file and 10 video files of one hour of 20 and a half hours, and total duration of finishing dealing with is 10 minutes.At first, superior node or the functional module of control node, for example, task scheduling modules becomes 10 tasks with 30 Divide Files, and each task is comprised of the video file of 1 one hour video file and 2 and a half hours, and namely each task comprises 3 video files.After task division is complete, these 10 tasks are sent to 10 control nodes, namely (any one control node is designated as NC to a control node
i, i=1,2 ..., 10) and task of distribution.
Control node NC
iAfter receiving task, being that one hour Video segmentation becomes 6 sub-video files of 10 minutes with duration wherein, is that halfhour video file is divided into 3 video subfiles of 10 minutes with duration, namely controls node NC
iIt is 10 minutes video subfile that the task of distributing is divided into 12 durations.Afterwards, control node NC
i6 sub-video files of 10 minutes that one hour video is divided into send to a computing node N of its connection
1Control node NC
i6 sub-video files of 10 minutes that 2 and a half hours videos are divided into send to computing node N
2
Computing node N
1After less than 5 minutes time 6 sub-video files of 10 minutes being finished object identification, transmission information is to control node NC
iControl node NC
i6 sub-video Piece file mergences of 10 minutes finishing object identification are become a complete video file, and concurrent carry information is to task scheduling modules.
Computing node N
2To finish less than 5 minutes time 6 sub-video files of 10 minutes of another group are finished object identification, concurrent carry information is given control node NC
iControl node NC
iThese 6 sub-video Piece file mergences of 10 minutes finishing object identification are become 2 complete video files, and concurrent carry information is to task scheduling modules.
In the invention described above embodiment, N video file is partitioned into before n the sub-video file, can obtain the additional informations such as the processing priority of each video file N video file and the described N video file and handling duration from memory device, the processing priority of video file has shown the priority treatment degree of this video file or the urgency level of processing, priority is higher, the priority treatment degree that shows this video file is higher or more urgent, and handling duration shows then this video file is finished dynamic object identification in need to how long; For the video file with same treatment priority, the sequencing of its processing can sort according to the time length of video record.
Seeing also accompanying drawing 2-a, is the dynamic object recognition system structural representation that first embodiment of the invention provides.For convenience of explanation, only show the part relevant with the embodiment of the invention.The dynamic object recognition system of accompanying drawing 2-a example comprises scheduler module 201, control node 202 and computing node 203, and control node 202 comprises receiver module 2021 and result treatment module 2022, wherein:
Scheduler module 201 and control node 202 are used for identifying by a described k computing node a described n video file is carried out object to n video file of described computing node distribution of k distributed deployment, and described k and n are natural number, and described k is not more than described n.
Receiver module 2021 is used for receiving n the video file finishing object identification that a described k computing node returns.
K computing node 203 is used for a described n video file is carried out object identification and return to receiver module 2021 finishing n the video file that object is identified.
Result treatment module 2022 is used for the described result who finishes n video file of object identification is processed.
In the dynamic object recognition system of accompanying drawing 2-a example, scheduler module 201 and control node 202 can be the functional modules on Same Physical equipment, also can be separate functional module physically, wherein, the distribution that scheduler module 201 is responsible for finishing the work, scheduling and distribution; Control node 202 cooperates with scheduler module 201, the result that video file is sent to computing node 203 and collects computing node 203; Computing node 203 is the equipment with computing function that is independent of control node 202, it can be general computer, it also can be special-purpose data processing equipment, it comprises a central processing unit at least, k computing node 203 passes through network, for example Ethernet is connected and is distributed deployment with control node 202, this distributed deployment can be implemented according to the framework of cloud system, be that computing node 203 receives the task of distributing, after task is finished, final result or intermediate object program are recycled to equipment or the functional module with higher level function, for example, control node 202.Accompanying drawing 2-b has provided a kind of of dynamic object recognition system that the embodiment of the invention provides may framework.
In one embodiment of the invention, short or can handle in the short time with the ability of computing node the time, scheduler module 201 and control node 202 can directly be distributed to n video file the computing node of k distributed deployment when the video file duration.
In another embodiment, if the video file duration is long or can't handle the long video file of these durations in the short time with the ability of computing node the time, then scheduler module 201 and control node 202 can be partitioned into N video file n sub-video file, send described n sub-video file to k computing node 203, wherein, N and n are natural number, and N is less than n.Concrete dividing method can be, each video file in N the video file is intercepted video flowing by section, and the starting and ending of every section video flowing made mark constantly, so, every section video flowing with starting and ending mark can be considered as the sub-video file in the embodiment of the invention; Each sub-video file is the unique identification name of imparting system also.Video file is divided into the sub-video file can also adopts additive method, the present invention does not limit this.
N video file is partitioned among the embodiment of n sub-video file in scheduler module 201 and control node 202, the result treatment module 2022 of accompanying drawing 2-a example can comprise merge cells 20221, shown in accompanying drawing 2-c, the dynamic object recognition system that another embodiment of the present invention provides.
203 pairs of n video files of k computing node can pass through network after finishing object identification, and for example, n the video file that Ethernet etc. will be finished object identification is recycled to control node 202.
After control node 202 is received n video file finishing object identification, carry out object identification if n video file is the computing node that module 201 and control node 202 be distributed to k distributed deployment that directly is scheduled, then control node 202 node that can directly make progress and report result or be kept at this locality and supply far call.Be partitioned into n sub-video file if N video file is be scheduled module 201 and control node 202, then merge cells 20221 n sub-video file will finishing object identification merges and obtains N video file.Owing to be that each video file is made mark constantly by section intercepting video flowing and to the starting and ending of every section video flowing when N video file being divided into n sub-video file, therefore, merge cells 20221 is when merging n sub-video file, can according to start mark and the end mark of every section video flowing, in turn the connection of sub-video file can be obtained original video file.
The scheduler module 201 of accompanying drawing 2-a example and the control node 202 concrete additional informations that are used for according to video file, a described N video file is partitioned into the sub-video file that n duration equates, the additional information of described video file comprises processing priority and the handling duration of each video file in the described N video file.In the present embodiment, scheduler module 201 comprises classification of task unit 301, and control node 202 comprises the first cutting unit 302, shown in accompanying drawing 3-a, and the dynamic object recognition system that another embodiment of the present invention provides, wherein:
Classification of task unit 301, be used for a described N video file is divided into to distribute to the individual control node 202 of M ' or be averagely allocated to M after M the task according to the additional information of described video file controlling node 202, described M and M ' are natural number, and M is less than N, and M ' is less than M;
The first cutting unit 302 is used for the video file that described control node 202 distributes the task of gained to comprise further is divided into the sub-video file that the individual duration of n ' equates fully, and described n ' is natural number.
Need to prove, in the dynamic object recognition system of accompanying drawing 3-a example, when classification of task unit 301 is divided into M task with N video file, each task can comprise the video file of equal amount, also can comprise the video file that does not wait, when the first cutting unit 302 is distributed to the control node with M task, can be to distribute the mode of at least one task to distribute according to a control node, for example, M task distributed to the individual control node of M ', M ' is less than M; Also can distribute the mode of a task to distribute according to a control node, be about to M task and be averagely allocated to M control node.It is fixed that the quantity of the computing node 203 that the concrete method of salary distribution can connect according to control node 202 or its disposal ability are come, for example, if the quantity of the computing node 203 that each control node 202 connects equates or its disposal ability is identical, then can distribute the mode of a task to distribute according to a control node 202, if the quantity of the computing node 203 that each control node 202 connects is unequal and/or its disposal ability is not identical, then can be to distribute the mode of at least one task to distribute according to a control node 202, the control node 202 that quantity is more and/or its disposal ability is stronger of the computing node 203 that namely connects is some tasks of overabsorption suitably.
The scheduler module 201 of accompanying drawing 2-a example and the control node 202 concrete additional informations that are used for according to video file, a described N video file is partitioned into the sub-video file that n duration do not wait, and the additional information of described video file comprises processing priority and the handling duration of each video file in the described N video file.In the present embodiment, scheduler module 201 comprises classification of task unit 301, and control node 202 comprises the second cutting unit 303, shown in accompanying drawing 3-b, and the dynamic object recognition system that another embodiment of the present invention provides, wherein:
Classification of task unit 301, be used for a described N video file is divided into to distribute to the individual control node 202 of M ' or be averagely allocated to M after M the task according to the additional information of described video file controlling node 202, described M and M ' are natural number, and M is less than N, and M ' is less than M;
The second cutting unit 303, the video file that comprises for the task of will control node 202 distribution gained further is divided into the sub-video file that the individual duration of n ' not exclusively equates, and described n ' is natural number.
Accompanying drawing 2-a can also comprise acquisition module 401 to the dynamic object recognition system shown in any embodiment of accompanying drawing 3-b, the dynamic object recognition system that provides to another embodiment of the present invention shown in the accompanying drawing 4-d such as accompanying drawing 4-a.Acquisition module 401 is used for obtaining from memory device processing priority and the handling duration of a described N video file and described N each video file of video file.
One of ordinary skill in the art will appreciate that all or part of step in the whole bag of tricks of above-described embodiment is to come the relevant hardware of instruction finish by program, this program can be stored in the computer-readable recording medium, storage medium can comprise: read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), disk or CD etc.
The above only is preferred embodiment of the present invention, not in order to limiting the present invention, all any modifications of doing within the spirit and principles in the present invention, is equal to and replaces and improvement etc., all should be included within protection scope of the present invention.