CN112398565A - Method and system for generating time scale adjustment instruction and adjusting time scale - Google Patents

Method and system for generating time scale adjustment instruction and adjusting time scale Download PDF

Info

Publication number
CN112398565A
CN112398565A CN202011226727.3A CN202011226727A CN112398565A CN 112398565 A CN112398565 A CN 112398565A CN 202011226727 A CN202011226727 A CN 202011226727A CN 112398565 A CN112398565 A CN 112398565A
Authority
CN
China
Prior art keywords
time
service end
instruction
time service
safety
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.)
Granted
Application number
CN202011226727.3A
Other languages
Chinese (zh)
Other versions
CN112398565B (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.)
Hebei Branch Of Huaneng New Energy Co ltd
Original Assignee
Hebei Branch Of Huaneng New Energy 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 Hebei Branch Of Huaneng New Energy Co ltd filed Critical Hebei Branch Of Huaneng New Energy Co ltd
Priority to CN202011226727.3A priority Critical patent/CN112398565B/en
Publication of CN112398565A publication Critical patent/CN112398565A/en
Application granted granted Critical
Publication of CN112398565B publication Critical patent/CN112398565B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L7/00Arrangements for synchronising receiver with transmitter
    • H04L7/0016Arrangements for synchronising receiver with transmitter correction of synchronization errors

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The invention discloses a method and a system for generating a time scale adjustment instruction and adjusting a time scale. The time scale adjustment instruction generation method comprises the following steps: the time service end acquires a safety instruction sequence sent by the time service end, and the safety instruction sequence is divided into a plurality of feedback instructions, wherein each feedback instruction is single bit data; sending the selected feedback instruction to the time service end, and receiving the time scale of the time service end sent by the time service end; and generating a time scale adjusting instruction according to the communication error, the allowable time error, the time scale of the time served end and the time of the time served end, and sending the time scale adjusting instruction to the time served end. The method and the system are suitable for the electric power one-way safety network system, and can safely and effectively carry out time scale adjustment under the conditions of not changing the existing networking structure and not increasing an additional satellite clock.

Description

