Telecontrol channel method of data synchronization
Technical field
The present invention relates to a kind of method of data synchronization of telecontrol channel, belong to the Operation of Electric Systems communications field.
Background technology
The problem that Operation of Electric Systems communication equipment mainly exists when two-shipper switches is, the analog quantity of converting equipment operation monitoring, switching value, action message teletransmission are to scheduling station, if while there is two-shipper or binary channels switching, switch to main passage, the repeating transmission of the analog quantity sending to scheduling station, quantity of state, action message ubiquity information, leakage are found to resemble.For the leakage of quantity of state information, send out state and the physical device state that can cause scheduling station to monitor inconsistent, if repeating transmission can cause quantity of state information to occur displacement action, may cause operator on duty to produce wrong judgement, affect system operation.The data message of the passage of the most employing of passage switching at present buffer memory experiences in switching time, after switching, sends to the method for scheduling station, this kind of method inaccuracy switching time, and under some abnormal conditions, the time can exceed experience time value.
Summary of the invention
The object of this invention is to provide a kind of telecontrol channel method of data synchronization, to solve in current transformer station the problem that sends, leak photos and sending messages of repeating of when binary channels is switched information.
The present invention proposes a kind of telecontrol channel method of data synchronization for solving the problems of the technologies described above, and the concrete steps of the method are as follows:
(1). will in transformer station, in binary channels, be divided into a synchronizing channel, one by synchronizing channel, synchronizing channel with by synchronizing channel in set up consistent information cache district;
(2). data to be sent are arranged in to sequence according to time sequencing;
(3). the data in the sequence of putting in order are sent to synchronizing channel simultaneously and by the information cache in synchronizing channel, each data in information cache must comprise Data Identification and local markers;
(4). synchronizing channel sends to scheduling by the data that receive in information cache, if this data are received in scheduling, sends the acknowledgement frame of these data to synchronizing channel, if these data are not received in scheduling, does not send;
(5) if. synchronizing channel is received acknowledgement frame, and synchronizing channel can adopt the mixing of the method for synchronization immediately, cycle synchronisation mode, the request method of synchronization or this three's method of synchronization to sent this data by synchronizing channel;
(6). by synchronizing channel, by the data comparison in the data of being received and its transmit queue, deleted in transmit queue and data this Data duplication.
Synchronizing channel in described step (1) refers to the passage that sends synchrodata, is referred to the passage of receiving isochronous data by synchronizing channel.
Synchronizing channel in described step (1) and can be deployed in an equipment or two platform independent equipment by synchronizing channel, if synchronizing channel and be deployed in an equipment by synchronizing channel, synchronizing channel and by the mode of the synchronous employing inter-task message between synchronizing channel, if synchronizing channel and be deployed in two platform independent equipment by synchronizing channel, synchronizing channel and by the synchronous employing UDP/IP host-host protocol between synchronizing channel.
Described synchronizing channel and by synchronizing channel system time error be millisecond a rank.
Data Identification in described step (3) refers to these data globally unique identifier in database, the Data Identification of identical information synchronous, must be consistent in by synchronizing channel, local markers refers to telemechanical apparatus markers while receiving these data, and this markers is accurate to millisecond.
The method of synchronization immediately in described step (5) refer to synchronizing channel data send successfully after immediately to sent this data by synchronizing channel; Cycle synchronisation mode refers to that synchronizing channel is periodically to sent the last successful data that send by synchronizing channel; Request synchronously refers to that, after primary channel switching, standby passage upgrades to main channel, but still is by synchronizing channel, asks the last successful data that send immediately to main channel (existing is standby passage, but still is synchronizing channel) before this.
Described main channel refers to and initiatively sends and the passage of request synchrodata, and standby passage refers to the passage of passive receiving isochronous data and requested synchrodata, and active and standby passage can be all synchronous or by synchronizing channel.
Described step (6) specific implementation step is as follows:
A. judgement has sent six parameters of successful data, comprises the markers T of synchrodata in the synchronizing channel of transmission
m, transmission synchronizing channel in the Data Identification Index of synchrodata
m, by the markers T of data in synchronizing channel transmit queue
q, by the Data Identification Index of data in synchronizing channel transmit queue
q, by synchronizing channel transmit queue with the markers T of synchrodata identical information
mqwith synchronizing information time window Δ t;
B. according to formula (T
m-Δ t) <T
q< (T
m+ Δ t) determine by the time window of synchronizing channel transmit queue;
C. in this time window, by judgement Data Identification, find out this data;
D. will be by T in synchronizing channel transmit queue
q<=T
mqdata are deleted from transmit queue;
If while e. being switched to main channel by synchronizing channel, by the data that exist in synchronizing channel transmit queue, be all and do not send data.
Synchronizing information time window Δ t in described step a is an empirical value.
Telecontrol channel method of data synchronization of the present invention, by set up buffer area in passage, data are sent to synchronizing channel and sent to scheduling to wait for the acknowledgement frame of scheduling, adopted Fuzzy Calculation method to being undertaken by the information to be sent of synchronizing channel end after some row steps of go-on-go by synchronizing channel according to time window in the receipt of receiving by synchronizing channel, synchronizing channel simultaneously, is deleted the information that synchronizing channel had sent.The method can carry out effectively information to be sent, go-on-go accurately, and what binary channels is reached after passage switches, can accomplish information does not leak the result of sending out, not retransmitting.
Accompanying drawing explanation
Fig. 1 is the flow chart of a kind of telecontrol channel method of data synchronization of the present invention;
Fig. 2 is the synchronizing channel of the embodiment of the present invention and by synchronizing channel deployment way schematic diagram;
Fig. 3 is the schematic diagram of the method for synchronization immediately of the embodiment of the present invention;
Fig. 4 is the schematic diagram of the cycle synchronisation mode of the embodiment of the present invention;
Fig. 5 is the schematic diagram of the request method of synchronization of the embodiment of the present invention;
Fig. 6 is the synchronizing information time window schematic diagram of the embodiment of the present invention.
Embodiment
Below in conjunction with accompanying drawing, the specific embodiment of the present invention is described further.
As shown in Figure 1, its concrete steps are as follows for the flow process of this telecontrol channel method of data synchronization:
First the binary channels in power system transformer substation is divided into a synchronizing channel, one by synchronizing channel, synchronizing channel refers to the passage that sends synchrodata, is referred to the passage of receiving isochronous data by synchronizing channel.Synchronizing channel and by the deployment of synchronizing channel as shown in Figure 2, can be divided into is main standby single, double machine mode and a main how standby single, double machine mode.If adopt the standby single, double machine mode of a master one, passage A is synchronous to carried out data by synchronizing channel B as synchronizing channel, if synchronizing channel A and be deployed in an equipment by synchronizing channel B, synchronizing channel A and by the mode of the synchronous employing inter-task message between synchronizing channel B, if synchronizing channel A and be deployed in two platform independent equipment by synchronizing channel B, synchronizing channel A and by the synchronous employing UDP/IP host-host protocol between synchronizing channel B.If adopting a master how standby is the mode of single, double machine, passage A is synchronous to carried out data by synchronizing channel B, C as synchronizing channel, if synchronizing channel A and be deployed in an equipment by synchronizing channel B, C, synchronizing channel A and by the mode of the synchronous employing inter-task message between synchronizing channel B, C, if synchronizing channel A and be deployed in two platform independent equipment by synchronizing channel B, C, synchronizing channel A and by the synchronous employing UDP/IP host-host protocol between synchronizing channel B, C.At synchronizing channel with in by synchronizing channel, set up information cache district, in these two buffer areas, the order of cache information entry should be consistent, synchronizing channel and be Millisecond by the system time error of synchronizing channel.
Then data to be sent are arranged in to sequence according to time sequencing, data in the sequence of putting in order are sent to synchronizing channel in chronological order simultaneously and by the information cache in synchronizing channel, each data in information cache must comprise Data Identification and local markers.Data Identification refers to these data globally unique identifier in database, the Data Identification of identical information synchronous, must be consistent in by synchronizing channel, local markers refers to telemechanical apparatus markers while receiving these data, this markers is accurate to millisecond.
Synchronizing channel sends to scheduling by the data that receive in information cache, if this data are received in scheduling, sends the acknowledgement frame of these data to synchronizing channel, if these data are not received in scheduling, does not send.If synchronizing channel is received acknowledgement frame, synchronizing channel can adopt the mixing of the method for synchronization immediately, cycle synchronisation mode, the request method of synchronization or this three's method of synchronization to sent this data by synchronizing channel.
The principle of the described method of synchronization immediately as shown in Figure 3, its detailed process is as follows: t0 constantly data I nf0 occurs and transmits to passage A, B simultaneously, t1 constantly passage A, B receives this data, now scheduling and passage A(synchronizing channel) just communicate, passage A forwards Inf0 data to scheduling, scheduling is constantly received these data and to passage A transmission success, is received the acknowledgement frame of Inf0 data at t2, passage A receives after acknowledgement frame at t3 constantly, being Inf0 data sends successfully to scheduling, and it is synchronous that passage A carries out data to channel B (by synchronizing channel) immediately.
As shown in Figure 4, its detailed process is as follows for the principle of described cycle synchronisation mode: t0 constantly data I nf0 occurs and transmits to passage A, B simultaneously; T1 constantly passage A, B receives this data; T4 constantly passage A receives the acknowledgement frame of scheduling, and Inf0 sends successfully to scheduling.
T3 constantly data I nf1 occurs and transmits to passage A, B simultaneously; T5 constantly passage A, B receives this data; T8 constantly passage A receives the acknowledgement frame of scheduling, and Inf1 sends successfully to scheduling.T6 constantly the cycle synchronisation time arrive, although Inf1 occurs at t3 constantly, then, unconfirmed transmission successfully still, therefore passage A(synchronizing channel constantly for t6) still to channel B (by synchronizing channel) transmission Inf0, to carry out data synchronous.The cycle synchronisation time arrives t9 constantly, although Inf1 just occurred in the t3 moment (being less than t4), but confirm to send, be successfully at t8 constantly, therefore Inf1 is t6 and the data that occur during t9 week, now passage A(synchronizing channel) to channel B (by synchronizing channel) transmission Inf1, to carry out data synchronous.T10 constantly the cycle synchronisation time arrive, because t9 any signal does not occur, passage A(synchronizing channel constantly to t10 constantly) still to channel B (by synchronizing channel), sending Inf1, to carry out data synchronous.
As shown in Figure 5, its detailed process is as follows for the principle of the described request method of synchronization: t0 constantly data I nf0 occurs and transmits to passage A, B simultaneously; T1 constantly passage A, B receives this data; T3 constantly passage A receives the acknowledgement frame of scheduling, and Inf0 sends successfully to scheduling, and now passage A continues to send other data to scheduling, but scheduling is not received.T4 constantly dispatches to passage A and sends other data, but passage A does not receive; Scheduling and passage A communicating interrupt between t3 to t4.T5 constantly data I nf1 occurs and transmits to passage A, B simultaneously; T6 constantly passage A, B receives this data, and now passage A is still main channel and sends Inf1 to scheduling, but due to communicating interrupt, does not receive the transmission success acknowledgement frame of scheduling to Inf1 always.Because of passage A and dispatching communication interruption, constantly there is passage and switch in t7, scheduling is restarted link to channel B, now channel B upgrades to main channel, to the last successful data message (being Inf0) that sends of passage A request, passage A sends the synchrodata of Inf0 to channel B, the success of the transmission In0 data that channel B is received t1 are constantly deleted, though Inf1 sends at passage A before this, but telemechanical is owing to not receiving that transmission successfully confirms, therefore do not delete, by channel B, to scheduling, at t8, constantly sent, thereby having guaranteed that Inf1 does not leak sends out.
By synchronizing channel, according to synchronizing information time window principle, deleted in transmit queue and data this Data duplication.As shown in Figure 6, its specific implementation process is as follows for this synchronizing information time window principle: passage A, B be respectively synchronizing channel, by synchronizing channel, and Δ t is 150ms, and passage A receives that the time of each signal is as follows: signal 1(T
q1) be 110ms, signal 2(T
q2) be 205ms, signal 3(T
q3) be 340ms, signal 4(T
q4) be 570ms.Channel B receives that the time of each signal is as follows: signal 1(T
q1) be 100ms, signal 2(T
q2) be 250ms, signal 3(T
q3) be 410ms, signal 4(T
q4) be 590ms.It is synchronous that passage A initiates data to channel B when 450ms.Now be scheduled and confirm that transmission is successfully signal 1,2,3, passage A does not receive signal 4 yet.So time synchrodata position signal 3, equal in passage A, be 340ms.According to formula (T
m-Δ t) <T
q< (T
m+ Δ t), synchronizing information time window is 190ms to 490ms.Channel B is received the data synchronizing signal 3 that passage A initiates when 450ms.Now channel B is received signal 1,2,3, does not receive yet signal 4.According to synchronizing information time window and formula Index
q=Index
m, in transmit queue, search signal 3, i.e. T
mqequaling in channel B, is 410ms.Press formula T
q1<T
q2<T
q3<=T
mq, delete signal 1,2,3(T in transmit queue
q1<T
q2<T
q3<=410ms).
Time window scope in the method is only 2 times of Δ t, and the data message that (Millisecond) comprises in this extremely short time window is limited, therefore the method can be guaranteed to locate and delete fast to send successful all data.