Off-line authorization method and system for rental period password of rental house tenant

文档序号:1876687 发布日期:2021-11-23 浏览:27次 中文

阅读说明:本技术 一种出租房租客租期密码的离线授权方法及系统 (Off-line authorization method and system for rental period password of rental house tenant ) 是由 李东兴 白刚 易海平 余俊 于 2021-08-31 设计创作,主要内容包括:本发明涉及出租房租客租期密码的离线授权方法,实现方法如下:在平台端和门锁端均内置一套相同的密码算法,密码算法包括激活码算法和离线密码算法;在租客入住登记时或登记后平台端生成与相应门锁端对应的授权离线密码并将其送达租客,授权离线密码包括激活码和离线密码;门锁端在接收到激活码输入时依据激活码算法进行激活码验证,若验证通过且在设定时间内接收到离线密码,则依据离线密码算法进行离线密码验证,若验证通过则开门并记录输入的离线密码作为开门密码;应用本申请的方式方法,可以在门锁端与平台端未联网或联网状态较差状态下,完成门锁密码的生成、有效验证以及开锁等全部的流程,适用性大幅增强,也能有效的节约能源。(The invention relates to an off-line authorization method for a rental code of a rental house tenant, which comprises the following steps: a set of same cryptographic algorithms are built in both the platform end and the door lock end, and the cryptographic algorithms comprise an activation code algorithm and an off-line cryptographic algorithm; when the tenant registers or after the tenant registers, the platform end generates an authorized offline password corresponding to the corresponding door lock end and sends the authorized offline password to the tenant, wherein the authorized offline password comprises an activation code and an offline password; the door lock end carries out activation code verification according to an activation code algorithm when receiving activation code input, if the verification is passed and an offline password is received within a set time, carries out offline password verification according to an offline password algorithm, and opens the door and records the input offline password as a door opening password if the verification is passed; by the method, all processes of generating, effectively verifying, unlocking and the like of the door lock password can be completed under the condition that the door lock end and the platform end are not networked or are in a poor networking state, applicability is greatly enhanced, and energy can be effectively saved.)

1. An off-line authorization method for a rental code of a rental house tenant is characterized by comprising the following steps:

a set of same cryptographic algorithms are built in both the platform end and the door lock end, and the cryptographic algorithms comprise an activation code algorithm and an off-line cryptographic algorithm;

when a tenant logs in or after the tenant logs in, the platform end generates an authorized offline password corresponding to the corresponding door lock end and sends the authorized offline password to the tenant, wherein the authorized offline password comprises an activation code and an offline password generated according to an offline password algorithm based on the activation code;

the door lock end conducts activation code composition and aging verification according to an activation code algorithm when receiving activation code input, if the verification is passed and the subsequently input offline password is received within the set time, the offline password verification is conducted according to the offline password algorithm, and if the verification is passed, the door is opened and the input offline password is recorded as the door opening password.

2. The method for offline authorization of a rental term code of a rental house tenant according to claim 1, further comprising the steps of:

and after the door lock end passes the offline password verification, deleting the previously recorded offline password.

3. The offline authorization method for rental codes of tenants in rental houses as claimed in claim 1, wherein the door lock end reports the offline code verification result by using a separate offline code activation instruction or the platform end actively issues a separate offline code query instruction to actively query.

4. The method as claimed in claim 1, wherein the data component of the activation code includes a time attribute, and the door lock terminal determines whether the activation code is valid for a certain period of time by identifying the time attribute of the activation code.

5. The offline authorization method for rental codes of house tenants as claimed in claim 4, wherein the platform end and the door lock end are time synchronized during the re-networking.

6. The offline authorization method for rental codes of house tenants as claimed in any one of claims 1 to 5, wherein the activation code is generated by encrypting the pre-encrypted activation code through an activation code algorithm; the data composition of the pre-encryption activation code comprises 3-bit activation date, 6-bit valid time and 1-bit password ID; the password ID represents the several activate codes generated at the same point in time.

7. The method of claim 6, wherein the activation code algorithm comprises a method of:

exchanging the position of each bit according to a certain rule;

each bit is summed and divided by 10 to obtain the remainder;

adding the product of the digit and the remainder to each bit;

and accumulating and operating after each bit is subjected to exclusive or.

8. The offline authorization method for the rental code of the rental house tenant according to claim 6, wherein the offline password is generated by calculation of an encrypted pre-activation code and a smart lock Mac via an offline password algorithm; the offline cryptographic algorithm comprises the steps of:

generating a 20-byte digest by the 10-bit encrypted preactivation code and the smart lock Mac through an HMAC _ SHA1 algorithm;

intercepting a 4-byte integer value of the abstract according to a certain rule;

this integer value is left over to 1000000.

9. The offline authorization method for rental codes of tenants in rental houses as claimed in any one of claims 1 to 5, wherein the platform end and the door lock end communicate by means of a set communication proprietary protocol.

10. An off-line authorization system for a rental code of a rental house tenant, which is used for realizing the off-line authorization method for the rental code of the rental house tenant according to any one of claims 1 to 9, and is characterized by comprising a platform end and a door lock end;

a set of same cryptographic algorithms are built in both the platform end and the door lock end, and the cryptographic algorithms comprise an activation code algorithm and an off-line cryptographic algorithm;

the platform end is used for generating an authorized offline password corresponding to the corresponding door lock end when or after a tenant logs in and registers, and sending the authorized offline password to the tenant, wherein the authorized offline password comprises an activation code and an offline password generated according to the offline password algorithm based on the activation code;

the door lock end is used for performing activation code composition and aging verification according to an activation code algorithm when the activation code is received and input, performing offline password verification according to an offline password algorithm if the verification is passed and a subsequently input offline password is received within a set time, and opening the door and recording the input offline password as a door opening password if the verification is passed.

Technical Field

The invention relates to the technical field of intelligent locks, in particular to an offline authorization method and system for a rental code of a rental tenant in a rental house.

Background

Along with the popularization of the internet of things technology, the application of the intelligent lock in the rental housing industry is more and more mature, and convenience is provided for renters and tenants. According to the type of the intelligent lock, whether the intelligent lock is a fingerprint lock, a human face lock or a pure coded lock, the password is an indispensable function, and the authorized password is much easier and more convenient than the authorized fingerprint, human face and other biological characteristic information. However, in a platform such as a rental house management platform, the intelligent lock is controlled by the door lock in a connected state at many times, so that the platform can issue an authorized tenant rental code to the door lock for the tenant to use when the tenant finishes registration. This way of online authorization mainly has the following disadvantages:

1. for the intelligent lock, the requirement of low power consumption is limited, the lock is in a dormant state for a long time and is not on line in real time, for example, a WiFi intelligent lock and an NB intelligent lock need to be awakened to be networked, whether networking is successful or not and password receiving is successful also depend on the network state at the awakening moment;

2. for an intelligent lock with a gateway, although a heartbeat mechanism is arranged between the gateway and the lock to keep long connection, the heartbeat loss can be caused by interference no matter a short-distance communication protocol such as 433 or Bluetooth is adopted between the gateway and the lock, and the door lock networking and password receiving are not timely caused by repeated heartbeat awakening;

3. for a rented house scene, the problem of large time delay of most networks, such as a WiFi network, generally exists, and especially, NB signals are also limited by the distribution setting of an operator base station; whether the authorization password can be issued to the door lock in time is a key for good platform experience, and in an actual use scene, a timing awakening mechanism has to be added to the door lock so as to improve the success rate of online authorization, so that the battery consumption of the door lock is increased to a certain extent.

Disclosure of Invention

The technical problem to be solved by the present invention is to provide an offline authorization method for a rental code of a rental house tenant and an offline authorization system for the rental code of the rental house tenant, aiming at the above defects of the prior art.

The technical scheme adopted by the invention for solving the technical problems is as follows:

an off-line authorization method for a rental code of a rental house tenant is constructed, wherein the implementation method comprises the following steps:

