CN-122024361-A - Hotel door lock system and security authorization and mode switching method thereof
Abstract
The invention discloses a hotel door lock system and a security authorization and mode switching method thereof. The system comprises door lock hardware, door lock management software configured with an environment detection module and an authorization platform configured with an environment consistency check module. The method comprises the steps of presetting a test/production double key and a Flash state flag bit in door lock firmware, after the test is passed, swiping a production card to trigger the door lock to irreversibly switch to a production mode, in a production stage, enabling door lock management software to identify own environment and generate a device code containing a software environment identifier, enabling an authorization platform to verify that the software identifier in the device code is consistent with a production environment option, generating a production authorization code, and enabling the door lock to verify whether the environment identifier bit is consistent with a current state flag bit when receiving the authorization code. The invention eliminates potential safety hazard through the full-link environment isolation.
Inventors
- OUYANG WEI
- YE XINWEN
- ZHANG MINGZHONG
- LIN JIEHAO
- LU QUN
Assignees
- 珠海全球时代科技股份有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260224
Claims (10)
- 1. The security authorization and mode switching method of the hotel door lock system is characterized by comprising the following steps of: Presetting a test key and a production key in door lock firmware, wherein the door lock firmware is provided with a state flag bit, the initial state of the state flag bit is a test state value, and the door lock is in a test mode of only responding to a test key instruction; in the test stage, writing a test authorization code into the door lock in the test mode through door lock management software, and performing functional test by using a door card encrypted based on the test key; After the function test is passed, executing a mode switching step, namely using a prefabricated production card to punch through a door lock sensing area, wherein a mode switching identifier encrypted by the test key is stored in the production card; The door lock reads the production card and decrypts by using the test key, and after verifying that the mode switching identifier is correct, the state flag bit is modified to produce a state value, and the door lock switches the current working key to the production key and enters a production mode; in the production stage, the door lock management software running on the computer side identifies the running environment currently configured by the door lock management software and generates a device code containing a software environment identifier; The door lock system authorizes the platform to receive the equipment code, and verifies whether the software environment identifier is consistent with the production environment option selected by the user on the platform; if the production authorization codes are consistent, the platform generates the production authorization codes containing the production environment identification bits; the door lock management software writes the production authorization code into the door lock, the door lock executes verification, namely, decrypts the production authorization code and reads an environment identification bit in the production authorization code, and if the environment identification bit corresponds to a production environment and the current state flag bit of the door lock is the production state value, the production authorization code is allowed to be written and initialization is completed.
- 2. The method for switching the security authorization and mode of the hotel door lock system according to claim 1, wherein the production authorization code is an encrypted character string, and the decrypted plaintext comprises the environment identification bit; The environment identification bit is a specific bit of the plaintext character string, the specific bit represents a test environment when the value of the specific bit is a first numerical value, and the specific bit represents a production environment when the value of the specific bit is a second numerical value; And when the door lock is verified, comparing whether the decrypted environment identification bit is consistent with the environment definition represented by the current state flag bit.
- 3. The method for switching the security authorization and the mode of the hotel door lock system according to claim 1, wherein the status flag bit is stored in a Flash memory of the door lock micro control unit; In the mode switching step, the door lock sets the status flag bit from 0 to 1 by executing a write operation on the Flash memory, wherein 0 represents the test mode and 1 represents the production mode, and the firmware logic is configured to refuse to execute any instruction attempting to modify the status flag bit to 0 when detecting that the status flag bit is 1, and can only be reset by a hardware burning mode at the factory level.
- 4. The method for security authorization and mode switching of hotel door lock system according to claim 1, wherein the step of generating the production authorization code at the production stage comprises: Running the door lock management software at a computer end, wherein the software reads a local configuration file or compiled version information to determine that an operating environment is the production environment, and generating the equipment code containing the production software identifier by combining with the hardware characteristics of the computer; Creating customer information on the door lock system authorization platform, inputting the equipment code, and forcedly selecting the production environment as an environment parameter; The door lock system authorization platform analyzes the equipment code, and generates a registration code by combining the production environment parameters after verifying that the production software identifier is valid; and the door lock management software receives the registration code and performs local registration, and the production authorization code is generated after the registration is successful.
- 5. The method for security authorization and mode switching of a hotel door lock system as recited in claim 1, wherein the test phase comprises: logging in the door lock system authorization platform by a tester to acquire the test authorization code, wherein the decrypted environment identification bit of the test authorization code corresponds to a test environment; The door lock management software writes the test authorization code into the door lock; the door lock detects that the current state flag bit is the test state value, the received environment identification bit of the authorization code corresponds to a test environment, verification is passed, and subsequent door card test operation is allowed.
- 6. The method of claim 1, wherein the test key is labeled as key a and the production key is labeled as key B; when the state flag bit of the door lock is the test state value, the door lock only calls the secret key A to encrypt and decrypt data; When the status flag bit of the door lock is the production status value, the door lock only calls the key B to encrypt and decrypt data, and at the moment, the test data encrypted based on the key A is refused to respond by the door lock due to decryption failure.
- 7. The method of claim 1, wherein the check logic of the door lock upon receiving the authorization code further comprises: if the door lock is in the production mode currently, but the environment identification bit in the decrypted authorization code corresponds to the test environment, the door lock refuses to write the authorization code; if the door lock is currently in the test mode, but the decrypted environment identification bit in the authorization code corresponds to the production environment, the door lock refuses to write the authorization code.
- 8. A hotel door lock system employing the method of any of claims 1-7, comprising: the door lock hardware is internally provided with a Flash memory and is stored with a test key, a production key and a status flag bit, and is configured with a card reading module for reading a mode switching identifier in a production card and triggering the change of the status flag bit; the door lock management software is operated on the computer terminal and is configured with an environment detection module for embedding an operation environment identifier of the current software when generating the equipment code; the door lock system authorization platform runs on the cloud server and is configured with an environment consistency check module which is used for comparing the running environment identifier in the equipment code with environment options selected by an administrator, and a registration code is generated only when the running environment identifier and the environment options are consistent with each other.
- 9. The hotel door lock system of claim 8, wherein the door lock system authorization platform is provided with a permission control module that opens an option for a production environment only if the login account is detected to have production environment administrator permission, and generates the registration code containing a production environment identification bit based on the option.
- 10. The hotel door lock system of claim 8, wherein the door lock hardware, upon switching from test mode to production mode, records a switch log containing a switch time stamp and card number information of the production card as a tamper-proof credential for the door lock lifecycle to enter production phase.
Description
Hotel door lock system and security authorization and mode switching method thereof Technical Field The invention relates to the technical field of intelligent security and hotel management, in particular to a hotel door lock system and a security authorization and mode switching method thereof. Background With the development of the internet of things, intelligent electronic door locks are widely adopted in hotel door lock systems. A complete hotel door lock system typically requires a close fit of door lock management software, door lock hardware (including embedded software), and door cards. In the research and development, production and iteration processes of the door lock system, internal testing is an essential link. The developer needs to perform a lot of functional tests on the door lock to ensure the stability of the system. In the prior art, the door lock is generally authorized in the manner shown in fig. 1, that is, the registration code is generated by the authorization platform, and then the authorization code is generated by the management software and written into the door lock. However, existing licensed implementations suffer from a significant problem in that the "test environment" and "production environment" are not tightly isolated from the underlying layers. In practice, the test authorization code used in the development stage often employs the same encryption logic or key hierarchy as in the production stage. In addition, existing door lock management software (PC-side tools) is generally not environment-friendly, and the same installation package can be used for both testing and production. This results in a serious security risk that the authorization means or data of the test environment may be used erroneously or even maliciously in the actual operating production environment. For example, a tester misuses software connected to a test database for a hotel site, or an illegal person uses a test authorization code to control the hotel's door lock. Therefore, how to provide a door lock system authorization method capable of performing all-link isolation test and production environment from a software end, a cloud platform to a hardware end becomes a technical problem to be solved in the field. Disclosure of Invention The invention aims to provide a hotel door lock system and a safety authorization and mode switching method thereof, and a soft-cloud-hard three-in-one safety isolation system is constructed through door lock management software environment self-checking, cloud platform environment consistency checking, door lock hardware Flash flag bit locking and authorization code environment identification bit checking. The invention provides a security authorization and mode switching method of a hotel door lock system, which comprises the following steps: presetting a test key and a production key in door lock firmware, wherein the door lock firmware is provided with a state flag bit, the initial state of the state flag bit is a test state value, and the door lock is in a test mode of only responding to a test key instruction; In the test stage, writing a test authorization code into a door lock in a test mode through door lock management software, and performing functional test by using a door card encrypted based on a test key; after the function test is passed, executing a mode switching step, namely reading a prefabricated production card through a card reading module of the door lock, wherein a mode switching identifier encrypted by a test key is stored in the production card; the door lock reads the production card and decrypts by using the test key, and after the verification mode switching identifier is correct, the state zone bit is modified to a production state value, the door lock switches the current working key to the production key and enters the production mode; in the production stage, the door lock management software running at the computer end identifies the running environment currently configured by the door lock management software and generates a device code containing a software environment identifier; The door lock system authorizes the platform to receive the equipment code, and checks whether the software environment identifier is consistent with the production environment option selected by the platform by the user; the door lock management software receives the registration code, generates a production authorization code containing a production environment identification bit based on the registration code, and writes the production authorization code into the door lock; The door lock performs verification, namely decrypting the production authorization code and reading the environment identification bit in the production authorization code, and if the environment identification bit corresponds to the production environment and the current state flag bit of the door lock is a production state value, the production authorization code is allowed to be