CN116959143A - Time synchronization method, system, equipment and medium for non-networking door lock - Google Patents

Time synchronization method, system, equipment and medium for non-networking door lock Download PDF

Info

Publication number
CN116959143A
CN116959143A CN202310712708.9A CN202310712708A CN116959143A CN 116959143 A CN116959143 A CN 116959143A CN 202310712708 A CN202310712708 A CN 202310712708A CN 116959143 A CN116959143 A CN 116959143A
Authority
CN
China
Prior art keywords
door lock
time
mobile terminal
card
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.)
Pending
Application number
CN202310712708.9A
Other languages
Chinese (zh)
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.)
China Merchants Shekou Digital City Technology Co ltd
Original Assignee
China Merchants Shekou Digital City Technology 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 China Merchants Shekou Digital City Technology Co ltd filed Critical China Merchants Shekou Digital City Technology Co ltd
Priority to CN202310712708.9A priority Critical patent/CN116959143A/en
Publication of CN116959143A publication Critical patent/CN116959143A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
    • G07C9/00Individual registration on entry or exit
    • G07C9/00174Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys
    • G07C9/00309Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys operated with bidirectional data transmission between data carrier and locks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0602Systems characterised by the synchronising information used
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
    • G07C9/00Individual registration on entry or exit
    • G07C9/00174Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys
    • G07C2009/00968Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys shape of the data carrier
    • G07C2009/00976Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys shape of the data carrier card

Abstract

The application discloses a time synchronization method, a system, equipment and a medium of a non-networking door lock. Comprising the following steps: the method comprises the steps that a mobile terminal performs time synchronization with a time server, the mobile terminal sends time synchronization notification information to a project management terminal, the time synchronization notification information is indication information of time synchronization of a non-networking door lock, when an IC card approaches the mobile terminal, the mobile terminal writes the local time of the current mobile terminal into the IC card, when the IC card approaches the non-networking door lock, the non-networking door lock reads the local time stored by the IC card, the non-networking door lock calculates a local time deviation value according to the local time stored by the IC card, and the local time of the non-networking door lock is calibrated according to the local time deviation value and a preset time compensation value. The application can make the door lock use the IC card to quickly correct the time of the non-networking door lock under the condition of no wireless network interface function, and can realize the time synchronization of the non-networking door lock without pulling out a cable and disassembling the door lock.

Description