Method and system for generating time scale adjustment instruction and adjusting time scale
Technical Field
The invention relates to the technical field of time scale adjustment, in particular to a method and a system for generating a time scale adjustment instruction and adjusting a time scale.
Background
In the traditional time scale adjusting method, both a time service end and a time service receiving end send time scales to the other side, communication errors are corrected by using the carried time scales, and then the time service receiving end passively receives the time scales given by the time service end. As shown in fig. 1, L1-L4 represents a security level, because of the existence of a single-bit physical security isolation device, the high security region (L1) cannot receive the time scale transmitted by the low security region (L2) (because the time scale length exceeds 1bit), so that the conventional time-tick method cannot work, and in addition, the high security region (L1) has a security risk due to the complete and indiscriminate passive reception of the time scale of the low security region (L2). Therefore, how to perform time scale adjustment under the condition of the private power network to ensure that the existing networking structure is not changed and an additional satellite clock is not added is a problem to be solved urgently.
Disclosure of Invention
The invention aims to provide a method and a system for generating a time scale adjustment instruction and adjusting a time scale, which are suitable for a power one-way safety network system and can safely and effectively adjust the time scale without changing the existing networking structure and adding an additional satellite clock.
In order to achieve the purpose, the invention provides the following scheme:
a method of time stamp adjustment instruction generation, comprising:
the time service end obtains an allowed time error and a safety instruction sequence sent by the time service end; the safety instruction sequence is a binary sequence;
the time service end divides the safety instruction sequence into a plurality of feedback instructions; each feedback instruction is single bit data;
the time service end selects a feedback instruction, sends the selected feedback instruction to the time service end and records a first time point;
the time service end receives a time mark of the time service end sent by the time service end, and records a second time point and time of the time service end when receiving the time mark of the time service end;
the time service end determines a communication error according to the first time point, the second time point and the length of the safety instruction sequence;
the time service end generates a time mark adjusting instruction according to the communication error, the allowed time error, the time mark of the time service end and the time service end time, and sends the time mark adjusting instruction to the time service end;
the time service end judges whether all feedback instructions are selected or not to obtain a first judgment result; if the first judgment result is negative, returning to the step that the time service end selects a feedback instruction.
Optionally, before the acquiring the secure instruction sequence sent by the timed terminal, the method further includes:
the time service terminal acquires the identity verification information sent by the time service terminal;
and the time service end verifies the identity verification information and sends a verification result to the time service end.
Optionally, the determining, by the time service terminal, a communication error according to the first time point, the second time point, and the length of the safety instruction sequence specifically includes:
the communication error is determined according to the following formula:
ttl=(∑△tn)/(2*N)
wherein,
△tn=t2-t1
wherein ttl represents a communication error,. DELTA.tnIndicating the time difference, t1 indicating a first point in time, t2 indicating a second point in time, N indicating the length of the sequence of safety instructions, N ≧ 3.
Optionally, the time service end generates a time scale adjustment instruction according to the communication error, the allowed time error, the time scale of the time served end, and the time of the time service end, and specifically includes:
calculating the difference value between the sum of the time scale of the time served end and the communication error and the time of the time served end to obtain a calculated value;
judging whether the calculated value is larger than the allowed time error or smaller than a negative value of the allowed time error to obtain a second judgment result;
if the second judgment result is negative, no time scale adjustment instruction is generated;
if the second judgment result is yes, judging whether the calculated value is larger than the allowable time error or not, and obtaining a third judgment result;
if the third judgment result is yes, judging that the time advance of the time served end is obtained, negating the selected feedback instruction and then sending the negation instruction to the time served end;
if the third judgment result is negative, judging to obtain the time lag of the time service end, and sending the selected feedback instruction to the time service end.
The invention also provides a time scale adjustment instruction generating system, which comprises:
the safety instruction sequence acquisition module is used for acquiring an allowable time error and a safety instruction sequence sent by a time service end; the safety instruction sequence is a binary sequence;
the safety instruction sequence dividing module is used for dividing the safety instruction sequence into a plurality of feedback instructions; each feedback instruction is single bit data;
the feedback instruction sending module is used for selecting a feedback instruction, sending the selected feedback instruction to the time service end and recording a first time point;
the time scale receiving module of the time served end is used for receiving the time scale of the time served end sent by the time served end and recording a second time point and time of the time served end when receiving the time scale of the time served end;
the communication error determining module is used for determining a communication error according to the first time point, the second time point and the length of the safety instruction sequence;
the time scale adjusting instruction generating module is used for generating a time scale adjusting instruction according to the communication error, the allowed time error, the time scale of the time served end and the time of the time served end, and sending the time scale adjusting instruction to the time served end;
the first judgment module is used for judging whether all the feedback instructions are selected to obtain a first judgment result; and when the first judgment result is negative, executing the feedback instruction sending module.
The invention also provides a time scale adjusting method, which comprises the following steps:
the time service end sends a safety instruction sequence to the time service end; the safety instruction sequence is a binary sequence;
the time service end receives a time scale adjustment instruction sent by the time service end; the time scale adjusting instruction is single bit data;
the time service end judges whether the received time scale adjustment instruction is the same as the safety instruction sequence or not to obtain a fourth judgment result;
if the fourth judgment result is yes, the timed end adjusts the timing mark positively;
if the fourth judgment result is negative, the time-receiving end judges whether the received time scale adjustment instruction is opposite to the safety instruction sequence or not, and a fifth judgment result is obtained;
if the fifth judgment result is yes, the time-receiving end carries out negative timing mark;
if the fifth judgment result is negative, the time service terminal updates the safety instruction sequence and sends the updated safety instruction sequence to the time service terminal.
Optionally, the method for sending a security instruction sequence from the time-service end to the time-service end further includes:
the timed terminal sends identity verification information to the timed terminal;
and receiving an identity verification result sent by the time service terminal.
Optionally, the adjustment amounts of the positive adjustment time scale and the negative adjustment time scale are both D/D; wherein D represents the allowable time error, D represents the time scale adjustment step size, and D > 2.
The present invention also provides a time scale adjustment system, including:
the safety instruction sequence sending module is used for sending a safety instruction sequence to the time service end; the safety instruction sequence is a binary sequence;
the time scale adjustment instruction receiving module is used for receiving a time scale adjustment instruction sent by the time service terminal; the time scale adjusting instruction is single bit data;
the fourth judging module is used for judging whether the received time scale adjusting instruction is the same as the safety instruction sequence or not to obtain a fourth judging result; if the fourth judgment result is yes, executing a timing mark correcting module; if the fourth judgment result is negative, executing a fifth judgment module;
the timing mark correcting module is used for realizing the timing mark correcting of the timed terminal;
the fifth judging module is used for judging whether the received time scale adjusting instruction is opposite to the safety instruction sequence or not to obtain a fifth judging result; if the fifth judgment result is yes, executing a negative tone time stamp module; if the fifth judgment result is negative, executing a safety instruction sequence updating module;
the time scale negative adjustment module is used for realizing the time scale negative adjustment of the time served end;
and the safety instruction sequence updating module is used for updating the safety instruction sequence and sending the updated safety instruction sequence to the time service end.
The invention also provides a time scale adjustment instruction generation and time scale adjustment method, which comprises the following steps:
the time service end sends a safety instruction sequence to the time service end; the safety instruction sequence is a binary sequence;
the time service end obtains an allowed time error and a safety instruction sequence sent by the time service end;
the time service end divides the safety instruction sequence into a plurality of feedback instructions; each feedback instruction is single bit data;
the time service end selects a feedback instruction, sends the selected feedback instruction to the time service end and records a first time point;
the time service end receives a time mark of the time service end sent by the time service end, and records a second time point and time of the time service end when receiving the time mark of the time service end;
the time service end determines a communication error according to the first time point, the second time point and the length of the safety instruction sequence;
the time service end generates a time mark adjusting instruction according to the communication error, the allowed time error, the time mark of the time service end and the time service end time, and sends the time mark adjusting instruction to the time service end;
the time service end receives a time scale adjustment instruction sent by the time service end; the time scale adjusting instruction is single bit data;
the time service end judges whether all feedback instructions are selected or not to obtain a sixth judgment result; if the sixth judgment result is negative, returning to the step of selecting a feedback instruction by the time service end;
the time service end judges whether the received time scale adjustment instruction is the same as the safety instruction sequence or not to obtain a seventh judgment result;
if the seventh judgment result is yes, the timed end adjusts the timing mark positively;
if the seventh judgment result is negative, the time-receiving end judges whether the received time scale adjustment instruction is opposite to the safety instruction sequence or not, and an eighth judgment result is obtained;
if the eighth judgment result is yes, the time-receiving end carries out negative timing mark;
and if the eighth judgment result is negative, the time service end updates the safety instruction sequence and sends the updated safety instruction sequence to the time service end.
Compared with the prior art, the invention has the beneficial effects that:
the invention provides a time scale adjustment instruction generation method and a time scale adjustment instruction generation system.A time service end acquires a safety instruction sequence sent by the time service end, the safety instruction sequence is divided into a plurality of feedback instructions, and each feedback instruction is single bit data; sending the selected feedback instruction to the time service end, and receiving the time scale of the time service end sent by the time service end; and generating a time scale adjusting instruction according to the communication error, the allowable time error, the time scale of the time served end and the time of the time served end, and sending the time scale adjusting instruction to the time served end. Unlike the traditional safety guarantee in the time setting process, the time setting end does not allow the time scale to be directly issued, and only can give a time scale adjusting instruction according to the safety instruction sequence of the time setting end, so that the active safety characteristic of the time setting end (high safety area) is realized.
In addition, the ttl updates in real time according to the previous round of empirical communication errors, so that the delay interference caused by network communication can be eliminated, and the accuracy of time scale tracking can be properly improved.
The invention provides a time scale adjusting method and a time scale adjusting system.A time service end sends a safety instruction sequence to a time service end; receiving a time scale adjustment instruction sent by a time service end; the time mark adjusting instruction is single bit data; judging whether the received time scale adjusting instruction is the same as the safety instruction sequence or not, if so, positively adjusting the time scale by the time-served end; if not, judging whether the received time scale adjustment instruction is opposite to the safety instruction sequence, and if so, carrying out time service on the time scale by the time service terminal; otherwise, the time service end updates the safety instruction sequence and sends the updated safety instruction sequence to the time service end. Different from the traditional time setting process, the time-set terminal is safer, does not receive any data except 1-bit safety confirmation messages, does not need to acquire the accurate time scale of the time-set terminal through complex message data of the time-set terminal, actively indicates the time scale of the time-set terminal, gives judgment, leads or lags by the time-set terminal, and then carries out stepping adjustment to realize time scale following. When the current hijacked time setting flow is invalid due to any error instruction sent by hijacking and interference, the safety instruction sequence is reinitiated, so that the method has good hijacking resistance and interference resistance. The invention is suitable for the electric power one-way safety network system, and can safely and effectively carry out time scale adjustment under the conditions of not changing the existing networking structure and not increasing an additional satellite clock.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings without inventive exercise.
FIG. 1 is a schematic diagram of a prior art NTP/PPT system;
FIG. 2 is a flowchart of a method for generating a time stamp adjustment instruction according to an embodiment of the present invention;
fig. 3 is a flowchart of a time scale adjustment method according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The invention aims to provide a method and a system for generating a time scale adjustment instruction and adjusting a time scale, which are suitable for a power one-way safety network system and can safely and effectively adjust the time scale without changing the existing networking structure and adding an additional satellite clock.
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
Example one
Fig. 2 is a flowchart of a method for generating a time scale adjustment instruction according to an embodiment of the present invention, and as shown in fig. 2, a method for generating a time scale adjustment instruction includes:
step 101: the time service end acquires the identity verification information sent by the time service end; the time service end verifies the identity verification information and sends a verification result to the time service end.
Step 102: the time service end obtains an allowed time error and a safety instruction sequence sent by the time service end; the secure instruction sequence is a binary sequence.
Step 103: the time service end divides the safety instruction sequence into a plurality of feedback instructions; each feedback command is a single bit of data.
Step 104: the time service end selects a feedback instruction, sends the selected feedback instruction to the time service end, and records a first time point.
Step 105: and the time service end receives the time service end time mark sent by the time service end, and records a second time point and the time service end time when receiving the time service end time mark.
Step 106: and the time service end determines a communication error according to the first time point, the second time point and the length of the safety instruction sequence.
Step 106, specifically comprising:
the communication error is determined according to the following formula:
ttl=(∑△tn)/(2*N)
wherein,
△tn=t2-t1
wherein ttl represents a communication error,. DELTA.tnIndicating the time difference, t1 indicating a first point in time, t2 indicating a second point in time, N indicating the length of the sequence of safety instructions, N ≧ 3.
Step 107: and the time service end generates a time scale adjusting instruction according to the communication error, the allowable time error, the time scale of the time service end and the time of the time service end, and sends the time scale adjusting instruction to the time service end.
Step 107, specifically including:
calculating the difference between the sum of the time scale and the communication error of the time served end and the time served end to obtain a calculated value;
judging whether the calculated value is larger than the allowable time error or smaller than the negative value of the allowable time error to obtain a second judgment result;
if the second judgment result is negative, the time scale adjustment instruction is not generated;
if the second judgment result is yes, judging whether the calculated value is larger than the allowable time error or not to obtain a third judgment result;
if the third judgment result is yes, the time advance of the time served end is judged, and the selected feedback instruction is sent to the time served end after being negated;
if the third judgment result is negative, the time lag of the time served end is judged, and the selected feedback instruction is sent to the time served end.
Step 108: the time service end judges whether all feedback instructions are selected or not to obtain a first judgment result; if the first determination result is negative, the step 104 is returned to.
The invention also provides a time scale adjustment instruction generating system, which comprises:
the safety instruction sequence acquisition module is used for acquiring an allowable time error and a safety instruction sequence sent by a time service end; the secure instruction sequence is a binary sequence.
The safety instruction sequence dividing module is used for dividing the safety instruction sequence into a plurality of feedback instructions; each feedback command is a single bit of data.
And the feedback instruction sending module is used for selecting a feedback instruction, sending the selected feedback instruction to the time service end and recording the first time point.
And the time mark receiving module of the time service end is used for receiving the time mark of the time service end sent by the time service end and recording a second time point and the time of the time service end when receiving the time mark of the time service end.
And the communication error determination module is used for determining the communication error according to the first time point, the second time point and the length of the safety command sequence.
And the time scale adjusting instruction generating module is used for generating a time scale adjusting instruction according to the communication error, the allowed time error, the time scale of the time served terminal and the time of the time served terminal, and sending the time scale adjusting instruction to the time served terminal.
The first judgment module is used for judging whether all the feedback instructions are selected to obtain a first judgment result; and when the first judgment result is negative, executing a feedback instruction sending module.
Example two
Fig. 3 is a flowchart of a time scale adjustment method in an embodiment of the present invention, and as shown in fig. 3, a time scale adjustment method includes:
step 201: the time service end sends identity verification information to the time service end; and receiving an identity verification result sent by the time service end.
Step 202: the time service end sends a safety instruction sequence to the time service end; the secure instruction sequence is a binary sequence.
Step 203: the time service end receives a time scale adjustment instruction sent by the time service end; the time stamp adjustment instruction is a single bit of data.
Step 204: the time service end judges whether the received time scale adjustment instruction is the same as the safety instruction sequence or not to obtain a fourth judgment result; if the fourth determination result is yes, go to step 205; if the fourth determination result is negative, go to step 206.
Step 205: and the timed end adjusts the time scale positively.
Step 206: the time service end judges whether the received time scale adjustment instruction is opposite to the safety instruction sequence or not to obtain a fifth judgment result; if the fifth determination result is yes, go to step 207; if the fifth determination result is negative, go to step 208.
Step 207: and the time-receiving end carries out negative timing mark.
Step 208: and the time service end updates the safety instruction sequence and sends the updated safety instruction sequence to the time service end.
Wherein, the adjustment quantity of the positive adjustment time scale and the negative adjustment time scale are both D/D; wherein D represents the allowable time error, D represents the time scale adjustment step size, and D > 2.
The present invention also provides a time scale adjustment system, including:
the safety instruction sequence sending module is used for sending a safety instruction sequence to the time service end; the secure instruction sequence is a binary sequence.
The time scale adjustment instruction receiving module is used for receiving a time scale adjustment instruction sent by the time service end; the time stamp adjustment instruction is a single bit of data.
The fourth judging module is used for judging whether the received time scale adjusting instruction is the same as the safety instruction sequence or not to obtain a fourth judging result; if the fourth judgment result is yes, executing a positive timing module; and if the fourth judgment result is negative, executing a fifth judgment module.
And the timing mark correcting module is used for realizing the timing mark correcting of the timed end.
The fifth judging module is used for judging whether the received time scale adjusting instruction is opposite to the safety instruction sequence or not to obtain a fifth judging result; if the fifth judgment result is yes, executing a negative regulation time mark module; and if the fifth judgment result is negative, executing the safety instruction sequence updating module.
And the negative regulation time stamp module is used for realizing the negative regulation time stamp of the time service end.
And the safety instruction sequence updating module is used for updating the safety instruction sequence and sending the updated safety instruction sequence to the time service end.
EXAMPLE III
The invention also provides a time scale adjustment instruction generation and time scale adjustment method, which comprises the following steps:
the time service end sends a safety instruction sequence to the time service end; the safety instruction sequence is a binary sequence;
the time service end obtains an allowed time error and a safety instruction sequence sent by the time service end;
the time service end divides the safety instruction sequence into a plurality of feedback instructions; each feedback instruction is single bit data;
the time service end selects a feedback instruction, sends the selected feedback instruction to the time service end and records a first time point;
the time service end receives a time service end time mark sent by the time service end, and records a second time point and time of the time service end when receiving the time service end time mark;
the time service end determines a communication error according to the first time point, the second time point and the length of the safety instruction sequence;
the time service end generates a time scale adjusting instruction according to the communication error, the allowed time error, the time scale of the time served end and the time of the time service end, and sends the time scale adjusting instruction to the time served end;
the time service end receives a time scale adjustment instruction sent by the time service end; the time mark adjusting instruction is single bit data;
the time service end judges whether all feedback instructions are selected or not, and a sixth judgment result is obtained; if the sixth judgment result is negative, returning to the step of selecting a feedback instruction by the time service end;
the time service end judges whether the received time scale adjustment instruction is the same as the safety instruction sequence or not to obtain a seventh judgment result;
if the seventh judgment result is yes, the timed end adjusts the timing mark positively;
if the seventh judgment result is negative, the time-served end judges whether the received time scale adjustment instruction is opposite to the safety instruction sequence or not, and an eighth judgment result is obtained;
if the eighth judgment result is yes, the time-receiving end carries out negative timing mark;
and if the eighth judgment result is negative, the time service end updates the safety instruction sequence and sends the updated safety instruction sequence to the time service end.
In particular, the method comprises the following steps of,
the method follows the following principles:
1. the time service end actively submits the identity and the real-time scale of the time service end to the time service end, and the direction is one-way (L1- > L2) allowing complex data to pass.
2. The time service end can verify the identity of the time service end through the step 1, and only a feedback instruction (0/1) of a single bit can be fed back to the time service end, the direction is safe, but the information is limited, the single bit can only be a single binary value, and the reverse transmission of harmful instructions is avoided.
3. The time service end has higher security level, so it is responsible for proposing the security instruction sequence (referring to the single bit of the step 2 feedback) that the two parties need to obey together. The sequence is represented by a binary (0/1) sequence with the length being larger than N (adjustment period, being larger than or equal to 3), the sequence is encrypted by the time service end, the trusted time service end can only hold the decryption key (asymmetry), each time a new time service request appears, the sequence is dynamically refreshed, and the time service end is informed by the time service end in an encryption mode.
4. After the above parts of communication are completed, the time service and the time service receiving end enter a negotiation link, and the number of times N of the repetition of the negotiation link is the adjustment period mentioned in step 3. The negotiation logic is as follows:
1) the time service end initializes the communication error ttl to 0, initializes an allowable error d to take a fixed constant (the constant determines a target error, for example, it can take 1ms), records the current time point t1, and immediately sends a single bit data with a binary value of 1 to the time service end.
2) And after receiving the data of the other party, the time service end immediately sends the identity of the time service end and the current time scale T' of the time service end to the time service end.
3) When the time service end receives T', the time T2 is recorded, and the standard time T of the time service end is obtained.
4) The time service end verifies the identity of the other party to be correct and calculates delta tnT2-t1, where N ≦ N for the nth round of negotiation.
5) Sending a single bit instruction to a time service terminal, wherein the instruction value is calculated according to the following rule:
if T' + ttl-T > d, the time of the time service end is considered to be advanced, the value of the issued instruction is opposite to that of the safety instruction sequence (negation), and the issued instruction is marked as negative-tone NCMD;
if T' + ttl-T < -d, the time lag of the time service end is considered, the value of the issued instruction is the same as the sequence of the safety instruction, and the issued instruction is marked as positive PCMD;
all the above are not, it is stated that the time scale deviation is within the error allowable range, the adjustment is cancelled actively, no instruction is issued, and the secure instruction sequence exchange flow is not triggered.
Repeating the above steps 1) to 5) until N ═ N, the following logic is performed:
1) time service end updates ttl (Σ Δ t)n) V (2 x N), i.e. as the time error of the last single communication.
2) And the time service end compares N AdjustCMDs (PCMD and NCMD are jointly called) received in N rounds of negotiation and compares the N AdjustCMDs with the safety command sequence, and each bit is the same and is marked as positive, and the bit is marked as negative. The following three conclusions are reached:
A. the time service end receives N positive signals, and the time scale of the time service end always lags behind the time scale of the time service end in N rounds, so that the time scale is adjusted by Step units. And sleeping for a certain time, and entering the next round of negotiation.
B. The time service end receives N negatives, which shows that in N rounds, the time scale of the time service end always leads the time scale of the time service end, so that the time scale is adjusted negatively by Step units. And sleeping for a certain time, and entering the next round of negotiation.
C. The time service end receives N bits, the positive and negative are not consistent, which shows that the communication is interfered, one of the two parties does not follow the safety command sequence, the identity is unknown, or the time is seriously drifted, therefore, the time service connection is disconnected, the time service end sleeps for a certain time, and enters a new round of negotiation after the safety command sequence is exchanged again. Repeatedly triggering the conclusion for more than S times (according to the safety requirement setting, normal number), alarming and rejecting the current time service terminal.
Note: D/D, i.e. 1 allowable error of D, D can be set according to the requirement of Step size in the time scale adjustment process, but should be greater than 2.
The invention has the following advantages:
1. different from the traditional time setting process, the time-set terminal is safer, does not receive any data except 1-bit safety confirmation messages, does not need to acquire the accurate time scale of the time-set terminal through complex message data of the time-set terminal, actively indicates the time scale of the time-set terminal, gives judgment, leads or lags by the time-set terminal, and then carries out stepping adjustment to realize time scale following.
2. Unlike the traditional safety guarantee in the time setting process, the time setting end does not allow to directly send the time scale, only can give the indication of the multiple rounds of positive and negative adjustment according to the safety instruction sequence of the time setting end, and the safety instruction is encrypted by the time setting end, and the time setting end can talk with the time setting end only by obtaining the secret key which can be used for decrypting the safety instruction sequence. The characteristic of active safety of the time-service end (high-safety area) is realized.
In N rounds of negotiation, any wrong instruction sent out due to hijack and interference can cause the current hijack time setting flow to be invalid, and a safety instruction sequence is reinitiated and negotiated, so that the method has good hijack resistance and interference resistance.
And 4, real-time updating is carried out on the ttl according to the previous round (after proper adjustment, multiple rounds of empirical communication can be carried out), so that delay interference caused by network communication can be eliminated, and the time mark following precision is properly improved.
The principles and embodiments of the present invention have been described herein using specific examples, which are provided only to help understand the method and the core concept of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, the specific embodiments and the application range may be changed. In summary, this summary should not be construed to limit the present invention.

