A kind of Local Area Network real-time database date storage method and system
Technical field
The present invention relates to a kind of Local Area Network real-time database date storage method and system, belong to local area network protection management system.
Background technology
Local area network protection management system needs run by protected object to carry out supervision in real time, control and management, not only need to safeguard a large amount of shared data and control knowledge; And the completing and there is the strict time limit of these application activities, require within certain moment or certain finite time from can only IED(IntelligentElectronicDevice) gather the remote measurement, remote signalling and the electric quantity data that come, by association access to each other and process, the working lipe of these data is of short duration, out-of-date, lost efficacy, therefore the exactness of electric substation automation system not only depends on logic result, but also depends on the logic resultant time. Therefore, in order to obtain upgrading the response extremely fast with inquiry, meet the needs of application in real time, adopt real-time data base RTDB(RealTimeDatabase) carry out storing to data and process. Real-time data base is exactly the database that its data and affairs have explicit timing restriction, ensure to share the consistence of data when the constraint of time, the exactness of data not only depends on logic result, and depends on the generation time of logic result and derive the time consistency that result is used data. But, for the Application Areas producing huge data volume instantaneously, due to the restriction of hardware, single real-time database is difficult to carry so big data volume thus has given play to optimum efficiency, there is the bottleneck in performance.
Summary of the invention
Under it is an object of the invention to solve Dual OMU Servers Mode traditional in Local Area Network, single real-time database runs the bottleneck problem run into.
The present invention provides a kind of Local Area Network real-time database date storage method for solving the problems of the technologies described above, and the step that the method specifically comprises is:
1). a real-time database in selected zone network real-time database is set to backup real-time database, all data that in other server run except oneself for storing, real-time data base stores, a real-time database in selected zone network real-time database is real-time database management machine again, for the relevant information of real data created and safeguard each real-time database and storage thereof;
2). judge whether real-time database management machine breaks down at real-time database operational process, if real-time database management machine breaks down, its administration authority and relevant data handover are given the real-time database specified in advance and inherit as management machine by this real-time database management machine, and send notice to other real-time database, inform the change that other real-time database is relevant;
3). in real-time database operational process, judge whether the real-time database of non-management machine breaks down, if the real-time database having non-management machine breaks down, management machine real-time database can utilize backup storehouse to take over the relevant data of real-time database of non-management machine and the business of this generation fault, management machine real-time database sends notice to other real-time database, informs the change that other real-time database is relevant.
Described step 2) concrete steps as follows:
A. when real-time database management machine breaks down, first judging the management of this real-time database, function is no initiatively notifies other real-time database, if other real-time database can initiatively be notified, this real-time database management machine sends message notice by private network and specifies the real-time database inherited as management machine in advance, then step b is entered, if this real-time database management machine can initiatively not notify other real-time database, the real-time database inherited as management machine is specified to send test frame to this real-time database management machine in advance, and do not receive the reply frame of this real-time database management machine at the appointed time, this real-time database being designated is automatically upgraded to management machine, then steps d is entered,
B. the real-time database being designated sends after receiving this frame and confirms that frame represents and receives notice;
C. then administration authority and relevant data handover are given the real-time database being designated by real-time database management machine, and this real-time database real-time database being designated is replied after receiving information and confirmed that frame represents and receive authority and data;
D. this real-time database being designated sends request frame to backup storehouse, request backup storehouse sends the storage data of real-time database management machine, the relevant data and then sending real-time database management machine after confirming frame are replied in backup storehouse after receiving request, after this real-time database being designated receives data, " real-time database management table " is carried out corresponding modify, and send notice to other real-time database, inform the change that other real-time database is relevant.
The concrete steps of described step 3) are as follows:
A). judge that can the non-management machine real-time database of this generation fault initiatively notify other real-time database, if other real-time database can initiatively be notified, management machine real-time database is that the non-management machine that this breaks down sends a frame test frame by private network, the non-management machine real-time database of this generation fault is replied by private network and is confirmed frame, then step b) is entered, if can initiatively not notify other real-time database, management machine real-time database is that the non-management machine that this breaks down sends a frame test frame by private network, step c) is entered after not receiving the reply frame of this non-management machine broken down at the appointed time,
B). management machine real-time database sends the relevant data of non-management machine real-time database and the request frame of business of this generation fault of adapter, and this non-management machine real-time database is replied after receiving and confirmed frame;
C). management machine real-time database sends request frame to backup storehouse, and request sends the relevant data of the non-management machine real-time database that fault occurs, and backup storehouse is replied after receiving request frame and confirmed frame, the relevant data of the non-management machine real-time database of send generation fault;
D). management machine real-time database receives backup storehouse and sends relevant data, revises its " real-time database management table ", and sends notice to other real-time database, informs the associated change that other real-time database occurs.
The present invention also provides a kind of Local Area Network real-time database data-storage system for solving the problems of the technologies described above, this real-time database data-storage system at least comprises three real-time database, for being carried out data transmission by public network and client terminal, one of them real-time database is backup real-time database, all data that in other server run except oneself for storing, real-time data base stores, a real-time database is real-time database management machine, for the relevant information of real data created and safeguard each real-time database and storage thereof, communicated by private network between each real-time database.
Its administration authority and relevant data handover are given the real-time database specified in advance and inherit as management machine when there is fault by described real-time database management machine, and relevant data and the business of the real-time database of the non-management machine of backup storehouse adapter generation fault can be utilized, and send notice to other real-time database, inform the change that other real-time database is relevant.
The invention has the beneficial effects as follows: the present invention is by being stored into multiple real-time data base by the data that originally should be stored in unit real-time data base according to certain regular-scattered, the real-time database of one of them machine stores, as backup real-time database, all data that in other server run except oneself, real-time data base stores, the real-time database of a machine, as the management machine of real-time database, creates and safeguards " real-time database management table. When the real-time database of one of them or multiple stage machine breaks down for a certain reason, data can be carried out Recovery processing timely by the present invention.
Accompanying drawing explanation
Fig. 1 is the schematic diagram of the deployment way of the embodiment of the present invention;
Fig. 2 is the schematic diagram of embodiment of the present invention real-time database when initiatively notifying other real-time database when breaking down;
Fig. 3 is the operation reserve schematic diagram of real-time database of the present invention when cannot initiatively notify other real-time database when breaking down;
Fig. 4 is the operation reserve schematic diagram of embodiment of the present invention real-time database when initiatively notifying other real-time database when breaking down;
Fig. 5 is the operation reserve schematic diagram of embodiment of the present invention real-time database when cannot initiatively notify other real-time database when breaking down.
Embodiment
Below in conjunction with accompanying drawing, the specific embodiment of the present invention is described further.
The embodiment of a kind of Local Area Network real-time database date storage method of the present invention
We adopt the supervisory system of C/S framework for integral deployment as shown in Figure 1, and this supervisory system adopts client terminal to obtain relative information displaying from server to the pattern of user. With traditional C/S framework the difference is that, its real-time database adopts concentrating type to dispose, and the real-time database in every station server stores respectively and processes a part of data information of whole system, dispersion stores in physics realization, but for client terminal, what obtain is but the complete information of whole system, carries out information interaction by public network between client terminal and server. The concrete steps of its real-time database data storage means comprise:
1. real-time database is but communicated by private network each other, disposes one of them real-time database, as management machine, all real-time database is carried out unified management.
2. dispose the full detail that one of them real-time database is used for storing whole system as backup storehouse, what the delta data produced when other real-time database is run was real-time is synchronously sent to backup storehouse, so that a real-time database carries out date restoring timely after breaking down wherein.
3. in operational process, as shown in Figure 2, when one of them real-time database A(manage machine) break down for a certain reason cannot work time, send message notice by private network immediately to specify in advance and inherit as the real-time database B of management machine, it is designated to send after real-time database B receives this frame and confirms that frame represents and receive notice; Then administration authority and relevant data handover are given the real-time database B being designated by real-time database A, and real-time database B replys after receiving information and confirms that frame represents and receive authority and data; Then real-time database B sends request frame to backup storehouse, request backup storehouse sends the storage data of real-time database A, the relevant data and then sending real-time database A after confirming frame are replied in backup storehouse after receiving request, after real-time database B receives data, " real-time database management table " is carried out corresponding modify, and send notice to other real-time database, inform the change that other real-time database is relevant.By above flow process, it is achieved that after there is network fault as the real-time database of management machine, as netting twine disconnects, the phenomenon such as net card failure reaches the object of network protection after occurring.
4. in operational process, as shown in Figure 3, when one of them real-time database A(manage machine) break down and cannot work and then cannot communicate with other real-time database time, the real-time database B with management machine qualification specified in advance by real-time database A sends test frame to real-time database A, if not replying frame at the appointed time, real-time database B is automatically upgraded to management machine; Then to backing up and send request frame, request backup storehouse sends the former management machine of real-time database A() the middle data stored, to continue to store and to process the data of real-time database A, backup storehouse sends the relevant data confirming that frame after image real-time database B sends request after receiving request, " real-time database management table " is carried out corresponding modify by last real-time database B, and send notice to other real-time database, inform the associated change that other real-time database occurs.
5. in operational process, as shown in Figure 4, when wherein any one real-time database (non-management machine) break down for a certain reason cause working time, as management machine real-time database A immediately by private network be the real-time database B broken down send one frame test frame, real-time database B is replied by private network equally subsequently and confirms frame, then real-time database A sends the request frame of the relevant data of adapter real-time database B and business, real-time database B replys after receiving and confirms frame, real-time database A sends request frame to backup storehouse, request sends the relevant data of real-time database B, backup storehouse is replied after receiving request frame and is confirmed frame, receive the relevant data sending real-time database B to real-time database A, last real-time database A revises " real-time database management table " after receiving data and sends notice to other real-time database, inform the change that other real-time database is relevant.
6. in operational process, as shown in Figure 5, when one of them real-time database B(non-management machine) break down when cannot work and then cannot communicate with other real-time database, real-time database A as management machine sends a frame test frame to real-time database B, when not receiving reply frame in the specified time, namely can't detect when existing of real-time database B, real-time database A sends request frame to backup storehouse, request sends the relevant data of real-time database B, to continue to store and to process relevant data, backup storehouse is replied after receiving request frame and is confirmed frame, the relevant data of send real-time database B, real-time database A revises " real-time database management table " after receiving relevant data, and send notice to other real-time database, inform the associated change that other real-time database occurs.
The embodiment of a kind of Local Area Network real-time database data-storage system of the present invention
As shown in Figure 1, this Local Area Network real-time database data-storage system adopts client terminal to obtain relative information displaying from server to the pattern of user. With traditional C/S framework the difference is that, its real-time database adopts concentrating type to dispose, and the real-time database in every station server stores respectively and processes a part of data information of whole system, dispersion stores in physics realization, but for client terminal, what obtain is but the complete information of whole system, carries out information interaction by public network between client terminal and server. This system comprises five client terminals, three station servers and a backup machine, wherein in three station server real-time database one be real-time database management machine, for the relevant information of real data created and safeguard each real-time database and storage thereof, all data that in other server that backup machine is running except oneself for storing, real-time data base stores, are communicated by private network between each real-time database.Its administration authority and relevant data handover are given the real-time database specified in advance and inherit as management machine when there is fault by described real-time database management machine, and relevant data and the business of the real-time database of the non-management machine of backup storehouse adapter generation fault can be utilized, and send notice to other real-time database, inform the change that other real-time database is relevant. Its concrete treating processes, as described in last embodiment, is not just describing in detail here.