Time synchronization method, system, equipment and medium for non-networking door lock
Technical Field
The present application relates to the field of door lock communication technologies, and in particular, to a time synchronization method, system, device, and medium for a non-networked door lock.
Background
Along with the development of internet of things and intelligent home technology, the door locks which are widely used in the market are various, the traditional door lock system gradually evolves into an intelligent door lock, the intelligent door lock is divided from networking functions, and the intelligent door lock can be divided into networking door locks and non-networking door locks.
The local time of the door lock equipment can deviate after the traditional non-networking door lock runs for a period of time, and because the network is not supported, in some projects, the time deviation of the door lock equipment can be as long as a plurality of hours or days after the door lock equipment runs for a long time, thereby affecting the business functions of door lock authority control, management maintenance and the like and even causing the potential safety hazard of project management.
The existing solution is to connect to the door lock device by means of ethernet, RS485, RS232, or data lines, and then manually adjust the local time of the door lock. In this process, network wiring, connecting cables, and even removing/reinstalling the door lock device are required, and thus, the operation is very inconvenient and inefficient.
Disclosure of Invention
Based on the above, it is necessary to provide a time synchronization method, system, device and medium for a non-networking door lock, so as to solve the problem that the existing door lock device can still solve the time synchronization when not supporting network communication.
A first aspect of an embodiment of the present application provides a time synchronization method for a non-networked door lock, where the method includes:
the mobile terminal and the time server perform time synchronization;
the mobile terminal sends time synchronization notification information to the project management terminal, wherein the time synchronization notification information comprises indication information for performing time synchronization on the non-networking door lock;
when the IC card approaches the mobile terminal, the mobile terminal writes the current local time of the mobile terminal into the IC card;
when the IC card is close to the non-networking door lock, the non-networking door lock reads the local time stored by the IC card;
and the non-networking door lock calculates a local time deviation value according to the local time stored by the IC card, and calibrates the local time of the non-networking door lock according to the local time deviation value and a preset time compensation value.
A second aspect of the embodiment of the present application provides a time synchronization system for a non-networking door lock, where the time synchronization system for a non-networking door lock includes a time server, a mobile terminal, an IC card, and a non-networking door lock:
the mobile terminal is used for carrying out time synchronization with the time server;
the mobile terminal is configured to send time synchronization notification information to the project management terminal, where the time synchronization notification information includes indication information for performing time synchronization on the non-networking door lock;
when the IC card approaches the mobile terminal, the mobile terminal is used for writing the current local time of the mobile terminal into the IC card;
when the IC card is close to the non-networking door lock, the non-networking door lock is used for reading the local time stored by the IC card;
the non-networking door lock is used for calculating a local time deviation value according to the local time stored by the IC card, and calibrating the local time of the networking door lock according to the local time deviation value and a preset time compensation value.
In a third aspect, an embodiment of the present application provides a time synchronization device, where the time synchronization device includes a time server, a mobile terminal, an IC card, and a non-networking door lock in the time synchronization system of the non-networking door lock described in the second aspect.
In a fourth aspect, embodiments of the present application provide a computer readable storage medium storing a computer program which, when executed by a processor, implements the time synchronization method of the non-networked door lock according to the first aspect.
In summary, the present application provides a time synchronization method, system, device and medium for a non-networking door lock, where after a mobile terminal performs time synchronization with a time server, the mobile terminal sends time synchronization notification information to a project management terminal, where the time synchronization notification information includes indication information for performing time synchronization on the non-networking door lock, when an IC card approaches the mobile terminal, the mobile terminal writes a local time of the current mobile terminal into the IC card, when the IC card approaches the non-networking door lock, the non-networking door lock reads the local time stored by the IC card, and the non-networking door lock calculates a local time offset value according to the local time stored by the IC card, and calibrates the local time of the non-networking door lock according to the local time offset value and a preset time offset value. According to the application, the time of the non-networking door lock can be quickly corrected by using the IC card under the condition of no wireless network interface functions such as Wifi, 4G, 5G, LORA, bluetooth or Zigbee, and the like, the time synchronization of the non-networking door lock can be realized without pulling a cable or disassembling the door lock, the operation is simple, the efficiency is high, the limitation that the non-networking door lock cannot be directly connected to a network is overcome, the bidirectional authentication mechanism of a mobile terminal and the non-networking door lock read-write IC card is supported, the interval period of the time synchronization of the door lock can be dynamically calculated, the problem of manpower waste caused by too frequent time synchronization of the door lock is avoided, the precision requirement of the time synchronization of the door lock is ensured, and the accuracy and the safety of the time synchronization of the door lock are improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments of the present application will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic view of an application environment of a time synchronization method for a non-networking door lock according to an embodiment of the present application;
FIG. 2 is a flowchart of a time synchronization method for a non-networked door lock according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a time synchronization system of a non-networking door lock according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
It should be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
As used in the present description and the appended claims, the term "if" may be interpreted as "when..once" or "in response to a determination" or "in response to detection" depending on the context. Similarly, the phrase "if a determination" or "if a [ described condition or event ] is detected" may be interpreted in the context of meaning "upon determination" or "in response to determination" or "upon detection of a [ described condition or event ]" or "in response to detection of a [ described condition or event ]".
Furthermore, the terms "first," "second," "third," and the like in the description of the present specification and in the appended claims, are used for distinguishing between descriptions and not necessarily for indicating or implying a relative importance.
Reference in the specification to "one embodiment" or "some embodiments" or the like means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," and the like in the specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments" unless expressly specified otherwise. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless expressly specified otherwise.
It should be understood that the sequence numbers of the steps in the following embodiments do not mean the order of execution, and the execution order of the processes should be determined by the functions and the internal logic, and should not be construed as limiting the implementation process of the embodiments of the present application.
In order to illustrate the technical scheme of the application, the following description is made by specific examples.
The time synchronization method of the non-networking door lock provided by the embodiment of the application can be applied to an application environment as shown in fig. 1, wherein the time server is in communication with the mobile terminal through network connection, the time server can be realized by an independent server or a server cluster formed by a plurality of servers, the mobile terminal comprises, but not limited to, mobile equipment such as a palm mobile phone, a tablet, a notebook computer and the like, the mobile terminal performs time synchronization with the time server, the mobile terminal sends time synchronization notification information to the project management terminal, when the IC card is close to the mobile terminal, the mobile terminal writes the local time of the current mobile terminal into the IC card, and when the IC card is close to the non-networking door lock, the local time stored by the IC card is read by the non-networking door lock, so that the local time of the non-networking door lock is calibrated, the time synchronization of the non-networking door lock and the time server is realized by using the IC card, and the method can enjoy convenience brought by the non-networking door lock with lower cost.
Example 1
Fig. 2 is a schematic flow chart of a time synchronization method of a non-networking door lock according to an embodiment of the application, where the method may include the following steps:
s201: the mobile terminal performs time synchronization with the time server.
In step S201, the mobile terminal of the present application may perform NTP time synchronization with a time server through a wireless network. The time server has time-based crystal oscillator, can keep higher frequency stability and timing precision, and receives satellite signals or a time synchronization source trusted by an external third party so as to synchronize own time, thereby obtaining accurate standard time. The time synchronization source may be an atomic clock, an astronomical station, a satellite, or a higher-level time synchronization server on the Internet, which is not limited in any way by the present application.
It should be noted that the time server may be deployed in a local area network machine room of the project, or may be deployed in an internet cloud platform, which is not limited in the present application.
In this embodiment, when the mobile terminal synchronizes its own local time, the mobile terminal sends a time synchronization request to the time server, then the mobile terminal receives the standard time fed back by the time server based on the time synchronization request, performs analysis calculation on the standard time, and then calibrates the local time of the mobile terminal according to the standard time of the time server, thereby implementing time synchronization between the mobile terminal and the time server.
Specifically, in an embodiment, the interval period of time synchronization between the mobile terminal and the time server may be preset to be T1, and the time synchronization between the mobile terminal and the time server may be achieved by setting the interval period T1. For example, the operation of implementing time synchronization between the mobile terminal and the time server is performed once every 1 minute if the set time length is 1 minute, or the operation of implementing time synchronization between the mobile terminal and the time server is performed once every 30 minutes if the set time length is 30 minutes. Namely, every interval period T1, the mobile terminal sends a query message with a T1 time stamp (time) to the time server, then the time server adds an arrival time T2 and a response query message sending time T3 to the query message, then sends the response query message to the mobile terminal, the mobile terminal records the arrival time T4 of the response query message, so as to calculate time deviation, and finally the mobile terminal adjusts the local time in the mobile terminal according to the calculated time deviation, thereby realizing the time synchronization of the mobile terminal and the time server, wherein the formula of the time deviation is as follows:
wherein Delta is time deviation, t1 is a time stamp, t2 is adding arrival time to the query message, t3 is sending time of response query message, and t4 is arrival time of response query message recorded by the mobile terminal.
In this embodiment, time synchronization is performed between the mobile terminal and the time server, so that the time synchronization of the non-networking door lock is improved.
In addition, as an example, when time synchronization is performed, synchronization may be performed based on a UTC time format, and is not particularly limited.
S202: the mobile terminal sends time synchronization notification information to the project management terminal, wherein the time synchronization notification information comprises indication information for performing time synchronization on the non-networking door lock.
In step S202, the mobile terminal of the present application sends a time synchronization notification message to the project management terminal, and reminds the project management terminal of performing door lock time synchronization in real time, wherein the project management terminal corresponds to a project manager.
The device ID, model, installation position, operation date of last door lock time synchronization, etc. of the door lock are included in the time synchronization notification information, and the content of the time synchronization notification information is not limited in detail in the embodiment of the present application and may be set according to actual situations. The notification mode may be a short message, a mobile phone APP message, an automatic voice prompt, etc., which is not limited in detail in the embodiment of the present application, and may be set according to practical situations. According to the application, the mobile terminal sends the notification to the project manager at intervals, so that the project manager is reminded of carrying out door lock time synchronization in real time, and the problem that the project manager omits time synchronization is avoided.
Optionally, in an embodiment, in step S201, that is, the mobile terminal sends time synchronization notification information to the project management terminal, including:
the mobile terminal dynamically determines a door lock time synchronization period according to a preset algorithm;
and the mobile terminal sends the time synchronization notification information to the project management terminal according to the door lock time synchronization period.
In this embodiment, an interval period of time synchronization between the mobile terminal and the non-networking door lock needs to be preset to be T2, that is, a door lock time synchronization period T2, and the mobile terminal sends time synchronization notification information to the project manager by setting the door lock time synchronization period T2 so as to remind the project manager to perform door lock time synchronization.
For example, the door lock time synchronization period may be set to be 1 minute, and then the operation of implementing the non-networking door lock time synchronization is performed once every 1 minute, or the operation of implementing the non-networking door lock time synchronization is performed once every 30 minutes, and then the project manager is reminded to implement the non-networking door lock time synchronization operation every 30 minutes.
However, in the above-described exemplary scheme, since the time synchronization of the mobile terminal with the non-networking door lock requires manual operation, if the door lock time synchronization period T2 is set too small, the time synchronization is too frequent, the workload of the manual operation is too great, and the manpower is wasted. If the door lock time synchronization period T2 is set too large, the time synchronization period is too long to meet the accuracy requirement of door lock time synchronization, so in another embodiment, the mobile terminal needs to dynamically determine the door lock time synchronization period according to a preset algorithm, so that the mobile terminal sends time synchronization notification information to the project manager according to the door lock time synchronization period T2.
In this embodiment, the mobile terminal needs to dynamically determine the door lock time synchronization period according to the preset algorithm, so that the mobile terminal sends the time synchronization notification information to the project manager according to the door lock time synchronization period T2, which can effectively avoid the problem of manpower waste caused by too frequent non-networking door lock time synchronization and can also ensure that the precision requirement of the non-networking door lock time synchronization is met.
Specifically, the mobile terminal dynamically determines a door lock time synchronization period according to a preset algorithm, including:
the mobile terminal acquires a reference period, wherein the reference period is an initialized door lock time synchronization period or a door lock time synchronization period dynamically determined last time;
the mobile terminal obtains the maximum allowable time deviation value of the non-networking door lock and the local time deviation value of the non-networking door lock calculated last time;
and the mobile terminal calculates the time synchronization period of the door lock according to the reference period, the maximum allowable time deviation value and the local time deviation value of the non-networking door lock calculated last time.
In this embodiment, in the project initialization stage, in combination with the time management requirement of the door lock system, the project manager may roughly estimate a time value as the initialized door lock time synchronization period (for example, 30 days), and the subsequent mobile terminal will dynamically adjust the time value to realize the time synchronization of the non-interlocking door locks. Specifically, a reference period is firstly obtained, wherein the reference period is an initialized door lock time synchronization period or a door lock time synchronization period dynamically determined last time, then a maximum allowable time deviation value of a non-networking door lock and a local time deviation value of the non-networking door lock calculated last time are obtained, and then dynamic calculation is carried out on the reference period of the mobile terminal, the maximum allowable time deviation value and the local time deviation value of the non-networking door lock calculated last time, so that the door lock time synchronization period of this time is calculated.
The present door lock time synchronization period is calculated by the following formula:
T2 =(△T max /△T)*T2
wherein T2 Indicating the current door lock time synchronization period, deltaT max According to the management requirement of a door lock system, the maximum allowable time deviation value of the non-networking door lock is represented, deltaT represents the local time deviation value of the non-networking door lock calculated last time, T2 represents a reference period, namely an initialized door lock time synchronization period or a door lock time synchronization period dynamically determined last time, and the problem of manpower waste caused by too frequent time synchronization of the non-networking door lock can be avoided and the precision requirement of the time synchronization of the non-networking door lock can be guaranteed.
In this embodiment, the mobile terminal dynamically calculates the interval period of the time synchronization of the non-networking door lock, so as to realize the time synchronization of the non-networking door lock, increase the processing speed, avoid the problem of manpower waste caused by too frequent time synchronization of the door lock, and ensure that the precision requirement of the time synchronization of the door lock is met, thereby improving the efficiency of the time synchronization of the non-networking door lock.
S203: when the IC card approaches the mobile terminal, the mobile terminal writes the current local time of the mobile terminal into the IC card.
In step S203, after the project manager receives the notification, the IC card is brought close to the mobile terminal, and the mobile terminal writes the local time of the current mobile terminal into the IC card.
The IC card of the application can adopt a passive and non-contact scheme, wherein the passive means that a battery is not needed in the IC card, and the IC card converts received radio frequency energy into a power supply to supply power for circuits in the card by using a beam power supply technology. After the IC card is close to the mobile terminal, the mobile terminal writes the local time of the mobile terminal into the IC card. For example, the non-contact type IC card can be read and written by the mobile terminal and the non-networking door lock within a range of 10cm, and has the advantages of no directivity during use, convenient card swiping and convenient operation. Illustratively, the IC card is divided into 2 sectors, and the mobile terminal writes the current local time of the mobile terminal to one of the sectors in the IC card.
Optionally, the mobile terminal writes the local time of the current mobile terminal into the IC card, including:
performing two-way authentication between the mobile terminal and the IC card;
when the two-way authentication is passed, the mobile terminal writes the local time of the current mobile terminal into the IC card.
In this embodiment, when the IC card approaches the mobile terminal, the mobile terminal and the IC card support bidirectional authentication, and the mobile terminal can write the local time of the current mobile terminal into one of the sectors of the IC card memory block.
Specifically, when the mobile terminal authenticates the IC card: the mobile terminal sends a random number to the IC card, the IC card uses the algorithm with the participation of the password appointed in advance to calculate the random number, then the result of calculation is returned to the mobile terminal, the mobile terminal checks whether the result is correct after receiving the result, if so, the authentication is successful, and if not, the authentication is failed. When the IC card authenticates the mobile terminal: the IC card sends a random number to the mobile terminal, the mobile terminal calculates the random number by using an algorithm with the participation of a password, and then returns the calculation result to the IC card, the IC card checks whether the result is correct after receiving the result, if the result is correct, the authentication is successful, and if the result is incorrect, the authentication is failed.
In one embodiment, for the final result of the mutual authentication, the mobile terminal may prompt the operator with an audible prompt, a vibration prompt, or an LED indicator light. For example, after the two-way authentication is successful, a prompt tone or a green indicator light is played, and if the two-way authentication is failed, a warning tone or a red indicator light is played. The embodiment of the application does not limit the prompting mode in detail, and can be set according to actual conditions. By adopting the bidirectional authentication mechanism, man-in-the-middle attacks and other potential security threats can be effectively prevented, and the security of the IC card and the mobile terminal is improved.
It should be noted that, the embodiment of the present application does not limit the random number in detail, and may be set according to actual situations.
In this embodiment, through the bidirectional authentication mechanism of the mobile terminal and the IC card, man-in-the-middle attack is effectively prevented, and the security of time synchronization of the door lock is improved, so that the mobile terminal writes the local time of the current mobile terminal into the IC card, and the efficiency of time synchronization of the subsequent non-networking door lock is improved.
S204: when the IC card is close to the non-networking door lock, the non-networking door lock reads the local time stored by the IC card.
In step S204, when the non-networking door lock is provided with the IC card reader/writer, the project manager brings the IC card close to the non-networking door lock, and the non-networking door lock reads the local time stored in the IC card.
Optionally, the non-networked door lock reads the local time stored by the IC card, including:
performing bidirectional authentication between the non-networking door lock and the IC card;
when the two-way authentication is passed, the non-networking door lock reads the local time stored by the IC card.
In this embodiment, when the IC card approaches the non-networking door lock, the non-networking door lock can only read the local time stored in the IC card, so that the IC card and the non-networking door lock need to perform bidirectional authentication.
Specifically, when the non-networked door lock authenticates the IC card: the non-networking door lock sends a random number to the IC card, the IC card calculates the random number by using a pre-agreed algorithm with a password, then the result of the calculation is returned to the non-networking door lock, the non-networking door lock checks whether the result is correct or not after receiving the result, if the result is correct, the authentication is successful, and if the result is incorrect, the authentication is failed. When the IC card authenticates the non-networked door lock: the IC card sends a random number to the non-networking door lock, the non-networking door lock calculates the random number by using an algorithm with the participation of a password, then the result of the calculation is returned to the IC card, the IC card checks whether the result is correct after receiving the result, if the result is correct, the authentication is successful, and if the result is incorrect, the authentication is failed.
In one embodiment, for the end result of the two-way authentication, the access device may prompt the operator with an audible prompt, or an LED indicator light. The embodiment of the application does not limit the prompting mode in detail, and can be set according to actual conditions.
In this embodiment, through adopting above-mentioned mutual authentication mechanism, can effectively prevent man-in-the-middle attack and other potential security threats, improved the security of IC-card and non-networking lock to the time of non-networking lock can be directly rectified to the follow-up IC-card that can directly utilize, and the time synchronization of lock just can be realized to the dismantlement lock of need not pulling out the cable, easy operation, efficient.
It should be noted that, the embodiment of the present application does not limit the random number in detail, and may be set according to actual situations.
S205: and the non-networking door lock calculates a local time deviation value according to the local time stored by the IC card, and calibrates the local time of the non-networking door lock according to the local time deviation value and a preset time compensation value.
In an embodiment, the local time offset value may also be defined by Δt=t utc -t local ,t utc Local time t of non-networking door lock reading IC card storage block local Local time of the non-networked door lock device.
In addition, considering that the time consumption of the operation of swiping the IC card on the mobile terminal and the door lock by the project manager can cause the deviation of the result of the formula, a time compensation value (for example, the value range is 1-15 seconds, the specific value can be set according to the actual requirement of the project) can be set for the time consumption of the two operation of swiping the IC card, then the non-networking door lock can calculate the local time of the IC card storage block and the local time of the non-networking door lock equipment through the preset time compensation value, so as to determine the more accurate local time deviation value of the non-networking door lock, and further automatically calibrate the local time inside the non-networking door lock to perform time synchronization, thereby ensuring that the non-networking door lock can still perform time synchronization when the non-networking door lock does not support network communication.
Specifically, the local time offset formula for a non-networked door lock may be modified as:
△T=t utc -t local +t offset
wherein t is utc Local time t of non-networking door lock reading IC card storage block local Local time, t, of non-networked door lock device offset Is a time offset value and Δt is the local time offset value of the non-networked door lock calculated this time.
In the embodiment, the local time of the non-networking door lock is adjusted by utilizing the local time deviation value to perform time synchronization of the non-networking door lock, and a time compensation value is set in the time synchronization process, so that the problem of time deviation caused by IC card swiping operation is solved, and the accuracy of time synchronization of the door lock is improved.
In one embodiment, the non-networking door lock includes, after calibrating the local time of the non-networking door lock according to the local time offset value and a preset time offset value: and writing a synchronization history record into the IC card by the non-networking door lock, wherein the synchronization history record comprises a door lock equipment identifier, a synchronization date and a local time deviation value of the synchronization.
In this embodiment, after the time synchronization of the non-networking door lock is achieved, the non-networking door lock will write the history record content of the time synchronization into another specific sector in the IC card storage block, where the history record content includes the ID of the non-networking door lock device, the operation date, the local time deviation value, etc., and the embodiment of the present application does not limit the history record content in detail, and can be set according to the actual situation. When the project manager approaches the IC card to the induction area of the mobile terminal, the mobile terminal can also read the history record of the time synchronization of the door lock from a specific sector of the IC card, so that the dynamic calculation of the period T2 is facilitated, and the accuracy and the time synchronization efficiency of the subsequent execution of the time synchronization of the non-networking door lock are ensured.
In summary, the present application provides a time synchronization method for a non-networking door lock, after a mobile terminal performs time synchronization with a time server, the mobile terminal sends time synchronization notification information to a project management terminal, the time synchronization notification information includes indication information for performing time synchronization on the non-networking door lock, when an IC card approaches the mobile terminal, the mobile terminal writes local time of the current mobile terminal into the IC card, when the IC card approaches the non-networking door lock, the non-networking door lock reads local time stored by the IC card, the non-networking door lock calculates a local time offset value according to the local time stored by the IC card, and calibrates the local time of the non-networking door lock according to the local time offset value and a preset time offset value. According to the application, the time of the non-networking door lock can be corrected by directly utilizing the IC card under the condition of no wireless network interface functions such as Wifi, 4G, 5G, LORA, bluetooth or Zigbee, the time synchronization of the non-networking door lock can be realized without pulling a cable or disassembling the door lock in the process, the operation is simple, the efficiency is high, the limitation that the non-networking door lock cannot be directly connected to a network is overcome, a two-way authentication mechanism of a mobile terminal and the non-networking door lock for reading and writing the IC card is supported, the interval period of the time synchronization of the door lock can be dynamically calculated, the problem of manpower waste caused by too frequent time synchronization of the door lock is avoided, and the precision requirement of the time synchronization of the door lock is guaranteed, so that the accuracy and the safety of the time synchronization of the door lock are improved.
Example two
Referring to fig. 3, fig. 3 is a schematic structural diagram of a time synchronization system of a non-networking door lock according to an embodiment of the application. The terminal in this embodiment includes units for executing the steps in the embodiment corresponding to fig. 2. Refer specifically to fig. 2 and the related description in the embodiment corresponding to fig. 2. For convenience of explanation, only the portions related to the present embodiment are shown. Referring to fig. 3, a time synchronization system 30 for a non-networked door lock includes: a time server 31, a mobile terminal 32, an IC card 33, a non-networked door lock 34.
The mobile terminal 32 is configured to perform time synchronization with the time server 31;
the mobile terminal 32 is configured to send time synchronization notification information to the project management terminal, where the time synchronization notification information includes indication information for performing time synchronization on the non-networking door lock 34;
when the IC card 33 approaches the mobile terminal 32, the mobile terminal 32 is configured to write the local time of the mobile terminal 32 into the IC card;
when the IC card 33 approaches the non-networking door lock 34, the non-networking door lock 34 is used for reading the local time stored by the IC card 33;
the non-networking door lock 34 is configured to calculate a local time deviation value according to the local time stored in the IC card 33, and calibrate the local time of the networking door lock 34 according to the local time deviation value and a preset time compensation value.
Optionally, the mobile terminal 32 is specifically configured to:
according to a preset algorithm, dynamically determining a door lock time synchronization period;
and sending the time synchronization notification information to the project management terminal 1 according to the door lock time synchronization period.
Optionally, the mobile terminal 32 is further configured to:
acquiring a reference period, wherein the reference period is an initialized door lock time synchronization period or a door lock time synchronization period dynamically determined last time;
acquiring a maximum allowable time deviation value of the non-networking door lock 34 and a local time deviation value of the non-networking door lock 34 calculated last time;
and calculating the time synchronization period of the door lock according to the reference period, the maximum allowable time deviation value and the last calculated local time deviation value of the non-networking door lock 34.
Optionally, the mobile terminal 32 is further configured to:
performing mutual authentication with the IC card 33;
when the mutual authentication is passed, the local time of the mobile terminal 33 is written into the IC card.
Optionally, the non-networking door lock 34 is specifically configured to:
performing mutual authentication with the IC card 33;
when the mutual authentication is passed, the local time stored in the IC card 33 is read.
Optionally, the non-networking door lock 34 is further configured to:
a synchronization history including a door lock device identification, a synchronization date, and a local time offset value of the present synchronization is written into the IC card 33.
It should be noted that, because the content of information interaction and execution process between the above units is based on the same concept as the method embodiment of the present application, specific functions and technical effects thereof may be referred to in the method embodiment section, and will not be described herein.
Example III
The embodiment of the application also provides time synchronization equipment. The time synchronization device of this embodiment refers to a time server, a mobile terminal, an IC card, or a non-networking door lock in the time synchronization system of the non-networking door lock.
Those skilled in the art will appreciate that the implemented functions of the time server, the mobile terminal, the IC card or the non-networked door lock may be referred to the corresponding description of the foregoing method embodiments, and the description is not repeated here.
Example IV
In an embodiment, a computer readable storage medium is provided, which when executed by a processor in a computer device, causes the computer device to perform the steps of a time server, a mobile terminal, an IC card, or a non-networking door lock in a time synchronization method of a non-networking door lock as disclosed in the present application, and the detailed description is not repeated herein. The computer readable storage medium may be nonvolatile or may be volatile.
The processor may be a CPU, but may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory includes a readable storage medium, an internal memory, etc., where the internal memory may be the memory of the computer device, the internal memory providing an environment for the execution of an operating system and computer-readable instructions in the readable storage medium. The readable storage medium may be a hard disk of a computer device, and in other embodiments may be an external storage device of the computer device, for example, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), etc. that are provided on the computer device. Further, the memory may also include both internal storage units and external storage devices of the computer device. The memory is used to store an operating system, application programs, boot loader (BootLoader), data, and other programs such as program codes of computer programs, and the like. The memory may also be used to temporarily store data that has been output or is to be output.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, the specific names of the functional units and modules are only for distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working process of the units and modules in the above device may refer to the corresponding process in the foregoing method embodiment, which is not described herein again. The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium.
The above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application.