a set of same cryptographic algorithms are built in both the platform end and the door lock end, and the cryptographic algorithms comprise an activation code algorithm and an off-line cryptographic algorithm;

when a tenant logs in or after the tenant logs in, the platform end generates an authorized offline password corresponding to the corresponding door lock end and sends the authorized offline password to the tenant, wherein the authorized offline password comprises an activation code and an offline password generated according to an offline password algorithm based on the activation code;

the door lock end conducts activation code composition and aging verification according to an activation code algorithm when receiving activation code input, if the verification is passed and the subsequently input offline password is received within the set time, the offline password verification is conducted according to the offline password algorithm, and if the verification is passed, the door is opened and the input offline password is recorded as the door opening password.

The invention relates to an off-line authorization method for a rental code of a rental house tenant, which comprises the following steps:

and after the door lock end passes the offline password verification, deleting the previously recorded offline password.

The invention relates to an offline authorization method for a tenant lease password of a rental house, wherein a door lock end reports an independent offline password activation instruction after passing offline password verification or a platform end actively issues an independent offline password query instruction for active query.

The invention relates to an off-line authorization method for a rental code of a rental house tenant, wherein the data composition of an activation code comprises a time attribute, and a door lock end determines whether the activation code is in an effective period in terms of time or not by identifying the time attribute of the activation code.

The invention relates to an offline authorization method for a rental code of a rental house tenant, wherein the platform end and the door lock end are time-synchronized when the platform end and the door lock end are networked again.

The invention relates to an off-line authorization method for a rental code of a rental house tenant, wherein an activation code is generated by encrypting the activation code before encryption through an activation code algorithm; the data composition of the pre-encryption activation code comprises 3-bit activation date, 6-bit valid time and 1-bit password ID; the password ID represents the several activate codes generated at the same point in time.

The invention relates to an off-line authorization method for a rental code of a rental house tenant, wherein an activation code algorithm comprises the following steps:

exchanging the position of each bit according to a certain rule;

each bit is summed and divided by 10 to obtain the remainder;

adding the product of the digit and the remainder to each bit;

and accumulating and operating after each bit is subjected to exclusive or.

The invention relates to an off-line authorization method for a rental code of a rental house tenant, wherein the off-line code is generated by calculating an activation code before encryption and an intelligent lock Mac through an off-line code algorithm; the offline cryptographic algorithm comprises the steps of:

generating a 20-byte digest by the 10-bit encrypted preactivation code and the smart lock Mac through an HMAC _ SHA1 algorithm;

intercepting a 4-byte integer value of the abstract according to a certain rule;

this integer value is left over to 1000000.

The off-line authorization method for the rental codes of the renters of the rented rooms, disclosed by the invention, is characterized in that the platform end and the door lock end are communicated by means of a set communication private protocol.

An off-line authorization system for a rental code of a rental house tenant is used for realizing the off-line authorization method for the rental code of the rental house tenant, and comprises a platform end and a door lock end;

a set of same cryptographic algorithms are built in both the platform end and the door lock end, and the cryptographic algorithms comprise an activation code algorithm and an off-line cryptographic algorithm;

the platform end is used for generating an authorized offline password corresponding to the corresponding door lock end when or after a tenant logs in and registers, and sending the authorized offline password to the tenant, wherein the authorized offline password comprises an activation code and an offline password generated according to the offline password algorithm based on the activation code;

the door lock end is used for performing activation code composition and aging verification according to an activation code algorithm when the activation code is received and input, performing offline password verification according to an offline password algorithm if the verification is passed and a subsequently input offline password is received within a set time, and opening the door and recording the input offline password as a door opening password if the verification is passed.

The invention has the beneficial effects that: by the method, all processes such as generation, effective verification and unlocking of the door lock password can be completed under the condition that the door lock end and the platform end are not networked or are in a poor networking state, the safety and the stability are good, the networking limitation is avoided, the applicability is greatly enhanced, and meanwhile, the energy can be effectively saved.

Drawings

In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the present invention will be further described with reference to the accompanying drawings and embodiments, wherein the drawings in the following description are only part of the embodiments of the present invention, and for those skilled in the art, other drawings can be obtained without inventive efforts according to the accompanying drawings:

