CN108449206B - Time synchronization method, device, equipment and storage medium - Google Patents

Time synchronization method, device, equipment and storage medium Download PDF

Info

Publication number
CN108449206B
CN108449206B CN201810201148.XA CN201810201148A CN108449206B CN 108449206 B CN108449206 B CN 108449206B CN 201810201148 A CN201810201148 A CN 201810201148A CN 108449206 B CN108449206 B CN 108449206B
Authority
CN
China
Prior art keywords
time
log record
internet
generation
time synchronization
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810201148.XA
Other languages
Chinese (zh)
Other versions
CN108449206A (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.)
Hangzhou H3C Technologies Co Ltd
Original Assignee
Hangzhou H3C Technologies 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 Hangzhou H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CN201810201148.XA priority Critical patent/CN108449206B/en
Publication of CN108449206A publication Critical patent/CN108449206A/en
Application granted granted Critical
Publication of CN108449206B publication Critical patent/CN108449206B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/069Management of faults, events, alarms or notifications using logs of notifications; Post-processing of notifications
    • 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
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0631Management of faults, events, alarms or notifications using root cause analysis; using analysis of correlation between notifications, alarms or events based on decision criteria, e.g. hierarchy, tree or time analysis
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L7/00Arrangements for synchronising receiver with transmitter

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Electric Clocks (AREA)

Abstract

The embodiment of the invention provides a time synchronization method, a time synchronization device, time synchronization equipment and a storage medium, wherein the method comprises the following steps: acquiring the generation time of a first log record in an Access Controller (AC) as a first generation time; acquiring the generation time of a second log record in the AC as second generation time; determining a time difference between the first generation time minus the second generation time; if the time difference is not larger than the first time threshold or not smaller than a second time threshold, determining that the time of the AC is changed, wherein the second time threshold is not smaller than the first time threshold; and sending a time synchronization instruction carrying the current time of the AC to the Internet of things equipment accessed to the AC, so that the Internet of things equipment informs the terminal accessed to the Internet of things equipment of time synchronization according to the time synchronization instruction. Therefore, real-time synchronization of the terminal and the AC time can be realized, and the accuracy of the terminal time is improved.

Description