Claims (10)

1. A method of time synchronization for a non-networked door lock, the method comprising:
the mobile terminal and the time server perform time synchronization;
the mobile terminal sends time synchronization notification information to the project management terminal, wherein the time synchronization notification information comprises indication information for performing time synchronization on the non-networking door lock;
when the IC card approaches the mobile terminal, the mobile terminal writes the current local time of the mobile terminal into the IC card;
when the IC card is close to the non-networking door lock, the non-networking door lock reads the local time stored by the IC card;
and the non-networking door lock calculates a local time deviation value according to the local time stored by the IC card, and calibrates the local time of the non-networking door lock according to the local time deviation value and a preset time compensation value.
2. The time synchronization method of a non-networked door lock according to claim 1, wherein the mobile terminal transmits time synchronization notification information to the project management terminal, comprising:
the mobile terminal dynamically determines a door lock time synchronization period according to a preset algorithm;
and the mobile terminal sends the time synchronization notification information to the project management terminal according to the door lock time synchronization period.
3. The time synchronization method of the non-networking door lock according to claim 2, wherein the mobile terminal dynamically determines a door lock time synchronization period according to a preset algorithm, comprising:
the mobile terminal acquires a reference period, wherein the reference period is an initialized door lock time synchronization period or a door lock time synchronization period dynamically determined last time;
the mobile terminal obtains the maximum allowable time deviation value of the non-networking door lock and the local time deviation value of the non-networking door lock calculated last time;
and calculating the time synchronization period of the door lock according to the reference period, the maximum allowable time deviation value and the last calculated local time deviation value of the non-networking door lock.
4. The method for time synchronization of non-networked door locks according to claim 3, wherein the calculating the present door lock time synchronization period according to the reference period, the maximum allowable time offset value and the last calculated local time offset value of the non-networked door lock comprises:
the lock time synchronization period of this time is calculated by the following formula:
T2’=(ΔT max /ΔT)*T2
wherein T2' represents the current door lock time synchronization period, deltaT max Representing the maximum allowable time offset value, Δt represents the last calculated local time offset value of the non-networked door lock.
5. The time synchronization method of the non-networking door lock according to claim 1, wherein the mobile terminal writes a current local time of the mobile terminal into the IC card, comprising:
the mobile terminal and the IC card perform bidirectional authentication;
and when the two-way authentication is passed, the mobile terminal writes the current local time of the mobile terminal into the IC card.
6. The time synchronization method of the non-networked door lock according to claim 1, wherein the non-networked door lock reads the local time stored by the IC card, comprising:
the non-networking door lock and the IC card are subjected to bidirectional authentication;
and when the bidirectional authentication is passed, the non-networking door lock reads the local time stored by the IC card.
7. The method for time synchronization of a non-networked door lock according to claim 1, wherein after the local time of the non-networked door lock is calibrated according to the local time deviation value and a preset time compensation value, the method comprises:
and writing a synchronization history record into the IC card by the non-networking door lock, wherein the synchronization history record comprises a door lock equipment identifier, a synchronization date and a local time deviation value of the synchronization.
8. The time synchronization system of the non-networking door lock is characterized by comprising a time server, a mobile terminal, an IC card and the non-networking door lock:
the mobile terminal is used for carrying out time synchronization with the time server;
the mobile terminal is configured to send time synchronization notification information to the project management terminal, where the time synchronization notification information includes indication information for performing time synchronization on the non-networking door lock;
when the IC card approaches the mobile terminal, the mobile terminal is used for writing the current local time of the mobile terminal into the IC card;
when the IC card is close to the non-networking door lock, the non-networking door lock is used for reading the local time stored by the IC card;
the non-networking door lock is used for calculating a local time deviation value according to the local time stored by the IC card, and calibrating the local time of the networking door lock according to the local time deviation value and a preset time compensation value.
9. A time synchronization device comprising a time server, a mobile terminal, an IC card and a non-networked door lock in the time synchronization system of the non-networked door lock according to claim 8.
10. A computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the time synchronization method of a non-networked door lock according to any one of claims 1 to 7.
CN202310712708.9A 2023-06-15 2023-06-15 Time synchronization method, system, equipment and medium for non-networking door lock Pending CN116959143A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310712708.9A CN116959143A (en) 2023-06-15 2023-06-15 Time synchronization method, system, equipment and medium for non-networking door lock

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310712708.9A CN116959143A (en) 2023-06-15 2023-06-15 Time synchronization method, system, equipment and medium for non-networking door lock

