A firmware protection method, device, system and medium

By integrating the same encryption algorithm as the management end in the intelligent ground lock, a verification activation code is generated to ensure the legality and security of the ground lock, the problem of the intelligent ground lock master program being easily copied and stolen, and the security and reliability of management are improved.

CN114065310BActive Publication Date: 2025-04-18SICHUAN YIZHITING TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111392608.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-23
Publication Date
2025-04-18
Estimated Expiration
2041-11-23

AI Technical Summary

Technical Problem

The existing smart lock master program is easily copied or stolen, resulting in unsafe management and pirated locks, endangering the secure and reliable communication of cloud servers.

Method used

By integrating an encryption algorithm into the intelligent ground lock, the same as the encryption algorithm on the management side, a verification activation code is generated to determine whether it matches the standard activation code provided by the management side. If it matches, switch to the activation mode to ensure the legality and security of the ground lock.

Benefits of technology

It effectively avoids the ground lock master program being counterfeited, improves the security and reliability of intelligent ground lock management, and ensures secure communication between ground lock and cloud server.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114065310B_ABST
    Figure CN114065310B_ABST
Patent Text Reader

Abstract

The present invention discloses a firmware protection method, device, system and medium. The method of the smart ground lock end includes the following steps: the main control program obtains the verification code group of the management end in the non-activation mode, the verification code group includes a serial number and a standard activation code corresponding to the serial number, and the standard activation code is generated by the serial number through an encryption algorithm; the verification activation code is generated according to the serial number and the built-in encryption algorithm; it is determined whether the verification activation code matches the standard activation code, and if the verification activation code is the same as the standard activation code, the non-activation mode of the main control program is switched to the activation mode. This solution can effectively prevent the main control program of the ground lock from being counterfeited, and improve the security and reliability of the management of the smart ground lock.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of smart ground locks, and specifically relates to a firmware protection method, device, system and medium. Background Art

[0002] In order to save labor costs and improve management accuracy, existing roadside parking fee management generally uses smart ground locks. Smart ground locks are configured in front of roadside parking spaces, and realize smart fee management of parking spaces through wireless communication with cloud servers. The core of the smart ground lock is the main control board, which runs the core control program of the ground lock, including its control logic, connection information with the cloud server, and related business processing logic. Therefore, the security of the main control program is very important. However, current ground lock manufacturers directly put the ground locks on site and use them after they are produced, and have not yet taken measures to protect the main control board and main control program of the ground lock.

[0003] As ground locks are widely used in the market, the main control programs of ground locks may be copied or stolen. On the other hand, there are pirated ground locks on the market, which use main control board designs similar to those of manufacturers. However, pirated main control boards or pirated main control programs will pose great danger to the secure and reliable communication between ground locks and cloud servers, bringing potential loss risks to enterprises. Summary of the invention

[0004] In order to solve the problem that the main control program of the existing smart ground lock is easily copied and thus inconvenient to manage, the present invention provides a firmware protection method, device, system and medium, which can effectively prevent the main control program of the ground lock from being counterfeited and improve the security and reliability of smart ground lock management.

[0005] The present invention is achieved through the following technical solutions:

[0006] A first aspect of the present invention provides a firmware protection method, which is suitable for use with a smart lock terminal, and comprises the following steps:

[0007] The main control program obtains a verification code group from the management terminal in the inactive mode, wherein the verification code group includes a serial number and a standard activation code corresponding to the serial number, wherein the standard activation code is generated by the serial number through an encryption algorithm;

[0008] Generate a verification activation code based on the serial number and the built-in encryption algorithm;

[0009] It is determined whether the verification activation code matches the standard activation code. If the verification activation code is the same as the standard activation code, the inactive mode of the main control program is switched to the active mode.

[0010] The smart floor lock of this solution integrates an encryption algorithm, which is the same as the encryption algorithm of the management end. The encryption algorithm is integrated into the chip of the smart floor lock during production. The smart floor lock generates a verification activation code through the serial number in the non-activation mode, i.e., the test mode, and compares the verification activation code generated by itself with the obtained standard activation code to see if they are consistent. When the two are consistent, the non-activation mode is switched to the activation mode. With the above method, even if the main control program of the smart floor lock is read, the smart floor lock will always be in the non-activation mode, and it has no serial number and the corresponding standard activation code. The above method can effectively prevent the main control program of the floor lock from being counterfeited, thereby improving the security and reliability of the management of the smart floor lock.