Claims (10)

1. A method for generating a time stamp adjustment instruction, comprising:
the time service end obtains an allowed time error and a safety instruction sequence sent by the time service end; the safety instruction sequence is a binary sequence;
the time service end divides the safety instruction sequence into a plurality of feedback instructions; each feedback instruction is single bit data;
the time service end selects a feedback instruction, sends the selected feedback instruction to the time service end and records a first time point;
the time service end receives a time mark of the time service end sent by the time service end, and records a second time point and time of the time service end when receiving the time mark of the time service end;
the time service end determines a communication error according to the first time point, the second time point and the length of the safety instruction sequence;
the time service end generates a time mark adjusting instruction according to the communication error, the allowed time error, the time mark of the time service end and the time service end time, and sends the time mark adjusting instruction to the time service end;
the time service end judges whether all feedback instructions are selected or not to obtain a first judgment result; if the first judgment result is negative, returning to the step that the time service end selects a feedback instruction.
2. The method for generating a time scale adjustment instruction according to claim 1, wherein before the acquiring the secure instruction sequence sent by the time-service terminal, further comprising:
the time service terminal acquires the identity verification information sent by the time service terminal;
and the time service end verifies the identity verification information and sends a verification result to the time service end.
3. The method for generating a time scale adjustment instruction according to claim 1, wherein the time service end determines a communication error according to the first time point, the second time point, and the length of the safety instruction sequence, and specifically includes:
the communication error is determined according to the following formula:
ttl=(∑△tn)/(2*N)
wherein,
△tn=t2-t1
wherein ttl represents a communication error,. DELTA.tnIndicating the time difference, t1 indicating a first point in time, t2 indicating a second point in time, N indicating the length of the sequence of safety instructions, N ≧ 3.
4. The method for generating a time scale adjustment instruction according to claim 1, wherein the time service end generates a time scale adjustment instruction according to the communication error, the allowable time error, the time scale of the time service end, and the time service end time, and specifically comprises:
calculating the difference value between the sum of the time scale of the time served end and the communication error and the time of the time served end to obtain a calculated value;
judging whether the calculated value is larger than the allowed time error or smaller than a negative value of the allowed time error to obtain a second judgment result;
if the second judgment result is negative, no time scale adjustment instruction is generated;
if the second judgment result is yes, judging whether the calculated value is larger than the allowable time error or not, and obtaining a third judgment result;
if the third judgment result is yes, judging that the time advance of the time served end is obtained, negating the selected feedback instruction and then sending the negation instruction to the time served end;
if the third judgment result is negative, judging to obtain the time lag of the time service end, and sending the selected feedback instruction to the time service end.
5. A time stamp adjustment instruction generating system, comprising:
the safety instruction sequence acquisition module is used for acquiring an allowable time error and a safety instruction sequence sent by a time service end; the safety instruction sequence is a binary sequence;
the safety instruction sequence dividing module is used for dividing the safety instruction sequence into a plurality of feedback instructions; each feedback instruction is single bit data;
the feedback instruction sending module is used for selecting a feedback instruction, sending the selected feedback instruction to the time service end and recording a first time point;
the time scale receiving module of the time served end is used for receiving the time scale of the time served end sent by the time served end and recording a second time point and time of the time served end when receiving the time scale of the time served end;
the communication error determining module is used for determining a communication error according to the first time point, the second time point and the length of the safety instruction sequence;
the time scale adjusting instruction generating module is used for generating a time scale adjusting instruction according to the communication error, the allowed time error, the time scale of the time served end and the time of the time served end, and sending the time scale adjusting instruction to the time served end;
the first judgment module is used for judging whether all the feedback instructions are selected to obtain a first judgment result; and when the first judgment result is negative, executing the feedback instruction sending module.
6. A method of time scale adjustment, comprising:
the time service end sends a safety instruction sequence to the time service end; the safety instruction sequence is a binary sequence;
the time service end receives a time scale adjustment instruction sent by the time service end; the time scale adjusting instruction is single bit data;
the time service end judges whether the received time scale adjustment instruction is the same as the safety instruction sequence or not to obtain a fourth judgment result;
if the fourth judgment result is yes, the timed end adjusts the timing mark positively;
if the fourth judgment result is negative, the time-receiving end judges whether the received time scale adjustment instruction is opposite to the safety instruction sequence or not, and a fifth judgment result is obtained;
if the fifth judgment result is yes, the time-receiving end carries out negative timing mark;
if the fifth judgment result is negative, the time service terminal updates the safety instruction sequence and sends the updated safety instruction sequence to the time service terminal.
7. The time scale adjustment method according to claim 6, wherein the step of sending the secure instruction sequence from the time-receiving end to the time-service end further comprises:
the timed terminal sends identity verification information to the timed terminal;
and receiving an identity verification result sent by the time service terminal.
8. The time scale adjustment method according to claim 7, wherein the adjustment amounts of the positive adjustment time scale and the negative adjustment time scale are D/D; wherein D represents the allowable time error, D represents the time scale adjustment step size, and D > 2.
9. A time scale adjustment system, comprising:
the safety instruction sequence sending module is used for sending a safety instruction sequence to the time service end; the safety instruction sequence is a binary sequence;
the time scale adjustment instruction receiving module is used for receiving a time scale adjustment instruction sent by the time service terminal; the time scale adjusting instruction is single bit data;
the fourth judging module is used for judging whether the received time scale adjusting instruction is the same as the safety instruction sequence or not to obtain a fourth judging result; if the fourth judgment result is yes, executing a timing mark correcting module; if the fourth judgment result is negative, executing a fifth judgment module;
the timing mark correcting module is used for realizing the timing mark correcting of the timed terminal;
the fifth judging module is used for judging whether the received time scale adjusting instruction is opposite to the safety instruction sequence or not to obtain a fifth judging result; if the fifth judgment result is yes, executing a negative tone time stamp module; if the fifth judgment result is negative, executing a safety instruction sequence updating module;
the time scale negative adjustment module is used for realizing the time scale negative adjustment of the time served end;
and the safety instruction sequence updating module is used for updating the safety instruction sequence and sending the updated safety instruction sequence to the time service end.
10. A method for generating a time stamp adjustment instruction and adjusting a time stamp, comprising:
the time service end sends a safety instruction sequence to the time service end; the safety instruction sequence is a binary sequence;
the time service end obtains an allowed time error and a safety instruction sequence sent by the time service end;
the time service end divides the safety instruction sequence into a plurality of feedback instructions; each feedback instruction is single bit data;
the time service end selects a feedback instruction, sends the selected feedback instruction to the time service end and records a first time point;
the time service end receives a time mark of the time service end sent by the time service end, and records a second time point and time of the time service end when receiving the time mark of the time service end;
the time service end determines a communication error according to the first time point, the second time point and the length of the safety instruction sequence;
the time service end generates a time mark adjusting instruction according to the communication error, the allowed time error, the time mark of the time service end and the time service end time, and sends the time mark adjusting instruction to the time service end;
the time service end receives a time scale adjustment instruction sent by the time service end; the time scale adjusting instruction is single bit data;
the time service end judges whether all feedback instructions are selected or not to obtain a sixth judgment result; if the sixth judgment result is negative, returning to the step of selecting a feedback instruction by the time service end;
the time service end judges whether the received time scale adjustment instruction is the same as the safety instruction sequence or not to obtain a seventh judgment result;
if the seventh judgment result is yes, the timed end adjusts the timing mark positively;
if the seventh judgment result is negative, the time-receiving end judges whether the received time scale adjustment instruction is opposite to the safety instruction sequence or not, and an eighth judgment result is obtained;
if the eighth judgment result is yes, the time-receiving end carries out negative timing mark;
and if the eighth judgment result is negative, the time service end updates the safety instruction sequence and sends the updated safety instruction sequence to the time service end.
CN202011226727.3A 2020-11-06 2020-11-06 Method and system for generating time scale adjusting instruction and adjusting time scale Active CN112398565B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011226727.3A CN112398565B (en) 2020-11-06 2020-11-06 Method and system for generating time scale adjusting instruction and adjusting time scale

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011226727.3A CN112398565B (en) 2020-11-06 2020-11-06 Method and system for generating time scale adjusting instruction and adjusting time scale