fig. 1 is a flowchart of an offline authorization method for a rental code of a rental tenant in a rental room according to a preferred embodiment of the invention;

fig. 2 is a schematic diagram of an offline authorization method for a rental code of a tenant in a rental house according to a preferred embodiment of the invention;

fig. 3 is a schematic block diagram of an offline authorization system for rental passwords of tenants of the rental housing according to a preferred embodiment of the invention.

Detailed Description

In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present invention, and it is obvious that the described embodiments are some embodiments of the present invention, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without inventive step, are within the scope of the present invention.

The off-line authorization method for the rental codes of the renters of the rental rooms in the preferred embodiment of the invention is shown in fig. 1 and also refers to fig. 2, and the implementation method is as follows:

a set of same cryptographic algorithms are built in both the platform end and the door lock end, and the cryptographic algorithms comprise an activation code algorithm and an off-line cryptographic algorithm;

s01, when the tenant logs in or after the tenant logs in, the platform end generates an authorized offline password corresponding to the corresponding door lock end and sends the authorized offline password to the tenant, wherein the authorized offline password comprises an activation code and an offline password generated according to an offline password algorithm based on the activation code;

s02, when the door lock end receives the activation code input, the activation code composition and the aging verification are carried out according to the activation code algorithm, if the verification is passed and the subsequently input off-line password is received within the set time, the off-line password verification is carried out according to the off-line password algorithm, and if the verification is passed, the door is opened and the input off-line password is recorded as the door opening password;

by the method, all processes such as generation, effective verification and unlocking of the door lock password can be completed under the condition that the door lock end and the platform end are not networked or are in a poor networking state, the safety and the stability are good, the networking limitation is avoided, the applicability is greatly enhanced, and meanwhile, the energy can be effectively saved.

It should be noted that: the invention adopts the mode that an N-bit (generally about 10 bits) offline password is not directly calculated to be used as a tenant lease password for authorization, but a 10-bit offline activation code is generated through an algorithm, a final 6-bit authorization password is obtained through calculation according to the activation code and a door lock MAC, and the authorization password is activated after the door lock is identified, so that the safety factor is improved, and the actual use of the tenant is facilitated (the shorter the code number of the authorized tenant password is, the more the tenant is convenient to use, and the password length of a common door lock is 6-8 bits).

Preferably, after the door lock end passes the offline password verification, the offline password recorded at the previous time is deleted; after an activation code correctly activates a tenant code, the offline authorization code recorded by the previous door lock end is immediately invalid (the authorization code of the previous tenant), that is, the door lock end is ensured to have only one offline authorization code in effect.

Preferably, after the door lock end passes the offline password verification, an independent offline password activation instruction is used for reporting, or the platform end actively issues an independent offline password query instruction for actively querying; in order to synchronously see whether the tenant correctly activates the related authorized password at the platform end, the scheme of the invention also provides a mechanism for automatically synchronizing the authorized offline lease password to the platform end, namely, when the authorized password is correctly activated, an independent offline password activation instruction is used for reporting (generally aiming at WiFi and NB intelligent locks), and the platform end can also actively issue an independent offline password inquiry instruction for actively inquiring (generally aiming at intelligent locks equipped with gateways).

Preferably, the data composition of the activation code comprises a time attribute, and the door lock end determines whether the activation code is in a valid period in time by identifying the time attribute of the activation code; for example: the timeliness of an activation code is that the activation code needs to be activated within 24 hours (the time of platform issuing and the authorization code are calculated) after the platform issuing to the tenant, and the activation code is correctly identified once within 10 minutes after the activation; this will ensure that it will be protective when a valid activation code is mistakenly bumped, unlike typical temporary password mechanisms, which are recognized and enabled by a door lock or unlocked directly upon being mistakenly bumped.

Preferably, the platform side and the door lock side are time synchronized when they are re-networked.

Preferably, the activation code is generated by encrypting the pre-encrypted activation code through an activation code algorithm; the data composition of the activation code before encryption comprises 3-bit activation date, 6-bit valid time and 1-bit password ID; the password ID represents several activation codes generated at the same time point;

