CN111831303A - Method and device for upgrading intelligent lock, computer equipment and storage medium - Google Patents

Method and device for upgrading intelligent lock, computer equipment and storage medium Download PDF

Info

Publication number
CN111831303A
CN111831303A CN202010555959.7A CN202010555959A CN111831303A CN 111831303 A CN111831303 A CN 111831303A CN 202010555959 A CN202010555959 A CN 202010555959A CN 111831303 A CN111831303 A CN 111831303A
Authority
CN
China
Prior art keywords
intelligent lock
upgrading
version number
upgrade
lock
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
CN202010555959.7A
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.)
Huizhou Topband Electronic Technology Co Ltd
Original Assignee
Huizhou Topband Electronic 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 Huizhou Topband Electronic Technology Co Ltd filed Critical Huizhou Topband Electronic Technology Co Ltd
Priority to CN202010555959.7A priority Critical patent/CN111831303A/en
Publication of CN111831303A publication Critical patent/CN111831303A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • 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/00563Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys using personal physical data of the operator, e.g. finger prints, retinal images, voicepatterns
    • 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/00571Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys operated by interacting with a central unit
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The invention is used in the technical field of wireless communication, and provides a method and a device for upgrading an intelligent lock, computer equipment and a storage medium, which are used for solving the problems of high bandwidth occupation and system power consumption increase caused by upgrading data downloading in the equipment upgrading process in a low-power-consumption wide area network. The method comprises the following steps: receiving intelligent lock upgrading information sent by a server, wherein the intelligent lock upgrading information comprises a version number and a check code; detecting whether the upgrade version number broadcasted by the second intelligent lock around contains a version number; if the broadcast upgrading version number of the second intelligent lock comprises a version number, sending an upgrading data acquisition request to the second intelligent lock broadcasting the version number, wherein the upgrading data acquisition request comprises a check code and the version number, so that the second intelligent lock checks the first intelligent lock according to the check code; if the second intelligent lock checks that the first intelligent lock passes, receiving upgrading data which is sent by the second intelligent lock and corresponds to the version number; and upgrading the firmware of the first intelligent lock according to the upgrading data.

Description