Publications (2)

Publication Number Publication Date
CN112398565A true CN112398565A (en) 2021-02-23
CN112398565B CN112398565B (en) 2022-06-28

Family

ID=74598232

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011226727.3A Active CN112398565B (en) 2020-11-06 2020-11-06 Method and system for generating time scale adjusting instruction and adjusting time scale

Country Status (1)

Country Link
CN (1) CN112398565B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101631049A (en) * 2008-07-18 2010-01-20 郑州威科姆科技股份有限公司 Method and device for testing network time service precision
US20100306533A1 (en) * 2009-06-01 2010-12-02 Phatak Dhananjay S System, method, and apparata for secure communications using an electrical grid network
CN102138292A (en) * 2008-08-29 2011-07-27 Abb研究有限公司 Time synchronization in industrial process control or automation systems
CN103675854A (en) * 2012-09-21 2014-03-26 郑州威科姆科技股份有限公司 Multichannel time service fitting method based on BeiDou satellite
US20160087738A1 (en) * 2014-09-19 2016-03-24 Research & Business Foundation Sungkyunkwan University Time synchronization slave apparatus capable of adjusting time synchronization period, and method of determining time synchronization period
CN106712889A (en) * 2016-12-30 2017-05-24 北京阳光天成信息技术有限公司 Timing device, method and system
CN106788838A (en) * 2016-11-18 2017-05-31 中国电力科学研究院 A kind of system and method for Power time synchronization system robust control
CN108023658A (en) * 2016-11-04 2018-05-11 中国科学院沈阳自动化研究所 High precision clock sync identification method and apparatus
CN110865406A (en) * 2019-11-28 2020-03-06 湖南率为控制科技有限公司 Multi-sensor data synchronous processing system and method based on vehicle-mounted GPS time service system

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101631049A (en) * 2008-07-18 2010-01-20 郑州威科姆科技股份有限公司 Method and device for testing network time service precision
CN102138292A (en) * 2008-08-29 2011-07-27 Abb研究有限公司 Time synchronization in industrial process control or automation systems
US20100306533A1 (en) * 2009-06-01 2010-12-02 Phatak Dhananjay S System, method, and apparata for secure communications using an electrical grid network
CN103675854A (en) * 2012-09-21 2014-03-26 郑州威科姆科技股份有限公司 Multichannel time service fitting method based on BeiDou satellite
US20160087738A1 (en) * 2014-09-19 2016-03-24 Research & Business Foundation Sungkyunkwan University Time synchronization slave apparatus capable of adjusting time synchronization period, and method of determining time synchronization period
CN108023658A (en) * 2016-11-04 2018-05-11 中国科学院沈阳自动化研究所 High precision clock sync identification method and apparatus
CN106788838A (en) * 2016-11-18 2017-05-31 中国电力科学研究院 A kind of system and method for Power time synchronization system robust control
CN106712889A (en) * 2016-12-30 2017-05-24 北京阳光天成信息技术有限公司 Timing device, method and system
CN110865406A (en) * 2019-11-28 2020-03-06 湖南率为控制科技有限公司 Multi-sensor data synchronous processing system and method based on vehicle-mounted GPS time service system