Time synchronization method, device, equipment and storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a time synchronization method, apparatus, device, and storage medium.
Background
With the continuous development of scientific technology, intelligent technology is widely applied to multiple fields in daily life. Generally, a terminal accessing an internet of things device sends a message to an Access Controller (AC) through the internet of things device, and the AC processes the received message, thereby implementing intelligent control of the terminal. For example, in the intelligent chemical school management system, each student wears the bracelet, wherein the bracelet is one kind at terminal, and the bracelet sends the message to thing networking device according to preset frequency, and thing networking device forwards the message to the AC, can include information such as student's motion step number in the message, and the AC sends this message for management platform again, so make can look over student's information in real time through management platform. The time synchronization of the Internet of things equipment and the time synchronization of the terminal accessed to the Internet of things equipment, the AC can be connected to the management platform in a wired mode, and the AC is synchronized with the time of the management platform. It can be seen that in the process of realizing intelligent control, the synchronization of the AC and the terminal time is very important. For example, the terminal sends a message including the number of movement steps of the student before 5:00 and the time node 5:00 to the AC through the internet of things device, and if the time of the AC is not synchronous with that of the terminal, the time node corresponding to the number of movement steps in the message sent to the management platform by the AC is inaccurate, so that the management platform cannot accurately analyze the number of movement steps.
In the prior art, the AC may send a time synchronization instruction to the physical network device at regular time, that is, the AC sends the time synchronization instruction to the physical network device every preset time period, so that the internet of things device notifies a terminal accessing the internet of things device to perform time synchronization according to the time synchronization instruction. And the time synchronization instruction comprises the current time of the AC, so that the terminal and the AC time are synchronized.
It can be seen that, in the prior art, a time synchronization instruction is sent to the physical network device every other preset time period AC, so that the internet of things device notifies the terminal accessing the internet of things device to perform time synchronization according to the time synchronization instruction, and if the time of the AC changes, the time of the terminal is inaccurate relative to the time of the AC before the preset time period is not reached.
Disclosure of Invention
The embodiment of the invention aims to provide a time synchronization method, a time synchronization device, time synchronization equipment and a storage medium, so as to improve the accuracy of terminal time. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a time synchronization method, including:
acquiring the generation time of a first log record in an Access Controller (AC) as a first generation time;
acquiring generation time of a second log record in the AC as second generation time, wherein the second log record is generated before the first log record and is separated from the first log record by a preset number;
determining a time difference of the first generation time minus the second generation time;
if the time difference is not larger than a first time threshold or not smaller than a second time threshold, determining that the time of the AC is changed, wherein the second time threshold is not smaller than the first time threshold;
and sending a time synchronization instruction carrying the current time of the AC to the Internet of things equipment accessed to the AC, so that the Internet of things equipment informs a terminal accessed to the Internet of things equipment of time synchronization according to the time synchronization instruction.
In a second aspect, an embodiment of the present invention provides a time synchronization apparatus, including:
a first obtaining module, configured to obtain a generation time of a first log record in an access controller AC as a first generation time;
a second obtaining module, configured to obtain, as a second generation time, a generation time of a second log record in the AC, where the second log record is generated before the second log record and is separated from the first log record by a preset number;
a first determining module for determining a time difference between the first generation time minus the second generation time;
a second determining module, configured to determine that the time of the AC changes if the time difference is not greater than a first time threshold or not less than a second time threshold, where the second time threshold is not less than the first time threshold;
the first sending module is used for sending a time synchronization instruction carrying the current time of the AC to the Internet of things equipment accessed to the AC, so that the Internet of things equipment informs a terminal accessed to the Internet of things equipment of time synchronization according to the time synchronization instruction.
In a third aspect, an embodiment of the present invention provides a time synchronization device, including a processor and a machine-readable storage medium, the machine-readable storage medium storing machine-executable instructions executable by the processor, the processor being caused by the machine-executable instructions to: the method steps of the first aspect are implemented.
In a fourth aspect, embodiments of the invention provide a machine-readable storage medium storing machine-executable instructions that, when invoked and executed by a processor, cause the processor to: the method steps of the first aspect are implemented.
The time synchronization method, the device, the equipment and the storage medium provided by the embodiment of the invention can acquire the generation time of the first log record in the access controller AC as the first generation time; acquiring generation time of a second log record in the AC as second generation time, wherein the second log record is generated before the first log record and is separated from the first log record by a preset number; determining a time difference between the first generation time minus the second generation time; if the time difference is not larger than the first time threshold or not smaller than a second time threshold, determining that the time of the AC is changed, wherein the second time threshold is not smaller than the first time threshold; and sending a time synchronization instruction carrying the current time of the AC to the Internet of things equipment accessed to the AC, so that the Internet of things equipment informs the terminal accessed to the Internet of things equipment of time synchronization according to the time synchronization instruction. Therefore, when the time of the AC changes, the time synchronization instruction carrying the changed current time of the AC is sent to the physical network equipment accessed to the AC in real time, so that the Internet of things equipment informs the terminal accessed to the Internet of things equipment of time synchronization according to the time synchronization instruction. The real-time synchronization of the terminal and the AC time can be realized, and the accuracy of the terminal time is improved. Of course, it is not necessary for any product or method of practicing the invention to achieve all of the above-described advantages at the same time.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of a time synchronization method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a scenario provided by an embodiment of the present invention;
fig. 3 is another flowchart of a time synchronization method according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a time synchronization apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a time synchronization apparatus 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.
An embodiment of the present invention provides a time synchronization method, as shown in fig. 1, including:
s101, acquiring the generation time of the first log record in the AC as a first generation time.
The time synchronization method provided by the embodiment of the invention can be applied to AC. It may be applied specifically to a specific process in the AC and this process may be referred to as a monitoring process. The monitoring process and the Internet of things equipment accessed to the AC have a corresponding relation, namely when the Internet of things equipment is accessed to the AC, the corresponding monitoring process is newly added, and when the Internet of things equipment is disconnected from the AC, the corresponding monitoring process stops working.
During the AC working process, log records of various conditions during the AC working process can be generated. In particular, the process of generating the log record may be accomplished by another process different from the monitoring process.
The log record may include log content and a time of generation of the log record. In a specific example of the present invention, the generated log records may be as shown in table 1.
TABLE 1
Log record identification Generating time
Log record 1 14:00
Log record 2 14:01
Log record 3 14:02
Log record 4 14:03
Log record 5 14:07
In this embodiment of the present invention, the first log record is a newly generated log record, and the monitoring process may obtain the latest log record in the AC, for example, obtain log record 5 shown in table 1. Because the log record includes the generation time of the log record, the generation time of the latest log record in the AC, such as the generation time 14:07 of log record 5, can be obtained.
S102, acquiring generation time of a second log record in the AC as second generation time, wherein the second log record is generated before the first log record and is separated from the first log record by a preset number.
In the embodiment of the present invention, the monitoring process may obtain the second log record. Specifically, the monitoring process acquires log records that are generated before the first log record and separated from the first log record by a preset number in the order in which the log records are generated. For example, the first log record is the most recent log record in Table 1: log record 5 is a log record generated before log record 5 and spaced 3 times from log record 5, such as log record 1 shown in table 1, i.e., a second acquired log record.
Meanwhile, because the log record includes the generation time of the log record, the generation time of the second log record, such as the generation time 14:00 of log record 1, can be obtained.
In addition, various types of log records, such as monitoring log records, process running log records, and the like, may be generated during the operation of the AC. However, different types of log records may have different generation manners or storage manners, which may increase the complexity of determination when determining the first log record and the second log record from different types of log records. Thus, to reduce the complexity of determining the first log record and the second log record, in an alternative embodiment of the invention, the first log record and the second log record may be of the same type of log record.
And S103, determining a time difference value obtained by subtracting the second generation time from the first generation time.
For example, when the first log record is log record 5 and the second log record is log record 1, the generation time 14:07 of the log record 5 is subtracted by the generation time 14:00 of the log record 1, and the time difference value is determined to be 7 seconds, that is, the time difference value of the determined first generation time minus the second generation time.
And S104, if the time difference value is not greater than the first time threshold or not less than a second time threshold, determining that the time of the AC is changed, wherein the second time threshold is not less than the first time threshold.
Comparing the time difference value with a first time threshold value and a second time threshold value, and if the time difference value is not greater than the first time threshold value or not less than the second time threshold value, determining that the time of the AC is changed; and if the time difference value is larger than the first time threshold and smaller than the second time threshold, determining that the time of the AC is not changed.
In a specific example, the first time threshold may be equal to the second time threshold, and in this case, if the time difference is not equal to the first time threshold and the second time threshold, it is determined that the time of the AC changes; if the time difference is equal to the first time threshold and the second time threshold, determining that the time of the AC is unchanged.
Typically, generating the log record is performed according to a preset rule. For example, a log record may be generated every 1 second; alternatively, according to a rule that the interval time between the generation of two adjacent log records is sequentially increased, for example, the interval time between the generation of the second log record and the generation of the first log record is 1 second, the interval time between the generation of the third log record and the generation of the second log record is 2 seconds, and so on.
Thus, when two log records are determined when the time of the AC does not change, the interval time between the two log records is determined. For example, if the predetermined rule for generating log records is to generate one log record every 1 second, the interval between the first log record and the second log record is 5 seconds when the first log record and the second log record are separated by 4 log records.
In the embodiment of the present invention, it may be determined that the first time threshold is 5-N, and the second time threshold is 5+ N. Wherein N may be an integer, e.g., 0, 1, 2, etc.; alternatively, N may be a decimal number, e.g., 0.5, 0.7, etc. At this time, if the time difference is not greater than 5-N or not less than 5+ N, determining that the time of the AC is changed; and if the time difference is larger than 5-N and smaller than 5+ N, determining that the time of the AC is not changed. In addition, because the determination process of the time threshold value comprises redundancy, the misjudgment of the determination of the time change can be reduced.
In a specific example of the embodiment of the present invention, N may be 1, and in this case, the first time threshold is 4 seconds, and the second time threshold is 6 seconds. Determining a first log record as log record 5 in the table 1, wherein the generation time of the log record 5 is 14: 07; determining the second log record as log record 1 in the table 1, wherein the generation time of the log record 1 is 14: 00; then the difference in time between the first generation time and the second generation time may be determined to be the difference of the generation time 14:07 of log record 5 minus the generation time 14:00 of log record 1, i.e., 7 seconds. It can be seen that if the time difference is 7 seconds, which is greater than the second time threshold of 6 seconds, then it can be determined that the time of the AC has changed.
And S105, sending a time synchronization instruction carrying the current time of the AC to the Internet of things equipment accessed to the AC, so that the Internet of things equipment informs the terminal accessed to the Internet of things equipment of time synchronization according to the time synchronization instruction.
In an optional embodiment of the present invention, as shown in fig. 2, in the intelligent school management system, a plurality of APs (access points) access an AC through a switch, and each AP of the plurality of APs, for example, AP1 and AP2, may be connected to one or more internet of things devices, for example, AP1 is connected to internet of things device 1, AP2 is connected to internet of things device 2, and the internet of things device may communicate with the bracelet through an RFID (Radio Frequency Identification) protocol, for example, physical network device 1 sends a time synchronization instruction to bracelet 1 through the RFID protocol, and physical network device 2 sends the time synchronization instruction to bracelet 2 through the RFID protocol. Therefore, when the time of the AC changes, the AC carries the time synchronization instruction of the current time of the AC and sends the time synchronization instruction to the AP through the switch; AP sends this time synchronization instruction to thing networking device, and physics net equipment sends this time synchronization instruction to bracelet again, and the bracelet updates self time according to the time synchronization instruction received, so realizes the synchronization of bracelet and AC time.
In the embodiment of the invention, when the time of the AC changes, the time synchronization instruction carrying the changed current time of the AC can be sent to the physical network equipment accessed to the AC in real time, so that the Internet of things equipment informs the terminal accessed to the Internet of things equipment of time synchronization according to the time synchronization instruction. Therefore, real-time synchronization of the terminal and the AC time can be realized, and the accuracy of the terminal time is improved.
An alternative embodiment of the present invention, as shown in fig. 3, after determining that the time of the AC changes, i.e. S104, may further include:
and S106, sending an alarm prompt for prompting the time change of the AC to the monitoring end.
The monitoring process in the AC may send an alarm prompt to the monitoring end for prompting that the time of the AC changes.
The monitoring end may be a monitoring platform, a monitoring system, or may be a device used by a network administrator, such as a mobile phone, a computer, and the like.
And S107, receiving feedback information sent by the monitoring end aiming at the alarm prompt.
And after receiving the alarm prompt, the monitoring end analyzes the alarm prompt and sends feedback information aiming at the alarm prompt.
Specifically, the monitoring end confirms whether the time change of the AC belongs to the normal change for the alarm prompt. For example, when the time variation of the AC is caused by the AC failure, it is confirmed that the time variation of the AC does not belong to a normal variation, that is, to an abnormal variation; when the time variation of the AC is caused by setting the AC time as required, it is confirmed that the time variation of the AC is a normal variation.
Because when the time change of the AC belongs to an abnormal change, for example, the time change occurs when the AC fails, at this time, the time change may not be notified to the internet of things device accessing the AC, and then the internet of things device may not notify the terminal accessing the internet of things device of performing time synchronization, that is, the terminal and the AC time are not synchronized. Thus, in the implementation of the present invention, when the time change of the AC belongs to the abnormal change, the AC may not send the time synchronization instruction to the physical network device accessing the AC; and when the time change of the AC belongs to normal change, sending a time synchronization instruction to the Internet of things equipment accessed to the AC.
When a time synchronization instruction needs to be sent to the internet of things equipment accessed to the AC, namely the time change of the AC is confirmed to belong to normal change, the monitoring end can send feedback information representing and indicating synchronization time to the AC; and when the time synchronization instruction does not need to be sent to the internet of things equipment accessed to the AC, namely when the time change of the AC is confirmed to belong to the abnormal change, the monitoring end can send feedback information representing the abnormal prompt to the AC.
In this way, when the received feedback information indicates that the synchronization time is indicated, step S105 is performed.
By monitoring the time change of the AC, when the time change of the AC belongs to normal change, the time of the AC is sent to the Internet of things equipment accessed to the AC, so that the Internet of things equipment informs the terminal accessed to the Internet of things equipment of time synchronization according to a time synchronization instruction, the terminal can sense the time change of the AC in real time, the real-time synchronization of the terminal and the AC time is realized, and the usability of the terminal is further improved.
In addition, when the time change of the AC belongs to the abnormal change, the current time of the AC is not sent to the Internet of things equipment accessed to the AC, so that unnecessary issuing can be reduced, and resources and time are saved; and unnecessary abnormal synchronization can be ensured, and the accuracy of the terminal time is improved.
In addition, the time of the monitoring terminal and the AC can be prompted to change, and when the monitoring terminal confirms that the time change of the AC belongs to the abnormal change, the abnormal change can be processed in time, so that the AC time is prevented from being abnormally damaged, and the accuracy of the AC time is improved.
An embodiment of the present invention further provides a time synchronization apparatus, as shown in fig. 4, including:
a first obtaining module 401, configured to obtain a generation time of a first log record in the AC as a first generation time;
a second obtaining module 402, configured to obtain, as a second generation time, a generation time of a second log record in the AC, where the second log record is generated before the first log record and is separated from the first log record by a preset number;
a first determining module 403, configured to determine a time difference value obtained by subtracting the second generating time from the first generating time;
a second determining module 404, configured to determine that the time of the AC changes if the time difference is not greater than the first time threshold or not less than a second time threshold, where the second time threshold is not less than the first time threshold;
the first sending module 405 is configured to send a time synchronization instruction carrying the current time of the AC to the internet of things device accessing the AC, so that the internet of things device notifies the terminal accessing the internet of things device of time synchronization according to the time synchronization instruction.
In the embodiment of the invention, when the time of the AC changes, the time synchronization instruction carrying the changed current time of the AC can be sent to the physical network equipment accessed to the AC in real time, so that the Internet of things equipment informs the terminal accessed to the Internet of things equipment of time synchronization according to the time synchronization instruction. Therefore, real-time synchronization of the terminal and the AC time can be realized, and the accuracy of the terminal time is improved.
Optionally, the apparatus further comprises:
the second sending module is used for sending an alarm prompt for prompting that the time of the AC changes to the monitoring end;
the receiving module is used for receiving feedback information sent by the monitoring end aiming at the alarm prompt;
the first sending module 405 is specifically configured to send a time synchronization instruction to the terminal when the feedback information represents and indicates the synchronization time.
Optionally, the first log record and the second log record are of the same type of log record.
Optionally, the first log record is a newly generated log record.
It should be noted that, the time synchronization apparatus according to the embodiment of the present invention is an apparatus applying the time synchronization method, and all embodiments of the time synchronization method are applicable to the apparatus and can achieve the same or similar beneficial effects.
An embodiment of the present invention further provides a time synchronization apparatus, as shown in fig. 5, including a processor 501 and a machine-readable storage medium 502, where the machine-readable storage medium 502 stores machine-executable instructions capable of being executed by the processor 501, and the processor 501 is caused by the machine-executable instructions to: method steps for implementing the above time synchronization method.
In the embodiment of the invention, when the time of the AC changes, the time synchronization instruction carrying the changed current time of the AC can be sent to the physical network equipment accessed to the AC in real time, so that the Internet of things equipment informs the terminal accessed to the Internet of things equipment of time synchronization according to the time synchronization instruction. Therefore, real-time synchronization of the terminal and the AC time can be realized, and the accuracy of the terminal time is improved.
Embodiments of the present invention provide a machine-readable storage medium storing machine-executable instructions that, when invoked and executed by a processor, cause the processor to: method steps for implementing the above time synchronization method.
In the embodiment of the invention, when the time of the AC changes, the time synchronization instruction carrying the changed current time of the AC can be sent to the physical network equipment accessed to the AC in real time, so that the Internet of things equipment informs the terminal accessed to the Internet of things equipment of time synchronization according to the time synchronization instruction. Therefore, real-time synchronization of the terminal and the AC time can be realized, and the accuracy of the terminal time is improved.
The machine-readable storage medium may include a Random Access Memory (RAM) and a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the apparatus, device and storage medium embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference may be made to some descriptions of the method embodiments for relevant points.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (10)