[0011] In a possible design, the switching of the inactive mode to the active mode further includes:

[0012] The chip ID and the serial number are sent to the management end, so that the management end can verify the legitimacy of the chip ID based on the uniqueness of the chip ID and the serial number.

[0013] If a serial number is illegally obtained, it can also switch between inactive mode and active mode. With the above method, when a serial number is illegally obtained and used to activate one or some ground locks, by combining the chip ID, the management end stores the chip ID of the legal smart ground lock, and by comparing the chip ID, the illegal smart ground lock can be identified, further improving the security and reliability of smart ground lock management.

[0014] A second aspect of the present invention provides a smart lock, comprising a signal acquisition unit, an encryption unit and an activation unit which are sequentially connected.

[0015] The signal acquisition unit is configured to acquire a verification code group of the management terminal in the inactive mode of the main control program, wherein the verification code group includes a serial number and a standard activation code corresponding to the serial number, wherein the standard activation code is generated by the serial number through an encryption algorithm;

[0016] The encryption unit is configured to generate a verification activation code according to the serial number and the built-in encryption algorithm;

[0017] The activation unit is configured to determine whether the verification activation code matches the standard activation code, and if the verification activation code is the same as the standard activation code, switch the inactive mode of the main control program to the active mode.

[0018] A third aspect of the present invention provides a firmware protection method, which is suitable for use by a management terminal and includes the following steps:

[0019] Generate a unique serial number, input the serial number into an encryption algorithm to generate a standard activation code to obtain a verification code group, the verification code group includes the serial number and the standard activation code corresponding to the serial number,

[0020] After receiving the verification request, the verification code group is sent to the request terminal, so that the smart lock can switch between the inactive mode and the active mode according to the verification code group and the encryption algorithm built into the smart lock.

[0021] In one possible design, the step of sending the check code group to a requesting terminal further includes:

[0022] Receive verification information sent by the smart lock, the verification information including the chip ID of the smart lock and the serial number used to switch between the inactive mode and the active mode of the main control program,

[0023] The legitimacy of the chip ID is verified based on its uniqueness and serial number.

[0024] In a possible design, verifying the legitimacy of the chip ID based on its uniqueness and serial number includes:

[0025] Verify whether the serial number in the verification information is a serial number generated by itself;

[0026] In response to the serial number in the verification information being a serial number generated by itself, counting the number N of times the serial number is received, where N is a natural number greater than or equal to 1;

[0027] When the number N is greater than 1, the chip ID in the verification information is matched with an ID in an ID set, wherein the ID set includes the chip ID of at least one legitimate smart lock and the chip IDs of each legitimate smart lock in the at least one legitimate smart lock are different;

[0028] The smart ground lock corresponding to the verification information that can match the same chip ID in the ID set is determined to be a legal ground lock.

[0029] A fourth aspect of the present invention provides a ground lock management device, comprising a check code group generating unit and an information sending unit connected in sequence.

[0030] The verification code group generating unit is configured to generate a unique serial number, input the serial number into an encryption algorithm to generate a standard activation code to obtain a verification code group, the verification code group includes the serial number and the standard activation code corresponding to the serial number;

[0031] The information sending unit is configured to send the verification code group to the requesting terminal after receiving the verification request, so that the smart lock can switch between the inactive mode and the active mode according to the verification code group and the encryption algorithm built into the smart lock.

[0032] A fifth aspect of the present invention provides a firmware protection system, comprising at least one smart ground lock and a ground lock management device that interacts with the smart ground lock signal.

[0033] It also includes an activation terminal that is signal-connected to the smart ground lock and the ground lock management device.

[0034] The activation terminal is used to receive the verification code group of the ground lock management device and send the verification code group to the smart ground lock;

[0035] The smart ground lock is a smart ground lock described in the second aspect, and the ground lock management device is a ground lock management device described in the fourth aspect.

[0036] The sixth aspect of the present invention provides a computer-readable storage medium, on which instructions are stored. When the instructions are run on a computer, a firmware protection method described in the first aspect and any possible embodiment thereof or a firmware protection method described in the third aspect and any possible embodiment thereof is executed.

[0037] Compared with the prior art, the present invention has at least the following advantages and beneficial effects:

[0038] 1. The present invention activates the corresponding smart ground lock after verifying the legitimacy of the smart ground lock through the serial number and the standard activation code corresponding to the serial number, which can effectively prevent the main control program of the ground lock from being counterfeited and improve the security and reliability of the smart ground lock management. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0040] Figure 1 is a flow chart of the method of the present invention. DETAILED DESCRIPTION

[0041] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments. It should be noted that although the description of these embodiments is used to help understand the present invention, it does not constitute a limitation of the present invention. The specific structures and functional details disclosed herein are only used to describe the exemplary embodiments of the present invention. However, the present invention can be embodied in many alternative forms, and it should not be understood that the present invention is limited to the embodiments set forth herein.

[0042] It should be understood that the term "and / or" that may appear in this article is merely a description of the association relationship between associated objects, indicating that three relationships may exist. For example, A and / or B can represent three situations: A exists alone, B exists alone, and A and B exist at the same time. The term " / and" that may appear in this article describes another type of association object relationship, indicating that two relationships may exist. For example, A / and B can represent two situations: A exists alone, and A and B exist alone. In addition, the character " / " that may appear in this article generally indicates that the previous and next associated objects are in an "or" relationship.

[0043] It should be understood that certain details are provided in the following description to facilitate a complete understanding of the example embodiments. However, one of ordinary skill in the art should understand that the example embodiments can be implemented without these specific details. For example, the system can be shown in a block diagram to avoid obscuring the example with unnecessary details. In other examples, well-known processes, structures, and techniques may not be shown in unnecessary details to avoid obscuring the example.

[0044] like Figure 1 As shown, the first aspect of the present invention discloses a firmware protection method, which is suitable for use in a smart lock terminal. Specifically, the protection method includes the following steps S101 to S104.

[0045] Step S101: The main control program obtains a verification code group of the management end in the non-activation mode, wherein the verification code group includes a serial number and a standard activation code corresponding to the serial number, wherein the standard activation code is generated by the serial number through an encryption algorithm.

[0046] During the installation process, the smart ground lock is in a non-networked state and test mode, that is, a non-activated mode. At this time, there are many ways to obtain the verification code group from the management end, such as through a third-party activation terminal or other methods. The activation terminal and the smart ground lock use wired or short-range wireless methods to achieve information exchange.

[0047] The encryption algorithm is integrated inside the smart floor lock, that is, the encryption algorithm is integrated into the chip of the smart floor lock during manufacturing, and the encryption algorithm is the same as the encryption algorithm of the management end.

[0048] Step S102: Generate a verification activation code according to the serial number and the built-in encryption algorithm.

[0049] Step S103, determine whether the verification activation code matches the standard activation code. If the verification activation code is the same as the standard activation code, switch the inactive mode of the main control program to the active mode. Since the encryption algorithm integrated in the smart ground lock is the same as the encryption algorithm of the management end and uses the same serial number, the verification activation code output by it is bound to be the same as the standard activation code issued by the management end. By adopting this method, it is possible to verify whether the smart ground lock is a genuine ground lock. Even if the main control program of the smart ground lock is copied, it is very difficult to decipher the encryption algorithm, so the smart ground lock is always in the inactive mode and cannot be used normally, which increases the strength of firmware protection, effectively prevents the main control program of the ground lock from being counterfeited, and improves the security and reliability of smart ground lock management.

[0050] Step S104: Send the chip ID and the serial number to the management end, so that the management end verifies the legitimacy of the chip ID based on the uniqueness of the chip ID and the serial number.

[0051] This step is further optimized on the basis of step S103, that is, the method of combining the activation code and the unique chip ID. When the encryption algorithm is cracked, that is, after the smart floor lock is switched from the test mode to the activation mode, after the smart floor lock is connected to the network and communicates with the management end, the legitimacy of the smart floor lock is verified by using the uniqueness of the chip ID.

[0052] The management end stores the chip IDs of all legal smart locks produced by the management manufacturer. Since the chip ID of each smart lock is different, it is verified by the legal chip ID. For example, if the main control program of the smart lock is copied to smart lock A, and the copier uses a verification code group that has been used to activate smart lock A, smart lock A can be used normally and communicate with the management end. At this time, smart lock A sends the serial number and chip ID used in the activation process to the management end. After receiving the information, the management end determines whether there is any theft through the statistics of the number of times the serial number is used, and when the serial number is stolen, it determines the illegal device by comparing the uploaded chip ID with the stored legal chip ID, protecting the main control program from being copied and stolen.

[0053] The second aspect of the present invention discloses a smart lock, comprising a signal acquisition unit, an encryption unit and an activation unit which are sequentially connected.