Publications (1)

Publication Number Publication Date
CN116959143A true CN116959143A (en) 2023-10-27

Family

ID=88443490

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310712708.9A Pending CN116959143A (en) 2023-06-15 2023-06-15 Time synchronization method, system, equipment and medium for non-networking door lock

Country Status (1)

Country Link
CN (1) CN116959143A (en)

Similar Documents

Publication Publication Date Title
CN102170353B (en) Adjustable free-running secure clock
CN1897494B (en) Ranging scalable time stamp data synchronization method and system
CN105027148A (en) Presence detection using Bluetooth and hybrid-mode transmitters
CN116959143A (en) Time synchronization method, system, equipment and medium for non-networking door lock
JP5039931B2 (en) Information processing device
US20100031049A1 (en) Time information distribution system, time distributing station, terminal, time information distribution method, and program
CN110675548B (en) Method and device for handing over intelligent banknote boxes
CN113783649B (en) Terminal timing method, system, electronic equipment and storage medium
CN113824889B (en) Method and equipment for monitoring hidden danger of power transmission line
CN113628392B (en) Time management method, device and storage medium
CN111726450B (en) Control method of intelligent express cabinet and intelligent express cabinet
JP4382039B2 (en) Time management apparatus and time management method
JP2003273866A (en) Time certification and device
JP2002297542A (en) Disclosure method of contents time limit, its system and security device
US20130297779A1 (en) Electronic device and method for detecting network connection between the electronic device and network
US20230376703A1 (en) Multiple identifiers of radio frequency identification (rfid) tags
CN113328822B (en) Time calibration method, device, electronic equipment, storage medium and program product
KR20200053850A (en) Method for updating BMS software of an energy storage system having different internal and external communication methods
CN104462902B (en) The initial method that the data of a kind of joint product and the product are downloaded
US20230393608A1 (en) Time synchronization device for providing timing information acquired from network time sources to endpoint devices
CN111327387B (en) Method and device for determining authentication timestamp and electronic equipment
US10015004B2 (en) Preventing a network from propagating incorrect time information
CN116068266A (en) Primary frequency modulation electric energy metering device and method
CN116131988A (en) Standard time generation device, method, device, readable storage medium and system
CN114328222A (en) Offline software expiration checking method and device, computing 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