CN109933354A - Fingerprint head online upgrading method, system and the cloud lock of a kind of intelligent cloud lock - Google Patents

Fingerprint head online upgrading method, system and the cloud lock of a kind of intelligent cloud lock Download PDF

Info

Publication number
CN109933354A
CN109933354A CN201910173167.0A CN201910173167A CN109933354A CN 109933354 A CN109933354 A CN 109933354A CN 201910173167 A CN201910173167 A CN 201910173167A CN 109933354 A CN109933354 A CN 109933354A
Authority
CN
China
Prior art keywords
fingerprint head
data packet
cloud
upgrading data
fingerprint
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
CN201910173167.0A
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.)
Guangdong Hutlon Technology Co Ltd
Foshan Hutlon Intelligent Technology Co Ltd
Original Assignee
Guangdong Hutlon Technology Co Ltd
Foshan Hutlon Intelligent 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 Guangdong Hutlon Technology Co Ltd, Foshan Hutlon Intelligent Technology Co Ltd filed Critical Guangdong Hutlon Technology Co Ltd
Priority to CN201910173167.0A priority Critical patent/CN109933354A/en
Publication of CN109933354A publication Critical patent/CN109933354A/en
Pending legal-status Critical Current

Links

Abstract

The invention discloses a kind of fingerprint head online upgrading method of intelligent cloud lock, system and cloud locks, cloud locks main body and is equipped with main control module and external flash memory, the following steps are included: step A, fingerprint head upgrading data packet is sent to the cloud by gateway and locks main body by Cloud Server, and external flash memory is written in received fingerprint head upgrading data packet by main control module;The main control module of step B, cloud lock main body verify received fingerprint head upgrading data packet, and main control module sends upgrade package to Cloud Server by gateway and receives instruction if being correctly if check results, are performed simultaneously step C;If check results be it is incorrect if to Cloud Server request retransmit fingerprint head upgrading data packet.Without disassembling fingerprint head and being upgraded with special workpiece, upgrading and software reparation are carried out to fingerprint head so as to network by wireless communication, it is convenient and efficient, a large amount of manpower and material resources are saved, realizes and is managed on the line of fingerprint head upgrading.

Description