[0054] The signal acquisition unit is configured to acquire a verification code group of the management terminal in the inactive mode of the main control program, wherein the verification code group includes a serial number and a standard activation code corresponding to the serial number, wherein the standard activation code is generated by the serial number through an encryption algorithm;

[0055] The encryption unit is configured to generate a verification activation code according to the serial number and the built-in encryption algorithm;

[0056] The activation unit is configured to determine whether the verification activation code matches the standard activation code, and if the verification activation code is the same as the standard activation code, switch the inactive mode of the main control program to the active mode.

[0057] The operating principle of each unit of the smart ground lock disclosed in the second aspect of the present invention is detailed in the first aspect and will not be repeated here.

[0058] A third aspect of the present invention provides a firmware protection method, which is suitable for use by a management terminal. The protection method includes the following steps S201 to S203.

[0059] Step S201: Generate a unique serial number, input the serial number into an encryption algorithm to generate a standard activation code to obtain a verification code group, wherein the verification code group includes the serial number and the standard activation code corresponding to the serial number.

[0060] This step is completed before or during the installation of the ground lock. The encryption algorithm is the same as the encryption algorithm of the smart ground lock. The encryption algorithm generates a standard activation code based on the serial number.

[0061] Step S202: after receiving the verification request, the verification code group is sent to the requesting terminal, so that the smart lock can switch between the inactive mode and the active mode according to the verification code group and the encryption algorithm built into the smart lock.

[0062] The verification request can be sent by a third-party activation terminal or other device, so the requesting terminal can be an activation terminal or other readable terminal, so that the smart lock can switch between non-activation mode and activation mode according to the verification code group and its built-in encryption algorithm according to the method in the first aspect.

[0063] Step S203, receiving the verification information sent by the smart lock, the verification information includes the chip ID of the smart lock and the serial number used to switch the main control program between the inactive mode and the active mode, and verifying the legitimacy of the chip ID based on its uniqueness and the serial number.

[0064] Specifically, verifying the legitimacy of the chip ID based on its uniqueness and serial number does not include:

[0065] Receiving verification information sent by the smart lock, the verification information including the chip ID and the serial number used when the smart lock switches between the inactive mode and the active mode;

[0066] Verify whether the serial number in the verification information is a serial number generated by itself;

[0067] In response to the serial number in the verification information being a serial number generated by itself, counting the number N of times the serial number is received, where N is a natural number greater than or equal to 1;

[0068] When the number N is greater than 1, the chip ID in the verification information is matched with an ID in an ID set, wherein the ID set includes the chip ID of at least one legitimate smart lock and the chip IDs of each legitimate smart lock in the at least one legitimate smart lock are different;

[0069] The smart ground lock corresponding to the verification information that can match the same chip ID in the ID set is determined to be a legal ground lock.

[0070] A fourth aspect of the present invention provides a firmware protection device, comprising a check code group generating unit and an information sending unit connected in sequence by signals,

[0071] The verification code group generating unit is configured to generate a unique serial number, input the serial number into an encryption algorithm to generate a standard activation code to obtain a verification code group, the verification code group includes the serial number and the standard activation code corresponding to the serial number;

[0072] The information sending unit is configured to send the verification code group to the requesting terminal after receiving the verification request, so that the smart lock can switch between the inactive mode and the active mode according to the verification code group and the encryption algorithm built into the smart lock.

[0073] The operating principle of each unit of the smart ground lock disclosed in the fourth aspect of the present invention is detailed in the third aspect and will not be repeated here.

[0074] A fourth aspect of the present invention provides a firmware protection system, comprising at least one smart ground lock, a ground lock management device that interacts with the smart ground lock signal, and an activation terminal that is simultaneously connected to the smart ground lock and the ground lock management device signal.

[0075] The activation terminal is used to receive the verification code group of the ground lock management device and send the verification code group to the smart ground lock;

[0076] The smart ground lock is a smart ground lock described in the second aspect, and the ground lock management device is a ground lock management device described in the fourth aspect.

[0077] The operating principles of each unit of the smart ground lock disclosed in the fifth aspect of the present invention are detailed in the first and third aspects and will not be elaborated here.