Method and device for upgrading intelligent lock, computer equipment and storage medium
Technical Field
The invention belongs to the technical field of wireless communication, and particularly relates to a method and a device for upgrading an intelligent lock, computer equipment and a storage medium.
Background
The low-power-consumption wide area internet of things (LPWAN) technology is a revolutionary internet of things access technology in recent years internationally, the low-power-consumption wide area network has the characteristics of wide coverage, more connections, low speed, low cost, less power consumption and the like, and is very suitable for the application of the low-power-consumption internet of things.
With the development of LPWAN technology, more and more wireless devices are available, which are dispersed in different regions, and with the development of wireless network technology, the wireless devices need to be upgraded more and more frequently.
In the related art, as shown in fig. 1, when the device firmware needs to be upgraded, the upgrade firmware is deployed in the server, and then each device (device B) needs to independently connect to the server to download the corresponding upgrade package, so as to upgrade the device firmware. Because each device needs to independently download the upgrade package from the server, the server load is greatly increased, the bandwidth of the wide area network is occupied in the downloading process, the system power consumption is increased, and the device upgrade is abnormal due to network problems, so that the upgrade efficiency of the device is low.
Disclosure of Invention
The embodiment of the invention provides a method and a device for upgrading an intelligent lock, computer equipment and a storage medium, and aims to solve the problems that the bandwidth is occupied by upgrading data downloading in the equipment upgrading process in a low-power-consumption wide area network, and the system power consumption is increased.
The embodiment of the invention is realized in such a way that a method for upgrading an intelligent lock is applied to a first intelligent lock, and the method comprises the following steps:
receiving intelligent lock upgrading information sent by a server, wherein the intelligent lock upgrading information comprises a version number and a check code;
detecting whether the upgrade version number broadcasted by a second intelligent lock around contains the version number;
if the broadcast upgrading version number of the second intelligent lock comprises the version number, sending an upgrading data acquisition request to the second intelligent lock broadcasting the version number, wherein the upgrading data acquisition request comprises the check code and the version number, so that the second intelligent lock checks the first intelligent lock according to the check code;
if the second intelligent lock passes the verification of the first intelligent lock, receiving upgrading data which is sent by the second intelligent lock and corresponds to the version number;
and upgrading the firmware of the first intelligent lock according to the upgrading data.
Further, the detecting whether the upgrade version number broadcasted by the second smart lock around contains the version number includes:
receiving the upgrade version number broadcasted by the second intelligent lock;
detecting whether the number in the upgraded version broadcast by the second intelligent lock contains the version number;
if the broadcast upgrade version number of the second intelligent lock comprises the version number, determining the second intelligent lock which is closest to the second intelligent lock and broadcasts the version number;
correspondingly, sending an upgrade data acquisition request to a second smart lock broadcasting the version number, including:
and sending an upgrading data acquisition request to the second intelligent lock which is closest to the second intelligent lock and broadcasts the version number.
Further, the method further comprises:
if the upgrade version number broadcasted by the second intelligent lock does not contain the version number, sending an upgrade data acquisition request to the server, so that the server determines corresponding upgrade data according to the upgrade data acquisition request;
and receiving the upgrading data sent by the server, and upgrading the firmware of the first intelligent lock according to the upgrading data.
Further, the upgrade information of the smart lock further includes a secret key, the upgrade data is an encrypted data packet, and after receiving the upgrade data corresponding to the version number sent by the second smart lock, the method further includes:
decrypting the upgrade data according to the secret key;
correspondingly, the upgrading the firmware of the first intelligent lock according to the upgrading data includes:
and upgrading the firmware of the first intelligent lock according to the decrypted upgrading data.
Further, after the firmware of the first smart lock is upgraded according to the upgrade data, the method further includes:
and after the firmware of the first intelligent lock is successfully upgraded according to the upgrading data, broadcasting the version number to other intelligent locks so that the other intelligent locks upgrade the local firmware according to the version number.
Further, the receiving of the upgrade information of the smart lock sent by the server includes:
sending a heartbeat packet to the server;
and receiving the intelligent lock upgrading information sent by the server according to the heartbeat packet.
The embodiment of the invention also provides a device for upgrading the intelligent lock, which is applied to the first intelligent lock and comprises the following components:
the intelligent lock upgrading system comprises an upgrading information receiving module, a verification module and a verification module, wherein the upgrading information receiving module is used for receiving intelligent lock upgrading information sent by a server, and the intelligent lock upgrading information comprises a version number and a verification code;
the version number detection module is used for detecting whether the upgrade version number broadcasted by the second intelligent lock at the periphery contains the version number;
the first upgrading data request module is used for sending an upgrading data acquisition request to a second intelligent lock broadcasting the version number if the upgrading version number broadcasted by the second intelligent lock contains the version number, wherein the upgrading data acquisition request contains the check code and the version number, so that the second intelligent lock checks the first intelligent lock according to the check code;
the first upgrading data receiving module is used for receiving upgrading data which is sent by the second intelligent lock and corresponds to the version number if the second intelligent lock verifies that the first intelligent lock passes the verification;
and the upgrading module is used for upgrading the firmware of the first intelligent lock according to the upgrading data.
Further, the version number detection module includes:
the version number receiving submodule is used for receiving the upgrade version number broadcasted by the second intelligent lock;
the version number comparison submodule is used for detecting whether the number in the upgrade version broadcast by the second intelligent lock contains the version number;
the second intelligent lock acquisition sub-module is used for determining a second intelligent lock which is closest to the second intelligent lock and broadcasts the version number if the version number is contained in the upgrade version number broadcasted by the second intelligent lock;
correspondingly, the upgrade data request module is configured to send an upgrade data acquisition request to the second smart lock closest to the second smart lock and broadcasting the version number.
Further, the apparatus further comprises:
the second upgrading data request module is used for sending an upgrading data acquisition request to the server if the upgrading version number broadcasted by the second intelligent lock does not contain the version number, so that the server determines corresponding upgrading data according to the upgrading data acquisition request;
the second upgrading data receiving module is used for receiving the upgrading data sent by the server;
and the upgrading module is used for upgrading the firmware of the first intelligent lock according to the upgrading data.
Further, the upgrade information of the smart lock further includes a key, the upgrade data is an encrypted data packet, and the device further includes:
the upgrade data decryption module is used for decrypting the upgrade data according to the secret key;
correspondingly, the upgrade module is further configured to: and upgrading the firmware of the first intelligent lock according to the decrypted upgrading data.
Further, the apparatus further comprises:
and the version number broadcasting module is used for broadcasting the version number to other intelligent locks after the firmware of the first intelligent lock is successfully upgraded according to the upgrading data so that other intelligent locks can upgrade the local firmware according to the version number.
Further, the upgrade information receiving module includes:
the heartbeat packet sending submodule is used for sending a heartbeat packet to the server;
and the upgrading information receiving submodule is used for receiving the intelligent lock upgrading information sent by the server according to the heartbeat packet.
The embodiment of the invention also provides computer equipment which comprises a storage medium, a processor and a computer program which is stored on the storage medium and can run on the processor, wherein the processor executes the program to realize the intelligent lock upgrading method.
The embodiment of the invention also provides a storage medium, wherein a computer program is stored on the storage medium, and when the program is executed by a processor, the method for upgrading the intelligent lock is realized.
The invention provides a method, a device, computer equipment and a storage medium for upgrading an intelligent lock, compared with a mode of acquiring upgrading data from a server to upgrade firmware, a first intelligent lock detects a nearby second intelligent lock based on the upgrading information of the intelligent lock sent by the server, searches for the second intelligent lock containing the version number of the upgrading information of the intelligent lock, sends an upgrading data acquisition request to the second intelligent lock, and sends upgrading data corresponding to the version number to the first intelligent lock after a check code contained in the acquisition request is checked by the second intelligent lock, so that the first intelligent lock realizes firmware upgrading, the first intelligent lock can acquire the upgrading data from the second intelligent lock equipment which is upgraded nearby through Bluetooth to upgrade the firmware, the firmware upgrading speed of the Bluetooth equipment of a low-power-consumption Bluetooth network is greatly accelerated, and the bandwidth occupation of the low-power-consumption wide area network during upgrading is reduced, the overall power consumption of the system is reduced.
Drawings
FIG. 1 is a schematic flow chart of a device upgrade provided by the prior art;
FIG. 2 is a flowchart illustrating an implementation of a method for upgrading an intelligent lock according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an intelligent lock according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of an intelligent lock according to an embodiment of the present invention;
FIG. 5 is a flowchart illustrating an implementation of another method for upgrading an intelligent lock according to an embodiment of the present invention;
FIG. 6 is a flowchart illustrating an implementation of a method for upgrading an intelligent lock according to an embodiment of the present invention;
FIG. 7 is a flowchart illustrating an implementation of a method for upgrading an intelligent lock according to an embodiment of the present invention;
FIG. 8 is a flowchart illustrating an implementation of a method for upgrading an intelligent lock according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram illustrating an apparatus for upgrading an intelligent lock according to an embodiment of the present invention;
FIG. 10 is a schematic structural diagram of another device for upgrading an intelligent lock according to an embodiment of the present invention;
FIG. 11 is a schematic structural diagram of another device for upgrading an intelligent lock according to an embodiment of the present invention;
FIG. 12 is a schematic structural diagram of a device for upgrading a smart lock according to an embodiment of the present invention;
fig. 13 is a schematic structural diagram illustrating a device for upgrading an intelligent lock according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The terminology used in the embodiments of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the examples of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used to describe various information in embodiments of the present invention, the information should not be limited to these terms. These terms are only used to distinguish one type of information from another. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus.
The invention obtains the upgrade data from the upgraded equipment nearby through the Bluetooth to upgrade the firmware, greatly accelerates the firmware upgrade speed of the Bluetooth equipment of the low-power-consumption wide area network, reduces the bandwidth occupation of the low-power-consumption wide area network during upgrade and reduces the overall power consumption of the system.
Example one
Fig. 2 shows a flowchart of an implementation of a method for upgrading an intelligent lock according to an embodiment of the present invention, and for convenience of description, only the parts related to the embodiment of the present invention are shown, and detailed steps are as follows:
step S11, receiving intelligent lock upgrading information sent by a server, wherein the intelligent lock upgrading information comprises a version number and a check code;
step S12, detecting whether the upgrade version number broadcasted by the second intelligent lock around contains the version number;
step S13, if the broadcast upgrade version number of the second intelligent lock comprises a version number, sending an upgrade data acquisition request to the second intelligent lock broadcasting the version number, wherein the upgrade data acquisition request comprises a check code and the version number, so that the second intelligent lock checks the first intelligent lock according to the check code;
step S14, if the second intelligent lock verifies that the first intelligent lock passes, receiving upgrade data which is sent by the second intelligent lock and corresponds to the version number;
and step S15, upgrading the firmware of the first intelligent lock according to the upgrading data.
The embodiment of the invention is applied to the centrally deployed low-power-consumption wide-area internet of things Bluetooth equipment (such as equipment with NB-IoT and Bluetooth communication functions or equipment with LoRa and Bluetooth communication functions at the same time) and is particularly applied to the first intelligent lock in the internet, wherein the first intelligent lock is an intelligent lock which needs firmware upgrading in any one of the internet of things, the second intelligent lock is an intelligent lock which finishes firmware upgrading in the internet of things, and after firmware upgrading is carried out on certain equipment in the internet of things, upgrade data for firmware upgrading can be stored in the equipment, and a version number corresponding to the upgrade data is broadcasted.
In step S11, the smart lock upgrade information sent by the server is received, where the smart lock upgrade information includes a version number and a check code.
In the embodiment of the invention, the first intelligent lock can receive the intelligent lock upgrading information from the server, the intelligent lock upgrading information comprises a version number and a check code, and when the intelligent lock upgrading information is received, the first intelligent lock is the equipment needing firmware upgrading. The version number is used for representing a unique version, specifically, the version number of the intelligent lock upgrade information is used for representing an upgradable version of the first intelligent lock, for example, the version number of the current version of the first intelligent lock is 1.0, the version number included in the intelligent lock upgrade information is 2.0, the check code is used as a check basis, and in subsequent steps, the second intelligent lock can verify whether the first intelligent lock is equipment which is specified by the server and needs firmware upgrade or not according to the check code.
In step S12, it is detected whether the upgrade version number broadcasted by the surrounding second smart lock includes a version number.
In the embodiment of the present invention, after the first smart lock receives the smart lock upgrade information, it may be detected whether a second smart lock broadcasting the version number exists around the first smart lock based on the version number corresponding to the smart lock upgrade information, that is, whether the upgrade version number broadcasted by the second smart lock around includes the version number is detected, where the upgrade version number broadcasted by the second smart lock is the version number of the second smart lock that has completed upgrading. The detection range of the first smart lock may be specifically determined based on the communication range of the communication module in the first smart lock, for example, if the communication distance of the communication module in the first smart lock is 10m, the first smart lock detects whether the upgrade version number broadcast by the second smart lock in the range of 10m includes the version number included in the upgrade information of the smart lock. Fig. 3 shows a schematic structural diagram of an intelligent lock according to an embodiment of the present invention. The smart lock shown in fig. 3 may be the first smart lock or the second smart lock in the embodiment of the present invention, and the communication module in the smart lock may be a Narrow Band Internet of Things (NB-IoT), a Low ra, Bluetooth Low Energy (BLE) type communication module, or other types of communication modules, which is not limited herein. Fig. 4 shows a communication diagram of an intelligent lock according to an embodiment of the present invention. The equipment A and the equipment B represent intelligent locks in the Internet of things, the intelligent locks are communicated with the server through NB-IoT, and the equipment is communicated with the server through Bluetooth.
In step S13, if the broadcast upgrade version number of the second intelligent lock includes a version number, an upgrade data acquisition request is sent to the second intelligent lock broadcasting the version number, where the upgrade data acquisition request includes a check code and the version number, so that the second intelligent lock checks the first intelligent lock according to the check code.
In the embodiment of the present invention, if it is detected based on step S12 that there is a second smart lock broadcast that broadcasts a corresponding version number, that is, the upgrade version number broadcasted by the second smart lock includes a version number in the upgrade information of the smart lock, then upgrade data matching the version number may be requested from the second smart lock, where the upgrade data acquisition request may include a check code and a version number in the upgrade information of the smart lock, and the second smart lock may pre-store a check code agreed with the server, so that after receiving the upgrade data acquisition request, the second smart lock may check the acquisition request based on the agreed check code, determine whether the check code in the acquisition request is identical with the agreed check code, and if the check code is identical with the agreed check code, indicate that a transmission subject of the acquisition request, that is the first smart lock, is the device identified by the server that should perform firmware upgrade, further, and if the check code passes the check, allowing the first intelligent lock to request the second intelligent lock for upgrading data.
In step S14, if the second smart lock verifies that the first smart lock passes, the upgrade data corresponding to the version number sent by the second smart lock is received.
In the embodiment of the present invention, when the second intelligent lock verifies that the first intelligent lock passes, the second intelligent lock may directly send the upgrade data matched with the version number to the first intelligent lock according to the version number included in the upgrade data acquisition request, or, when the second intelligent lock verifies that the first intelligent lock passes, the second intelligent lock may feed back a message that the verification passes to the first intelligent lock, so that the first intelligent lock further obtains the upgrade data from the second intelligent lock after receiving the message. The Bluetooth mode can be used for obtaining the upgrading data from the second intelligent lock nearby, the NB-IoT mode is needed for obtaining the upgrading data from the server, the upgrading data of about 100K is taken as an example, about 30 minutes are needed for obtaining the upgrading data from the service, and the upgrading data obtained from the second intelligent lock can be completed only by spending several seconds, so that the firmware upgrading speed of the low-power-consumption wide area network Bluetooth equipment is greatly accelerated, the bandwidth occupation of the low-power-consumption wide area network during upgrading is reduced, and the total power consumption of the system is reduced.
In step S15, the firmware of the first smart lock is upgraded according to the upgrade data.
In the embodiment of the invention, after the first intelligent lock receives the upgrading data, the firmware of the first intelligent lock is upgraded based on the upgrading data.
Through the technical scheme of this embodiment of application, first intelligent lock detects near second intelligent lock based on the intelligent lock upgrading information that the server sent, seeks the second intelligent lock that contains the version number of intelligent lock upgrading information to send the upgrading data acquisition request to the second intelligent lock, after the check-up code that contains in the acquisition request passes through the check-up of second intelligent lock, send the upgrading data that corresponds with the version number to first intelligent lock, so that first intelligent lock realizes the firmware upgrading. Compared with the mode of acquiring the upgrade data from the server to upgrade the firmware, the embodiment of the invention can acquire the upgrade data from the nearby upgraded equipment through the Bluetooth to upgrade the firmware, greatly quickens the firmware upgrade speed of the Bluetooth equipment of the low-power-consumption wide area network, reduces the bandwidth occupation of the low-power-consumption wide area network during upgrade, and reduces the overall power consumption of the system.
Example two
As shown in fig. 5, based on the first embodiment, step S12 of the present invention is as follows:
step S121, receiving an upgrade version number broadcasted by the second intelligent lock;
step S122, detecting whether the number in the upgrade version broadcast by the second intelligent lock contains a version number;
step S123, if the broadcast upgrade version number of the second intelligent lock comprises a version number, the second intelligent lock which is closest to the second intelligent lock and broadcasts the version number is determined.
In the second embodiment, the first smart lock may receive the upgrade version number broadcasted by the second smart lock, and further detect whether the version number corresponding to the upgrade information received by the first smart lock belongs to the upgrade version number broadcasted by the second smart lock, and when the upgrade version number broadcasted by the second smart lock includes the version number, determine the second smart lock that is closest to the first smart lock and broadcasts the upgrade version number corresponding to the upgrade information, or select the second smart lock with the highest RSSI value, for example, the version number corresponding to the upgrade information of the smart lock is 2.0, the upgrade version number received by the first smart lock is 1.0, 1.2, or 2.0, and then find out the device closest to the first smart lock from the devices broadcasting 2.0.
Correspondingly, step S13 of the present invention specifically includes: and if the broadcast upgrading version number of the second intelligent lock comprises the version number, sending an upgrading data acquisition request to the second intelligent lock which is closest to the second intelligent lock and broadcasts the version number.
In the above embodiment, the upgrade data acquisition request is sent to the second smart lock which is closest to the second smart lock and broadcasts the upgrade information corresponding to the version number, so as to request the upgrade data from the second smart lock which is closest to the first smart lock and completes the upgrade of the version firmware, so as to reduce the acquisition time of the upgrade data.
EXAMPLE III
As shown in fig. 6, on the basis of the first embodiment, the present invention further includes:
step S16, if the upgrade version number broadcasted by the second intelligent lock does not contain the version number, sending an upgrade data acquisition request to the server, so that the server determines corresponding upgrade data according to the upgrade data acquisition request;
and step S17, receiving the upgrade data sent by the server, and upgrading the firmware of the first intelligent lock according to the upgrade data.
In the third embodiment, if the upgrade version number broadcast by the second intelligent lock does not include the version number corresponding to the upgrade information, which indicates that there is no device that has completed the firmware upgrade of the version around, an upgrade data request may be sent to the server, so that the server may determine upgrade data required by the first intelligent lock according to the upgrade data request and send the upgrade data to the first intelligent lock, and the first intelligent lock performs firmware upgrade based on the received upgrade data.
Example four
As shown in fig. 7, on the basis of the third embodiment, after the step S14, the method further includes, before the step S15:
step S18, the upgrade data is decrypted according to the secret key;
correspondingly, step S15 may specifically be: and upgrading the firmware of the first intelligent lock according to the decrypted upgrading data.
In the fourth embodiment, the upgrade information of the intelligent lock further includes a secret key, the upgrade data is an encrypted data packet, and the first intelligent lock can decrypt the upgrade data according to the secret key included in the upgrade information after receiving the upgrade data, so that firmware upgrade is performed on the first intelligent lock according to the decrypted upgrade data, thereby preventing the upgrade data from being leaked due to malicious interception and interception in the transmission process, and improving the transmission security of the upgrade data.
EXAMPLE five
As shown in fig. 8, based on the first embodiment, step S11 specifically includes:
step S111, sending a heartbeat packet to a server;
and step S112, receiving the intelligent lock upgrading information sent by the server according to the heartbeat package.
In the fifth embodiment, for devices networked by using a low power consumption wan technology, in order to reduce power consumption, the devices are in a low power consumption sleep state at ordinary times, and are only waken up when data needs to be reported, and if no data needs to be reported, the devices are waken up periodically to send a heartbeat packet. The server can only return the data to be issued after the equipment reports the data. If the device does not report, the server cannot issue the data. The latency depends on the frequency of use of the device and the interval of heartbeat packets. After the first intelligent lock sends the heartbeat packet to the server or the first intelligent lock reports data to the server, the server sends the intelligent lock upgrading information to the first intelligent lock.
In addition, in any embodiment of the present invention, specifically, after the first smart lock performs firmware upgrade according to the upgrade data, the method further includes: and after the firmware of the first intelligent lock is successfully upgraded according to the upgrading data, broadcasting the version number to other intelligent locks so that the other intelligent locks upgrade the local firmware according to the version number.
In the above embodiment, after a device in the internet of things finishes firmware upgrade, the device may broadcast the upgraded version number, for example, if the first smart lock is upgraded to the 2.0 version, the version number is broadcast to 2.0, so that when other devices that need to be upgraded receive the version number, the other devices may request upgrade data from the device to implement firmware upgrade.
EXAMPLE six
Fig. 9 is a schematic structural diagram of an apparatus for upgrading an intelligent lock according to an embodiment of the present invention, which, for convenience of description, only shows parts related to the embodiment of the present invention, and includes:
the upgrading information receiving module 11 is used for receiving the intelligent lock upgrading information sent by the server, wherein the intelligent lock upgrading information comprises a version number and a check code;
the version number detection module 12 is configured to detect whether the upgrade version numbers broadcasted by the surrounding second intelligent locks include a version number;
the first upgrade data request module 13 is configured to send an upgrade data acquisition request to the second intelligent lock broadcasting the version number if the upgrade version number broadcasted by the second intelligent lock includes the version number, where the upgrade data acquisition request includes a check code and the version number, so that the second intelligent lock checks the first intelligent lock according to the check code;
the first upgrade data receiving module 14 is configured to receive upgrade data corresponding to the version number sent by the second intelligent lock if the second intelligent lock verifies that the first intelligent lock passes;
and the upgrading module 15 is used for upgrading the firmware of the first intelligent lock according to the upgrading data.
EXAMPLE seven
On the basis of the sixth embodiment, as shown in fig. 10, optionally, the version number detecting module 12 includes:
the version number receiving submodule 121 is configured to receive an upgrade version number broadcasted by the second smart lock;
the version number comparison submodule 122 is used for detecting whether the number in the upgrade version broadcast by the second intelligent lock contains a version number;
the second intelligent lock acquisition sub-module 123 is configured to determine, if the upgrade version number broadcast by the second intelligent lock includes a version number, the second intelligent lock closest to the upgrade version number and broadcasting the version number;
correspondingly, the first upgrade data request module 13 is configured to send an upgrade data acquisition request to the second smart lock closest to the second smart lock and broadcasting the version number.
Example eight
On the basis of the sixth embodiment, as shown in fig. 11, optionally, the apparatus further includes:
the second upgrade data request module 16 is configured to send an upgrade data acquisition request to the server if the upgrade version number broadcasted by the second smart lock does not include the version number, so that the server determines corresponding upgrade data according to the upgrade data acquisition request;
a second upgrade data receiving module 17, configured to receive upgrade data sent by a server;
and the upgrading module 14 is used for upgrading the firmware of the first intelligent lock according to the upgrading data.
Example nine
On the basis of the eighth embodiment, as shown in fig. 12, optionally, the upgrade information of the smart lock further includes a secret key, and the upgrade data is an encrypted data packet, and the apparatus further includes:
the upgrade data decryption module 18 is used for decrypting the upgrade data according to the secret key;
accordingly, the upgrade module 14 is further configured to: and upgrading the firmware of the first intelligent lock according to the decrypted upgrading data.
Example ten
As shown in fig. 13, optionally, the upgrade information receiving module 11 includes:
a heartbeat packet sending submodule 111, configured to send a heartbeat packet to a server;
and the upgrade information receiving submodule 112 is configured to receive the upgrade information of the smart lock sent by the server according to the heartbeat packet.
Further, in any embodiment of the present invention, specifically, the apparatus further includes: and the version number broadcasting module 19 is configured to broadcast a version number to other intelligent locks after determining that the firmware of the first intelligent lock is successfully upgraded according to the upgrade data, so that the other intelligent locks upgrade the local firmware according to the version number.
It should be noted that, for other corresponding descriptions of the functional units related to the above-mentioned apparatuses provided in six to ten embodiments of the present invention, reference may be made to the corresponding descriptions in fig. 2 to fig. 8, which are not described again here.
Based on the methods shown in fig. 2 to 8, correspondingly, the embodiment of the present invention further provides a storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the method for upgrading the smart lock shown in fig. 2 to 8 is implemented.
Based on such understanding, the technical solution of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.), and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the method according to the implementation scenarios of the present invention.
Based on the method shown in fig. 2 to fig. 8 and the virtual device embodiment shown in fig. 9 to fig. 13, in order to achieve the above object, an embodiment of the present invention further provides a computer device, which may specifically be a personal computer, a server, a network device, and the like, where the computer device includes a storage medium and a processor; a storage medium for storing a computer program; a processor for executing a computer program to implement the method of smart lock upgrade as described above with reference to fig. 2-8.
Optionally, the computer device may also include a user interface, a network interface, a camera, Radio Frequency (RF) circuitry, sensors, audio circuitry, a WI-FI module, and so forth. The user interface may include a Display screen (Display), an input unit such as a keypad (Keyboard), etc., and the optional user interface may also include a USB interface, a card reader interface, etc. The network interface may optionally include a standard wired interface, a wireless interface (e.g., a bluetooth interface, WI-FI interface), etc.
It will be appreciated by those skilled in the art that the present embodiment provides a computer device architecture that is not limiting of the computer device, and that may include more or fewer components, or some components in combination, or a different arrangement of components.
The storage medium may further include an operating system and a network communication module. An operating system is a program that manages and maintains the hardware and software resources of a computer device, supporting the operation of information handling programs, as well as other software and/or programs. The network communication module is used for realizing communication among components in the storage medium and other hardware and software in the entity device.
Those skilled in the art will appreciate that the figures are merely schematic representations of one preferred implementation scenario and that the blocks or flow diagrams in the figures are not necessarily required to practice the present invention. Those skilled in the art will appreciate that the modules in the devices in the implementation scenario may be distributed in the devices in the implementation scenario according to the description of the implementation scenario, or may be located in one or more devices different from the present implementation scenario with corresponding changes. The modules of the implementation scenario may be combined into one module, or may be further split into a plurality of sub-modules.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention are intended to be included within the scope of the present invention.