Fingerprint head online upgrading method, system and the cloud lock of a kind of intelligent cloud lock
Technical field
The present invention relates to fingerprint head online upgrading method, systems that intelligent door lock field more particularly to a kind of intelligent cloud are locked And cloud lock.
Background technique
Currently, intelligent door lock is all installed to security door by many families, fingerprint recognition can be carried out by fingerprint head to substitute key Spoon opens the door, and goes home to open the door more convenient and safe and reliable.And with the development of internet technology, intelligent door lock can access Internet allows intelligent door lock to upgrade to intelligent cloud lock so that user is by the manipulation of the mobile terminals such as mobile phone, computer.But existing intelligence Energy cloud lock can not carry out online upgrading to fingerprint head, need to disassemble fingerprint head and be upgraded with special workpiece, it has not been convenient to Upgrading and maintenance, maintenance costs are big, and user can not operate intelligent cloud lock in escalation process, make troubles to user.
Summary of the invention
It is an object of the invention to propose that a kind of online upgrading stability is high, user is not influenced and is locked using the intelligent cloud that cloud is locked Fingerprint head online upgrading method.
It is an object of the invention to propose that a kind of online upgrading stability is high, user is not influenced and is locked using the intelligent cloud that cloud is locked Fingerprint head online upgrade system.
It is an object of the invention to propose that a kind of online upgrading stability is high, not influencing user can using the fingerprint head that cloud is locked The intelligent cloud of online upgrading is locked.
To achieve this purpose, the present invention adopts the following technical scheme:
A kind of fingerprint head online upgrading method of intelligent cloud lock, cloud lock main body and are equipped with main control module and outside flash storage Device, cloud lock main body, gateway and Cloud Server are connected to the network by wireless communication, and the fingerprint head and cloud lock main body have by serial ports Line connection, comprising the following steps:
Fingerprint head upgrading data packet is sent to the cloud by gateway and locks main body, the Yun Suozhu by step A, Cloud Server External flash memory is written in received fingerprint head upgrading data packet by the main control module of body;
Step B, the main control module of the cloud lock main body verifies received fingerprint head upgrading data packet, if verification knot Fruit is that the correct then described main control module by gateway receives instruction to Cloud Server transmission upgrade package, and Cloud Server is not at this time Fingerprint head upgrading data packet is retransmited, step C is performed simultaneously;If check results be it is incorrect if to Cloud Server request send out again Send fingerprint head upgrading data packet;
Step C, the fingerprint head that the main control module of the cloud lock main body obtains external flash memory storage upgrade data Packet, and it is sent to fingerprint head;
Step D after fingerprint head has received fingerprint head upgrading data packet, verifies fingerprint head upgrading data packet, if school Testing result is correctly to then follow the steps E;If check results be it is incorrect if to the main control module request retransmit fingerprint head Upgrading data packet;
Step E, fingerprint head carry out online upgrading according to fingerprint head upgrading data packet, have upgraded the backward main control module hair Upgrading END instruction is sent, the main control module sends upgrading END instruction to the Cloud Server by gateway.
Preferably, bootstrap loader and cloud locked application are locked in main control module setting cloud, is deposited in external flash Reservoir division has fingerprint head firmware storage areas, and fingerprint head bootstrap loader and fingerprint head application journey is arranged in the fingerprint head Sequence;
The step A specifically: fingerprint head upgrading data packet is sent to the cloud lock application by gateway by Cloud Server The fingerprint head firmware of external flash memory is written in received fingerprint head upgrading data packet by program, the cloud locked application Memory block;
The step B specifically: the cloud locked application verifies received fingerprint head upgrading data packet, if school It tests result and instruction is received to Cloud Server transmission upgrade package by gateway for the correct then described cloud locked application, at this time cloud Server does not retransmit fingerprint head upgrading data packet, is performed simultaneously step C;If check results be it is incorrect if ask to Cloud Server It asks and retransmits fingerprint head upgrading data packet;
The step C specifically: the fingerprint head that the cloud locked application obtains fingerprint head firmware storage areas upgrades data Packet, and it is sent to the fingerprint head application program of fingerprint head;
The step D specifically: after the fingerprint head application program has received fingerprint head upgrading data packet, to fingerprint head liter Grade data packet is verified, if check results are correctly to then follow the steps E, if check results are incorrect Xiang Suoshu Yun Suoying Fingerprint head upgrading data packet is retransmitted with PROGRAMMED REQUESTS;
The step E specifically: the upgrading generation in the fingerprint head bootstrap loader copy fingerprint head upgrading data packet Code carries out online upgrading, jumps back to fingerprint head application program after having upgraded, and the fingerprint head application program is to cloud locked application Upgrading END instruction is sent, the cloud locked application sends upgrading END instruction to the Cloud Server by gateway.
Preferably, before step A further include:
Cloud Server is sent fingerprint head upgrade request and instructed to the cloud by gateway locks main body, and the fingerprint head upgrading is asked Instruction is asked to include version number to be upgraded, firmware updating size and check code;
After the cloud locked application receives the instruction of fingerprint head upgrade request, fingerprint is obtained from external flash memory The current version number of head, and detect the memory space of current residual electricity and fingerprint head;
The cloud locked application judges whether the current version number of fingerprint head and version number to be upgraded are inconsistent, and judgement is worked as Whether preceding remaining capacity is not less than upgrading institute's electricity demand, and judges whether firmware updating size is smaller than the memory space of fingerprint head:
Only when the current version number of fingerprint head and version number to be upgraded are inconsistent, current residual electricity is not less than upgrading institute Electricity demand and firmware updating size are smaller than the memory space of fingerprint head, just execute step A, and the check code is stored in institute State fingerprint head firmware storage areas;Otherwise refusal upgrading.
Preferably, the check code is CRC32 check code;
The verification of the step B and step D is equal are as follows: as soon as a fingerprint head upgrading data packet is often received, to received finger Line head upgrading data packet carries out exclusive or check;And when all fingerprint head upgrading data packets have received, all fingerprint heads are upgraded Data packet carries out CRC32 verification:
Sequence i.e. according to data packet from big to small is successively read the fingerprint head ascending series of fingerprint head firmware storage areas According to packet, and calculate the CRC32 check code of the fingerprint head upgrading data packet of each reading;
Then, to each fingerprint head upgrading data packet, counted CRC32 check code and fingerprint head firmware storage will be counted Area save the check code compare: if the two unanimously if CRC32 verify check results be correct, if the two is inconsistent Then the check results of CRC32 verification are incorrect;
If the check results that the check results and CRC32 of exclusive or check verify are correct, the final verification knot Fruit is correct;
If the check results that the check results or CRC32 of exclusive or check verify are incorrect, the final verification knot Fruit is incorrect.
Preferably, described when the gateway forwards fingerprint head upgrading data packet to the cloud locks main body in the step A Gateway records current offset address;
If gateway Xiang Yunsuo main body sends fingerprint head upgrading data packet Shi Yunsuo main body and powers off, cloud lock is restarted Main body, into the operation interface of cloud lock main body, and gateway records offset address when powering off;When cloud lock main body powers on again When, gateway Xiang Yunsuo main body from offset address when powering off continues to send fingerprint head upgrading data packet;
In the step C, fingerprint head upgrading data packet Shi Yunsuo main body is sent to power off to fingerprint hair if cloud locks main body, Then cloud lock main body stops sending fingerprint head upgrading data packet;When cloud lock main body powers on again, cloud locks main body for all fingerprint heads Upgrading data packet is re-transmitted to fingerprint head.
Preferably, a kind of fingerprint head online upgrade system of intelligent cloud lock, cloud lock main body and are equipped with main control module and outside Flash memory, cloud lock main body, gateway and Cloud Server are connected to the network by wireless communication, and the fingerprint head and cloud lock main body Pass through serial ports wired connection;
The Cloud Server, which is used to that fingerprint head upgrading data packet to be sent to the cloud by gateway, locks main body;
The main control module of the cloud lock main body is used to that external flash storage to be written received fingerprint head upgrading data packet into Device;
With for being verified to received fingerprint head upgrading data packet: if check results be it is correct if by gateway to cloud Server sends upgrade package and receives instruction, and Cloud Server does not retransmit fingerprint head upgrading data packet at this time, while obtaining outer The fingerprint head upgrading data packet of portion's flash memory storage, and it is sent to fingerprint head;If check results be it is incorrect if to cloud take Business device request retransmits fingerprint head upgrading data packet;
The fingerprint head is for verifying fingerprint head upgrading data packet after having received fingerprint head upgrading data packet: if Check results are correct then according to fingerprint head upgrading data packet progress online upgrading, send and rise to the main control module after having upgraded Grade END instruction, the main control module send upgrading END instruction to the Cloud Server by gateway;
If check results be it is incorrect if to the main control module request retransmit fingerprint head upgrading data packet.
Preferably, the main control module is equipped with cloud lock bootstrap loader and cloud locked application, and the external flash is deposited Reservoir division has fingerprint head firmware storage areas, and the fingerprint head is equipped with fingerprint head bootstrap loader and fingerprint head application program;
The Cloud Server is used to that fingerprint head upgrading data packet to be sent to the cloud locked application by gateway;
The cloud locked application is used to be written received fingerprint head upgrading data packet the fingerprint of external flash memory Head firmware storage areas;
With for being verified to received fingerprint head upgrading data packet: if check results be it is correct if by gateway to cloud Server sends upgrade package and receives instruction, and Cloud Server does not retransmit fingerprint head upgrading data packet at this time, while obtaining and referring to The fingerprint head upgrading data packet of line head firmware storage areas, and it is sent to the fingerprint head application program of fingerprint head;If check results are It is incorrect then to request to retransmit fingerprint head upgrading data packet to Cloud Server;
The fingerprint head application program is for carrying out fingerprint head upgrading data packet after having received fingerprint head upgrading data packet Verification requests the fingerprint head bootstrap loader to copy the upgrading in fingerprint head upgrading data packet if being correctly if check results Code carries out online upgrading, and fingerprint head application program is jumped back to after having upgraded, and the fingerprint head application program applies journey to cloud lock Sequence sends upgrading END instruction, and the cloud locked application sends upgrading END instruction to the Cloud Server by gateway;
If check results be it is incorrect if to cloud locked application request retransmit fingerprint head upgrading data packet.
Preferably, the Cloud Server is also used to send fingerprint head upgrade request by gateway and instruct to the Yun Suozhu Body, the fingerprint head upgrade request instruction includes version number to be upgraded, firmware updating size and check code;
After the cloud locked application is also used to receive the instruction of fingerprint head upgrade request, obtained from external flash memory The current version number of print head, and detect the memory space of current residual electricity and fingerprint head;
It is also used to judge whether current version number and the version number to be upgraded of fingerprint head are inconsistent, judge current residual electricity Whether not less than upgrading institute's electricity demand, and judge whether firmware updating size is smaller than the memory space of fingerprint head:
Only when the current version number of fingerprint head and version number to be upgraded are inconsistent, current residual electricity is not less than upgrading institute Electricity demand and firmware updating size are smaller than the memory space of fingerprint head, just execute step A, and the check code is stored in institute State fingerprint head firmware storage areas;Otherwise refusal upgrading;
As soon as being also used to often receive a fingerprint head upgrading data packet, exclusive or is carried out to received fingerprint head upgrading data packet Verification;And when all fingerprint head upgrading data packets have received, CRC32 verification is carried out to all fingerprint head upgrading data packets: i.e. According to the sequence of data packet from big to small, it is successively read the fingerprint head upgrading data packet of fingerprint head firmware storage areas, and is calculated every The CRC32 check code of the fingerprint head upgrading data packet of a reading;
Then, to each fingerprint head upgrading data packet, counted CRC32 check code and fingerprint head firmware storage will be counted Area save the check code compare: if the two unanimously if CRC32 verify check results be correct, if the two is inconsistent Then the check results of CRC32 verification are incorrect;
If the check results that the check results and CRC32 of exclusive or check verify are correct, the final verification knot Fruit is correct;If the check results that the check results or CRC32 of exclusive or check verify are incorrect, the final verification knot Fruit is incorrect;
As soon as the fingerprint head application program is for often receiving a fingerprint head upgrading data packet, to received fingerprint head liter Grade data packet carries out exclusive or check;And when all fingerprint head upgrading data packets have received, the fingerprint head application program is to institute There is fingerprint head upgrading data packet to carry out the CRC32 verification;
If the check results of the exclusive or check and the check results of CRC32 verification are correctly, to allow to upgrade;
If the check results of the exclusive or check or the CRC32 verification check results be it is incorrect, request again Send all fingerprint head upgrading data packets.
Preferably, it when the gateway is for forwarding fingerprint head upgrading data packet to the cloud to lock main body, records current inclined Move address;If Xiang Yunsuo main body sends fingerprint head upgrading data packet Shi Yunsuo main body and powers off, offset when power-off is recorded Address;When cloud lock main body powers on again, Xiang Yunsuo main body continues to send fingerprint head liter offset address of gateway when power-off Grade data packet;
It powering off, restarting when if the main control module of the cloud lock main body is for receiving fingerprint head upgrading data packet And enter operation interface;
It is powered off when fingerprint head upgrading data packet if being also used to send to fingerprint hair, stops sending fingerprint head ascending series According to packet;When powering on again, all fingerprint head upgrading data packets are re-transmitted to fingerprint head.
Preferably, a kind of fingerprint head can online upgrading intelligent cloud lock, cloud locks main body and is equipped with main control module and outside flash Memory, cloud lock main body, gateway and Cloud Server are connected to the network by wireless communication, and the fingerprint head and cloud lock main body pass through string Mouth wired connection;Online upgrading is carried out to the fingerprint head using the fingerprint head online upgrading method that the intelligent cloud is locked.
The fingerprint head online upgrading method of intelligent cloud lock, it can be achieved that fingerprint head online upgrading, without by fingerprint head It disassembles and is upgraded with special workpiece, upgrading is carried out to fingerprint head so as to network by wireless communication and software is repaired It is multiple, it is convenient and efficient, a large amount of manpower and material resources are saved, realizes and is managed on the line of fingerprint head upgrading.The cloud lock main body is equipped with master control External flash memory is written in received fingerprint head upgrading data packet by module and external flash memory, main control module, from And user can be locked during upgrading with intelligent cloud described in normal operating, i.e., during the upgrading of fingerprint head, user can still unlock, shut Operation avoids making user that can not unlock in the internal storage that fingerprint head upgrading data packet is copied directly to cloud lock main body. By serial ports wired connection, i.e. fingerprint head receives fingerprint head upgrading data packet by serial ports for the fingerprint head and cloud lock main body, Updating speed is fast, and data 2 minutes of 200kbytes, which can upgrade, to be finished, and is not take up the uncaging time of user fingerprints head, avoids Fingerprint unlocking is not available because fingerprint head update time is long.
Detailed description of the invention
The present invention will be further described for attached drawing, but the content in attached drawing does not constitute any limitation of the invention.
Fig. 1 is the fingerprint head online upgrade system communication link map interlinking of the one of embodiment of the present invention;
Fig. 2 is the fingerprint head online upgrading flow chart of the one of embodiment of the present invention;
Fig. 3 be the one of embodiment of the present invention upgrading before judge process.
Specific embodiment
To further illustrate the technical scheme of the present invention below with reference to the accompanying drawings and specific embodiments.
Embodiment 1
The fingerprint head online upgrading method of the intelligent cloud lock of the present embodiment, as shown in Figure 1, cloud lock main body is equipped with main control module With external flash memory, cloud lock main body, gateway and Cloud Server are connected to the network by wireless communication, the fingerprint head and cloud Lock main body by serial ports wired connection, as shown in Figure 2, comprising the following steps:
Fingerprint head upgrading data packet is sent to the cloud by gateway and locks main body, the Yun Suozhu by step A, Cloud Server External flash memory is written in received fingerprint head upgrading data packet by the main control module of body;
Step B, the main control module of the cloud lock main body verifies received fingerprint head upgrading data packet, if verification knot Fruit is that the correct then described main control module by gateway receives instruction to Cloud Server transmission upgrade package, and Cloud Server is not at this time Fingerprint head upgrading data packet is retransmited, step C is performed simultaneously;If check results be it is incorrect if to Cloud Server request send out again Send fingerprint head upgrading data packet;
Step C, the fingerprint head that the main control module of the cloud lock main body obtains external flash memory storage upgrade data Packet, and it is sent to fingerprint head;
Step D after fingerprint head has received fingerprint head upgrading data packet, verifies fingerprint head upgrading data packet, if school Testing result is correctly to then follow the steps E;If check results be it is incorrect if to the main control module request retransmit fingerprint head Upgrading data packet;
Step E, fingerprint head carry out online upgrading according to fingerprint head upgrading data packet, have upgraded the backward main control module hair Upgrading END instruction is sent, the main control module sends upgrading END instruction to the Cloud Server by gateway.
The fingerprint head online upgrading method of intelligent cloud lock, it can be achieved that fingerprint head online upgrading, without by fingerprint head It disassembles and is upgraded with special workpiece, upgrading is carried out to fingerprint head so as to network by wireless communication and software is repaired It is multiple, it is convenient and efficient, a large amount of manpower and material resources are saved, realizes and is managed on the line of fingerprint head upgrading.
Since fingerprint head upgrading data packet is bigger, there are several hundred K bytes, gateway transfers data to the cloud lock main body and needs Want left and right for 1 hours.Therefore the cloud lock main body is equipped with main control module and external flash memory, and main control module will connect External flash memory is written in the fingerprint head upgrading data packet of receipts, so that user can be with intelligence described in normal operating during upgrading During Yun Suo, i.e. fingerprint head upgrade, the operations such as user can still unlock, shut avoid directly copying fingerprint head upgrading data packet Shellfish makes user that can not unlock into the internal storage of cloud lock main body.The fingerprint head and cloud lock main body pass through the wired company of serial ports It connects, i.e., fingerprint head receives fingerprint head upgrading data packet by serial ports, and updating speed is fast, and data 2 minutes of 200kbytes can Finished with upgrading, be not take up the uncaging time of user fingerprints head, avoid because fingerprint head update time long due to be not available fingerprint and open Lock.
Using verifying twice, i.e. the main control module of cloud lock main body verifies received fingerprint head upgrading data packet, first The fingerprint head upgrading data packet for ensuring wireless receiving is correctly to verify with fingerprint head to fingerprint head upgrading data packet, also The fingerprint head upgrading data packet of fingerprint head and being consistent for external flash memory storage need to be ensured to be transferred to, greatly mentioned Height upgrading reliability, prevents upgrading midway factor to upgrade again according to mistake.After the completion of verifying twice, main control module takes to cloud Business device sends upgrading END instruction, and Cloud Server terminates the transmission task of fingerprint head upgrading data packet.
Using double copies code, i.e. fingerprint head upgrading data packet is first stored in external flash memory, and verification is correctly also sent out It send to fingerprint head and stores, if exception occurs in a code in fingerprint head escalation process, external flash memory can be switched to and deposited This part of code of storage, to avoid the case where crashing in escalation process.Pass through internet between the cloud service and gateway Data transmit-receive, the gateway and cloud lock main body are carried out by Small Area Wireless Communication Networks progress data transmit-receive, such as ZigBee-network, WIFI network.
Preferably, bootstrap loader and cloud locked application are locked in main control module setting cloud, is deposited in external flash Reservoir division has fingerprint head firmware storage areas, and fingerprint head bootstrap loader and fingerprint head application journey is arranged in the fingerprint head Sequence;
The step A specifically: fingerprint head upgrading data packet is sent to the cloud lock application by gateway by Cloud Server The fingerprint head firmware of external flash memory is written in received fingerprint head upgrading data packet by program, the cloud locked application Memory block;
The step B specifically: the cloud locked application verifies received fingerprint head upgrading data packet, if school It tests result and instruction is received to Cloud Server transmission upgrade package by gateway for the correct then described cloud locked application, at this time cloud Server does not retransmit fingerprint head upgrading data packet, is performed simultaneously step C;If check results be it is incorrect if ask to Cloud Server It asks and retransmits fingerprint head upgrading data packet;
The step C specifically: the fingerprint head that the cloud locked application obtains fingerprint head firmware storage areas upgrades data Packet, and it is sent to the fingerprint head application program of fingerprint head;
The step D specifically: after the fingerprint head application program has received fingerprint head upgrading data packet, to fingerprint head liter Grade data packet is verified, if check results are correctly to then follow the steps E, if check results are incorrect Xiang Suoshu Yun Suoying Fingerprint head upgrading data packet is retransmitted with PROGRAMMED REQUESTS;
The step E specifically: the upgrading generation in the fingerprint head bootstrap loader copy fingerprint head upgrading data packet Code carries out online upgrading, jumps back to fingerprint head application program after having upgraded, and the fingerprint head application program is to cloud locked application Upgrading END instruction is sent, the cloud locked application sends upgrading END instruction to the Cloud Server by gateway.
When fingerprint head upgrading data packet is sent to the main control module by gateway by Cloud Server, journey is applied by cloud lock Received fingerprint head upgrading data packet is written the fingerprint head firmware storage areas of external flash memory by sequence, rather than Yun Suoyin Loading procedure copy fingerprint head upgrading data packet is led, so that user can be locked during upgrading with intelligent cloud described in normal operating.Using It verifies twice, i.e., cloud locked application verifies received fingerprint head upgrading data packet, first ensures the fingerprint of wireless receiving Head upgrading data packet is correctly to verify with fingerprint head application program to fingerprint head upgrading data packet, also needs to ensure to transmit What fingerprint head upgrading data packet and external flash memory to fingerprint head stored is consistent, and it is reliable greatly to improve upgrading Property, prevent upgrading midway factor to upgrade again according to mistake.
The fingerprint head upgrading data packet of fingerprint head is sent to by fingerprint head bootstrap loader copy fingerprint head upgrading data Upgrade code in packet carries out online upgrading, if exception occurs in a code in escalation process, switches to the storage of fingerprint head firmware This part of code of area's storage, to avoid the case where crashing in escalation process.Fingerprint head application is jumped back to after the completion of upgrading Program sends upgrading END instruction by fingerprint head application program and gives cloud locked application, and cloud locked application terminates fingerprint head liter Grade task.
Preferably, as shown in figure 3, before step A further include:
Cloud Server is sent fingerprint head upgrade request and instructed to the cloud by gateway locks main body, and the fingerprint head upgrading is asked Instruction is asked to include version number to be upgraded, firmware updating size and check code;
After the cloud locked application receives the instruction of fingerprint head upgrade request, fingerprint is obtained from external flash memory The current version number of head, and detect the memory space of current residual electricity and fingerprint head;
The cloud locked application judges whether the current version number of fingerprint head and version number to be upgraded are inconsistent, and judgement is worked as Whether preceding remaining capacity is not less than upgrading institute's electricity demand, and judges whether firmware updating size is smaller than the memory space of fingerprint head:
Only when the current version number of fingerprint head and version number to be upgraded are inconsistent, current residual electricity is not less than upgrading institute Electricity demand and firmware updating size are smaller than the memory space of fingerprint head, just execute step A, and the check code is stored in institute State fingerprint head firmware storage areas;Otherwise refusal upgrading.
The instruction of fingerprint head upgrade request can be sent to Cloud Server by the end APP of user, and it is regular to be also possible to Cloud Server Automatic on-line upgrading is carried out to fingerprint head, realizes and is managed on the line of fingerprint head upgrading.
Before upgrading, whether the version number on the cloud lock main body judges current finger print head is newest version number, if It is that newest version number does not have to then upgrade, if not newest, it is necessary to upgrade;Judge firmware updating size whether than fingerprint head Memory space it is small, avoid causing to crash because firmware updating size is bigger than the memory space of fingerprint head;Judge current residual electricity Whether amount is not less than upgrading institute's electricity demand causes user that can not grasp to avoid shutting down in escalation process because of not enough power supply Make the intelligent cloud lock, not enough power supply and version are that newest Shi Junke is issued to the operation interface that the end APP of user, cloud lock main body Prompting message;Ensure to upgrade smoothly unobstructed.
Preferably, the check code is CRC32 check code;
The verification of the step B and step D is equal are as follows: as soon as a fingerprint head upgrading data packet is often received, to received finger Line head upgrading data packet carries out exclusive or check;And when all fingerprint head upgrading data packets have received, all fingerprint heads are upgraded Data packet carries out CRC32 verification:
Sequence i.e. according to data packet from big to small is successively read the fingerprint head ascending series of fingerprint head firmware storage areas According to packet, and calculate the CRC32 check code of the fingerprint head upgrading data packet of each reading;
Then, to each fingerprint head upgrading data packet, counted CRC32 check code and fingerprint head firmware storage will be counted Area save the check code compare: if the two unanimously if CRC32 verify check results be correct, if the two is inconsistent Then the check results of CRC32 verification are incorrect;
If the check results that the check results and CRC32 of exclusive or check verify are correct, the final verification knot Fruit is correct;
If the check results that the check results or CRC32 of exclusive or check verify are incorrect, the final verification knot Fruit is incorrect.
CRC32 verification is cyclic redundancy check, is a kind of data transmission error-detecting function, carries out polynomial computation to data, And obtained result is attached to behind frame, receiving device also executes similar algorithm, with guarantee data transmission correctness and Integrality.Exclusive or check obtains exclusive or check code after the data of each byte are carried out exclusive or, is used for serial communication.
The cloud locked application and fingerprint head application program can receive fingerprint head upgrading data packet on one side, on one side to finger Line head upgrading data packet carries out exclusive or check, can find the fingerprint head upgrading data packet of error immediately in this way, retransmit immediately Corresponding fingerprint head upgrading data packet, improve data transfer efficiency;Then, when all fingerprint head upgrading data packets have received, CRC32 verification is carried out to all fingerprint head upgrading data packets again, second is carried out on the whole and verifies, improves verification accuracy.
When due to the upgrading of fingerprint head, the instruction of fingerprint head upgrade request is sent to the master control mould by gateway by Cloud Server Block, the instruction of fingerprint head upgrade request contain check code, and fingerprint head upgrading data packet is being sent to fingerprint by cloud locked application Before head, need first to determine whether received fingerprint head upgrading data packet is correct, therefore to the fingerprint of fingerprint head firmware storage areas Head upgrading data packet carries out CRC32 verification, calculates the practical CRC32 check code of fingerprint head upgrading data packet, if calculating and former First is inconsistent, then illustrates that the fingerprint head upgrading data packet received is incorrect.According to the sequence check of data packet from big to small, Be conducive to Cloud Server and retransmit corresponding fingerprint head upgrading data packet, reduces the incidence of secondary error.
For the step B, as soon as often receiving a fingerprint head upgrading data packet, cloud locked application is to received fingerprint Head upgrading data packet carries out exclusive or check;And when all fingerprint head upgrading data packets have received, cloud locked application is to all Fingerprint head upgrading data packet carries out CRC32 verification;If the check results that the check results and CRC32 of exclusive or check verify are positive Really, then final check results be it is correct, the cloud locked application sends upgrade package to Cloud Server by gateway and connects Bi Zhiling is harvested, Cloud Server does not retransmit fingerprint head upgrading data packet at this time, is performed simultaneously step C;If the school of exclusive or check Test result or CRC32 verification check results be it is incorrect, then the final check results be it is incorrect, asked to Cloud Server It asks and retransmits fingerprint head upgrading data packet.
For the step D, as soon as often receiving a fingerprint head upgrading data packet, fingerprint head application program is to received finger Line head upgrading data packet carries out exclusive or check;And when all fingerprint head upgrading data packets have received, fingerprint head application program pair All fingerprint head upgrading data packets carry out CRC32 verification;If the check results that the check results and CRC32 of exclusive or check verify are equal To be correct, then the final check results are correct, and the fingerprint head application program executes step E;If the school of exclusive or check Test result or CRC32 verification check results be it is incorrect, then the final check results be incorrect, Xiang Suoshu Yun Suoying Fingerprint head upgrading data packet is retransmitted with PROGRAMMED REQUESTS.
Preferably, further includes:
In the step A, when the gateway forwards fingerprint head upgrading data packet to the cloud locks main body, the gateway record Current offset address;
If gateway Xiang Yunsuo main body sends fingerprint head upgrading data packet Shi Yunsuo main body and powers off, cloud lock is restarted Main body, into the operation interface of cloud lock main body, and gateway records offset address when powering off;When cloud lock main body powers on again When, gateway Xiang Yunsuo main body from offset address when powering off continues to send fingerprint head upgrading data packet;
In the step C, fingerprint head upgrading data packet Shi Yunsuo main body is sent to power off to fingerprint hair if cloud locks main body, Then cloud lock main body stops sending fingerprint head upgrading data packet;When cloud lock main body powers on again, cloud locks main body for all fingerprint heads Upgrading data packet is re-transmitted to fingerprint head.
Have in the fingerprint head upgrading data packet that gateway issues and records current offset address, such as current offset address 48, next effect upgrading data that are surrounded by are 48 bytes, then the offset address of the data of next packet is 96, by recording this offset Address, here it is the principles of breakpoint transmission.When cloud lock main body powers on again, to Yun Suozhu offset address of gateway when power-off Body continues to send fingerprint head upgrading data packet, realizes the function of breakpoint transmission, sends without restarting, and saves upgrading data Transmission time.
And if cloud locks main body and send fingerprint head upgrading data packet Shi Yunsuo main body to power off to fingerprint hair, due to outside Flash memory stores all fingerprint head upgrading data packets, transmits data also quickly by serial ports, therefore cloud lock main body is again The case where when powering on, all fingerprint head upgrading data packets can be re-transmitted to fingerprint head by cloud lock main body, avoided leakage hair, are mistaken.
Embodiment 2
The fingerprint head online upgrade system of the intelligent cloud lock of the present embodiment, as shown in Figure 1, cloud lock main body is equipped with main control module With external flash memory, cloud lock main body, gateway and Cloud Server are connected to the network by wireless communication, the fingerprint head and cloud It locks main body and passes through serial ports wired connection;
The Cloud Server, which is used to that fingerprint head upgrading data packet to be sent to the cloud by gateway, locks main body;
The main control module of the cloud lock main body is used to that external flash storage to be written received fingerprint head upgrading data packet into Device;
With for being verified to received fingerprint head upgrading data packet: if check results be it is correct if by gateway to cloud Server sends upgrade package and receives instruction, and Cloud Server does not retransmit fingerprint head upgrading data packet at this time, while obtaining outer The fingerprint head upgrading data packet of portion's flash memory storage, and it is sent to fingerprint head;If check results be it is incorrect if to cloud take Business device request retransmits fingerprint head upgrading data packet;
The fingerprint head is for verifying fingerprint head upgrading data packet after having received fingerprint head upgrading data packet: if Check results are correct then according to fingerprint head upgrading data packet progress online upgrading, send and rise to the main control module after having upgraded Grade END instruction, the main control module send upgrading END instruction to the Cloud Server by gateway;
If check results be it is incorrect if to the main control module request retransmit fingerprint head upgrading data packet.
The fingerprint head online upgrade system of intelligent cloud lock, it can be achieved that fingerprint head online upgrading, without by fingerprint head It disassembles and is upgraded with special workpiece, upgrading is carried out to fingerprint head so as to network by wireless communication and software is repaired It is multiple, it is convenient and efficient, a large amount of manpower and material resources are saved, realizes and is managed on the line of fingerprint head upgrading.
Since fingerprint head upgrading data packet is bigger, there are several hundred K bytes, gateway transfers data to the cloud lock main body and needs Want left and right for 1 hours.Therefore the cloud lock main body is equipped with main control module and external flash memory, and main control module will connect External flash memory is written in the fingerprint head upgrading data packet of receipts, so that user can be with intelligence described in normal operating during upgrading During Yun Suo, i.e. fingerprint head upgrade, the operations such as user can still unlock, shut avoid directly copying fingerprint head upgrading data packet Shellfish makes user that can not unlock into the internal storage of cloud lock main body.The fingerprint head and cloud lock main body pass through the wired company of serial ports It connects, i.e., fingerprint head receives fingerprint head upgrading data packet by serial ports, and updating speed is fast, and data 2 minutes of 200kbytes can Finished with upgrading, be not take up the uncaging time of user fingerprints head, avoid because fingerprint head update time long due to be not available fingerprint and open Lock.
Using verifying twice, i.e. the main control module of cloud lock main body verifies received fingerprint head upgrading data packet, first The fingerprint head upgrading data packet for ensuring wireless receiving is correctly to verify with fingerprint head to fingerprint head upgrading data packet, also The fingerprint head upgrading data packet of fingerprint head and being consistent for external flash memory storage need to be ensured to be transferred to, greatly mentioned Height upgrading reliability, prevents upgrading midway factor to upgrade again according to mistake.After the completion of verifying twice, main control module takes to cloud Business device sends upgrading END instruction, and Cloud Server terminates the transmission task of fingerprint head upgrading data packet.
Using double copies code, i.e. fingerprint head upgrading data packet is first stored in external flash memory, and verification is correctly also sent out It send to fingerprint head and stores, if exception occurs in a code in fingerprint head escalation process, external flash memory can be switched to and deposited This part of code of storage, to avoid the case where crashing in escalation process.Pass through internet between the cloud service and gateway Data transmit-receive, the gateway and cloud lock main body are carried out by Small Area Wireless Communication Networks progress data transmit-receive, such as ZigBee-network, WIFI network.
Preferably, the main control module is equipped with cloud lock bootstrap loader and cloud locked application, and the external flash is deposited Reservoir division has fingerprint head firmware storage areas, and the fingerprint head is equipped with fingerprint head bootstrap loader and fingerprint head application program;
The Cloud Server is used to that fingerprint head upgrading data packet to be sent to the cloud locked application by gateway;
The cloud locked application is used to be written received fingerprint head upgrading data packet the fingerprint of external flash memory Head firmware storage areas;
With for being verified to received fingerprint head upgrading data packet: if check results be it is correct if by gateway to cloud Server sends upgrade package and receives instruction, and Cloud Server does not retransmit fingerprint head upgrading data packet at this time, while obtaining and referring to The fingerprint head upgrading data packet of line head firmware storage areas, and it is sent to the fingerprint head application program of fingerprint head;If check results are It is incorrect then to request to retransmit fingerprint head upgrading data packet to Cloud Server;
The fingerprint head application program is for carrying out fingerprint head upgrading data packet after having received fingerprint head upgrading data packet Verification requests the fingerprint head bootstrap loader to copy the upgrading in fingerprint head upgrading data packet if being correctly if check results Code carries out online upgrading, and fingerprint head application program is jumped back to after having upgraded, and the fingerprint head application program applies journey to cloud lock Sequence sends upgrading END instruction, and the cloud locked application sends upgrading END instruction to the Cloud Server by gateway;
If check results be it is incorrect if Xiang Suoshu cloud locked application request retransmit fingerprint head upgrading data packet.
When fingerprint head upgrading data packet is sent to the main control module by gateway by Cloud Server, journey is applied by cloud lock Received fingerprint head upgrading data packet is written the fingerprint head firmware storage areas of external flash memory by sequence, rather than Yun Suoyin Loading procedure copy fingerprint head upgrading data packet is led, so that user can be locked during upgrading with intelligent cloud described in normal operating.Using It verifies twice, i.e., cloud locked application verifies received fingerprint head upgrading data packet, first ensures the fingerprint of wireless receiving Head upgrading data packet is correctly to verify with fingerprint head application program to fingerprint head upgrading data packet, also needs to ensure to transmit What fingerprint head upgrading data packet and external flash memory to fingerprint head stored is consistent, and it is reliable greatly to improve upgrading Property, prevent upgrading midway factor to upgrade again according to mistake.
The fingerprint head upgrading data packet of fingerprint head is sent to by fingerprint head bootstrap loader copy fingerprint head upgrading data Upgrade code in packet carries out online upgrading, if exception occurs in a code in escalation process, switches to the storage of fingerprint head firmware This part of code of area's storage, to avoid the case where crashing in escalation process.Fingerprint head application is jumped back to after the completion of upgrading Program sends upgrading END instruction by fingerprint head application program and gives cloud locked application, and cloud locked application terminates fingerprint head liter Grade task.
Preferably, the Cloud Server is also used to send fingerprint head upgrade request by gateway and instruct to the Yun Suozhu Body, the fingerprint head upgrade request instruction includes version number to be upgraded, firmware updating size and check code;
After the cloud locked application is also used to receive the instruction of fingerprint head upgrade request, obtained from external flash memory The current version number of print head, and detect the memory space of current residual electricity and fingerprint head;
It is also used to judge whether current version number and the version number to be upgraded of fingerprint head are inconsistent, judge current residual electricity Whether not less than upgrading institute's electricity demand, and judge whether firmware updating size is smaller than the memory space of fingerprint head:
Only when the current version number of fingerprint head and version number to be upgraded are inconsistent, current residual electricity is not less than upgrading institute Electricity demand and firmware updating size are smaller than the memory space of fingerprint head, just execute step A, and the check code is stored in institute State fingerprint head firmware storage areas;Otherwise refusal upgrading;
As soon as being also used to often receive a fingerprint head upgrading data packet, exclusive or is carried out to received fingerprint head upgrading data packet Verification;And when all fingerprint head upgrading data packets have received, CRC32 verification is carried out to all fingerprint head upgrading data packets: i.e. According to the sequence of data packet from big to small, it is successively read the fingerprint head upgrading data packet of fingerprint head firmware storage areas, and is calculated every The CRC32 check code of the fingerprint head upgrading data packet of a reading;
Then, to each fingerprint head upgrading data packet, counted CRC32 check code and fingerprint head firmware storage will be counted Area save the check code compare: if the two unanimously if CRC32 verify check results be correct, if the two is inconsistent Then the check results of CRC32 verification are incorrect;
If the check results that the check results and CRC32 of exclusive or check verify are correct, the final verification knot Fruit is correct;If the check results that the check results or CRC32 of exclusive or check verify are incorrect, the final verification knot Fruit is incorrect;
As soon as the fingerprint head application program is for often receiving a fingerprint head upgrading data packet, to received fingerprint head liter Grade data packet carries out exclusive or check;And when all fingerprint head upgrading data packets have received, the fingerprint head application program is to institute There is fingerprint head upgrading data packet to carry out the CRC32 verification;
If the check results of the exclusive or check and the check results of CRC32 verification are correctly, to allow to upgrade;
If the check results of the exclusive or check or the CRC32 verification check results be it is incorrect, request again Send all fingerprint head upgrading data packets.
The instruction of fingerprint head upgrade request can be sent to Cloud Server by the end APP of user, and it is regular to be also possible to Cloud Server Automatic on-line upgrading is carried out to fingerprint head, realizes and is managed on the line of fingerprint head upgrading.
Before upgrading, whether the version number on the cloud lock main body judges current finger print head is newest version number, if It is that newest version number does not have to then upgrade, if not newest, it is necessary to upgrade;Judge firmware updating size whether than fingerprint head Memory space it is small, avoid causing to crash because firmware updating size is bigger than the memory space of fingerprint head;Judge current residual electricity Whether amount is not less than upgrading institute's electricity demand causes user that can not grasp to avoid shutting down in escalation process because of not enough power supply Make the intelligent cloud lock, not enough power supply and version are that newest Shi Junke is issued to the operation interface that the end APP of user, cloud lock main body Prompting message;Ensure to upgrade smoothly unobstructed.
The cloud locked application and fingerprint head application program can receive fingerprint head upgrading data packet on one side, on one side to finger Line head upgrading data packet carries out exclusive or check, can find the fingerprint head upgrading data packet of error immediately in this way, retransmit immediately Corresponding fingerprint head upgrading data packet, improve data transfer efficiency;Then, when all fingerprint head upgrading data packets have received, CRC32 verification is carried out to all fingerprint head upgrading data packets again, second is carried out on the whole and verifies, improves verification accuracy.
When due to the upgrading of fingerprint head, the instruction of fingerprint head upgrade request is sent to the master control mould by gateway by Cloud Server Block, the instruction of fingerprint head upgrade request contain check code, and fingerprint head upgrading data packet is being sent to fingerprint by cloud locked application Before head, need first to determine whether received fingerprint head upgrading data packet is correct, therefore to the fingerprint of fingerprint head firmware storage areas Head upgrading data packet carries out CRC32 verification, calculates the practical CRC32 check code of fingerprint head upgrading data packet, if calculating and former First is inconsistent, then illustrates that the fingerprint head upgrading data packet received is incorrect.According to the sequence check of data packet from big to small, Be conducive to Cloud Server and retransmit corresponding fingerprint head upgrading data packet, reduces the incidence of secondary error.
Preferably, it when the gateway is for forwarding fingerprint head upgrading data packet to the cloud to lock main body, records current inclined Move address;If Xiang Yunsuo main body sends fingerprint head upgrading data packet Shi Yunsuo main body and powers off, offset when power-off is recorded Address;When cloud lock main body powers on again, Xiang Yunsuo main body continues to send fingerprint head liter offset address of gateway when power-off Grade data packet;
It powering off, restarting when if the main control module of the cloud lock main body is for receiving fingerprint head upgrading data packet And enter operation interface;
It is powered off when fingerprint head upgrading data packet if being also used to send to fingerprint hair, stops sending fingerprint head ascending series According to packet;When powering on again, all fingerprint head upgrading data packets are re-transmitted to fingerprint head.
Have in the fingerprint head upgrading data packet that gateway issues and records current offset address, such as current offset address 48, next effect upgrading data that are surrounded by are 48 bytes, then the offset address of the data of next packet is 96, by recording this offset Address, here it is the principles of breakpoint transmission.When cloud lock main body powers on again, to Yun Suozhu offset address of gateway when power-off Body continues to send fingerprint head upgrading data packet, realizes the function of breakpoint transmission, sends without restarting, and saves upgrading data Transmission time.
And if cloud locks main body and send fingerprint head upgrading data packet Shi Yunsuo main body to power off to fingerprint hair, due to outside Flash memory stores all fingerprint head upgrading data packets, transmits data also quickly by serial ports, therefore cloud lock main body is again The case where when powering on, all fingerprint head upgrading data packets can be re-transmitted to fingerprint head by cloud lock main body, avoided leakage hair, are mistaken.
Embodiment 3
The fingerprint head of the present embodiment can online upgrading intelligent cloud lock, as shown in Figure 1, cloud lock main body be equipped with main control module and External flash memory, cloud lock main body, gateway and Cloud Server are connected to the network by wireless communication, the fingerprint head and cloud lock Main body passes through serial ports wired connection;The fingerprint head online upgrading method locked using intelligent cloud described in embodiment 1 is to the fingerprint Head carries out online upgrading.
The fingerprint head can online upgrading intelligent cloud lock, it can be achieved that fingerprint head online upgrading, it is not necessary that fingerprint head is torn open It unloads and is used together special workpiece and is upgraded, upgrading and software reparation are carried out to fingerprint head so as to network by wireless communication, It is convenient and efficient, a large amount of manpower and material resources are saved, realizes and is managed on the line of fingerprint head upgrading.
The cloud lock main body is equipped with main control module and external flash memory, and main control module upgrades received fingerprint head External flash memory is written in data packet, so that user can be locked during upgrading with intelligent cloud described in normal operating, i.e. fingerprint head liter During grade, the operations such as user can still unlock, shut avoid being copied directly to fingerprint head upgrading data packet in cloud lock main body Make user that can not unlock in portion's memory.By serial ports wired connection, i.e. fingerprint head passes through for the fingerprint head and cloud lock main body Serial ports receives fingerprint head upgrading data packet, and updating speed is fast, and data 2 minutes of 200kbytes, which can upgrade, to be finished, do not account for With the uncaging time of user fingerprints head, avoid not being available fingerprint unlocking because fingerprint head update time is long.
Using verifying twice, i.e. the main control module of cloud lock main body verifies received fingerprint head upgrading data packet, first The fingerprint head upgrading data packet for ensuring wireless receiving is correctly to verify with fingerprint head to fingerprint head upgrading data packet, also The fingerprint head upgrading data packet of fingerprint head and being consistent for external flash memory storage need to be ensured to be transferred to, greatly mentioned Height upgrading reliability, prevents upgrading midway factor to upgrade again according to mistake.After the completion of verifying twice, main control module takes to cloud Business device sends upgrading END instruction, and Cloud Server terminates the transmission task of fingerprint head upgrading data packet.
Using double copies code, i.e. fingerprint head upgrading data packet is first stored in external flash memory, and verification is correctly also sent out It send to fingerprint head and stores, if exception occurs in a code in fingerprint head escalation process, external flash memory can be switched to and deposited This part of code of storage, to avoid the case where crashing in escalation process.
The technical principle of the invention is described above in combination with a specific embodiment.These descriptions are intended merely to explain of the invention Principle, and shall not be construed in any way as a limitation of the scope of protection of the invention.Based on the explanation herein, the technology of this field Personnel can associate with other specific embodiments of the invention without creative labor, these modes are fallen within Within protection scope of the present invention.