1. A method of time synchronization, comprising:
acquiring the generation time of a first log record in an Access Controller (AC) as a first generation time;
acquiring generation time of a second log record in the AC as second generation time, wherein the second log record is generated before the first log record and is separated from the first log record by a preset number;
determining a time difference of the first generation time minus the second generation time;
if the time difference is not larger than a first time threshold or not smaller than a second time threshold, determining that the time of the AC is changed, wherein the second time threshold is not smaller than the first time threshold;
and sending a time synchronization instruction carrying the current time of the AC to the Internet of things equipment accessed to the AC, so that the Internet of things equipment informs a terminal accessed to the Internet of things equipment of time synchronization according to the time synchronization instruction.
2. The method of claim 1, wherein after the determining that the time of the AC has changed, the method further comprises:
sending an alarm prompt for prompting that the time of the AC changes to a monitoring end;
receiving feedback information sent by the monitoring end aiming at the alarm prompt;
the sending a time synchronization instruction carrying the current time of the AC to the Internet of things equipment accessing the AC comprises:
and when the feedback information representation indicates the synchronization time, sending the time synchronization instruction to the Internet of things equipment.
3. The method in accordance with claim 1, wherein the first log record and the second log record are of a same type of log record.
4. A method according to any of claims 1-3, wherein the first log record is a newly generated log record.
5. A time synchronization apparatus, comprising:
a first obtaining module, configured to obtain a generation time of a first log record in an access controller AC as a first generation time;
a second obtaining module, configured to obtain, as a second generation time, a generation time of a second log record in the AC, where the second log record is generated before the first log record and is separated from the first log record by a preset number;
a first determining module for determining a time difference between the first generation time minus the second generation time;
a second determining module, configured to determine that the time of the AC changes if the time difference is not greater than a first time threshold or not less than a second time threshold, where the second time threshold is not less than the first time threshold;
the first sending module is used for sending a time synchronization instruction carrying the current time of the AC to the Internet of things equipment accessed to the AC, so that the Internet of things equipment informs a terminal accessed to the Internet of things equipment of time synchronization according to the time synchronization instruction.
6. The apparatus of claim 5, further comprising:
the second sending module is used for sending an alarm prompt for prompting that the time of the AC changes to a monitoring end;
the receiving module is used for receiving feedback information sent by the monitoring end aiming at the alarm prompt;
the first sending module is specifically configured to send the time synchronization instruction to the internet of things device when the feedback information represents and indicates synchronization time.
7. The apparatus of claim 5, wherein the first log record and the second log record are of a same type of log record.
8. The apparatus of any of claims 5-7, wherein the first log record is a newly generated log record.
9. A time synchronization device comprising a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor, the processor being caused by the machine-executable instructions to: carrying out the method steps of any one of claims 1 to 4.
10. A machine-readable storage medium having stored thereon machine-executable instructions that, when invoked and executed by a processor, cause the processor to: carrying out the method steps of any one of claims 1 to 4.
CN201810201148.XA 2018-03-12 2018-03-12 Time synchronization method, device, equipment and storage medium Active CN108449206B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810201148.XA CN108449206B (en) 2018-03-12 2018-03-12 Time synchronization method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810201148.XA CN108449206B (en) 2018-03-12 2018-03-12 Time synchronization method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN108449206A CN108449206A (en) 2018-08-24
CN108449206B true CN108449206B (en) 2020-11-27

