A kind of methods, devices and systems realizing various video monitoring device compatibility
Technical field
The invention belongs to field of video monitoring, particularly relate to a kind of side realizing various video monitoring device compatibility
Method, device and system.
Background technology
Video monitoring system is the integrated system that a kind of prevention ability is stronger, is also the important of safety and protection system
Ingredient.Video monitoring system is directly perceived with it, accurate, abundant with information content in time and is widely used in
Many occasions.In recent years, along with the domestic demand to video monitoring is continuously increased, video equipment production firm
The most constantly increase, but, owing to the security protection industry development time is shorter, not yet form perfect industry standard.
Each video equipment production firm has formulated respective company standard according to the development of respective enterprise, and by
This defines different SDK (Software Development Kit, SDK).So-called
SDK, is by the offer of video equipment production firm, realizes the interface with device talk and realize equipment video flowing
The interface of encoding and decoding.The SDK provided due to video equipment production firm is different, and the most same video sets
Standby production firm there is also the biggest difference at its SDK of series of products of the exploitation of different times, and this video sets
The equipment that phenomenon is video monitoring system that the SDK that standby production firm provides " does things in his own way " accesses and brings
Huge challenge.Such as, user has purchased the video equipment of different brands at different times, therefore, how
Use the video equipment that the video equipment production firm of identical video monitoring system compatibility difference SDK provides
Become one of industry problem needing solution badly.
For the problems referred to above, video equipment production firm is provided by a kind of method that prior art provides
SDK carries out secondary encapsulation, forms the plug-in unit that interface is unified.Video monitoring system client with video monitoring
When the headend equipment of system is mutual, its host process realizes these video equipments by the way of calling plug-in unit
Compatibility.
Substantially suitable with dynamic link library file due to plug-in unit, therefore, the method that above-mentioned prior art provides
Defect is: along with the increase of video equipment kind, and the load time is continuously increased, and due to different video
The stability of the SDK that equipment production firm provides is inconsistent, when gross error occurs in certain SDK, easily
The program causing whole video monitoring system client is unstable.
Summary of the invention
It is an object of the invention to provide a kind of methods, devices and systems realizing various video hardware compatibility,
Aim to solve the problem that the SDK that prior art provides because of video equipment production firm makes mistakes to video monitoring system client
The problem that end program causes instability.
The present invention is achieved in that a kind of method realizing various video monitoring device compatibility, described method
Including:
Receive the operational order that user sends;
According to the device type that described operational order is corresponding, by the unified interface of host process to video monitoring
The subprocess that equipment is corresponding sends described operational order, and described subprocess possesses corresponding with described unified interface
Interface;
If described subprocess does not has normal response to described operational order, then described subprocess is restarted with
Just continue to send described operational order to described subprocess.
Another object of the present invention is to provide a kind of device realizing various video monitoring device compatibility, described
Device includes that host process module, described host process module include receiving submodule, sending submodule and control son
Module;
Described reception submodule, for receiving the operational order that user sends;
Described transmission submodule, for the device type corresponding according to described operational order, by host process
Unified interface sends described operational order to the subprocess corresponding with video monitoring equipment, and described subprocess possesses
The interface corresponding with described unified interface;
Described control submodule, if described operational order not being had normal response for described subprocess, the most right
Described subprocess carries out restarting to continue to send described operational order to described subprocess.
Another object of the present invention is to provide a kind of system realizing various video monitoring device compatibility, described
System includes that video front-end equipment and control equipment, described control equipment include host process module and subprocess mould
Block;
Described video front-end equipment, for processing video data and result return described son
Journey module;
Described host process module, for receiving the operational order that user sends, corresponding according to described operational order
Device type, send described to the subprocess corresponding with video monitoring equipment by the unified interface of host process
Operational order, if described subprocess does not has normal response to described operational order, is then carried out described subprocess
Restarting to continue to send described operational order to described subprocess, described subprocess possesses and connects with described unification
The interface that mouth is corresponding;
Described subprocess module, enters to the son corresponding with video monitoring equipment for receiving described host process module
The operational order that journey sends, communicates to obtain described video front-end equipment pair with described video front-end equipment
Video data carries out the result processed.
Knowable to the invention described above embodiment, on the one hand, subprocess to by the unified interface of host process to
When the operational order that these subprocess send does not has normal response, subprocess can be restarted to continue to enter to son
Journey sends operational order, therefore, with prior art, the SDK that video equipment production firm provides is carried out secondary
The plug-in unit that encapsulation forms interface unified is compared, and the method that the embodiment of the present invention provides is in video equipment production firm
When the SDK provided occurs abnormal, the properly functioning of client host process can't be affected, it is ensured that video is supervised
The stability of Ore-controlling Role;On the other hand, possess and host process due to the subprocess that each video equipment is corresponding
The interface that unified interface is corresponding, therefore, during newly-increased video equipment, it is only necessary to increase corresponding son according to SDK
Process, it is not necessary to amendment host process, thus ensure that the independence and good extension that video monitoring system is stronger
Property.
Accompanying drawing explanation
Fig. 1 is the method flow signal realizing various video hardware compatibility that first embodiment of the invention provides
Figure;
Fig. 2 is the apparatus structure signal realizing various video hardware compatibility that first embodiment of the invention provides
Figure;
Fig. 3 is the apparatus structure signal realizing various video hardware compatibility that another embodiment of the present invention provides
Figure;
Fig. 4 is the apparatus structure signal realizing various video hardware compatibility that another embodiment of the present invention provides
Figure;
Fig. 5 is the apparatus structure signal realizing various video hardware compatibility that another embodiment of the present invention provides
Figure;
Fig. 6-a is the apparatus structure signal realizing various video hardware compatibility that another embodiment of the present invention provides
Figure;
Fig. 6-b is the apparatus structure signal realizing various video hardware compatibility that another embodiment of the present invention provides
Figure;
Fig. 6-c is the apparatus structure signal realizing various video hardware compatibility that another embodiment of the present invention provides
Figure;
Fig. 6-d is the apparatus structure signal realizing various video hardware compatibility that another embodiment of the present invention provides
Figure;
Fig. 6-e is the apparatus structure signal realizing various video hardware compatibility that another embodiment of the present invention provides
Figure;
Fig. 6-f is the apparatus structure signal realizing various video hardware compatibility that another embodiment of the present invention provides
Figure;
Fig. 6-g is the apparatus structure signal realizing various video hardware compatibility that another embodiment of the present invention provides
Figure;
Fig. 6-h is the apparatus structure signal realizing various video hardware compatibility that another embodiment of the present invention provides
Figure;
Fig. 7-a is the system structure signal realizing various video hardware compatibility that first embodiment of the invention provides
Figure;
Fig. 7-b is the system architecture signal realizing various video hardware compatibility that another embodiment of the present invention provides
Figure.
Detailed description of the invention
In order to make the purpose of the present invention, technical scheme and advantage clearer, below in conjunction with accompanying drawing and reality
Execute example, the present invention is further elaborated.Only should be appreciated that specific embodiment described herein
Only in order to explain the present invention, it is not intended to limit the present invention.
Fig. 1 shows that the method flow realizing various video hardware compatibility that first embodiment of the invention provides shows
Being intended to, including step S101, step S102 and step S103, details are as follows:
Step S101, receives the operational order that user sends.
In embodiments of the present invention, host process provides man-machine interface, receives the behaviour that user is sent by this interface
Instructing, this operational order realizes certain operation carrying out video equipment.Such as, user needs certain
Video equipment carries out parameter setting, then host process receives the parameter setting instruction that user sends;And for example, user
Want to receive the warning message of certain video equipment, then host process receives the audiomonitor instruction that user sends.
Step S102, according to the device type that this operational order is corresponding, by the unified interface of host process to
The subprocess that video equipment is corresponding sends operational order, and this subprocess possesses the interface corresponding with this unified interface.
From prior art, the SDK that video equipment production firm provides is carried out secondary encapsulation different, in the present invention
In embodiment, host process has a unified interface.The SDK provided for each video equipment production firm,
Developing corresponding subprocess, these subprocess all possess the interface corresponding with the unified interface of host process, with
Just, when host process is simultaneously with multiple subprocess communication, subprocess is called by host process by this interface.By
Corresponding by a sub-management of process in a video equipment, and host process has a unified interface, therefore,
The method provided according to the embodiment of the present invention, when newly-increased video equipment, it is only necessary to increase corresponding according to SDK
Subprocess, it is not necessary to amendment host process, so, it is ensured that the independence of video monitoring system and autgmentability.
Owing to subprocess may not be in starting state in the moment, in order to avoid the transmission of invalid operation instruction, at this
In inventive embodiments, send operation by the unified interface of host process to the subprocess corresponding with video equipment and refer to
Before order, can determine whether whether this subprocess starts, before this, in addition it is also necessary to judge that subprocess has
Do not register to host process, without registration, then promoter process.If subprocess has been started up, the most directly
Connect and send operational order to this subprocess, if subprocess does not start, then after starting this subprocess, then to this
Subprocess sends operational order.After starting due to subprocess, can register to host process and send heartbeat message because of.
Therefore, in embodiments of the present invention, if after host process a period of time does not receives normal heartbeat information, then judging
This subprocess does not the most start or dies, thus should perform to restart the operation of subprocess.
Step S103, if this subprocess does not has normal response to operational order, then restarts this subprocess
To continue to send operational order to this subprocess.
The SDK poor compatibility, error-prone provided due to video equipment production firm, to subprocess in the short time
Frequently call, substantial amounts of concurrent operations and video equipment run for a long time, subprocess may not be to transmission
Operational order can carry out normal response.In embodiments of the present invention, by the unified interface of host process to
After the subprocess corresponding with video equipment sends operational order, can determine whether that operation is referred to by subprocess
Making whether normal response, concrete grammar is: if subprocess is Normal Feedback information to operational order return,
Such as, confirm (ACKnowledge, ACK) information etc., then judge that subprocess is normal to this operational order
Response, if subprocess return be non-acknowledgement (Non-ACKnowledge, NACK) information or do not return
Returning any information, then judge that this subprocess does not has normal response to this operational order, this subprocess is in exception
State.
If subprocess to send instruction there is no normal response, then this subprocess is restarted, in order to continue to
This subprocess sends operational order.With prior art, SDK is carried out secondary encapsulation and form the plug-in unit that interface is unified
Difference, in embodiments of the present invention, the subprocess developed according to SDK is executable program, therefore,
Even if subprocess to send instruction can not normal response, the prompting restarting subprocess can be given, will not be to visitor
The host process that family end runs causes the unstable collapse even causing whole system.
Owing to video monitoring system is different from common application software, but in the higher system of requirement of real-time,
User requires can view real time imaging as early as possible or receive warning message etc., therefore, if repeatedly (secondary
Number can according to user need be set) this subprocess is restarted after, this subprocess still can not be right
Operational order carries out normal response, then to running host process and the computer of subprocess or computer system is carried out
Restart.
It should be noted that after host process starts, can manage by the subprocess communicated therewith
Reason, is managed including to the life cycle of subprocess, the most when should promoter process, and timing
The state of detection subprocess, in order to close subprocess when program end of run, etc..
Knowable to the above-mentioned method realizing various video hardware compatibility, on the one hand, enter by master at subprocess
The unified interface of journey, when the operational order that these subprocess send does not has normal response, can restart subprocess
To continue to send operational order to subprocess, therefore, with prior art, video equipment production firm is provided
SDK carry out secondary encapsulation and form the unified plug-in unit of interface and compare, the method that the embodiment of the present invention provides is regarding
Frequently, when the SDK that equipment production firm provides occurs abnormal, the normal fortune of client host process can't be affected
OK, it is ensured that the stability of video monitoring system;On the other hand, enter due to the son that each video equipment is corresponding
Journey possesses the interface corresponding with the unified interface of host process, therefore, during newly-increased video equipment, it is only necessary to according to
SDK increases corresponding subprocess, it is not necessary to amendment host process, thus ensure that stronger only of video monitoring system
Vertical property and good autgmentability.
In order to clearly demonstrate the method realizing various video monitoring device compatibility that the embodiment of the present invention provides,
Two specific embodiments given below.
Embodiment one:
S1, user sends parameter setting instruction to set certain video by the interface that client host process provides
For carrying out parameter setting, host process receives this parameter setting instruction;
S2, host process detects whether subprocess corresponding to this video equipment has been turned on, if not actuated, starting should
Subprocess;
S3, if the subprocess of correspondence has been turned on, host process then sends parameter setting instruction to this subprocess;
After S3, subprocess may not this parameter setting instruction of normal response, its possible reason includes:
The SDK poor compatibility, error-prone that video equipment production firm provides, frequent tune to subprocess in the short time
Run for a long time with, substantial amounts of concurrent operations and video equipment, etc..
S4, if subprocess can not normal response parameter setting instruction, then host process restarts this subprocess, and again
Secondary transmission parameter setting instruction;
S5, if subprocess correctly arranges parameter after accepting parameter setting instruction, and returns normal, then completes behaviour
Make.
Embodiment two:
S ' 1, user sends audiomonitor by the interface that client host process provides and instructs to receive certain video
The warning message of equipment, host process receives the instruction of this audiomonitor;
S ' 2, host process detects whether subprocess corresponding to this video equipment has been turned on, if not actuated, starting should
Subprocess;
S ' 3, if the subprocess of correspondence has been turned on, host process then sends audiomonitor instruction to this subprocess;
S ' 4, after subprocess receives audiomonitor instruction, the information that AM automatic monitoring equipment reports, see if there is report
Alarming information reports, and sends normal information to host process;
S ' 5, if a period of time fails to be normally received the information reported, subprocess sends abnormal information to host process;
S ' 6, host process receives abnormal information, restarts this subprocess;
S ' 7, host process continuous several times (number of times can in the light of actual conditions be arranged) is still received after restarting subprocess
To abnormal information, then restart computer.
Computer refers to run host process and the computer system of subprocess, due to the spy of video monitoring system herein
Different property, is not common application software, and the requirement for real-time is higher, if simply sending error reporting,
Finally cannot accept warning message, bigger loss may be brought to user, so preferably with restarting calculating
The mode of machine, answering system runs as early as possible.
Refer to accompanying drawing 2, be the device realizing various video hardware compatibility of first embodiment of the invention offer
Structural representation.For convenience of description, illustrate only the part relevant to the embodiment of the present invention.Accompanying drawing 2
The device realizing various video hardware compatibility of example includes that host process module 21, host process module 21 include
Receive submodule 211, send submodule 212 and control submodule 213, wherein:
Receive submodule 211, for receiving the operational order that user sends;
Send submodule 212, for the device type corresponding according to this operational order, by the system of host process
One interface sends this operational order to the subprocess corresponding with video equipment, and subprocess possesses and this unified interface
Corresponding interface;
Controlling submodule 213, if this operational order not being had normal response for subprocess, then this son being entered
Cheng Jinhang is restarted to continue to send operational order to this subprocess.
It should be noted that in the embodiment of the device of implementation above various video hardware compatibility, each function
The division of module is merely illustrative of, can as required in actual application, and the configuration of such as corresponding hardware is wanted
Ask or the convenient of realization of software considers, and above-mentioned functions distribution is completed by different functional modules, i.e.
The internal structure realizing the device of various video hardware compatibility is divided into different functional modules, with complete with
The all or part of function of upper description.And, in actual application, the corresponding function mould in the present embodiment
Block can be to be realized by corresponding hardware, it is also possible to is performed corresponding software by corresponding hardware and completes, such as,
Aforesaid reception submodule, can be the hardware having and performing the operational order that the aforementioned user of reception sends, example
Such as receptor, it is also possible to be to be able to carry out corresponding computer program thus complete the general processor of aforementioned function
Or other hardware devices;The most aforesaid transmission submodule, can be to have execution aforementioned to refer to according to operation
The device type that order is corresponding, being sent to the subprocess corresponding with video equipment by the unified interface of host process should
The hardware of operational order function, such as transmitter, it is also possible to be to be able to carry out corresponding computer program thus complete
(each embodiment that this specification provides all may be used to become the general processor of aforementioned function or other hardware devices
Application foregoing description principle).
The host process module 21 of accompanying drawing 2 example farther includes the first judgement submodule 301, such as accompanying drawing 3 institute
Show, the device realizing various video hardware compatibility that another embodiment of the present invention provides.First judges submodule
301 are used for judging that subprocess is to operational order whether normal response.
The first of accompanying drawing 3 example judges that submodule 301 includes the first judging unit 401, as shown in Figure 4,
The device realizing various video hardware compatibility that another embodiment of the present invention provides.First judging unit 401 is used
If operational order being returned Normal Feedback information, such as, ACK information in subprocess, then judge this subprocess
To this operational order normal response.
The host process module 21 of accompanying drawing 2 example can also farther include the second judgement submodule 501 and start
Submodule 502, as shown in Figure 5, what another embodiment of the present invention provided realizes various video hardware compatibility
Device, wherein:
Second judges submodule 501, is used for judging whether subprocess starts;
Promoter module 502, if not starting for subprocess, then starts this subprocess.
The host process module 21 of accompanying drawing 2 to accompanying drawing 5 any example can also farther include to manage submodule
601, as accompanying drawing 6-a is to shown in accompanying drawing 6-d, and what another embodiment of the present invention provided realizes various video equipment
Compatible device.Subprocess, after starting in host process, is managed by management submodule 601, including
The life cycle of subprocess is managed, the most when should promoter process, and timing detection enters
The state of journey, in order to close subprocess when program end of run, etc..
The device of accompanying drawing 2 to accompanying drawing 5 any example can also farther include subprocess module 602, as attached
Fig. 6-e to shown in accompanying drawing 6-h, the dress realizing various video hardware compatibility that another embodiment of the present invention provides
Putting, subprocess module 602 sends, for receiving, the behaviour that submodule sends to the subprocess corresponding with video equipment
Instruct, and the data obtained from front end video equipment are sent to host process module 21 etc..
Refer to accompanying drawing 7-a, be the system realizing various video hardware compatibility of first embodiment of the invention offer
Structural representation.For convenience of description, illustrate only the part relevant to the embodiment of the present invention.Accompanying drawing 7-a
The system realizing various video hardware compatibility of example includes video front-end equipment 71 and control equipment 72, control
Control equipment 72 includes host process module 721 and subprocess module 722, wherein:
Video front-end equipment 71, for processing video data and result returning subprocess mould
Block;
Host process module 721, for receiving the operational order that user sends, corresponding according to this operational order
Device type, sends this operational order by the unified interface of host process to the subprocess corresponding with video equipment,
If subprocess does not has normal response to this operational order, then subprocess is restarted to continue to subprocess
Sending this operational order, subprocess possesses the interface corresponding with unified interface;
Subprocess module 722, sends out to the subprocess corresponding with video equipment for receiving host process module 721
The operational order sent, communicates to obtain video front-end equipment 71 to video counts with video front-end equipment 71
According to carrying out the result that processes and feeding back to host process module 721 etc..
Accompanying drawing 7-b shows the connection signal of the system realizing various video hardware compatibility of accompanying drawing 7-a example
Scheming, control equipment 72 and various video headend equipment 71 are connected by network, and host process module 721 is passed through
Unified interface is mutual with subprocess module 722.
One of ordinary skill in the art will appreciate that all or part of step in the various methods of above-described embodiment
The program that can be by completes to instruct relevant hardware, and this program can be stored in a computer-readable and deposit
In storage media, storage medium may include that read only memory (ROM, Read Only Memory), with
Machine access memorizer (RAM, Random Access Memory), disk or CD etc.
The foregoing is only presently preferred embodiments of the present invention, not in order to limit the present invention, all at this
Any amendment, equivalent and the improvement etc. made within bright spirit and principle, should be included in the present invention
Protection domain within.