Claims (10)

1. a kind of fingerprint head online upgrading method of intelligent cloud lock, it is characterised in that: cloud locks main body and is equipped with main control module and outside Flash memory, cloud lock main body, gateway and Cloud Server are connected to the network by wireless communication, and the fingerprint head and cloud lock main body Pass through serial ports wired connection, comprising the following steps:
Fingerprint head upgrading data packet is sent to the cloud by gateway and locks main body by step A, Cloud Server, the cloud lock main body External flash memory is written in received fingerprint head upgrading data packet by main control module;
Step B, the main control module of the cloud lock main body verifies received fingerprint head upgrading data packet, if check results are The correct then described main control module sends upgrade package to Cloud Server by gateway and receives instruction, and Cloud Server is no longer sent out at this time Fingerprint head upgrading data packet is sent, step C is performed simultaneously;If check results be it is incorrect if to Cloud Server request retransmit refer to Line head upgrading data packet;
Step C, the main control module of the cloud lock main body obtain the fingerprint head upgrading data packet of external flash memory storage, and It is sent to fingerprint head;
Step D after fingerprint head has received fingerprint head upgrading data packet, verifies fingerprint head upgrading data packet, if verification knot Fruit is correctly to then follow the steps E;If check results be it is incorrect if to the main control module request retransmit fingerprint head upgrading Data packet;
Step E, fingerprint head carry out online upgrading according to fingerprint head upgrading data packet, send and rise to the main control module after having upgraded Grade END instruction, the main control module send upgrading END instruction to the Cloud Server by gateway.
2. the fingerprint head online upgrading method of intelligent cloud lock according to claim 1, it is characterised in that: in the master control mould Block is arranged cloud and locks bootstrap loader and cloud locked application, has fingerprint head firmware storage areas in the division of external flash memory, Fingerprint head bootstrap loader and fingerprint head application program are set in the fingerprint head;
The step A specifically: fingerprint head upgrading data packet is sent to the cloud locked application by gateway by Cloud Server, The cloud locked application stores the fingerprint head firmware that external flash memory is written in received fingerprint head upgrading data packet Area;
The step B specifically: the cloud locked application verifies received fingerprint head upgrading data packet, if verification knot Fruit sends upgrade package to Cloud Server by gateway for the correct then described cloud locked application and receives instruction, cloud service at this time Device does not retransmit fingerprint head upgrading data packet, is performed simultaneously step C;If check results be it is incorrect if to Cloud Server request weight It is new to send fingerprint head upgrading data packet;
The step C specifically: the cloud locked application obtains the fingerprint head upgrading data packet of fingerprint head firmware storage areas, and It is sent to the fingerprint head application program of fingerprint head;
The step D specifically: after the fingerprint head application program has received fingerprint head upgrading data packet, to fingerprint head ascending series It is verified according to packet, if check results are correctly to then follow the steps E, if check results are incorrect Xiang Suoshu cloud, lock applies journey Sequence request retransmits fingerprint head upgrading data packet;
The step E specifically: the upgrade code in the fingerprint head bootstrap loader copy fingerprint head upgrading data packet, into Row online upgrading, jumps back to fingerprint head application program after having upgraded, the fingerprint head application program is sent to cloud locked application Upgrade END instruction, the cloud locked application sends upgrading END instruction to the Cloud Server by gateway.
3. the fingerprint head online upgrading method of intelligent cloud lock according to claim 2, which is characterized in that before step A Further include:
Cloud Server is sent fingerprint head upgrade request and instructed to the cloud by gateway locks main body, and the fingerprint head upgrade request refers to Enable includes version number to be upgraded, firmware updating size and check code;
After the cloud locked application receives the instruction of fingerprint head upgrade request, fingerprint head is obtained from external flash memory Current version number, and detect the memory space of current residual electricity and fingerprint head;
The cloud locked application judges whether the current version number of fingerprint head and version number to be upgraded are inconsistent, judges current surplus Whether remaining electricity is not less than upgrading institute's electricity demand, and judges whether firmware updating size is smaller than the memory space of fingerprint head:
Only when the current version number of fingerprint head and version number to be upgraded are inconsistent, current residual electricity is not less than electricity needed for upgrading Amount and firmware updating size are smaller than the memory space of fingerprint head, just execute step A, and the check code is stored in the finger Line head firmware storage areas;Otherwise refusal upgrading.
4. the fingerprint head online upgrading method of intelligent cloud lock according to claim 3, it is characterised in that:
The check code is CRC32 check code;
The verification of the step B and step D is equal are as follows: as soon as a fingerprint head upgrading data packet is often received, to received fingerprint head Upgrading data packet carries out exclusive or check;And when all fingerprint head upgrading data packets have received, data are upgraded to all fingerprint heads Packet carries out CRC32 verification:
Sequence i.e. according to data packet from big to small is successively read the fingerprint head upgrading data of fingerprint head firmware storage areas Packet, and calculate the CRC32 check code of the fingerprint head upgrading data packet of each reading;
Then, to each fingerprint head upgrading data packet, counted CRC32 check code will be counted and fingerprint head firmware storage areas is protected The check code deposited compares: if the two unanimously if CRC32 verify check results be correct, if the two is inconsistent The check results of CRC32 verification are incorrect;
If the check results that the check results and CRC32 of exclusive or check verify are correctly, the final check results are Correctly;
If the check results that the check results or CRC32 of exclusive or check verify be it is incorrect, the final check results are It is incorrect.
5. the fingerprint head online upgrading method of intelligent cloud lock according to claim 1, which is characterized in that further include:
In the step A, when the gateway forwards fingerprint head upgrading data packet to the cloud locks main body, the gateway record is current Offset address;
If gateway Xiang Yunsuo main body sends fingerprint head upgrading data packet Shi Yunsuo main body and powers off, Yun Suozhu is restarted Body, into the operation interface of cloud lock main body, and gateway records offset address when powering off;When cloud lock main body powers on again, Xiang Yunsuo main body continues to send fingerprint head upgrading data packet offset address of gateway when power-off;
In the step C, fingerprint head upgrading data packet Shi Yunsuo main body is sent to power off to fingerprint hair if cloud locks main body, cloud Main body is locked to stop sending fingerprint head upgrading data packet;When cloud lock main body powers on again, cloud lock main body upgrades all fingerprint heads Data packet is re-transmitted to fingerprint head.
6. a kind of fingerprint head online upgrade system of intelligent cloud lock, it is characterised in that: cloud locks main body and is equipped with main control module and outside Flash memory, cloud lock main body, gateway and Cloud Server are connected to the network by wireless communication, and the fingerprint head and cloud lock main body Pass through serial ports wired connection;
The Cloud Server, which is used to that fingerprint head upgrading data packet to be sent to the cloud by gateway, locks main body;
The main control module of the cloud lock main body is used to that external flash memory to be written received fingerprint head upgrading data packet into;
With for being verified to received fingerprint head upgrading data packet: if check results be it is correct if by gateway to cloud service Device sends upgrade package and receives instruction, and Cloud Server does not retransmit fingerprint head upgrading data packet at this time, while obtaining outside The fingerprint head upgrading data packet of flash memory storage, and it is sent to fingerprint head;If check results be it is incorrect if to cloud service Device request retransmits fingerprint head upgrading data packet;
The fingerprint head is for verifying fingerprint head upgrading data packet after having received fingerprint head upgrading data packet: if verification As a result online upgrading is then carried out according to fingerprint head upgrading data packet to be correct, sends upgrading knot to the main control module after having upgraded Shu Zhiling, the main control module send upgrading END instruction to the Cloud Server by gateway;
If check results be it is incorrect if to the main control module request retransmit fingerprint head upgrading data packet.
7. the fingerprint head online upgrade system of intelligent cloud lock according to claim 6, it is characterised in that:
The main control module is equipped with cloud lock bootstrap loader and cloud locked application, and the external flash memory division has Fingerprint head firmware storage areas, the fingerprint head are equipped with fingerprint head bootstrap loader and fingerprint head application program;
The Cloud Server is used to that fingerprint head upgrading data packet to be sent to the cloud locked application by gateway;
The fingerprint head that the cloud locked application is used to be written received fingerprint head upgrading data packet external flash memory is consolidated Part memory block;
With for being verified to received fingerprint head upgrading data packet: if check results be it is correct if by gateway to cloud service Device sends upgrade package and receives instruction, and Cloud Server does not retransmit fingerprint head upgrading data packet at this time, while obtaining fingerprint head The fingerprint head upgrading data packet of firmware storage areas, and it is sent to the fingerprint head application program of fingerprint head;If check results are not just It is true then to Cloud Server request retransmit fingerprint head upgrading data packet;
The fingerprint head application program is for carrying out school to fingerprint head upgrading data packet after having received fingerprint head upgrading data packet It tests, requests the fingerprint head bootstrap loader to copy the upgrading generation in fingerprint head upgrading data packet if being correctly if check results Code carries out online upgrading, jumps back to fingerprint head application program after having upgraded, and the fingerprint head application program is to cloud locked application Upgrading END instruction is sent, the cloud locked application sends upgrading END instruction to the Cloud Server by gateway;
If check results be it is incorrect if Xiang Suoshu cloud locked application request retransmit fingerprint head upgrading data packet.
8. the fingerprint head online upgrade system of intelligent cloud lock according to claim 7, it is characterised in that:
The Cloud Server, which is also used to send fingerprint head upgrade request by gateway and instruct to the cloud, locks main body, the fingerprint head Upgrade request instruction includes version number to be upgraded, firmware updating size and check code;
After the cloud locked application is also used to receive the instruction of fingerprint head upgrade request, refer to from the acquisition of external flash memory The current version number of line head, and detect the memory space of current residual electricity and fingerprint head;
It is also used to judge whether current version number and the version number to be upgraded of fingerprint head are inconsistent, whether judge current residual electricity Not less than upgrading institute's electricity demand, and judge whether firmware updating size is smaller than the memory space of fingerprint head:
Only when the current version number of fingerprint head and version number to be upgraded are inconsistent, current residual electricity is not less than electricity needed for upgrading Amount and firmware updating size are smaller than the memory space of fingerprint head, just execute step A, and the check code is stored in the finger Line head firmware storage areas;Otherwise refusal upgrading;
As soon as being also used to often receive a fingerprint head upgrading data packet, exclusive or school is carried out to received fingerprint head upgrading data packet It tests;And when all fingerprint head upgrading data packets have received, CRC32 verification is carried out to all fingerprint head upgrading data packets: being pressed According to the sequence of data packet from big to small, it is successively read the fingerprint head upgrading data packet of fingerprint head firmware storage areas, and is calculated each The CRC32 check code of the fingerprint head upgrading data packet of reading;
Then, to each fingerprint head upgrading data packet, counted CRC32 check code will be counted and fingerprint head firmware storage areas is protected The check code deposited compares: if the two unanimously if CRC32 verify check results be correct, if the two is inconsistent The check results of CRC32 verification are incorrect;
If the check results that the check results and CRC32 of exclusive or check verify are correctly, the final check results are Correctly;If the check results that the check results or CRC32 of exclusive or check verify be it is incorrect, the final check results are It is incorrect;
As soon as the fingerprint head application program is for often receiving a fingerprint head upgrading data packet, to received fingerprint head ascending series Exclusive or check is carried out according to packet;And when all fingerprint head upgrading data packets have received, the fingerprint head application program is to all fingers Line head upgrading data packet carries out the CRC32 verification;
If the check results of the exclusive or check and the check results of CRC32 verification are correctly, to allow to upgrade;
If the check results of the exclusive or check or the CRC32 verification check results be it is incorrect, request to retransmit All fingerprint head upgrading data packets.
9. the fingerprint head online upgrade system of intelligent cloud lock according to claim 1, it is characterised in that:
When the gateway is for forwarding fingerprint head upgrading data packet to the cloud to lock main body, current offset address is recorded;If to Cloud lock main body sends fingerprint head upgrading data packet Shi Yunsuo main body and powers off, then records offset address when power-off;When cloud is locked When main body powers on again, Xiang Yunsuo main body continues to send fingerprint head upgrading data packet offset address of gateway when power-off;
It is powered off when if the main control module of the cloud lock main body is for receiving fingerprint head upgrading data packet, restarting is gone forward side by side Enter operation interface;
It is powered off when fingerprint head upgrading data packet if being also used to send to fingerprint hair, stops sending fingerprint head upgrading data Packet;When powering on again, all fingerprint head upgrading data packets are re-transmitted to fingerprint head.
10. a kind of fingerprint head can online upgrading intelligent cloud lock, it is characterised in that: cloud lock main body be equipped with main control module and outside Flash memory, cloud lock main body, gateway and Cloud Server are connected to the network by wireless communication, and the fingerprint head and cloud lock main body Pass through serial ports wired connection;The fingerprint head online upgrading method pair locked using intelligent cloud described in claim 1 to 5 any one The fingerprint head carries out online upgrading.
CN201910173167.0A 2019-03-07 2019-03-07 Fingerprint head online upgrading method, system and the cloud lock of a kind of intelligent cloud lock Pending CN109933354A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910173167.0A CN109933354A (en) 2019-03-07 2019-03-07 Fingerprint head online upgrading method, system and the cloud lock of a kind of intelligent cloud lock

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910173167.0A CN109933354A (en) 2019-03-07 2019-03-07 Fingerprint head online upgrading method, system and the cloud lock of a kind of intelligent cloud lock