3, the activation date is 3 days at the maximum, the distance between the activation date and the reference date is more than 999, and the 999 is left;

the effective time is as follows: the maximum effective time of 6 bits can be (999999 min/60/24) × 5 ═ 694 × 5 days >9 years;

password ID: indicating the number of activation codes generated at the same time (up to 10 at the same time).

Preferably, the activate code algorithm includes the method of:

the position of each bit is exchanged according to a certain rule (for example, the position exchange between the nth bit and 10-N bits can be adopted);

each bit is summed and divided by 10 to obtain the remainder;

adding the product of the digit and the remainder to each bit;

and accumulating and operating after each bit is subjected to exclusive or.

Preferably, the offline password is generated by calculation of the pre-encryption activation code and the intelligent lock Mac through an offline password algorithm; the off-line cryptographic algorithm comprises the following steps:

generating a 20-byte digest by the 10-bit encrypted pre-activation code and the smart lock Mac through an HMAC _ SHA1 algorithm (meaning needs to be supplemented);

intercepting a 4-byte integer value of the abstract according to a certain rule;

this integer value is left over to 1000000.

This will make the factor of the password that is cracked violently a 10-bit activated password multiplied by a 6-bit lease password, which is a factor of the normal temporary password mechanism that is just the factor of the N-bit password that is cracked.

Preferably, the platform end and the door lock end communicate by means of a set communication proprietary protocol. The communication private protocol can adopt a self-defined protocol and can also adopt the existing communication protocol to implement, and the replacement mode also belongs to the protection scope of the application.

The specific operation implementation steps of the invention are as follows:

the method comprises the following steps: defining a set of off-line password calculation algorithm and a secure communication private protocol of an intelligent lock and a platform end;

step two: the intelligent door lock performs time synchronization during binding and each networking, and the time of the intelligent door lock is consistent with that of a platform end;

step three: when a tenant registers, the manager generates an authorized offline password (comprising an activation code and a tenant six-bit offline password) and sends the password to the tenant in time in a short message mode;

step four: before the tenant arrives at the door lock, the tenant inputs an activation code;

step five: the door lock prompts the voice of 'activating the offline password successfully, please use the password once in ten minutes';

step six: the tenant inputs six off-line passwords;

step seven: and unlocking after the door lock is correctly identified, and prompting the voice that the password is correct and the door is opened. In addition, if the door lock judges that the platform end can be connected currently, the successful activation is actively reported to the platform end, and if the door lock cannot be connected currently, the platform end is waited to be actively inquired and reported.

An offline authorization system for a rental code of a renter room is used for realizing the above offline authorization method for the rental code of the renter room, as shown in fig. 3, and comprises a platform end 1 and a door lock end 2;

a set of same cryptographic algorithms are built in both the platform end 1 and the door lock end 2, and the cryptographic algorithms comprise an activation code algorithm and an off-line cryptographic algorithm;

the platform end 1 is used for generating an authorized offline password corresponding to the corresponding door lock end when or after a tenant logs in and registers, and sending the authorized offline password to the tenant, wherein the authorized offline password comprises an activation code and an offline password generated according to an offline password algorithm based on the activation code;

the door lock end 2 is used for performing activation code composition and aging verification according to an activation code algorithm when the activation code is received and input, performing offline password verification according to an offline password algorithm if the verification is passed and a subsequently input offline password is received within a set time, and opening the door and recording the input offline password as a door opening password if the verification is passed;

by the method, all processes such as generation, effective verification and unlocking of the door lock password can be completed under the condition that the door lock end and the platform end are not networked or are in a poor networking state, the safety and the stability are good, the networking limitation is avoided, the applicability is greatly enhanced, and meanwhile, the energy can be effectively saved.

It will be understood that modifications and variations can be made by persons skilled in the art in light of the above teachings and all such modifications and variations are intended to be included within the scope of the invention as defined in the appended claims.

10页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种具有散热功能的指纹识别门禁设备

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!