Claims (10)

1. A method for upgrading an intelligent lock is applied to a first intelligent lock, and comprises the following steps:
receiving intelligent lock upgrading information sent by a server, wherein the intelligent lock upgrading information comprises a version number and a check code;
detecting whether the upgrade version number broadcasted by a second intelligent lock around contains the version number;
if the broadcast upgrading version number of the second intelligent lock comprises the version number, sending an upgrading data acquisition request to the second intelligent lock broadcasting the version number, wherein the upgrading data acquisition request comprises the check code and the version number, so that the second intelligent lock checks the first intelligent lock according to the check code;
if the second intelligent lock passes the verification of the first intelligent lock, receiving upgrading data which is sent by the second intelligent lock and corresponds to the version number;
and upgrading the firmware of the first intelligent lock according to the upgrading data.
2. The method for upgrading the smart lock according to claim 1, wherein the detecting whether the upgrade version number broadcasted by the second smart lock around contains the version number comprises:
receiving the upgrade version number broadcasted by the second intelligent lock;
detecting whether the number in the upgraded version broadcast by the second intelligent lock contains the version number;
if the broadcast upgrade version number of the second intelligent lock comprises the version number, determining the second intelligent lock which is closest to the second intelligent lock and broadcasts the version number;
correspondingly, sending an upgrade data acquisition request to a second smart lock broadcasting the version number, including:
and sending an upgrading data acquisition request to the second intelligent lock which is closest to the second intelligent lock and broadcasts the version number.
3. The method for upgrading an intelligent lock according to claim 1 or 2, further comprising:
if the upgrade version number broadcasted by the second intelligent lock does not contain the version number, sending an upgrade data acquisition request to the server, so that the server determines corresponding upgrade data according to the upgrade data acquisition request;
and receiving the upgrading data sent by the server, and upgrading the firmware of the first intelligent lock according to the upgrading data.
4. The method for upgrading an intelligent lock according to claim 3, wherein the upgrade information of the intelligent lock further includes a secret key, the upgrade data is an encrypted data packet, and after receiving the upgrade data corresponding to the version number sent by the second intelligent lock, the method further includes:
decrypting the upgrade data according to the secret key;
correspondingly, the upgrading the firmware of the first intelligent lock according to the upgrading data includes:
and upgrading the firmware of the first intelligent lock according to the decrypted upgrading data.
5. The method for upgrading the intelligent lock according to claim 4, wherein after the upgrading of the firmware of the first intelligent lock according to the upgrading data, the method further comprises:
and after the firmware of the first intelligent lock is successfully upgraded according to the upgrading data, broadcasting the version number to other intelligent locks so that the other intelligent locks upgrade the local firmware according to the version number.
6. The method for upgrading the intelligent lock according to claim 1, wherein the receiving the intelligent lock upgrading information sent by the server includes:
sending a heartbeat packet to the server;
and receiving the intelligent lock upgrading information sent by the server according to the heartbeat packet.
7. The utility model provides a device of intelligence lock upgrading which is applied to first intelligence lock, the device includes:
the intelligent lock upgrading system comprises an upgrading information receiving module, a verification module and a verification module, wherein the upgrading information receiving module is used for receiving intelligent lock upgrading information sent by a server, and the intelligent lock upgrading information comprises a version number and a verification code;
the version number detection module is used for detecting whether the upgrade version number broadcasted by the second intelligent lock at the periphery contains the version number;
the first upgrading data request module is used for sending an upgrading data acquisition request to a second intelligent lock broadcasting the version number if the upgrading version number broadcasted by the second intelligent lock contains the version number, wherein the upgrading data acquisition request contains the check code and the version number, so that the second intelligent lock checks the first intelligent lock according to the check code;
the first upgrading data receiving module is used for receiving upgrading data which is sent by the second intelligent lock and corresponds to the version number if the second intelligent lock verifies that the first intelligent lock passes the verification;
and the upgrading module is used for upgrading the firmware of the first intelligent lock according to the upgrading data.
8. The intelligent lock upgrading device according to claim 7, wherein the version number detection module comprises:
the version number receiving submodule is used for receiving the upgrade version number broadcasted by the second intelligent lock;
the version number comparison submodule is used for detecting whether the number in the upgrade version broadcast by the second intelligent lock contains the version number;
the second intelligent lock acquisition sub-module is used for determining a second intelligent lock which is closest to the second intelligent lock and broadcasts the version number if the version number is contained in the upgrade version number broadcasted by the second intelligent lock;
correspondingly, the first upgrading data request module is configured to send an upgrading data obtaining request to the second smart lock closest to the first smart lock and broadcasting the version number.
9. A computer device comprising a storage medium, a processor and a computer program stored on the storage medium and executable on the processor, wherein the processor implements the method of upgrading a smart lock according to any of claims 1 to 6 when executing the program.
10. A storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the method of upgrading a smart lock of any of claims 1 to 6.
CN202010555959.7A 2020-06-17 2020-06-17 Method and device for upgrading intelligent lock, computer equipment and storage medium Pending CN111831303A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010555959.7A CN111831303A (en) 2020-06-17 2020-06-17 Method and device for upgrading intelligent lock, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010555959.7A CN111831303A (en) 2020-06-17 2020-06-17 Method and device for upgrading intelligent lock, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111831303A true CN111831303A (en) 2020-10-27