Family

ID=63194094

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810201148.XA Active CN108449206B (en) 2018-03-12 2018-03-12 Time synchronization method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN108449206B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102238719A (en) * 2010-04-27 2011-11-09 中国移动通信集团公司 Time synchronization method and device and distributed time synchronization system
CN102412983A (en) * 2011-10-12 2012-04-11 广东威创视讯科技股份有限公司 Reporting method for equipment alarm
CN103532786A (en) * 2013-10-22 2014-01-22 中国联合网络通信集团有限公司 Server synchronization detector as well as synchronous detection method and system
CN104092697A (en) * 2014-07-18 2014-10-08 杭州华三通信技术有限公司 Anti-replaying method and device based on time
CN104935465A (en) * 2015-06-17 2015-09-23 北京京东尚科信息技术有限公司 Log generating method and log generating device of client application program, and server
EP2928109A1 (en) * 2012-11-29 2015-10-07 NEC Corporation Synchronization apparatus, synchronization system, wireless communication apparatus and synchronization method
EP3082282A1 (en) * 2015-04-14 2016-10-19 LSIS Co., Ltd. Method for time synchronization
CN106231669A (en) * 2016-08-31 2016-12-14 合肥工业大学 The method of Time Synchronization for Wireless Sensor Networks
CN106254094A (en) * 2016-07-19 2016-12-21 中国银联股份有限公司 A kind of method of data synchronization and system

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102238719A (en) * 2010-04-27 2011-11-09 中国移动通信集团公司 Time synchronization method and device and distributed time synchronization system
CN102412983A (en) * 2011-10-12 2012-04-11 广东威创视讯科技股份有限公司 Reporting method for equipment alarm
EP2928109A1 (en) * 2012-11-29 2015-10-07 NEC Corporation Synchronization apparatus, synchronization system, wireless communication apparatus and synchronization method
CN103532786A (en) * 2013-10-22 2014-01-22 中国联合网络通信集团有限公司 Server synchronization detector as well as synchronous detection method and system
CN104092697A (en) * 2014-07-18 2014-10-08 杭州华三通信技术有限公司 Anti-replaying method and device based on time
EP3082282A1 (en) * 2015-04-14 2016-10-19 LSIS Co., Ltd. Method for time synchronization
CN104935465A (en) * 2015-06-17 2015-09-23 北京京东尚科信息技术有限公司 Log generating method and log generating device of client application program, and server
CN106254094A (en) * 2016-07-19 2016-12-21 中国银联股份有限公司 A kind of method of data synchronization and system
CN106231669A (en) * 2016-08-31 2016-12-14 合肥工业大学 The method of Time Synchronization for Wireless Sensor Networks

