CN111404632B - Offline timing method, medium, offline server and offline timing system - Google Patents
Offline timing method, medium, offline server and offline timing system Download PDFInfo
- Publication number
- CN111404632B CN111404632B CN202010210910.8A CN202010210910A CN111404632B CN 111404632 B CN111404632 B CN 111404632B CN 202010210910 A CN202010210910 A CN 202010210910A CN 111404632 B CN111404632 B CN 111404632B
- Authority
- CN
- China
- Prior art keywords
- time
- messages
- offline
- message
- node
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04J—MULTIPLEX COMMUNICATION
- H04J3/00—Time-division multiplex systems
- H04J3/02—Details
- H04J3/06—Synchronising arrangements
- H04J3/0635—Clock or time synchronisation in a network
- H04J3/0638—Clock or time synchronisation among nodes; Internode synchronisation
- H04J3/0658—Clock or time synchronisation among packet nodes
- H04J3/0661—Clock or time synchronisation among packet nodes using timestamps
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/80—Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W56/00—Synchronisation arrangements
- H04W56/001—Synchronization between nodes
Abstract
The invention provides an offline timing method, a medium, an offline server and an offline timing system, wherein the offline timing method comprises the following steps: acquiring messages of at least two nodes in a regional chain; recording the system receiving time of the message of each node; and timing the server according to the timestamps and the system receiving time in the messages of different nodes. The invention filters out repeated and wrong information by acquiring the two-dimensional codes or Bluetooth timeliness information of a plurality of mobile phone nodes containing time information, and corrects the system time of the system through a plurality of times of decryption operation and processing.
Description
Technical Field
The invention belongs to the technical field of time correction, relates to an offline time correction method, and particularly relates to an offline time correction method, a medium, an offline server and an offline time correction system.
Background
With the rapid development of computer and network communication technologies, the era of digitization and networking of automation systems in various industries has come. Computers and network devices provide a better platform for data exchange, analysis and application between control and information systems, thus placing higher demands on the accuracy of various real-time and historical data timestamps. However, the devices in the network travel their own time, and the time of the whole system is confused in the day and month, so that the normal data statistical analysis service cannot be normally performed, and at this time, the time of the whole network needs to be synchronized.
The existing time synchronization is mostly unified time calibration based on the internet. For how to calibrate time for offline equipment without internet, in the prior art, clock calibration is mostly performed by using methods such as a GPS (global positioning system) and a Beidou, but the cost of the offline equipment is increased while clock modules such as the GPS and the Beidou are added.
Therefore, how to provide an offline timing method to solve the technical problem that the prior art cannot perform system timing stably in an offline manner in real time has become a critical solution for those skilled in the art.
Disclosure of Invention
In view of the above drawbacks of the prior art, an object of the present invention is to provide an offline timing method, medium, offline server and offline timing system, which are used to solve the problem of how to implement offline device timing without using GPS or beidou clock modules.
In order to achieve the above and other related objects, the present invention provides an offline timing method, which is applied to an offline server, where the offline server performs timing through a message obtained in an offline manner, where the message includes a timestamp; the off-line time correcting method comprises the following steps: receiving messages of at least two nodes communicated with the offline server; recording the system receiving time of the message of each node; and timing the offline server according to the time stamps in the messages of different nodes and the system receiving time.
In an embodiment of the present invention, the step of receiving packets of at least two nodes communicating with the offline server includes: when a message is received, the identity of the node sending the message is identified.
In an embodiment of the present invention, the step of timing the offline server according to the timestamps in the messages of the different nodes and the system receiving time includes: acquiring messages of different nodes with a preset number according to a time sequence; the time stamps in the adjacent messages are differenced to obtain node time difference; differentiating the system receiving time of the adjacent messages to obtain a system time difference; subtracting the node time difference from the system time difference to obtain a timing reference value; and judging whether the timing reference value exceeds a preset threshold value or not, and executing an arbitration mechanism to perform timing according to a judgment result.
In an embodiment of the present invention, the step of obtaining the messages of the different nodes in the preset number according to the time sequence includes: acquiring messages of different nodes according to the time sequence; determining the earliest acquired message in a preset number of messages according to the time sequence; and continuously acquiring the messages of different nodes, and replacing the earliest acquired message with the currently acquired message.
In an embodiment of the present invention, the step of determining whether the timing reference value exceeds a preset threshold and executing an arbitration mechanism to perform timing according to the determination result includes: respectively counting the number of messages exceeding a preset threshold value and the number of messages not exceeding the preset threshold value; selecting one party with the largest number of messages from the two parties of messages which exceed the preset threshold value and do not exceed the preset threshold value as a time corrector; and selecting the last acquired message in the time correcting party, and replacing the timestamp of the last acquired message with the system time of the offline server to realize time correction.
In an embodiment of the present invention, the offline timing method further includes: storing the system time after time correction in a clock module; the clock module is also used for recording the system receiving time of each node message.
Another aspect of the present invention provides a medium having a computer program stored thereon, where the computer program is executed by a processor to implement the offline timing method.
In another aspect, the present invention provides an offline server, including: a processor and a memory; the memory is used for storing computer programs, and the processor is used for executing the computer programs stored in the memory, so that the offline server executes the offline timing method.
In a final aspect, the present invention provides an offline timing system, including: at least two nodes, generating a message containing a timestamp; and the offline server receives the messages transmitted by the nodes in an offline mode, records the system receiving time of the messages of each node, and performs time correction on the offline server according to the timestamps in the messages of different nodes and the system receiving time.
In an embodiment of the present invention, the node is a mobile terminal; the transmission mode of the message between the node and the off-line service end comprises the following steps: a two-dimensional code mode, a bluetooth mode and/or a near field communication mode.
As described above, the offline timing method, medium, offline server and offline timing system of the present invention have the following advantages:
the invention adopts the characteristics of decentralized and completely distributed regional chain technology, any terminal equipment can be used as a node, each node can jointly maintain the time of the system through effective data information carried by the node, repeated and wrong information is filtered out by acquiring the two-dimensional code or Bluetooth timeliness information of a plurality of mobile phone nodes containing time information, and the system can be used for correcting the system time of the node through a plurality of times of decryption operation and processing. When any node is wrong in time, other nodes can still work normally, the time error of a single node or even a plurality of nodes cannot influence the system time unless the time continuously exceeding the preset number of mobile phone nodes in the whole system can be controlled to simultaneously make errors, but the probability of simultaneous errors is very small, so that the system time correction is realized in a relatively stable and low-cost mode.
Drawings
Fig. 1 is a diagram illustrating an application background architecture of the offline timing method according to an embodiment of the present invention.
Fig. 2 is a message transmission diagram illustrating an offline timing method according to an embodiment of the present invention.
FIG. 3 is a schematic flow chart diagram illustrating an offline timing method according to an embodiment of the present invention.
FIG. 4 is a timing flowchart illustrating an off-line timing method according to an embodiment of the invention.
Fig. 5 is a flow chart illustrating a message acquisition process of the offline timing method according to an embodiment of the present invention.
FIG. 6 is an arbitration flow chart of the offline timing method according to an embodiment of the present invention.
Fig. 7 is a schematic structural diagram of an offline server according to an embodiment of the present invention.
Fig. 8 is a schematic structural connection diagram of an offline timing system according to an embodiment of the present invention.
Description of the element reference numerals
7 off-line server
71 processor
72 memory
73 transceiver
74 communication interface
75 System bus
S31-S33
S331-S335 steps
S331A-S331C steps
S335A-S335C step
Detailed Description
The embodiments of the present invention are described below with reference to specific embodiments, and other advantages and effects of the present invention will be easily understood by those skilled in the art from the disclosure of the present specification. The invention is capable of other and different embodiments and of being practiced or of being carried out in various ways, and its several details are capable of modification in various respects, all without departing from the spirit and scope of the present invention. It should be noted that the features in the following embodiments and examples may be combined with each other without conflict.
It should be noted that the drawings provided in the following embodiments are only for illustrating the basic idea of the present invention, and the components related to the present invention are only shown in the drawings rather than drawn according to the number, shape and size of the components in actual implementation, and the type, quantity and proportion of the components in actual implementation may be changed freely, and the layout of the components may be more complicated.
The embodiment aims to provide an offline timing method, a medium, an offline server and an offline timing system, which are used for solving the problem of how to realize offline device timing under the condition of not adopting clock modules such as a GPS (global positioning system) or a Beidou.
The principle and implementation of an offline timing method, medium, offline server and offline timing system according to the present embodiment will be described in detail below with reference to fig. 1 to 8, so that those skilled in the art can understand an offline timing method, medium, offline server and offline timing system according to the present embodiment without creative work.
Referring to fig. 1, an application background architecture diagram of the offline timing method according to an embodiment of the present invention is shown. As shown in fig. 1, the offline server has a time recording function, and performs system timing by acquiring message information of a plurality of nodes in an offline state. Node 1 and node 2 … are different nodes, and when the system receiving time is different but the received node identification information is the same, it is determined to be the same node.
Please refer to fig. 2, which is a message transmission diagram illustrating an offline timing method according to an embodiment of the present invention. As shown in fig. 2, the nodes in this embodiment are nodes in a regional chain, and in the regional chain technology, a regional chain refers to an end-to-end network formed by a plurality of nodes together through cryptography, and has a completely distributed characteristic without centralized equipment and management mechanisms. The node in fig. 2 may be a mobile phone, or may be other terminal devices that can be used as a regional link node. Taking a mobile phone as an example of a node, the message content of the mobile phone node includes a timestamp, an identification code, and a check code, and in an embodiment, the identification code is a user card number. The generation process of the message is as follows: acquiring a timestamp, namely the current time value of a mobile phone node, using the timestamp as a key, and performing DES encryption on a user card number to obtain an identification code; combining the timestamp and the identification code into Message information, and performing MD5 calculation on the Message to obtain 16byte abstract information; the digest information is logically operated to obtain a check code, for example, an xor operation is performed, and in one embodiment, the identification code is an id code.
The time stamp may play a role in e-commerce, financial fields, etc., proving certain data of the user, the occurrence time of the transaction. In practical blockchain techniques, the timestamps play the role of notary in the blockchain. The block chain can ensure that each block is connected in sequence through the timestamp, if the timestamp signature is recorded on the block chain, the time of what event happens on the block chain can be proved, and the information can be stored permanently without worrying about tampering. In addition, the time stamp is a transaction certification mechanism of the blockchain, and all transactions and document signatures occurring on the blockchain are recorded through the time stamp.
At present, the application of the timestamp is not associated with the time calibration of a server system, and the time calibration of the system is carried out by communicating with the server through wired media such as a network and the like, and transmitting time information through mutual communication to realize the consistency of the two times. Therefore, when a line of the transmission network fails, time calibration cannot be performed normally, which further affects the realization of information transmission and system functions related to time.
Please refer to fig. 3, which is a schematic flowchart illustrating an offline timing method according to an embodiment of the present invention. As shown in fig. 3, in an embodiment, an offline timing method is provided, which is applied to an offline server, where the offline server performs timing through a message acquired in an offline manner, where the message includes a timestamp; the off-line timing method specifically comprises the following steps:
s31, receiving messages of at least two nodes communicated with the off-line server.
Specifically, when a packet is received, the identity of the node that sent the packet is identified. The specific steps of S31 include:
s311, when the message is obtained, the format of the message is verified.
Further, the S311 includes:
S311A, combining the timestamp and the identification code into the information to be verified.
In particular, a timestamp is a complete verifiable data that can indicate that a piece of data already exists at a particular point in time, and that identifies the timeliness of the data.
S311B, carrying out summary calculation on the information to be verified to obtain the summary information to be verified.
Specifically, the hash function MD5 is used to perform digest calculation, and the MD5 algorithm calculates input data according to a certain algorithm to generate a 128-bit function value, where the input value and the function value correspond to each other one to one. It has irreversibility and impact resistance. Irreversibility is that the function value can be calculated through the input value, but the input value is difficult to derive through the function value; collision resistance is the difference between the function values calculated for any two input values. Even if the data is stolen by others in the transmission process, the useful information is difficult to be cracked.
It should be noted that the MD5 digest algorithm is only an embodiment of the present invention, and an MD4 digest algorithm, an SHA digest algorithm, or other hash function algorithms besides the MD5 digest algorithm are within the protection scope of the present invention.
S311C, performing logic operation on the abstract information to be verified to obtain a check code to be verified.
S311D, judging whether the check code to be verified is consistent with the check code in the message; if yes, the acquired message format is judged to be correct.
S312, when the format of the message is verified correctly, the user card number is obtained by decrypting the message.
Specifically, the Encryption and decryption of the message Data utilize a symmetric Encryption algorithm DES (Data Encryption Standard). DES encryption, namely, taking a key as a parameter, carrying out various rules and steps of replacement and conversion on a plaintext, and taking a conversion result as a ciphertext; DES decryption is the inverse transformation of an encryption algorithm, taking a ciphertext as an input and a key as a parameter, and the transformation result is a plaintext. DES is symmetric, using the same key to encrypt and decrypt data.
It should be noted that the symmetric encryption algorithm DES is only a specific embodiment of the present invention, and a 3DES algorithm, a TDEA algorithm, a Blowfish algorithm, an RC5 algorithm, an IDEA algorithm, or other symmetric encryption algorithms other than the symmetric encryption algorithm DES are within the scope of the present invention.
In this embodiment, after the user card number is obtained, if the user card numbers are the same, the same mobile phone node is determined, and a plurality of pieces of mobile phone node information are continuously obtained, for example, ten pieces of mobile phone node information are continuously obtained to perform system timing.
And S32, recording the system receiving time of the message of each node.
Specifically, the system itself has a multi-function clock/calendar chip, such as PCF8563, which records the current time of the system. When the system works, the message information of 10 mobile phone nodes is continuously acquired, and each mobile phone node is acquiredRecording a system time during message, so that time stamps of 10 mobile phone nodes and 10 system times exist, and defining the time stamps of the mobile phone nodes as T respectively A1 、T A2 、T A3 、T A4 、T A5 、T A6 、T A7 、T A8 、T A9 、T A10 Defining the system time as T S1 、T S2 、T S3 、T S4 、T S5 、T S6 、T S7 、T S8 、T S9 、T S10 。
It should be noted that the PCF8563 chip is only a specific embodiment of the clock chip of the present invention, and other clock chips capable of recording the system time besides the PCF8563 chip are within the protection scope of the present invention.
And S33, timing the offline server according to the time stamps in the messages of different nodes and the system receiving time.
In an embodiment, please refer to fig. 4, which is a timing flowchart of the offline timing method according to an embodiment of the present invention. As shown in fig. 4, the S33 includes:
and S331, acquiring messages of different nodes with preset quantity according to the time sequence.
Fig. 5 is a message acquiring flow chart of the offline timing method according to an embodiment of the present invention. As shown in fig. 5, in an embodiment, the S331 includes:
S331A, obtaining the messages of different nodes according to time sequence.
And S331B, determining the earliest acquired message in the preset number of messages according to the time sequence.
S331C, continuously acquiring the messages of the different nodes, and replacing the earliest acquired message with the current acquired message.
S332, the time stamps in the adjacent messages are differentiated to obtain the node time difference.
S333, differentiating the system receiving time of the adjacent messages to obtain a system time difference.
Specifically, the nodes in the area chain take the mobile phone node as an example, and list management is performed on the mobile phone time group, the mobile phone time difference, the system time group, and the system time difference, and the list management is edited in a table form, which refers to the initial time statistical table in table 1. In this embodiment, the number of the selected nodes is ten as an example, and in addition, other preset numbers of reference points may be used, so as to improve the stability and effectiveness of the system when the number of the reference points is increased.
Table 1: initial time statistical table
And S334, subtracting the node time difference from the system time difference to obtain a timing reference value.
And S335, judging whether the timing reference value exceeds a preset threshold value, and executing an arbitration mechanism to perform timing according to the judgment result.
Specifically, whether a plurality of timing reference values exceed a preset threshold value is sequentially judged, and system timing is carried out on the offline server according to a few majority-obeying arbitration mechanisms.
Please refer to fig. 6, which is an arbitration flow chart illustrating an offline timing method according to an embodiment of the present invention. As shown in fig. 6, in one embodiment, the step S335 includes:
S335A, respectively counting the number of the messages exceeding the preset threshold and the number of the messages not exceeding the preset threshold.
Specifically, the preset threshold value is 60 seconds, and if | Δ in watch 1 a4 -Δ S4 Full 100 seconds, then T A4 Unsatisfied | Δ a4 - Δ S4 ︱<If the remaining timestamps satisfy the condition of being less than or equal to 60 seconds, the number of the messages exceeding the preset threshold is 1, and the number of the messages not exceeding the preset threshold is 9.
S335B, selecting the message with the largest number from the two messages that exceed the preset threshold and do not exceed the preset threshold as the time corrector.
Specifically, since the number of the messages not exceeding the preset threshold is 9, the messages not exceeding the preset threshold are used as a time corrector.
S335C, selecting the last acquired message in the time correcting party, and replacing the system time of the off-line service end with the timestamp of the last acquired message to realize time correction.
Specifically, in the preset number of messages obtained in table 1, the timestamp T is set A10 The corresponding message is the last obtained message, and the system time of the off-line server is replaced by a timestamp T A10 To achieve timing.
In an embodiment, the offline timing method further includes: storing the system time after time correction in a clock module; the clock module is also used for recording the system receiving time of each node message.
Specifically, the clock module is a multifunctional clock/calendar chip-PCF 8563, and the time stamp T is obtained A10 The system time as the off-line server is stored in PCF8563, and calibration is performed.
In an embodiment, messages of different nodes are continuously acquired, the earliest received message is replaced by a new received message to update the messages within the preset number, and meanwhile, system timing is performed again.
Specifically, the updated mobile phone time group, the mobile phone time difference, the system time group and the system time difference are subjected to list management and are edited in a table form, and the time statistical table is updated according to table 2.
Table 2: updating a time statistics table
According to the table 2, the personal identification agent Delta is judged in turn a2 -Δ S2 ︱<60 seconds and | Delta a3 -Δ S3 ︱<60 seconds and | Delta a4 -Δ S4 ︱<60 seconds and | Delta a5 -Δ S5 ︱<60 seconds and | Delta a6 -Δ S6 ︱<60 seconds and | Delta a7 -Δ S7 ︱<60 seconds and | Delta a8 -Δ S8 ︱<60 seconds and | Delta a9 -Δ S9 ︱<60 seconds and | Delta a10 -Δ S10 ︱<If the time stamp T corresponding to the just received message meets the condition of whether 60 seconds are met or not A11 If the judgment result of (1) belongs to the party with a large number of messages, replacing the system time of the offline server with T A11 (ii) a If the timestamp T corresponding to the just received message A11 If the judgment result of (2) is the party with less message quantity, the current system time of the offline server is reserved and is not replaced.
The present embodiment also provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the offline timing method.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the above method embodiments may be performed by hardware associated with a computer program. The aforementioned computer program may be stored in a computer readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Please refer to fig. 7, which is a schematic structural diagram of an offline server according to an embodiment of the present invention. As shown in fig. 7, this embodiment provides an offline server 7, where the offline server 7 includes: a processor 71, memory 72, transceiver 73, communication interface 74, or/and system bus 75; the memory 72 and the communication interface 74 are connected to the processor 71 and the transceiver 73 through the system bus 75 and perform communication with each other, the memory 72 is used for storing computer programs, the communication interface 74 is used for communicating with other devices, and the processor 71 and the transceiver 73 are used for running the computer programs, so that the offline server executes the steps of the offline timing method.
The system bus 75 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The system bus 75 may be divided into an address bus, a data bus, a control bus, and the like. The communication interface is used for realizing communication between the database access device and other equipment (such as a client, a read-write library and a read-only library). The Memory may include a Random Access Memory (RAM), and may further include a non-volatile Memory (non-volatile Memory), such as at least one disk Memory.
The Processor 71 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, or discrete hardware components.
Please refer to fig. 8, which is a schematic structural connection diagram of an offline timing system according to an embodiment of the present invention. As shown in fig. 8, the present embodiment provides an offline timing system, which includes: at least two nodes, generating a message containing a timestamp; and the offline server receives the messages transmitted by the nodes in an offline mode, records the system receiving time of the messages of each node, and performs time correction on the offline server according to the timestamps in the messages of different nodes and the system receiving time.
In one embodiment, the node is a mobile terminal, such as a laptop, a smart phone, or a tablet computer.
In an embodiment, the method for transmitting the message between the node and the offline server includes: the two-dimensional code mode, the bluetooth mode and/or the near field communication mode, and the transmission mode also comprises other non-network communication modes.
In an embodiment, the offline time calibration system is a card punching system, wherein the node is a mobile phone of an employee, and the offline server is an offline card punching machine. In the specific application, when the employee punches the card through the mobile phone, the message containing the timestamp is transmitted in a short distance, the offline card punch identifies the message and performs system timing according to the message which is just received, the offline timing of the offline card punch is realized in a low-cost mode, the phenomenon that the employee punches the card instead of the card can be effectively avoided, and the working behavior habit of the employee is well standardized and supervised.
In summary, the offline time correction method, medium, offline server and offline time correction system of the present invention adopt decentralized and fully distributed characteristics of the area link technology, any terminal device can be used as a node, each node can maintain the time of the system through the effective data information carried by itself, and the system can correct the system time by obtaining the two-dimensional code or bluetooth timeliness information of multiple mobile phone nodes containing time information, filtering out repeated and wrong information, and performing multiple times of decryption operations and processing. When any node is in error, other nodes can still work normally, and the probability of errors occurring when the time of controlling the mobile phone nodes continuously exceeding the preset number in the whole system is controlled to be extremely low, so that the system timing is realized in a relatively stable and low-cost mode. The invention effectively overcomes various defects in the prior art and has high industrial utilization value.
The foregoing embodiments are merely illustrative of the principles and utilities of the present invention and are not intended to limit the invention. Any person skilled in the art can modify or change the above-mentioned embodiments without departing from the spirit and scope of the present invention. Accordingly, it is intended that all equivalent modifications or changes which can be made by those skilled in the art without departing from the spirit and technical spirit of the present invention be covered by the claims of the present invention.
Claims (8)
1. An off-line time correction method is characterized in that the off-line time correction method is applied to an off-line server, the off-line server performs time correction through a message acquired in an off-line mode, and the message comprises a timestamp; the off-line time correcting method comprises the following steps:
receiving messages of at least two nodes communicating with the offline server;
recording the system receiving time of the message of each node;
acquiring messages of different nodes with preset quantity according to time sequence; the time stamps in the adjacent messages are differentiated to obtain node time differences; differentiating the system receiving time of the adjacent messages to obtain a system time difference; subtracting the node time difference from the system time difference to obtain a timing reference value; respectively counting the number of messages exceeding a preset threshold and the number of messages not exceeding the preset threshold; selecting one party with the largest number of messages from the two parties of messages which exceed the preset threshold value and do not exceed the preset threshold value as a time corrector; and selecting the last acquired message in the time correcting party, and replacing the timestamp of the last acquired message with the system time of the offline server to realize time correction.
2. The offline timing method of claim 1, wherein the step of receiving messages of at least two nodes in communication with the offline server comprises:
when a message is received, the identity of the node sending the message is identified.
3. The offline time correction method according to claim 1, wherein the step of obtaining the messages of the different nodes of the preset number according to the time sequence comprises:
acquiring messages of different nodes according to the time sequence;
determining the earliest acquired message in a preset number of messages according to the time sequence;
and continuously acquiring the messages of different nodes, and replacing the earliest acquired message with the currently acquired message.
4. The offline timing method of claim 1, further comprising:
storing the system time after timing in a clock module;
the clock module is also used for recording the system receiving time of each node message.
5. A medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the offline timing method of any one of claims 1 to 4.
6. An offline server, comprising: a processor and a memory;
the memory is used for storing a computer program, and the processor is used for executing the computer program stored by the memory to enable the offline server to execute the offline time-calibrating method according to any one of claims 1 to 4.
7. An off-line timing system, comprising:
at least two nodes, generating a message containing a timestamp;
the offline server receives the messages transmitted by the nodes in an offline mode, records the system receiving time of the messages of each node, and acquires the messages of different nodes with preset quantity according to the time sequence; the time stamps in the adjacent messages are differentiated to obtain node time differences; differentiating the system receiving time of the adjacent messages to obtain a system time difference; subtracting the node time difference from the system time difference to obtain a timing reference value; respectively counting the number of messages exceeding a preset threshold and the number of messages not exceeding the preset threshold; selecting one party with the largest number of messages from the two parties of messages which exceed the preset threshold value and do not exceed the preset threshold value as a time correcting party; and selecting the last acquired message in the time correcting party, and replacing the timestamp of the last acquired message with the system time of the offline server to realize time correction.
8. The offline timing system of claim 7,
the node is a movable terminal;
the transmission mode of the message between the node and the off-line server side comprises the following steps: two-dimensional code mode, Bluetooth mode and/or near field communication mode.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010210910.8A CN111404632B (en) | 2020-03-24 | 2020-03-24 | Offline timing method, medium, offline server and offline timing system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010210910.8A CN111404632B (en) | 2020-03-24 | 2020-03-24 | Offline timing method, medium, offline server and offline timing system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111404632A CN111404632A (en) | 2020-07-10 |
CN111404632B true CN111404632B (en) | 2022-08-23 |
Family
ID=71431074
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010210910.8A Active CN111404632B (en) | 2020-03-24 | 2020-03-24 | Offline timing method, medium, offline server and offline timing system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111404632B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113965991A (en) * | 2021-10-28 | 2022-01-21 | 杭州字节信息技术有限公司 | LoRaWan-based node positioning implementation method |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109286498A (en) * | 2018-09-20 | 2019-01-29 | 北京广利核系统工程有限公司 | Nuclear power station DCS leads to credit network method of calibration and device, electronic device |
CN110677211A (en) * | 2019-09-27 | 2020-01-10 | 宁波三星医疗电气股份有限公司 | Time synchronization method and device and power acquisition terminal |
CN110868268A (en) * | 2019-11-01 | 2020-03-06 | 南方电网数字电网研究院有限公司 | Local time timing method, device, timing equipment and storage medium |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8494009B2 (en) * | 2006-09-25 | 2013-07-23 | Futurewei Technologies, Inc. | Network clock synchronization timestamp |
US10313041B2 (en) * | 2016-06-10 | 2019-06-04 | Apple Inc. | Determination of accuracy of a chain of clocks |
CN110176973B (en) * | 2019-05-17 | 2020-12-04 | 固高科技(深圳)有限公司 | Method, system, computer device and storage medium for clock synchronization |
-
2020
- 2020-03-24 CN CN202010210910.8A patent/CN111404632B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109286498A (en) * | 2018-09-20 | 2019-01-29 | 北京广利核系统工程有限公司 | Nuclear power station DCS leads to credit network method of calibration and device, electronic device |
CN110677211A (en) * | 2019-09-27 | 2020-01-10 | 宁波三星医疗电气股份有限公司 | Time synchronization method and device and power acquisition terminal |
CN110868268A (en) * | 2019-11-01 | 2020-03-06 | 南方电网数字电网研究院有限公司 | Local time timing method, device, timing equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN111404632A (en) | 2020-07-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
TWI666902B (en) | Robust ATM network system and information processing method based on blockchain technology | |
CN108846010B (en) | Method, system, computer system and storage medium for tracing product source in network | |
CN111159306B (en) | Information publishing method and device based on block chain and computer equipment | |
CN111445333B (en) | Block generation method, device, computer equipment and storage medium | |
US20230092484A1 (en) | Block chain-based block consensus method and related device | |
TWI729518B (en) | Block chain-based event processing method and device, and electronic equipment | |
US11640394B2 (en) | Method, apparatuses and system for exchanging data between a distributed database system and devices | |
CN109949111A (en) | Electronic bill mark distributing method, electronic bill generation method, apparatus and system | |
EP3882840A1 (en) | Terminal and method for making contract in blockchain type by using digital content original copy confirmation key | |
CN111404632B (en) | Offline timing method, medium, offline server and offline timing system | |
US11188523B1 (en) | Distributed ledger object router for transactions, contracts and data | |
EP3805960B1 (en) | Methods and systems for identifying software product installation instances | |
EP3883175A1 (en) | Blockchain-based contract terminal and method using location information | |
CN108882230B (en) | Call record management method, device and system | |
CN116910820A (en) | Data report processing method, device, computer equipment and storage medium | |
CN114390063B (en) | Message broadcasting method for blockchain network, blockchain node and blockchain system | |
CN112667586B (en) | Method, system, equipment and medium for synchronizing data based on stream processing | |
CN115131029A (en) | Block chain-based digital file signing method and device | |
CN113014572A (en) | Message communication system, method and device | |
CN113553371A (en) | Block chain-based medical data processing method and device and computer equipment | |
CN115529288B (en) | Message pushing method, device and computer equipment | |
US11477022B1 (en) | Distributed ledger object router for transactions, contracts and data | |
US11886463B2 (en) | Distributed ledger object router using nested time signals | |
EP4086788A1 (en) | Blockchain-based data processing method and apparatus, device, and readable storage medium | |
CN110347748B (en) | Data verification method, system, device and equipment based on inverted index |
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 |