Publications (1)

Publication Number Publication Date
CN109933354A true CN109933354A (en) 2019-06-25

Family

ID=66986648

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910173167.0A Pending CN109933354A (en) 2019-03-07 2019-03-07 Fingerprint head online upgrading method, system and the cloud lock of a kind of intelligent cloud lock

Country Status (1)

Country Link
CN (1) CN109933354A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110515637A (en) * 2019-07-12 2019-11-29 湖南新云网科技有限公司 A kind of programme upgrade method, system and terminal device
CN111199701A (en) * 2020-03-17 2020-05-26 上海仰邦科技股份有限公司 Synchronous control system of LED dot matrix display screen and self-checking method thereof
CN111932751A (en) * 2020-08-15 2020-11-13 广州云莫凡信息科技有限公司 Intelligent park Internet of things comprehensive management platform and management method
CN114827309A (en) * 2022-04-19 2022-07-29 深信服科技股份有限公司 Equipment fingerprint generation method, device, equipment and readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140196137A1 (en) * 2013-01-07 2014-07-10 Curtis John Schwebke Unified communications with a cloud client device
CN107247589A (en) * 2017-06-02 2017-10-13 广东汇泰龙科技有限公司 A kind of door lock firmware upgrade method based on OTA
CN107301064A (en) * 2017-05-19 2017-10-27 深圳Tcl新技术有限公司 Upgrade method, television terminal and the computer-readable recording medium of bluetooth firmware
CN109067894A (en) * 2018-08-23 2018-12-21 广东汇泰龙科技有限公司 A kind of method, the system of the online upgrading based on cloud lock system and key reduction
CN109240721A (en) * 2018-08-24 2019-01-18 江苏恒宝智能系统技术有限公司 A kind of method of MCU online upgrading

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140196137A1 (en) * 2013-01-07 2014-07-10 Curtis John Schwebke Unified communications with a cloud client device
CN107301064A (en) * 2017-05-19 2017-10-27 深圳Tcl新技术有限公司 Upgrade method, television terminal and the computer-readable recording medium of bluetooth firmware
CN107247589A (en) * 2017-06-02 2017-10-13 广东汇泰龙科技有限公司 A kind of door lock firmware upgrade method based on OTA
CN109067894A (en) * 2018-08-23 2018-12-21 广东汇泰龙科技有限公司 A kind of method, the system of the online upgrading based on cloud lock system and key reduction
CN109240721A (en) * 2018-08-24 2019-01-18 江苏恒宝智能系统技术有限公司 A kind of method of MCU online upgrading

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110515637A (en) * 2019-07-12 2019-11-29 湖南新云网科技有限公司 A kind of programme upgrade method, system and terminal device
CN111199701A (en) * 2020-03-17 2020-05-26 上海仰邦科技股份有限公司 Synchronous control system of LED dot matrix display screen and self-checking method thereof
CN111932751A (en) * 2020-08-15 2020-11-13 广州云莫凡信息科技有限公司 Intelligent park Internet of things comprehensive management platform and management method
CN114827309A (en) * 2022-04-19 2022-07-29 深信服科技股份有限公司 Equipment fingerprint generation method, device, equipment and readable storage medium
CN114827309B (en) * 2022-04-19 2024-02-23 深信服科技股份有限公司 Equipment fingerprint generation method, device, equipment and readable storage medium