Family

ID=72897755

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010555959.7A Pending CN111831303A (en) 2020-06-17 2020-06-17 Method and device for upgrading intelligent lock, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111831303A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112506538A (en) * 2020-11-25 2021-03-16 珠海格力电器股份有限公司 Version upgrading method and device and air conditioning system
CN112968793A (en) * 2021-01-20 2021-06-15 广州技象科技有限公司 Equipment upgrading method, device, equipment and storage medium based on Internet of things
CN113112670A (en) * 2021-04-26 2021-07-13 厦门熵基科技有限公司 Access control method and device, electronic equipment and storage medium
CN114115939A (en) * 2021-11-10 2022-03-01 广州易而达科技股份有限公司 Firmware upgrading method and device, electronic equipment and storage medium
CN114299646A (en) * 2022-01-25 2022-04-08 广东好太太智能家居有限公司 Intelligent lock detection method and system based on Internet of things
CN114338780A (en) * 2021-12-24 2022-04-12 金蝶软件(中国)有限公司 Resource loading method, resource loading device and related equipment

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130275956A1 (en) * 2012-04-17 2013-10-17 Hon Hai Precision Industry Co., Ltd. Firmware upgrade method and system and terminal device using the method
CN103379142A (en) * 2012-04-17 2013-10-30 国基电子(上海)有限公司 Terminal device firmware upgrading method and system
CN106648669A (en) * 2016-12-26 2017-05-10 广东芬尼克兹节能设备有限公司 Remote firmware upgrading method and system for product equipment
CN106953902A (en) * 2017-03-10 2017-07-14 深圳市金正方科技股份有限公司 The method and apparatus of electric energy meter firmware upgrade
CN107832064A (en) * 2017-10-13 2018-03-23 东峡大通(北京)管理咨询有限公司 Smart lock and its firmware upgrade method, device, system and upgrading part
CN110149370A (en) * 2019-04-23 2019-08-20 华为技术有限公司 A kind of upgrade file method for down loading and device
CN110688133A (en) * 2019-08-28 2020-01-14 深圳绿米联创科技有限公司 Method, system and device for upgrading distributed firmware and electronic equipment
CN111188538A (en) * 2019-11-07 2020-05-22 储长青 Intelligent door lock safety remote upgrading method

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130275956A1 (en) * 2012-04-17 2013-10-17 Hon Hai Precision Industry Co., Ltd. Firmware upgrade method and system and terminal device using the method
CN103379142A (en) * 2012-04-17 2013-10-30 国基电子(上海)有限公司 Terminal device firmware upgrading method and system
CN106648669A (en) * 2016-12-26 2017-05-10 广东芬尼克兹节能设备有限公司 Remote firmware upgrading method and system for product equipment
CN106953902A (en) * 2017-03-10 2017-07-14 深圳市金正方科技股份有限公司 The method and apparatus of electric energy meter firmware upgrade
CN107832064A (en) * 2017-10-13 2018-03-23 东峡大通(北京)管理咨询有限公司 Smart lock and its firmware upgrade method, device, system and upgrading part
CN110149370A (en) * 2019-04-23 2019-08-20 华为技术有限公司 A kind of upgrade file method for down loading and device
CN110688133A (en) * 2019-08-28 2020-01-14 深圳绿米联创科技有限公司 Method, system and device for upgrading distributed firmware and electronic equipment
CN111188538A (en) * 2019-11-07 2020-05-22 储长青 Intelligent door lock safety remote upgrading method

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112506538A (en) * 2020-11-25 2021-03-16 珠海格力电器股份有限公司 Version upgrading method and device and air conditioning system
CN112968793A (en) * 2021-01-20 2021-06-15 广州技象科技有限公司 Equipment upgrading method, device, equipment and storage medium based on Internet of things
CN112968793B (en) * 2021-01-20 2023-01-31 广州技象科技有限公司 Equipment upgrading method, device, equipment and storage medium based on Internet of things
CN113112670A (en) * 2021-04-26 2021-07-13 厦门熵基科技有限公司 Access control method and device, electronic equipment and storage medium
CN113112670B (en) * 2021-04-26 2023-06-02 厦门熵基科技有限公司 Access control method and device, electronic equipment and storage medium
CN114115939A (en) * 2021-11-10 2022-03-01 广州易而达科技股份有限公司 Firmware upgrading method and device, electronic equipment and storage medium
CN114338780A (en) * 2021-12-24 2022-04-12 金蝶软件(中国)有限公司 Resource loading method, resource loading device and related equipment
CN114299646A (en) * 2022-01-25 2022-04-08 广东好太太智能家居有限公司 Intelligent lock detection method and system based on Internet of things