Also Published As

Publication number Publication date
CN112398565B (en) 2022-06-28

Similar Documents

Publication Publication Date Title
US10848257B2 (en) Apparatus and method for timestamping of data packets
US5293645A (en) Apparatus and method for locating mobile and portable radio terminals in a radio network
RU2146420C1 (en) Method and device for synchronizing burst transmission to communication system
CA2100446C (en) Technique for measuring channel delay
EP1215559B1 (en) Method and system for time synchronization
CA2384688C (en) Method and arrangement for synchronization of base stations in a mobile communications network
EP2220883B1 (en) Methods and apparatuses generating a radio base station key in a cellular radio system
CN111565083A (en) Method, UE, base station, device and computer readable storage medium for time synchronization
US8644352B1 (en) System and method for accurate time sampling in presence of output delay
WO2013170499A1 (en) System and method for establishing a secure connection in communications systems
EP3949576A1 (en) Method to schedule data transmission
CN112187556B (en) Congestion measurement method and network node
CN112398565B (en) Method and system for generating time scale adjusting instruction and adjusting time scale
CN112187557B (en) Method for measuring and reporting and network node
ES2238030T3 (en) SYNCHRONIZATION PROCEDURE AND SYSTEM FOR PULSE SOURCES, IN PARTICULAR IN COMMUNICATIONS SYSTEMS WITH PACKAGE SWITCHING.
US6647026B1 (en) Frame phase synchronous system and a method thereof
US12021867B2 (en) Authentication processing method and device, storage medium, and electronic device
CN113141648A (en) Timing information reporting method, terminal and network side equipment
JP2007089065A (en) Point multipoint light transmission system and master station device
CN115243362B (en) Time synchronization system and method applied to traveling wave positioning device
CN113949476B (en) Optical fiber time synchronization network networking method and device based on safe time quality
CN113965991A (en) LoRaWan-based node positioning implementation method
US11343007B2 (en) Time synchronization method and device
US20040001455A1 (en) Method and system for identification of digitally signed messages in a telecommunication system
CN112422223A (en) TCP/IP-based time synchronization device, time synchronization method and time mark monitoring system

Legal Events

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