Summary of the invention
Purpose of the present invention is intended to solve at least one of above-mentioned technological deficiency, particularly solves the effectively asymmetric synchronous defective of fulfillment database of prior art.
For achieving the above object, one aspect of the present invention proposes the asymmetric method for synchronous of database in a kind of video monitoring system, may further comprise the steps: in local domain, set up shared data set and close, and according to the sharing request in other territories be in described shared data set is closed each shared device separately mark read authority, describedly read the sign that authority includes other territories of having the right to read described shared data; According to described each shared device read permission build data script, and send to other corresponding territories by the described data script that network will generate.
As one embodiment of the present of invention, also comprise: processing queue is put into described data script in other territories after receiving the data script that sends to oneself, processes at one's leisure and with the shared data data inserting storehouse in the described data script.
As one embodiment of the present of invention, after receiving the data script that sends to oneself in other territories, described data script is put into processing queue, process at one's leisure and with after the shared data data inserting storehouse in the described data script, also comprise: judge whether successfully with the shared data data inserting storehouse in the described data script; If judge successfully with the shared data data inserting storehouse in the described data script, then return to described local domain and receive successful message; If judge not successfully with the shared data data inserting storehouse in the described data script, then return the message that takes defeat to described local domain.
As one embodiment of the present of invention, also comprise: after the message that receives the reception success of returning in described other territories, data script deletion this territory is corresponding according to the sign in described other territories.
As one embodiment of the present of invention, read permission build data script described according to each shared device, and by network the data script that generates is sent to before other corresponding territories, also comprise: the application service assembly start or timer expiry after the described shared data set of inquiry whether have shared device in closing; If described shared data set is closed the interior shared device that exists, then the authority that reads according to each shared device regenerates data script and transmission.
As one embodiment of the present of invention, also comprise: after receiving the message that takes defeat of returning in described other territories, resend the data script of correspondence according to the sign in described other territories.
As one embodiment of the present of invention, the described authority that reads also comprises the authority information of controlling described shared device, and/or downloads or watch the authority information of the monitor video of described shared device collection.
In the above-described embodiments, described network is IP network or dedicated network.
The present invention also proposes a kind of video monitoring system, comprise that at least two are in the not server of same area, one of them is the local domain server, described local domain server, being used for setting up shared data set at local domain closes, and in closing according to described shared data set each shared device read permission build data script, describedly read the sign that authority includes other territories of having the right to read described shared device, and send to the server in other corresponding territories by the described data script that network will generate.
As one embodiment of the present of invention, the server in described other territories, be used for after receiving the data script that sends to oneself, described data script being put into processing queue, process at one's leisure and with the shared data data inserting storehouse in the described data script.
As one embodiment of the present of invention, the server in described other territories, also be used for judging whether successfully the shared data data inserting storehouse with described data script, if judge successfully with the shared data data inserting storehouse in the described data script, then return to described local domain and receive successful message, if judge not successfully with the shared data data inserting storehouse in the described data script, then return the message that takes defeat to described local domain.
As one embodiment of the present of invention, described local domain server also is used for after the message that receives the reception success of returning in described other territories, data script deletion this territory is corresponding according to the sign in described other territories; Perhaps, after receiving the message that takes defeat of returning in described other territories, resend the data script of correspondence according to the sign in described other territories.
As one embodiment of the present of invention, described local domain server, be used for also whether the described shared data set of inquiry exists shared device in closing behind the startup of application service assembly or timer expiry, if described shared data set is closed the interior shared device that exists, then the authority that reads according to each shared device regenerates data script and transmission.
As one embodiment of the present of invention, also comprise the third party's memory storage that links to each other with each server, be used for preserving the monitor data that each territory shared device gathers, described each server reads corresponding monitor data according to the information of shared device from described third party's memory storage.
As one embodiment of the present of invention, the described authority that reads also comprises the authority information of controlling described shared device, and/or downloads or watch the authority information of the monitor video of described shared device collection.
In the above-described embodiments, pass through IP network or dedicated network communication between the described server.
The present invention also proposes a kind of server, be used for the front-end equipment in this territory is managed and mutually exchanges the information of shared device with the server in other territories, comprising that shared data set is closed preserves module, data script generation module and sending module, described shared data set is closed the preservation module, being used for being kept at the shared data set that local domain sets up closes, described shared data set each shared device in closing is according to the authority that reads of the sharing request mark in other territories, describedly reads the sign that authority includes other territories of having the right to read described shared data; Described data script generation module is used for reading permission build data script according to described each shared device; Described sending module, the described data script that by network described data script generation module is generated for the sign according to other territories of described data script sends to other corresponding territories.
As one embodiment of the present of invention, also comprise the message sink module, be used for receiving the receipt message that other domain servers return, if the receipt message that receives is for receiving successful message, then will delete data script corresponding to this territory according to the sign in described other territories; If the receipt message that receives is the message that takes defeat, then the sign according to described other territories resends corresponding data script.
As one embodiment of the present of invention, the described authority that reads also comprises the authority information of controlling described shared device, and/or downloads or watch the authority information of the monitor video of described shared device collection.
In the above-described embodiments, server is by the server communication in IP network or dedicated network and other territories.
The present invention can send to the information of shared device in other territories that request shares according to the authority information of shared device, can solve the asymmetric stationary problem of supervisory system, and the security that improves whole system.Can automatically a large amount of shared data be sent in other territories by the present invention in addition, improve the performance of total system.
The aspect that the present invention adds and advantage in the following description part provide, and part will become obviously from the following description, or recognize by practice of the present invention.
Embodiment
The below describes embodiments of the invention in detail, and the example of described embodiment is shown in the drawings, and wherein identical or similar label represents identical or similar element or the element with identical or similar functions from start to finish.Be exemplary below by the embodiment that is described with reference to the drawings, only be used for explaining the present invention, and can not be interpreted as limitation of the present invention.
The present invention mainly is the setting by this territory, give shared device in this territory for other territories read accordingly authority, this sample domain server start or timer expiry after will reading the corresponding script file of permission build and being sent to different territories according to these shared devices.Need to prove that asymmetric that the present invention says refers to that synchronously the information of the shared device of each server stores is not identical, is not the symmetrical gained that copies, and except raising the efficiency, has also increased security like this.For example for above-mentioned example, as shown in Figure 1, be the asymmetric synchronous synoptic diagram of the present invention, suppose that Chaoyang branch office (territory A) has had A1 under its command, A2, A3, four front-end equipments of A4, A1 and A2 need to be shared to Haidian branch office (territory B), also need simultaneously A2 and A3 are shared to Fengtai branch office (territory C), like this can be first with A1, A2, A3 puts into the shared data set that local domain sets up and closes, and respectively to A1, A2, A3 carries out mark, mark its separately read authority, for example A1 is labeled as with Haidian branch office and shares, be labeled as with Haidian branch office and Fengtai branch office A2 shared, be labeled as with Fengtai branch office A3 shared, thereby Chaoyang branch office restarts or timer expiry after the data communication device of A1 and A2 crossed network send to Haidian branch office, the data communication device of A2 and A3 is crossed network send to Fengtai branch office, thereby fulfillment database is asymmetric synchronous.
Below will the present invention be introduced in the mode of specific embodiment.
As shown in Figure 2; process flow diagram for the asymmetric method for synchronous of database in the embodiment of the invention video monitoring system; this embodiment has described the local domain server and sent the flow process of sharing data to other territories when starting; but need to prove; supervisory system of the present invention also can be set timer after starting; whether the inquiry shared data set exists shared device in closing behind the timer expiry; also send if having shared device then will generate corresponding script file; therefore can find out that following examples only are to realize a kind of means of the present invention; also can realize by other above-mentioned means, so these other means based on the above-mentioned thought of the present invention also should be included in protection scope of the present invention.This embodiment may further comprise the steps:
Step S201, the local domain keeper sets up shared data set and closes in local domain, and according to the sharing request in other territories be in shared data set is closed each shared device separately mark read authority.For example local domain A has had A1, A2, four front-end equipments of A3, A4 under its command, device A 1 and the device A 2 of territory B request shared domain A, device A 2 and the device A 3 of territory C request shared domain A, the keeper carries out mark to device A 1, A2, A3 respectively after receiving above-mentioned sharing request like this, marking arrangement separately read authority, wherein read authority and include the sign of having the right to read other territories of sharing data, for example be marked with the sign of territory B in the device A 1, represent that the informational needs of this device A 1 sends to territory B; And be marked with the sign of territory B and territory C in the device A 2, and represent that the information of this device A 2 not only needs to send to territory B, also need to send to territory C.As the preferred embodiments of the present invention, read authority and also comprise the authority information (for example cloud platform rotation of opertaing device) of controlling described shared device, and/or download or watch the authority information of the monitor video of shared device collection.For example device A 2 is made as the control cloud platform rotation for the authority of territory B, then the user of territory B can be by the rotation of device A 2 among the server controls territory A of territory B.Watch if equally device A 2 is made as for the authority of territory B, the user of the territory B video data that only can gather by the server evaluation equipment A2 of territory B then, and can not download to this locality.
As one embodiment of the present of invention, can be the keeper operation interface is provided, for example, as mentioned above, the local domain keeper at first chooses camera A1 and the A2 that manages in the territory of controlling oneself; And then in the configuration interface that occurs, choose first will with A1A2 to territory B, then dispose A1 and in B, can only watch, A2 can watch and download video recording in the B of territory.
Step S202 starts the application service assembly.But this moment, the local domain server was not accepted the registration message in other territories.
Step S203, the inquiry shared data set is closed, and judges whether described shared data set exists shared device in closing, and has shared device then reads the corresponding data script of permission build according to each shared device if judge.Wherein, can generate different data scripts according to different territories in the present invention, for example need device A 1 and the A2 of shared domain A for the B of territory, the data script that then generates for the B of territory will include information and the corresponding control authority of device A 1 and A2.As one embodiment of the present of invention, the data script that generates among the present invention meets the requirement of ANSI/ISO SQL 99, not limited by the DBMS isomery.For example: Insert into table_share (devid; athority) values (' shared device ID '; Share Permissions); wherein particularly, Share Permissions can represent such as 00 expression the authority of watching is only arranged as follows; 01 expression has the authority of rotary platform; 11 expressions have authority of download etc., get final product if authority increases the bit position more at most as required, and these similar variations all should be included within protection scope of the present invention.More specifically, in conjunction with above-mentioned example, can be Insert intotable_share (devid, athority) values (' A1 ', 11), its authority is " authority that download is arranged " concerning shared device A1 like this.
Step S204, the local domain server begins to accept the registration message in other territories, initiates registration to other territories simultaneously.
Step S205 after registration is successfully accepted in other territories, will send to other corresponding territories by network for the data script of not same area generation.Wherein, described network is included as IP network or dedicated network.Can adopt http/ftp/sip mode the transmission of data script between the territory.
Step S206, other territories are after receiving the data script that sends to oneself, described data script is put into processing queue, process at one's leisure and with the shared data data inserting storehouse in the described data script, can not affect synchronously because data like this work of other domain servers.
Step S207, other domain servers further judge whether successfully with the shared data data inserting storehouse in the described data script.If judge successfully with the shared data data inserting storehouse in the data script, then return to described local domain and receive successful message; If judge not successfully with the shared data data inserting storehouse in the data script, then return the message that takes defeat to described local domain.
Step S208, the message that the local domain server returns according to other domain servers is selected the shared device deletion that other territories are corresponding, perhaps retransmits.If what receive it is to receive successful message, then data script deletion this territory is corresponding according to the sign in other territories, for example receive territory B return receive successful message after, the data script that then A server in territory is corresponding with territory B is deleted.If what receive it is the message that takes defeat, resend the data script of correspondence according to the sign in described other territories.As one embodiment of the present of invention, if need to upgrade for certain territory shared device, for example the authority with device A 1 is updated to cradle head control by only watching, then this domain administrator directly closes interior corresponding shared device A1 to shared data set and makes amendment, and the startup timer, this domain server can directly generate corresponding data script and send to other territories behind the timer expiry.
As shown in Figure 3, be embodiment of the invention video monitoring system structural drawing, comprise that at least two are in the not server of same area,, pass through IP network or dedicated network communication between the server.One of them is local domain server 100, and other are other domain servers 200.Local domain server 100 is used for setting up shared data set at local domain and closes, and in closing according to shared data set each shared device read permission build data script, this reads the sign that authority includes other territories of having the right to read shared device, and the data script that generates is sent to the server 200 in other corresponding territories by network.Need to prove, it is in order clearly to understand the present invention that video monitoring system of the present invention has adopted a plurality of servers, but each territory also can share a server in the reality, if may not can there be the problem of data sharing when sharing a server, therefore at this example that shares a server is repeated no more.
Wherein, the server in other territories 200 is used for after receiving the data script that sends to oneself the data script being put into processing queue, processes at one's leisure and with the shared data data inserting storehouse in the data script.As one embodiment of the present of invention, the server 200 in other territories also is used for judging whether successfully the shared data data inserting storehouse with the data script, if judge successfully with the shared data data inserting storehouse in the data script, then return to local domain server 100 and receive successful message, if judge not successfully with the shared data data inserting storehouse in the data script, then return the message that takes defeat to local domain server 100.
As one embodiment of the present of invention, local domain server 100 also is used for after the message that receives the reception success that other domain servers 200 return, data script deletion this territory is corresponding according to the sign of other domain servers 200; Perhaps, after receiving the message that takes defeat that other domain servers 200 return, resend the data script according to the sign of other domain servers 200.
As one embodiment of the present of invention, local domain server 100 is used for also whether the inquiry shared data set exists shared device in closing behind the startup of application service assembly or timer expiry, if shared data set is closed the interior shared device that exists, then the authority that reads according to each shared device regenerates data script and transmission.
As one embodiment of the present of invention, this system also comprises the third party's memory storage 300 that links to each other with each server, be used for preserving the monitor data that each territory shared device gathers, each server reads corresponding monitor data according to the information of shared device from third party's memory storage 300.
As one embodiment of the present of invention, the above-mentioned authority that reads also comprises the authority information of controlling shared device, and/or downloads or watch the authority information of the monitor video of shared device collection.
The present invention also proposes a kind of server 400, as shown in Figure 5, structural drawing for embodiment of the invention server, server 400 is used for the front-end equipment in this territory is managed and mutually exchanges the information of shared device with the server in other territories, comprises that shared data set is closed to preserve module 410, data script generation module 420 and sending module 430.Shared data set is closed and is preserved module 410 and be used for being kept at the shared data set that local domain sets up and close, this shared data set each shared device in closing is according to the authority that reads of the sharing request mark in other territories, reads the sign that authority includes other territories of having the right to read described shared data.Data script generation module 420 is used for reading permission build data script according to each shared device.Sending module 430 is used for by network the data script that data script generation module 420 generates being sent to other corresponding territories according to the sign in other territories of data script.
As one embodiment of the present of invention, server 400 also comprises message sink module 440, be used for receiving the receipt message that other domain servers return, if the receipt message that receives is for receiving successful message, then data script deletion this territory is corresponding according to the sign in described other territories; If the receipt message that receives is the message that takes defeat, then the sign according to described other territories regenerates data script and transmission.
As one embodiment of the present of invention, the above-mentioned authority that reads also comprises the authority information of controlling described shared device, and/or downloads or watch the authority information of the monitor video of described shared device collection.
In the above-described embodiments, server 400 is by the server communication in IP network or dedicated network and other territories.
The present invention can send to the information of shared device in other territories that request shares according to the authority information of shared device, can solve the asymmetric stationary problem of supervisory system, and the security that improves whole system.Can automatically a large amount of shared data be sent in other territories by the present invention in addition, improve the performance of total system.
Although illustrated and described embodiments of the invention, for the ordinary skill in the art, be appreciated that without departing from the principles and spirit of the present invention and can carry out multiple variation, modification, replacement and modification to these embodiment that scope of the present invention is by claims and be equal to and limit.