[0078] The fourth aspect of the present invention provides a computer-readable storage medium, on which instructions are stored, and when the instructions are executed on a computer, a firmware protection method described in the first aspect and any possible one thereof or a firmware protection method described in the third aspect and any possible one thereof is executed. Specifically, the computer-readable storage medium may include, but is not limited to, a random access memory (RAM), a read-only memory (ROM), a flash memory, a first-in-first-out memory (FIFO), or a first-in-last-out memory (FILO), etc.

[0079] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention is described in detail with reference to the above embodiments, a person skilled in the art should understand that the technical solutions described in the above embodiments can still be modified, or some of the technical features can be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A firmware protection method, characterized in that: The method is suitable for use with intelligent lock terminals, and the protection method includes the following steps S101 to S104; Step S101: The main control program obtains a verification code group of the management terminal in the non-activation mode, wherein the verification code group includes a serial number and a standard activation code corresponding to the serial number, wherein the standard activation code is generated by the serial number through an encryption algorithm; The smart lock is in a non-networked state and test mode during the installation process, that is, in a non-activated mode; The encryption algorithm is integrated into the smart lock, that is, the encryption algorithm is integrated into the chip of the smart lock during manufacturing, and the encryption algorithm is the same as the encryption algorithm of the management end; Step S102: Generate a verification activation code according to the serial number and the built-in encryption algorithm; Step S103, determining whether the verification activation code matches the standard activation code, and if the verification activation code is the same as the standard activation code, switching the inactive mode of the main control program to the active mode; Step S104, sending the chip ID and the serial number to the management end, so that the management end verifies the legitimacy of the chip ID based on its uniqueness and the serial number; the verification of the legitimacy of the chip ID based on its uniqueness and the serial number includes: verifying whether the serial number in the verification information is a serial number generated by itself; In response to the serial number in the verification information being a serial number generated by itself, counting the number N of times the serial number is received, where N is a natural number greater than or equal to 1; When the number N is greater than 1, the chip ID in the verification information is matched with an ID in an ID set, wherein the ID set includes the chip ID of at least one legitimate smart lock and the chip IDs of each legitimate smart lock in the at least one legitimate smart lock are different; The smart ground lock corresponding to the verification information that can match the same chip ID in the ID set is determined to be a legal ground lock.

2. A smart ground lock, characterized in that: It includes a signal acquisition unit, an encryption unit and an activation unit which are connected in sequence, wherein the signal acquisition unit is configured to acquire a verification code group of the management end when the main control program is in an inactive mode, wherein the verification code group includes a serial number and a standard activation code corresponding to the serial number, wherein the standard activation code is generated by the serial number through an encryption algorithm; The encryption unit is configured to generate a verification activation code according to the serial number and the built-in encryption algorithm; the encryption algorithm is integrated inside the smart lock, that is, the encryption algorithm is integrated into the chip of the smart lock during production, and the encryption algorithm is the same as the encryption algorithm of the management end; The activation unit is configured to determine whether the verification activation code matches the standard activation code, and if the verification activation code is the same as the standard activation code, switch the inactive mode of the main control program to the active mode; send the chip ID and the serial number to the management end, so that the management end verifies the legitimacy of the chip ID according to the uniqueness of the chip ID and the serial number; the verification of the legitimacy of the chip ID according to the uniqueness of the chip ID and the serial number includes: verifying whether the serial number in the verification information is a serial number generated by itself; In response to the serial number in the verification information being a serial number generated by itself, counting the number N of times the serial number is received, where N is a natural number greater than or equal to 1; When the number N is greater than 1, the chip ID in the verification information is matched with the ID in the ID set, the ID set includes the chip ID of at least one legitimate smart lock and the chip IDs of each legitimate smart lock in the at least one legitimate smart lock are different; The smart ground lock corresponding to the verification information that can match the same chip ID in the ID set is determined to be a legal ground lock.

3. A firmware protection system, comprising at least one smart ground lock and a ground lock management device that interacts with the smart ground lock signal, characterized in that: It also includes an activation terminal that is signal-connected to the smart ground lock and the ground lock management device at the same time, and the activation terminal is used to receive a verification code group from the ground lock management device and send the verification code group to the smart ground lock; The smart ground lock is a smart ground lock as described in claim 2.

4. A computer-readable storage medium having instructions stored thereon, characterized in that: When the instructions are executed on a computer, the firmware protection method of claim 1 is executed.

Citation Information

Patent Citations

  • Method and system for preventing network locking of mobile terminal from being illegally cracked

    CN102170630A

  • Encryption method and apparatus for embedded operating system

    CN105069350A