Similar Documents

Publication Publication Date Title
CN111831303A (en) Method and device for upgrading intelligent lock, computer equipment and storage medium
US7920823B2 (en) System capability discovery for software defined radio
Vanhoef et al. Why MAC address randomization is not enough: An analysis of Wi-Fi network discovery mechanisms
US8792825B2 (en) Terminal apparatus and communication method, information processing apparatus and method, non-transitory storing medium storing program, and information processing system
JP2022522038A (en) Information push methods, devices, electronic devices and computer readable storage media
US20130104232A1 (en) Appliqué providing a secure deployment environment (sde) for a wireless communications device
US10943010B2 (en) Generation of a random value for a child process
US7245258B2 (en) Location processing apparatus, systems, and methods
EP3103303B1 (en) Priority access to a priority access channel
WO2013008048A1 (en) Method and apparatus for provisioning network access credentials
CN109068284B (en) Physical layer authentication method and system based on group connection among Internet of things devices
WO2017095307A1 (en) Improved method of providing a service by a service terminal to a user of a mobile device, and an associated communication system
CN112237017B (en) Terminal device and method for identifying malicious AP by using the same
WO2018117958A1 (en) Improved ability to trigger beacon receiver devices in a short-range wireless beacon communication system
CN103023684A (en) Method, device and system for network information management
US7742456B2 (en) System and method for locationing in a communications network
CN113765950A (en) Internet of things equipment, server and software updating method
JP5628780B2 (en) Radio system management apparatus and radio system management method
US10110618B1 (en) System and methods to detect mobile credential leaks during dynamic analysis
CN110020529B (en) Method and device for detecting user information and computer equipment
CN115509628A (en) Method, device, equipment and storage medium for calling micro-service
US10171213B2 (en) Communication device and method for performing radio communication
CN111935546B (en) Program importing method and device, video playing equipment and storage medium
EP3823326B1 (en) System and method for detecting bluetooth security threat, and computer readable medium therefor
Ledbetter Analyzing inherent vulnerabilities and associated risks in bluetooth technology

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