Also Published As

Publication number Publication date
CN108449206A (en) 2018-08-24

Similar Documents

Publication Publication Date Title
CN106997314B (en) Exception handling method, device and system for distributed system
CN105224343B (en) A kind of the update reminding method and device of application program
US20150207877A1 (en) Time synchronization client, a system and a non-transitory computer readable medium
US20210089377A1 (en) Log analysis in vector space
US20130055271A1 (en) Apparatus and method for controlling polling
US20180160327A1 (en) First Network Node, Method Therein, Computer Program and Computer-Readable Medium Comprising the Computer Program for Determining Whether a Performance of a Cell is Degraded or Not
US20180260298A1 (en) Method and Device for Reporting Mobile Terminal Behaviors
CN104572318A (en) Report information obtaining method, device, equipment and system
CN110784358A (en) Method and device for constructing network call relation topological graph
CN106294364B (en) Method and device for realizing web crawler to capture webpage
CN108449206B (en) Time synchronization method, device, equipment and storage medium
CN110119334B (en) Page script monitoring method and device
CN111766772B (en) Time calibration method, device and system and computer readable storage medium
CN104618461A (en) Mobile code cloud mobile phone-based server monitoring method
CN110108296B (en) Step counting method, electronic equipment and computer readable storage medium
CN108628901A (en) A kind of data-updating method and device
CN112448855B (en) Method and system for updating block chain system parameters
CN115033927A (en) Method, device, equipment and medium for detecting data integrity
CN115102862A (en) Automatic synchronization method and device for SDN equipment
CN113157472A (en) Service information processing method, device, equipment and computer storage medium
CN112395155A (en) Service monitoring method and device, storage medium and electronic device
CN114338435A (en) Network change monitoring method and device, computer equipment and storage medium
CN114785711B (en) Performance monitoring method, device and storage medium of network equipment
CN103973804A (en) Method and device for setting terminal time
CN113608960B (en) Service monitoring method and device, electronic equipment and storage medium

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