Similar Documents

Publication Publication Date Title
CN109933354A (en) Fingerprint head online upgrading method, system and the cloud lock of a kind of intelligent cloud lock
CN108052355B (en) Satellite-borne load unit software on-orbit weight composing method
CN109677455B (en) Train auxiliary driving system
CN107992321A (en) ECU software update method, device, vehicle-mounted T-BOX and vehicle
CN106227572A (en) A kind of frequency converter control system programme upgrade method
CN108121554A (en) A kind of upgrade method and upgrade-system of open air embedded device system
US20120117040A1 (en) Method and System for Verifying Data Stored on a Medium
CN109002310A (en) firmware upgrade method
CN110990036A (en) OTA upgrading method and device for power change cabinet, power change equipment and storage medium
CN112130881A (en) Firmware remote upgrading method and device
CN103116507A (en) Electronic control unit (ECU) program downloading method based on controller area network (CAN)
CN113905039A (en) System upgrade file transmission method, device and system
CN102866900B (en) Upgrade the method and system of the configurator of control system
CN109408088A (en) CPLD upgrade method, device, system and computer readable storage medium
US20060206640A1 (en) Storage apparatus
CN108958752A (en) Single-chip microcontroller online upgrade system and method
CN107832074A (en) A kind of intelligent sound box data updating method and device
WO2022160816A1 (en) Data processing method and related device
CN110727448B (en) OTA over-the-air upgrading method for charging piles
CN115220755A (en) Router online upgrading system based on credibility measurement
CN102158304B (en) File self-repair downloading method for embedded type multi-machine system
CN103902323B (en) A kind of lung ventilator method for upgrading software and its system
CN111273919B (en) Secure computer platform supporting software batch remote update
CN117908913A (en) Method and device for updating vehicle-mounted safety platform software
CN114144759A (en) Method and device for updating software of a vehicle computer comprising an execution memory, a backup memory and a check memory

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20190625

RJ01 Rejection of invention patent application after publication