CN104639917B - A kind of video monitoring system and its control method - Google Patents

A kind of video monitoring system and its control method Download PDF

Info

Publication number
CN104639917B
CN104639917B CN201510097950.5A CN201510097950A CN104639917B CN 104639917 B CN104639917 B CN 104639917B CN 201510097950 A CN201510097950 A CN 201510097950A CN 104639917 B CN104639917 B CN 104639917B
Authority
CN
China
Prior art keywords
ball machine
gunlock
head
control
serial ports
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.)
Active
Application number
CN201510097950.5A
Other languages
Chinese (zh)
Other versions
CN104639917A (en
Inventor
尚金龙
白文翔
邹文艺
奚荣勇
晋兆龙
陈卫东
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Keda Technology Co Ltd
Original Assignee
Suzhou Keda Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Keda Technology Co Ltd filed Critical Suzhou Keda Technology Co Ltd
Priority to CN201510097950.5A priority Critical patent/CN104639917B/en
Publication of CN104639917A publication Critical patent/CN104639917A/en
Application granted granted Critical
Publication of CN104639917B publication Critical patent/CN104639917B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Closed-Circuit Television Systems (AREA)

Abstract

A kind of video monitoring system and its control method, the monitoring system include:At least two ball machines;One gunlock, for controlling ball machine, gunlock is connected and is connected by serial ports with wherein at least one ball machine respectively by network interface with ball machine;Monitor client, monitoring system control software is installed, be connected respectively with gunlock, ball machine by network.The control method includes:Monitor client controls whether to allow in the presence of the connected mode of delay, ball machine and gunlock to configure the control mode of ball machine according to gunlock to ball machine;When network is normal and control of the gunlock to ball machine allows to exist delay, gunlock controls ball machine by network interface;When the control of Network Abnormal or suspension or gunlock to ball machine does not allow to exist delay, for the ball machine being connected by serial ports with gunlock, gunlock is controlled it by serial ports.Solve to control by network interface and delay be present, the technical problem that ball machine carry quantity limits by serial ports control be present, merged the advantages of serial ports control controls with network interface.

Description

A kind of video monitoring system and its control method
Technical field
The present invention relates to technical field of video monitoring.Specifically, it is related to a kind of video monitoring system and its control method.
Background technology
Single gunlock controls more ball machines, in video monitoring, by high definition gun type camera (abbreviation gunlock) run intelligence with Track algorithm, target following control is carried out to high-speed intelligent ball video camera (abbreviation ball machine), and main control item includes ball machine Movement and head.Core section controls camera lens, ball machine tracking is realized that optimum target characteristic gathers;Cradle head part control ball Machine stepper motor, the switching ball machine visual field.
The multiple target synchronized tracking that single more ball machine monitoring systems of gunlock can apply under large scene, there is tracking target More, the characteristics of area coverage is wide, multiple ball machines can be by running specific intelligent algorithm, performance objective signature analysis, high definition Face snap, recognition of face etc. customize affairs, play the advantages of more ball machines cooperate.
Single gunlock can control multiple ball machines using network interface, and gunlock all passes through Socket message to the control command of ball machine Communicated, gunlock and ball machine physically without being directly connected to, can the ball machine of carry quantity bottleneck (up to tens thousand of) is not present, expand Malleability is good, and equipment sets up easy., can be mutually from several meters or farther and the physical distance controllability of gunlock and ball machine is good.But It is that the control under network interface, can slightly be delayed, typically within 5 milliseconds, and depends on network environment, it is different if there is network Often, gunlock is will appear to the out of control of ball machine, can not be completed normal tracing control, be caused the consequences such as target loss.
The content of the invention
Therefore, when the technical problems to be solved by the invention are that single gunlock controls multiple ball machines only by network interface, one The even suspension of denier Network Abnormal, gunlock will be unable to control ball machine to complete normal tracing control, and have one by network control Fixed delay.The video monitoring system and use of multiple ball machines are controlled so as to propose a kind of single gunlock by serial ports and network interface mixing In the control method of the video monitoring system.
In order to solve the above technical problems, the invention provides following technical scheme:
A kind of video monitoring system, including:
At least two ball machines, gathered for target following and target data;
One gunlock, for controlling ball machine, gunlock is connected and by serial ports and wherein at least respectively by network interface with ball machine One ball machine connection;
Monitor client, monitoring system control software is installed, be connected respectively with gunlock, ball machine by network.
Preferably, in addition to:
Networking data transfer equipment, for making monitor client be communicated respectively with gunlock, ball machine by network, and cause rifle Machine is communicated by network and ball machine.
Preferably:
Gunlock includes gunlock serial ports;
Ball machine includes ball machine control unit, ball machine serial ports, movement, movement control unit, movement control serial ports, head, cloud Platform control unit, cradle head control serial ports and memory cell, ball machine control unit obtain gunlock by ball machine serial ports and pass through gunlock string The instruction that mouth is sent, movement control unit are controlled movement accordingly according to movement control command, and movement control unit can Serial ports or ball machine control unit is controlled to obtain movement control command by movement, cradle head control unit is according to cradle head control order Head is controlled accordingly, cradle head control unit can obtain cradle head control by cradle head control serial ports or ball machine control unit Order, gunlock serial ports can control serial ports to connect with ball machine serial ports and/or cradle head control serial ports and/or movement respectively by serial bus Connect.
A kind of control method of video monitoring system, comprises the following steps:
Monitor client according to gunlock to ball machine control whether to allow exist delay, ball machine and gunlock connected mode come Configure the control mode of ball machine;
When network is normal and control of the gunlock to ball machine allows to exist delay, gunlock controls ball machine by network interface;
When the control of Network Abnormal or suspension or gunlock to ball machine does not allow to exist delay, for passing through serial ports and rifle The ball machine of machine connection, gunlock are controlled it by serial ports.
Preferably, when gunlock controls ball machine by network interface, including the control process to movement, specifically include following step Suddenly:
Gunlock generates movement control command according to track algorithm, and is sent to corresponding ball machine by network interface;
Ball machine corresponding to movement control command receives movement control command;
Ball machine corresponding to movement control command completes the control to the ball machine movement according to movement control command.
Preferably, when gunlock controls ball machine by network interface, including the control process to head, specifically include following step Suddenly:
Gunlock generates cradle head control order according to track algorithm, and corresponding to by network interface, cradle head control order is sent to Ball machine;
Ball machine corresponding to cradle head control order receives cradle head control order;
Ball machine corresponding to cradle head control order completes the control to the ball machine head according to cradle head control order.
Preferably, when gunlock controls ball machine by network interface, including head escalation process, specifically include following steps:
Ball machine to be upgraded receives the head upgrade file that monitor client is sent;
Ball machine to be upgraded suspends its all serial ports affairs, if ball machine to be upgraded is also connected by serial ports with gunlock, then Also need to suspend gunlock, all serial ports affairs of other ball machines being connected with gunlock by serial ports;
Ball machine to be upgraded completes head upgrading.
Preferably, when gunlock controls ball machine by serial ports, including the control process to movement, specifically include following step Suddenly:
Gunlock generates movement control command according to track algorithm, and is sent to corresponding ball machine by serial ports;
Ball machine corresponding to movement control command receives movement control command;
Ball machine corresponding to movement control command completes the control to the ball machine movement according to movement control command.
Preferably, when gunlock controls ball machine by serial ports, including the process of head address is set, specifically includes following step Suddenly:
Monitor client sets one according to the MAC Address of ball machine come corresponding each ball machine head in video monitoring system Individual head address, head address are used for the head for distinguishing each ball machine.
Preferably, corresponded in monitor client according to the MAC Address of ball machine to each ball machine in video monitoring system Before head sets the step of head address, in addition to:
The cradle head control unit of ball machine correspondingly writes the MAC Address of ball machine the memory cell of the ball machine, in memory cell Data do not lose after a power failure.
Preferably, when gunlock controls ball machine by serial ports, including the process to cradle head control, specifically include following step Suddenly:
Gunlock sends cradle head control order to head by serial ports, and its ball machine to be controlled is included in cradle head control order Head address;
To the head address included in cradle head control order corresponding to ball machine head it is corresponding according to cradle head control order completion Control.
Preferably, when gunlock controls ball machine by serial ports, including head escalation process, comprise the following steps that:
Ball machine to be upgraded receives the head upgrade file that monitor client is sent;
Ball machine to be upgraded suspends its all serial ports affairs;
Ball machine to be upgraded starts message to serial bus broadcast head upgrading;
Gunlock and other do not upgrade ball machines of head and received by serial ports after head upgrading starts message, pause at its All affairs on serial bus;
Head upgrade file is sent to the head of the ball machine by the ball machine control unit of ball machine to be upgraded;
The head of ball machine to be upgraded receives head upgrade file and completes head upgrading;
The ball machine for having completed upgrading upgrades completion message to serial bus broadcast head;
Gunlock and other ball machines for not upgrading head being connected by serial ports with gunlock receive head by serial ports and upgraded After completion message, recover all affairs on serial bus.
The above-mentioned technical proposal of the present invention has advantages below compared with prior art:
In video monitoring system and its control method provided by the invention, gunlock can control all ball machines by network interface, A portion ball machine can also be controlled by serial ports.When gunlock controls ball machine by serial ports, the communication between gunlock and ball machine Network environment is completely independent of, has stronger tolerance to the Network Abnormal of burst, it is special to capture target for especially operation tracking The ball machine of algorithm is levied, target following can be still carried out in suspension, target high definition feature snapshot is carried out and capture, and combine ball Machine SD card stores, and keeps in and captures picture, after network recovery, picture is uploaded into picture servers.In addition, controlled by serial ports When directly ball machine is controlled by gunlock serial ports, real-time is high, there's almost no latency issue.And work as control of the gunlock to ball machine When requirement of real-time processed is not high, selection by network interface control ball machine, gunlock and ball machine physically without being directly connected to, can carry ball Machine is not present quantity bottleneck, therefore can meet the application scenarios more than destination number by setting more ball machine, can be with The each target of track simultaneously obtains, preserves each clarification of objective data.
Brief description of the drawings
Fig. 1 is a kind of video monitoring system structural representation of one embodiment of the invention;
Fig. 2 is a kind of control method flow chart of video monitoring system of one embodiment of the invention;
Fig. 3 is the ball machine head upgrade method flow chart under a kind of control by serial ports of one embodiment of the invention.
Embodiment
In order that those skilled in the art more fully understand present disclosure, with reference to the accompanying drawings and examples to this The there is provided technical scheme of invention is described in further detail.
Embodiment 1
As shown in figure 1, a kind of video monitoring system is present embodiments provided, including:
Three ball machines, gathered for target following and target data, respectively ball machine A, ball machine B and ball machine C;
One gunlock, for controlling ball machine, gunlock is connected respectively by network interface with ball machine A, ball machine B and ball machine C, and is passed through Serial ports is connected with ball machine A, ball machine B, and gunlock controls ball machine particular by intelligent-tracking algorithm;
Monitor client, monitoring system control software is installed, be connected respectively with gunlock, each ball machine by network, should Monitor client is used for the head unique identification mark and/or movement unique identification mark for configuring the ball machine in the video monitoring system Will, the head unique identification mark namely head address, are also used for sending head upgrade file to ball machine, and it is each to be additionally operable to configuration The control mode of individual ball machine, that is, configure the control command that ball machine still receives gunlock by serial ports by network interface.It is specific to can be used Kodak IPC series.
Monitor client is according to being actually needed and ball machine and the connected mode of gunlock configure the control mode of ball machine.This Needing to control ball machine A in real time in embodiment, i.e., the concerned control command for hardly allowing ball machine A to send gunlock, which is delayed, to be performed, And ball machine A is connected further through serial ports with gunlock, then configuration gunlock controls ball machine A by serial ports.When gunlock is controlled by serial ports During ball machine A, even if Network Abnormal occurs, or even suspension, ball machine A also can normally carry out target following, therefore also ensure that not Ball machine can be caused with losing target because of the reason for network.And for ball machine B and ball machine C, because control requirement of real-time not The control command that height, i.e. ball machine B, C perform gunlock allows delay be present, and they are all connected by network with gunlock again, so prison Control the control command that client configuration ball machine B and ball machine C receives gunlock by network interface.Gunlock is controlled by network interface control mode During ball machine B and ball machine C, can be to determine network by sending, replying the form of (detection) packet between ball machine B, C and gunlock No exception or suspension, (detection) packet of ball machine is not received by or in repeatedly transmission (detection) when gunlock exceedes certain time Packet and when not receiving the reply of ball machine, then abnormal, the ball being now also connected by serial ports with gunlock that judges that network occurs Machine B then switches to serial ports control.Can not in the ball machine that network occurs exception or suspension and causes only to be connected with gunlock by network interface During normal work, all ball machine energy normal works being connected by serial ports with gunlock, as often as possible to obtain Network Abnormal or disconnected Target data during net.
Specifically, gunlock includes gunlock serial ports, concretely RS485 serial ports;Ball machine includes ball machine control unit, ball machine string Mouth, movement, movement control unit, movement control serial ports, head, cradle head control unit, cradle head control serial ports and memory cell, ball The order that machine control unit is sent by connected ball machine serial ports acquisition gunlock by gunlock serial ports, movement control unit root Movement is controlled accordingly according to movement control command, movement control unit can control serial ports or ball machine to control by movement Unit obtains movement control command, and cradle head control unit is controlled head accordingly according to cradle head control order, head control Unit processed can obtain cradle head control order by cradle head control serial ports or ball machine control unit, and gunlock serial ports can pass through serial bus It is connected respectively with ball machine serial ports and/or cradle head control serial ports and/or movement control serial ports.In the present embodiment, gunlock serial ports and ball Machine serial ports connects, while is also directly connected to cradle head control serial ports, without being directly connected to movement control serial ports.Cradle head control string Mouth with gunlock serial ports because being physically directly connected to, therefore cradle head control unit can directly receive the cradle head control life of gunlock transmission Order.And movement control serial ports does not control directly physically with gunlock serial ports, therefore directly controlled by ball machine control unit, ball machine control Unit processed can monitor the Serial Port Information of gunlock serial ports in real time by ball machine serial ports.The memory cell of ball machine is specially ball machine E2PROM, the data in the memory cell are stored in after electricity under system, accreditation memory will not lose.
In addition, also include the interchanger as networking data transfer equipment in the present embodiment, for leading to monitor client Cross network to communicate with gunlock, ball machine respectively, and gunlock is communicated by network and ball machine.
As other embodiments of the present invention, 2 ball machines or 3 can be set with Apparatus for feeding balls as disintegrating members.Due to passing through net The limitation of carry quantity is not present in mouth control ball machine, therefore the quantity of ball machine can be a lot, even up to tens thousand of.Wherein, lead to Cross ball machine number that serial ports is connected with gunlock and selected in the range of the limitation of carry quantity according to being actually needed.More ball machines is led to as far as possible Cross serial ports to be connected with gunlock, can not lose tracking target as far as possible by controlling these ball machines in Network Abnormal and use up Amount obtains target data more.In addition, in other embodiments, on the premise of gunlock serial ports is connected with ball machine serial ports, gunlock string Mouth direct can not be connected with cradle head control serial ports, but is directly connected with movement control serial ports, and now movement control unit is direct Movement is controlled by the movement control command of serial ports reception gunlock, and cradle head control order then passes through ball by ball machine control unit Machine serial ports is transmitted to cradle head control unit after the reception of gunlock serial ports;Gunlock serial ports can simultaneously directly with cradle head control serial ports, machine Core control serial ports connection, the cloud that now cradle head control unit directly can be sent by cradle head control serial ports reception gunlock by serial ports Platform control command, movement control unit also directly can control serial ports to receive the movement control that gunlock is sent by serial ports by movement Order;Gunlock serial ports direct can not be also connected with cradle head control serial ports, while is not also connected with movement control serial ports, now head Control command and movement control command are all received by ball machine control unit by ball machine serial ports.In other embodiments In, router also can be selected and other common equipments are used as networking data transfer equipment.
In the video monitoring system that the present embodiment provides, gunlock can control all ball machines by network interface, can also pass through Serial ports controls other ball machines of a portion ball machine to be controlled by network interface.When gunlock controls ball machine by serial ports, gunlock and ball machine Between communication be completely independent of network environment, have stronger tolerance to the Network Abnormal of burst, especially operation tracking The ball machine of target signature algorithm is captured, target following can be still carried out in suspension, target high definition feature snapshot is carried out and grab Clap, and combine the storage of ball machine SD card, keep in and capture picture, after network recovery, picture is uploaded to picture servers.In addition, Directly ball machine is controlled by gunlock serial ports when being controlled by serial ports, real-time is high, there's almost no latency issue.But The multiplexing control of single serial ports time-shared serial, obvious carry ball machine quantity bottleneck (typically can only carry several) be present.Present invention solution To the dependence of network when ball machine carry quantity limitation when serial ports of having determined controls, network interface control, serial ports control and net have been merged The advantages of mouth control, fault-tolerance, the scalability of ball machine quantity that single gunlock controls the video monitoring system of more ball machines are improved, Simplify the difficulty of system erection.
The present embodiment can combine different ball machine control modes according to selection is actually needed, real-time when being controlled according to ball machine Property require to configure the control mode of ball machine when, to simple tracking picture-recording ball machine, because its execution to gunlock control command is permitted Perhaps delay be present, therefore the mode that network can be taken to control, and capture ball machine for tracking and take serial ports control mode, with reference to The advantages of network interface controls with serial ports, realize high fault-tolerant, the high-effect characteristic of whole single more ball machine video monitoring systems of gunlock.
Embodiment 2
As shown in Fig. 2 a kind of video monitoring system control method is present embodiments provided, for the video in embodiment 1 Monitoring system, comprise the following steps:
S1:The connection side that controls whether allow have delay, ball machine and gunlock of the monitor client according to gunlock to ball machine Formula configures the control mode of ball machine.Because monitor client is to be connected by network with gunlock, ball machine, once Network Abnormal Or generation suspension monitor client can not communicate with ball machine, gunlock, so control mode of the monitoring client to each ball machine Configuration carry out in advance.If less demanding to the realtime control of ball machine, i.e. allow execution of the ball machine to control command In the presence of delay, then i.e. settable to control the ball machine by way of network interface control;If the realtime control requirement to ball machine Height, that is, require that ball machine performs control command in time and is not allow for more delay, and the ball machine is connected by serial ports with ball machine, So set and control the ball machine by way of serial ports control.
S2:When control of the gunlock to ball machine allows to have delay and normal network, gunlock controls ball machine by network interface, i.e., Ball machine is controlled by Socket.
S3:When control of the gunlock to ball machine does not allow to exist delay or Network Abnormal or suspension, for passing through serial ports The ball machine being connected with gunlock, gunlock are controlled it by serial ports.Gunlock by network interface control mode to control ball machine when, ball Between machine and gunlock can by send, reply the form of (detection) packet determine network whether exception or suspension, work as gunlock (detection) packet of ball machine is not received by more than certain time or does not receive ball in repeatedly transmission (detection) packet During the reply of machine, then it is abnormal to judge that network occurs, so as to switch the control mode for the ball machine being also connected with gunlock by serial ports, i.e., The ball machine is controlled by serial ports from controlling the ball machine to be switched to by network interface.And for being set in advance as serial ports control as needed Ball machine, no matter then which kind of situation network is, controlled by serial ports.
The present embodiment provide video monitoring system control method, merged single gunlock by serial ports control more ball machines with And the advantages of more ball machines are controlled by network interface, when gunlock is less demanding to the realtime control of ball machine, that is, allows to exist and necessarily prolong Constantly, then the ball machine is configured to be connected with gunlock by network interface.When network is normal, gunlock passes through Socket to the control command of ball machine Message is communicated, gunlock and ball machine physically without being directly connected to, can the ball machine of carry be not present quantity bottleneck, favorable expandability, Equipment sets up easy., can be mutually from several meters or farther and the physical distance controllability of gunlock and ball machine is good.And work as gunlock pair The realtime control of ball machine requires high and when the ball machine is also connected by serial ports with gunlock, then configures the ball machine and received by serial ports The control command of gunlock.When gunlock controls ball machine by serial ports, the communication between gunlock and ball machine is completely independent of network rings Border, there are stronger tolerance, especially operation tracking to capture the ball machine of target signature algorithm, Ke Yi the Network Abnormal of burst During suspension, target following is still carried out, target high definition feature snapshot is carried out and captures, and combines the storage of ball machine SD card, keeps in and captures Picture, after network recovery, picture is uploaded to picture servers.In addition, gunlock is received by network interface for being preconfigured to The ball machine of control command, but when it is also connected by serial ports with gunlock, after Network Abnormal or suspension occurs, can switch Controlled for serial ports.
Specifically, in above-mentioned steps S2 when gunlock controls ball machine by network interface, including movement control process and head control Process processed.Control to movement includes the brightness of adjustment camera lens, contrast, saturation degree, acutance and focal length etc., and main purpose is Obtain clearly, be easy to extraction to track the image of target signature;And to the control of head, mainly by step motor control So as to adjust the horizontal and vertical angle of head, so as to adjust the visual field of ball machine.Both rationally coordinate, it is possible to achieve from motion tracking And the acquisition and storage of target image.
Wherein, the detailed process that gunlock is controlled movement by network interface is as follows:
First, gunlock generates movement control command according to track algorithm, and is sent to corresponding ball machine by network interface, specifically The movement control command can be packaged into packet and be then forwarded to corresponding ball machine, and ball machine is distinguished by IP address, Need the IP address for controlling which ball machine that movement control command is just sent to corresponding ball machine.
Then, the ball machine corresponding to movement control command receives movement control command.Specifically led to by ball machine control unit Cross multithreading means and open serial ports, network interface watcher thread, serial ports, network interface are monitored in real time, when receiving the machine from network interface During core control command data bag, message queue is put into, and starts to unpack, parses effective movement control command.
Finally, the ball machine corresponding to movement control command completes the control to the ball machine movement according to movement control command. Specifically mirror is included by ball machine control unit in movement control command by calling movement control interface to complete the control to movement Head brightness, contrast, saturation degree, acutance and focal length etc..
In addition, gunlock is as follows to the detailed process of cradle head control by network interface:
First, gunlock generates cradle head control order according to track algorithm, and is sent to cradle head control order by network interface Corresponding ball machine.Specifically cradle head control order can also be dressed up to packet is then forwarded to ball machine, and by IP address to distinguish Carry out the ball machine of cradle head control.
Then, the ball machine corresponding to cradle head control order receives cradle head control order.Ball machine control unit is supervised by network Listen the cradle head control command packet that will be received from network interface to be unpacked, parse effective cradle head control order.
Finally, the ball machine corresponding to cradle head control order completes the control to the ball machine head according to cradle head control order. Cradle head control interface specifically is write into the cradle head control order parsed by ball machine control unit, so as to complete the control of head System.
Movement is controlled and during head by network interface, because gunlock and ball machine are physically without being directly connected to, therefore ball machine is not present Quantity limits, and is applicable to the especially more application scenarios of destination number, each ball machine division of labor tracks different targets, completely to obtain Take the related data of the complete trajectory and target of each target in itself.
Specifically, in step s3 when gunlock controls ball machine by serial ports, including movement control process and cradle head control Process.Control to movement be mainly used in obtaining clearly, be easy to extraction to track the image of target signature;And to the control of head System, it is mainly used in adjusting the visual field of ball machine.Both rationally coordinate, it is possible to achieve the acquisition of automatically track target and target image And storage.
Wherein, the detailed process that gunlock is controlled movement by serial ports is as follows:
First, gunlock generates movement control command according to track algorithm, and is sent to corresponding ball machine by serial ports.Specifically The movement control command can be packaged into packet and be then forwarded to corresponding ball machine.In addition, now can be by pre-setting Movement unique identification mark distinguishes the ball machine corresponding to movement control command.
Then, the ball machine corresponding to movement control command receives movement control command.Ball machine control unit receives from serial ports During to the movement control command data bag, message queue is put into, and starts to unpack, parses effective movement control life Order.
Finally, the ball machine corresponding to movement control command completes the control to the ball machine movement according to movement control command. Specifically by ball machine control unit by calling movement control interface to complete the control to movement.
Compared with the control method of ball machine movement is controlled by network interface, the gunlock that the present embodiment provides passes through serial ports control ball The movement of machine, movement control command is because of the forwarding not over network but is directly transferred to ball machine by serial bus, passes Defeated speed quickly, does not almost postpone.Therefore ball machine can adjust movement according to the movement control command immediately.Grabbing fearness rapidly During its target image tracked, the target image of better effects can be obtained, more easily to be obtained from the image of the candid photograph Target signature.
And for cradle head control, it is necessary first to each ball machine head, one unique address is set, it is each for distinguishing The head of ball machine.
Set the detailed process of head address as follows:
Monitor client sets one according to the MAC Address of ball machine come corresponding each ball machine head in video monitoring system Individual head address, the head address are used for the head for distinguishing each ball machine, i.e., in the monitoring system, head address is not repeat And address that be not broadcast type.Specifically, after single gunlock controls the video monitoring system networking of more ball machines, the prison is started Control system, gunlock is logged in after ball machine, sending front end with top level control agreement by configuration interface to adjust using monitor client The setting of head address is completed with ball machine control interface, after head receives address, address is write into E2PROM.Head address Set particular by SET_ADDR_BY_MAC and GET_ADDR_BY_MAC the two custom protocols to realize, SET_ ADDR_BY_MAC agreements are used to set head address according to MAC Address, and SET_ADDR_BY_MAC agreements are:
GET_ADDR_BY_MAC is used to obtain head address according to MAC Address, with determine the setting of head address whether into Work(and whether hold water, GET_ADDR_BY_MAC agreements are as follows:
When multiple ball machines are connected by serial ports with gunlock, gunlock is sent to the control command of each ball machine, under serial ports control Ball machine head can receive.Therefore, ADDR heads address is the unique mark that cradle head control unit carries out message screening.Therefore exist Be used for before cradle head control and head upgrading, it is necessary to configure one for each ball machine head in the video monitoring system The head address of each head is distinguished, i.e., under serial ports control model, head address cannot repeat and cannot have wide Broadcast the address of type.
Specifically, before above-mentioned the step of head address is set according to the MAC Address of ball machine, in addition to:
The cradle head control unit of ball machine correspondingly writes the MAC Address of ball machine the memory cell of the ball machine, the memory cell In data do not lose after a power failure.Specifically, ball machine MAC Address has been set before ball machine is dispatched from the factory, ball machine control Unit provides SET_MAC protocol realization interfaces, and cradle head control unit is after SET_MAC instructions are received, by calling SET_MAC MAC Address is loaded into the E2PROM of ball machine by protocol realization interface.SET_MAC agreements also determine write operation by return value Whether succeed.SET_MAC agreements are custom protocol, specific as follows:
The protocol format of above-mentioned SET_MAC agreements, SET_ADDR_BY_MAC and GET_ADDR_BY_MAC is as follows:
Wherein, LENGTH:Order length byte, including BTYE2~BYTEn, i.e. LENGTH=n-1.
Order length byte negates, i.e.,
ADDR:Head address, span 0~255, wherein, 0 is broadcast address, and 1~255 is private address.
COMMAND:Command context.
CHECKSUM:Command checksum and CHECKSUM=BYTE0+BYTE1+BYTE2+ ...+BYTE (n-1).
When gunlock controls ball machine by serial ports, after head address is set up, the detailed process being controlled to head is such as Under:
First, gunlock sends cradle head control order to head by serial ports, to be controlled in the cradle head control order comprising it The head address of the ball machine of system.Because gunlock serial ports and cradle head control serial ports are directly connected to, gunlock can be directly by cradle head control order It is sent to head.
Then, ball machine head corresponding with the head address included in cradle head control order is completed according to cradle head control order Corresponding control.If the cradle head control serial ports of multiple ball machines is all directly connected with gunlock serial ports, then sends head control in gunlock During system order, the head of the plurality of ball machine can receive cradle head control order simultaneously.Now the cradle head control unit of ball machine can parse Head address in the cradle head control order, when the cradle head control unit of ball machine finds the head address of oneself and the control command Included in head address it is consistent when, then transfer stepper motor controlled accordingly.
Cradle head control in the present embodiment realizes that PELCO-D protocol formats are such as using puppy parc PELCO-D Under:
BYTE VALUE FUNCTION
1 FF STX(start transmission)
2 01TO FF Addr
3 Data byte 1
4 Data byte 2
5 Data byte 3
6 Data byte 4
7 00-FF Checksum(add byte 2,3,4,5,6)
Compared with by the control method of network interface control ball machine head and movement, the gunlock that the present embodiment provides passes through serial ports The head and movement of ball machine, cradle head control order and movement control command are controlled because not over the forwarding of network but direct Ball machine is transferred to by serial bus, transmission speed quickly, does not almost postpone.Cloud can also be transferred directly in the present embodiment Platform or movement are further to reduce the transmission time of cradle head control order.Therefore, ball machine can order according to the cradle head control immediately Order adjustment head, to adjust the ball machine visual field rapidly, target image was photographed so as to chase after all the time;And adjusted immediately according to movement control command Whole focal length, brightness, contrast etc., so as to obtain, target signature is most clear, obvious image.By serial ports control ball machine head with The control method of movement, the candid photograph of the target of the movement velocity that is particularly suitable for use in quickly.
Embodiment 3
Another video monitoring system control method is provided in the present embodiment, this method is removed and includes the control in embodiment 1 Outside method processed, the head upgrade method for being upgraded to head further comprises.Because cradle head control demand becomes constantly More, cradle head control agreement is also extended constantly, therefore, it is necessary to head is upgraded extend cradle head control agreement, The problem of there may be in amendment existing program.The upgrading of head is to initiate upgrade request from ball machine control unit to head, and Head responds after upgrade request is received, and the video monitoring system enters head upgrade logic.The present embodiment includes The head upgrade method controlled by network interface and the head upgrade method controlled by serial ports.
Specifically, when gunlock controls ball machine by network interface, the escalation process of head is:
First, ball machine to be upgraded receives the head upgrade file that monitor client is sent.Specifically, monitor client is logical Cross FTP and head upgrade file ptzupdate.bin is passed to ball machine, after ball machine receives the head upgrade file, save it in In FLASH.The process upgraded by network interface control ball machine head, is to distinguish ball machine by ball machine IP address.And the head The code of upgrade file, i.e. head agreement is realized, is the effective document data that will be generated after code compilation.
Then, ball machine to be upgraded suspends its all serial ports affairs, if ball machine to be upgraded is also connected by serial ports with gunlock, So also need to suspend gunlock, all serial ports affairs of other ball machines being connected by serial ports with gunlock.Specific implementation process is: After head upgrade file is received, ball machine control unit suspends all affairs of the ball machine on serial ports, including read-write thing Business and control affairs.If the ball machine is also connected by serial ports with gunlock, then need to broadcast ball machine head by serial ports Upgrading starts message so that gunlock and other ball machines being connected by serial ports with gunlock suspend its on serial ports it is busy Business, so as to suspend all affairs on serial bus.Now, serial ports enters head upgrade mode.
Finally, ball machine to be upgraded completes head upgrading.Specific implementation process is:After serial ports enters head upgrade mode, lead to The communications protocol that ball machine control unit defines with head is crossed, head upgrade file ptzupdate.bin is packaged into packet, and Head is sent the packet to by control of the ball machine control unit to cradle head control interface;Head receives the packet Afterwards, cradle head control unit verifies to packet, if verification passes through, upgrading is completed, to ball machine control if unsuccessful Unit processed sends the request for retransmitting head upgrade file, and repetition is packaged into packet, delivers a packet to head, to packet The step of being verified, until upgrading successfully.After ball machine upgrades successfully, all serial ports affairs of the ball machine need to be recovered, if should Ball machine is also connected by serial ports with gunlock, then is also needed to recover other serial ports affairs on serial bus, is included the string of gunlock Mouthful affairs and other are connected by serial ports with gunlock but and the serial ports affairs of ball machine that upgrade without head.
Head upgrading needs exclusive serial port resource, therefore can not have other equipment to carry out serial ports in head escalation process Any operation, otherwise, the situation of con current control serial ports is will appear from, the superposition of control command signal level occurs, cause signal distortion, Control is caused to be failed.In the present embodiment, before ball machine carries out head upgrading, i.e. pause is possible to influence the upgrading of ball machine head All serial ports affairs, to cause head smoothly to upgrade.Head just recovers the serial ports affairs of pause after upgrading successfully.
Specifically, as shown in figure 3, when gunlock controls ball machine by serial ports, in addition to head escalation process:
S31:Ball machine to be upgraded receives the head upgrade file that monitor client is sent, and is specifically passed through by monitor client Head upgrade file ptzupdate.bin is passed to ball machine by FTP, after ball machine receives the head upgrade file, is saved it in In FLASH.
S32:Ball machine to be upgraded suspends its all serial ports affairs, and the step is specifically to be controlled by ball machine control unit.
S33:Ball machine to be upgraded starts message to serial bus broadcast head upgrading.Specifically passed through by ball machine control unit Serial ports controls thread, calls BroadCastPtzUpdateBegin interfaces to send head upgrading to serial bus and starts message, Api interface is:
BD_SOFT_SELF_COMM_API int BroadCastPtzUpdateBegin(unsigned char* pIpAddrBuf);// broadcast PTZ upgrade events start.
S34:After gunlock and other ball machines for not upgrading head receive head upgrading beginning message by serial ports, suspend it All affairs on serial bus.Specifically gunlock and other ball machines not upgraded is received by serial ports watcher thread After BroadCastPtzUpdateBegin message, all suspend its affairs of all on serial bus, into wait BroadCastPtzUpdateEnd message status.
S35:Head upgrade file is sent to the head of the ball machine by the ball machine control unit of ball machine to be upgraded.Specifically by Head upgrade file ptzupdate.bin is divided into some numbers by ball machine control unit by it with the communications protocol that head defines Head upgrade file ptzupdate.bin each packet is sent to according to bag, and by the control to cradle head control interface Head., it is necessary to distinguish head by head address during being somebody's turn to do, otherwise in follow-up escalation process, pass through serial ports and rifle Other ball machines of machine connection can receive the related command of head upgrading from serial ports, so as to mistakenly perform upgrade step.
S36:The head of ball machine to be upgraded receives head upgrade file and completes head upgrading.Specifically by cradle head control list Head upgrade file ptzupdate.bin of the member to receiving each packet verifies, and is completed if verifying and passing through Upgrading, the request of head upgrade file is retransmitted if it fails, then being sent to ball machine control unit, repeat step S35 is until upgrading Success.
S37:The ball machine for having completed upgrading upgrades completion message to serial bus broadcast head.Specifically controlled by ball machine Unit upgrades completion message by calling BroadCastPtzUpdateEnd interfaces to broadcast head to serial bus.Api interface For:
BD_SOFT_SELF_COMM_API int BroadCastPtzUpdateEnd(unsigned char* pIpAddrBuf);// broadcast PTZ upgrade events terminate.
S38:Gunlock, other ball machines for not upgrading head being connected by serial ports with gunlock receive head liter by serial ports After level completion message, recover all affairs on serial bus.Specifically, gunlock, other balls being connected by serial ports with gunlock After machine receives BroadCastPtzUpdateEnd message by serial ports watcher thread, the institute recovered on serial bus is busy Business, including completed the ball machine that head upgrades and also recovered its all serial ports affairs in itself.Now, the more ball machine monitoring of single gunlock System, controlled by serial ports and complete head escalation process.
Head upgrading needs exclusive serial port resource, can not have other equipment to carry out any behaviour to serial ports in escalation process Make, otherwise will appear from the situation of con current control serial ports, control command signal level is applied, and is caused signal distortion, is lost control Effect.Therefore, the present embodiment realizes that serial ports broadcasts head upgrade status by extending rifle ball serial port communicating protocol, total to suspend serial ports All serial ports affairs on line, so as to ensure smoothly completing for head upgrading.
Obviously, above-described embodiment is only intended to clearly illustrate example, and is not the restriction to embodiment.It is right For those of ordinary skill in the art, can also make on the basis of the above description it is other it is various forms of change or Change.There is no necessity and possibility to exhaust all the enbodiments.And the obvious change thus extended out or Among changing still in the protection domain of the invention.

Claims (11)

  1. A kind of 1. video monitoring system, it is characterised in that including:
    At least two ball machines, gathered for target following and target data;
    One gunlock, for controlling the ball machine, the gunlock be connected respectively with the ball machine by network interface and by serial ports with Ball machine described in wherein at least one connects;
    Monitor client, monitoring system control software is installed, be connected respectively with the gunlock, the ball machine by network;
    The gunlock includes gunlock serial ports;
    The ball machine includes ball machine control unit, ball machine serial ports, movement, movement control unit, movement control serial ports, head, cloud Platform control unit, cradle head control serial ports and memory cell, the ball machine control unit obtain the rifle by the ball machine serial ports The instruction that machine is sent by the gunlock serial ports, the movement control unit carry out phase according to movement control command to the movement The control answered, the movement control unit can control serial ports or the ball machine control unit to obtain the machine by the movement Core control command, the cradle head control unit are controlled the head accordingly according to cradle head control order, the head Control unit can obtain the cradle head control order, the gunlock by the cradle head control serial ports or the ball machine control unit Serial ports can be gone here and there with the ball machine serial ports and/or the control of the cradle head control serial ports and/or the movement respectively by serial bus Mouth connection.
  2. 2. video monitoring system as claimed in claim 1, it is characterised in that also include:
    Networking data transfer equipment, for making the monitor client be communicated respectively with the gunlock, the ball machine by network, And the gunlock is communicated by network and the ball machine.
  3. A kind of 3. control method of video monitoring system, for video monitoring system as claimed in claim 1 or 2, its feature It is to comprise the following steps:
    The monitor client according to the gunlock to the ball machine control whether to allow exist delay, the ball machine with it is described The connected mode of gunlock configures the control mode of the ball machine;
    When network is normal and the control of the gunlock to the ball machine allows to exist delay, the gunlock controls institute by network interface State ball machine;
    When the control of Network Abnormal or suspension or the gunlock to the ball machine does not allow to exist delay, for passing through serial ports The ball machine being connected with the gunlock, the gunlock are controlled it by serial ports.
  4. 4. method as claimed in claim 3, it is characterised in that when the gunlock controls the ball machine by network interface, including it is right The control process of movement, specifically includes following steps:
    The gunlock generates movement control command according to track algorithm, and is sent to corresponding ball machine by network interface;
    Ball machine corresponding to the movement control command receives the movement control command;
    Ball machine corresponding to the movement control command completes the control to the ball machine movement according to the movement control command.
  5. 5. the method as described in claim 3 or 4, it is characterised in that when the gunlock controls the ball machine by network interface, bag The control process to head is included, specifically includes following steps:
    The gunlock generates cradle head control order according to track algorithm, and is sent to the cradle head control order pair by network interface The ball machine answered;
    Ball machine corresponding to the cradle head control order receives the cradle head control order;
    Ball machine corresponding to the cradle head control order completes the control to the ball machine head according to the cradle head control order.
  6. 6. the method as described in claim 3 or 4, it is characterised in that when the gunlock controls the ball machine by network interface, bag Head escalation process is included, specifically includes following steps:
    Ball machine to be upgraded receives the head upgrade file that the monitor client is sent;
    The ball machine to be upgraded suspends its all serial ports affairs, if the ball machine to be upgraded is also connected by serial ports and the gunlock Connect, then also need to suspend the gunlock, all serial ports affairs of other ball machines being connected with the gunlock by serial ports;
    The ball machine to be upgraded completes head upgrading.
  7. 7. the method as described in claim 3 or 4, it is characterised in that when the gunlock controls the ball machine by serial ports, bag The control process to movement is included, specifically includes following steps:
    The gunlock generates movement control command according to track algorithm, and is sent to corresponding ball machine by serial ports;
    Ball machine corresponding to the movement control command receives the movement control command;
    Ball machine corresponding to the movement control command completes the control to the ball machine movement according to the movement control command.
  8. 8. method as claimed in claim 3, it is characterised in that when the gunlock controls the ball machine by serial ports, including set The process of head address is put, specifically includes following steps:
    The monitor client is according to the MAC Address of the ball machine come corresponding to each ball machine cloud in the video monitoring system Platform sets a head address, and the head address is used for the head for distinguishing each ball machine.
  9. 9. method as claimed in claim 8, it is characterised in that the MAC Address in the monitor client according to the ball machine Come correspond to in the video monitoring system each ball machine head set a head address the step of before, in addition to:
    The cradle head control unit of the ball machine correspondingly writes the MAC Address of ball machine the memory cell of the ball machine, described to deposit Data in storage unit are not lost after a power failure.
  10. 10. method as claimed in claim 8 or 9, it is characterised in that when the gunlock controls the ball machine by serial ports, bag The process to cradle head control is included, specifically includes following steps:
    The gunlock sends cradle head control order to the head by serial ports, to be controlled in the cradle head control order comprising it The head address of the ball machine of system;
    Ball machine head corresponding with the head address included in the cradle head control order is completed according to the cradle head control order Corresponding control.
  11. 11. the method as described in claim 3 or 8 or 9, it is characterised in that when the gunlock controls the ball machine by serial ports When, including head escalation process, comprise the following steps that:
    Ball machine to be upgraded receives the head upgrade file that the monitor client is sent;
    The ball machine to be upgraded suspends its all serial ports affairs;
    The ball machine to be upgraded starts message to serial bus broadcast head upgrading;
    After the gunlock and other ball machines for not upgrading head receive the head upgrading beginning message by serial ports, pause at Its all affairs on serial bus;
    The head upgrade file is sent to the head of the ball machine by the ball machine control unit of the ball machine to be upgraded;
    The head of the ball machine to be upgraded receives the head upgrade file and completes head upgrading;
    The ball machine for having completed upgrading upgrades completion message to serial bus broadcast head;
    The gunlock and other ball machines for not upgrading head being connected by serial ports with the gunlock are received described by serial ports After head upgrading completion message, recover all affairs on serial bus.
CN201510097950.5A 2015-03-05 2015-03-05 A kind of video monitoring system and its control method Active CN104639917B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510097950.5A CN104639917B (en) 2015-03-05 2015-03-05 A kind of video monitoring system and its control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510097950.5A CN104639917B (en) 2015-03-05 2015-03-05 A kind of video monitoring system and its control method

Publications (2)

Publication Number Publication Date
CN104639917A CN104639917A (en) 2015-05-20
CN104639917B true CN104639917B (en) 2017-12-15

Family

ID=53218164

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510097950.5A Active CN104639917B (en) 2015-03-05 2015-03-05 A kind of video monitoring system and its control method

Country Status (1)

Country Link
CN (1) CN104639917B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105979210B (en) * 2016-06-06 2019-02-05 深圳市深网视界科技有限公司 A kind of pedestrian's identifying system based on the more ball video camera arrays of multiple gun
CN106209858A (en) * 2016-07-15 2016-12-07 厦门博聪信息技术有限公司 A kind of serial communication protocol controlled for ball machine
CN110097761B (en) * 2019-05-17 2021-02-09 江苏航天大为科技股份有限公司 Illumination self-adaptive video vehicle flow detection mode switching system and method

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101127887A (en) * 2007-08-28 2008-02-20 湖南大学 Intelligent vision monitoring method and device
WO2008156910A2 (en) * 2007-04-20 2008-12-24 Innovation First, Inc. Managing communications between robots and controllers
CN102915249A (en) * 2012-11-02 2013-02-06 苏州科达科技股份有限公司 Method and device for remotely realizing firmware updating
CN102946528A (en) * 2012-12-14 2013-02-27 安徽水天信息科技有限公司 Airport runway monitoring system based on intelligent video monitoring for whole scenic spot
CN103473926A (en) * 2013-09-11 2013-12-25 无锡加视诚智能科技有限公司 Gun-ball linkage road traffic parameter collection and rule breaking snapshooting system
CN104125433A (en) * 2014-07-30 2014-10-29 西安冉科信息技术有限公司 Moving object video surveillance method based on multi-PTZ (pan-tilt-zoom)-camera linkage structure

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008156910A2 (en) * 2007-04-20 2008-12-24 Innovation First, Inc. Managing communications between robots and controllers
CN101127887A (en) * 2007-08-28 2008-02-20 湖南大学 Intelligent vision monitoring method and device
CN102915249A (en) * 2012-11-02 2013-02-06 苏州科达科技股份有限公司 Method and device for remotely realizing firmware updating
CN102946528A (en) * 2012-12-14 2013-02-27 安徽水天信息科技有限公司 Airport runway monitoring system based on intelligent video monitoring for whole scenic spot
CN103473926A (en) * 2013-09-11 2013-12-25 无锡加视诚智能科技有限公司 Gun-ball linkage road traffic parameter collection and rule breaking snapshooting system
CN104125433A (en) * 2014-07-30 2014-10-29 西安冉科信息技术有限公司 Moving object video surveillance method based on multi-PTZ (pan-tilt-zoom)-camera linkage structure

Also Published As

Publication number Publication date
CN104639917A (en) 2015-05-20

Similar Documents

Publication Publication Date Title
US9602391B2 (en) Network apparatus and method for communication between different components
CN104639917B (en) A kind of video monitoring system and its control method
US20120236859A1 (en) Method & apparatus for configuring a link aggregation group on a stacked switch
CN111865736B (en) Equipment control method and device
CN104067256A (en) Systems and methods for supporting two different protocols on a same physical connection
US20130238738A1 (en) Distributed method and system for implementing link aggregation control protocol (lacp) standard state machines
CN110034983A (en) Home equipment interlock method and system based on Publish-subscribe message processing facility
CN106060088A (en) Service management method and device
CN108632305A (en) Cloud storage system, media data storage method and system
CN104090538B (en) Wifi-based intelligent disability-assisting wheelchair control system and control method
CN103051470A (en) Cluster and control method for magnetic disk heartbeat of cluster
CN104270344A (en) Quintillion gatekeeper
WO2011137797A1 (en) Method and system for data transmission in ethernet
CN101247290A (en) Ethernet switchboard high temperature ageing real-time monitoring method and system
CN104270452B (en) A kind of tele-medicine data management system and its wireless network communication method
CN107154948A (en) A kind of multi-protocol data exchange method applied to car launcher information control system
CN112929418B (en) Rapid IO high-speed communication method and system based on publish-subscribe
US20180351802A1 (en) State Synchronization Between a Controller and a Switch in a Communications Network
CN105049367A (en) Traffic distribution method of aggregated link and access device
CN109144913A (en) A kind of data processing method, system and electronic equipment
CN107395768A (en) Two-shipper adaptive load balancing method for file security transmission
CN104038557A (en) Batch upgrading method of equipment software in optical fiber connection tree shape network structure
CN102088455A (en) ASN (attack security interaction) and implementation method thereof
CN115378822B (en) DDS distributed application simulation method and system
CN101478775B (en) Detection method, system and equipment for multi-neighbor connection state

Legal Events

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