WO2019100988A1 - 电子关锁设备及其固件升级方法 - Google Patents

电子关锁设备及其固件升级方法 Download PDF

Info

Publication number
WO2019100988A1
WO2019100988A1 PCT/CN2018/115434 CN2018115434W WO2019100988A1 WO 2019100988 A1 WO2019100988 A1 WO 2019100988A1 CN 2018115434 W CN2018115434 W CN 2018115434W WO 2019100988 A1 WO2019100988 A1 WO 2019100988A1
Authority
WO
WIPO (PCT)
Prior art keywords
upgrade
firmware
electronic lock
lock device
server
Prior art date
Application number
PCT/CN2018/115434
Other languages
English (en)
French (fr)
Inventor
陈志强
李元景
吴相豪
李进学
刘世国
Original Assignee
同方威视技术股份有限公司
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 同方威视技术股份有限公司 filed Critical 同方威视技术股份有限公司
Publication of WO2019100988A1 publication Critical patent/WO2019100988A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/51Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems at application loading time, e.g. accepting, rejecting, starting or inhibiting executable software based on integrity or source reliability
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Definitions

  • the present disclosure relates to the field of logistics supervision, and in particular to an electronic lock device and a firmware upgrade method thereof.
  • the present disclosure proposes an electronic lock device and a firmware upgrade method thereof.
  • a firmware upgrade method of an electronic lock device includes receiving a firmware upgrade notification from a service server, the firmware upgrade notification including an upgrade parameter, transmitting a firmware upgrade request to the upgrade server according to the upgrade parameter, and receiving a firmware upgrade response from the upgrade server, the firmware upgrade response including a number Signing; verifying the digital signature to determine whether to perform an upgrade; sending an upgrade confirmation to the upgrade server under the condition that the digital signature is verified; and receiving upgrade data including the firmware file from the upgrade server.
  • the upgrade data includes firmware files and integrity data.
  • the method also includes calculating integrity data from the firmware file, comparing the received integrity data to the calculated integrity data, and agreeing on a condition that the received integrity data is consistent with the calculated integrity data And performing firmware upgrade on the electronic lock device using the firmware file.
  • the method further comprises: deriving a first hash digest value from the digital signature; hashing the firmware file, deriving a second hash digest value; and using the first hash digest value Comparing with the second hash digest value; performing firmware upgrade on the electronic lock device using the firmware file under the condition that the first hash digest value is the same as the second hash digest value.
  • the step of sending a firmware upgrade request to the upgrade server according to the upgrade parameter comprises: matching the received upgrade parameter with the stored upgrade parameter; and sending a firmware upgrade to the upgrade server under the condition that the matching is implemented request.
  • the upgrade parameter includes at least one of the following: an address of the upgrade server, a port for upgrading, an address of the service server, an identifier of the service server, port information of the service server, and service server verification. information.
  • the firmware upgrade notification further includes version information indicating the version to be upgraded to.
  • the method further includes determining, according to the version information, whether an upgrade is required.
  • the method before sending the upgrade confirmation to the upgrade server, the method further comprises: determining whether it is in an idle period; and sending an upgrade confirmation to the upgrade server under the condition of being in an idle period.
  • the idle time period information is sent to the upgrade server under conditions that the electronically locked device is not in an idle period, the idle time period information indicating that the upgrade server can send the firmware to the electronically locked device The time period for the upgrade data of the file.
  • the method further includes: transmitting the upgrade confirmation to the upgrade server if the electronic lock device is not in an idle period; and receiving upgrade data including a firmware file from the upgrade server Thereafter, the upgrade data is stored in a first storage area of the storage unit of the electronic lock device under the condition that the electronic lock device is in an idle period, and the electronic lock device is not in an idle period And storing the upgrade data in a second storage area of the storage unit of the electronically locked device that is different from the first storage area.
  • the method further comprises: separately storing the received firmware file and the old firmware file before the upgrade in the electronic lock device; and upgrading the electronic lock device using the received firmware file Thereafter, it is judged whether the electronic lock device can operate normally; and the electronic lock device is restored using the old firmware file under the condition that the electronic lock device cannot operate normally.
  • the electronically locked device is further connected to an associated device, and the upgrade data further includes firmware upgrade data for the associated device, the method further comprising: The firmware upgrade data of the associated device is sent to the associated device.
  • the electronically-locked device communicates with an associated device via short-range or wired communication.
  • the electronic lockout device communicates with the service server and the upgrade server via mobile communication.
  • the integrity data includes a checksum value for a cyclic redundancy check (CRC).
  • CRC cyclic redundancy check
  • an electronic lock device includes: a first communication unit configured to communicate with a service server and an upgrade server; and a processing unit configured to: control the first communication unit to receive a firmware upgrade notification from the service server,
  • the firmware upgrade notification includes an upgrade parameter; processing the upgrade parameter, and controlling, according to the processing result, the first communication unit to send a firmware upgrade request to the upgrade server; and controlling the first communication unit to receive a firmware upgrade from the upgrade server
  • the firmware upgrade response includes a digital signature; verifying the digital signature to determine whether the upgrade is secure; and controlling the first communication unit to send an upgrade to the upgrade server under the condition that the digital signature passes verification Confirming; controlling the first communication unit to receive upgrade data including a firmware file from an upgrade server.
  • the upgrade data also includes integrity data.
  • the processing unit is further configured to: calculate integrity data based on the firmware file; compare the received integrity data with the calculated integrity data; and receive the integrity data and the calculated integrity data Under the same condition, the firmware lock file is used to perform firmware upgrade on the electronic lock device.
  • the processing unit is further configured to: derive a first hash digest value from the digital signature; perform a hash operation on the firmware file, and derive a second hash digest value; The column summary value is compared with the second hash summary value; the firmware is upgraded using the firmware file to perform firmware upgrade using the firmware file with the same value as the second hash summary value.
  • the electronic lockout device further includes a storage unit, the processing unit further configured to: match the received upgrade parameter with an upgrade parameter stored in the storage unit; under the condition that the matching is implemented, The first communication unit is controlled to send a firmware upgrade request to the upgrade server.
  • the firmware upgrade notification further includes version information indicating a version to be upgraded, and the processing unit is further configured to determine whether an upgrade is required based on the version information.
  • the processing unit is further configured to: determine whether it is in an idle period; and, under conditions of an idle period, control the first communication unit to send an upgrade confirmation to the upgrade server.
  • the processing unit is further configured to: send the upgrade confirmation to the upgrade server under the condition that the electronic lock device is not in an idle period; and control the first communication unit After receiving the upgrade data including the firmware file from the upgrade server, storing the upgrade data in a first storage area of the storage unit of the electronic lock device under the condition that the electronic lock device is in an idle period, and The upgrade data is stored in a second storage area of the storage unit of the electronic lock device that is different from the first storage area under the condition that the electronic lock device is not in an idle period.
  • the processing unit is further configured to: store the received firmware file separately from the old firmware file before the upgrade in the electronic lock device; electronically lock the use of the received firmware file After the device is upgraded, it is determined whether the electronic lock device can operate normally; and the electronic lock device is restored using the old firmware file under the condition that the electronic lock device cannot operate normally.
  • the electronic lockout device further includes a second communication unit.
  • the second communication unit is configured to communicate with an associated device.
  • the upgrade data also includes firmware upgrade data for the associated device.
  • the processing unit is further configured to control the second communication unit to transmit the upgrade data or firmware upgrade data for the associated device to the associated device.
  • the second communication unit is a short range communication unit or a wired communication unit.
  • the first communication unit is a mobile communication unit.
  • remote electronic upgrade of the electronic lock device can be performed in batches, thereby improving work efficiency. Moreover, it is possible to avoid disassembling the lock body and retain the integrity of the product structure function. In addition, the firmware upgrade method can greatly improve the security of data in the electronic lock.
  • FIG. 1 shows a schematic diagram of a firmware upgrade network of an electronic lockout device in accordance with an embodiment of the present disclosure.
  • Figure 2 shows a schematic appearance of an electronic lockout device.
  • FIG. 3 illustrates a structural block diagram of an electronic lock device in accordance with an embodiment of the present disclosure.
  • FIG. 4 is a signaling diagram of a method of firmware upgrade of the electronically locked device shown in FIG.
  • FIG. 5 shows a flow diagram of an example upgrade process in accordance with an embodiment of the present disclosure.
  • FIG. 1 shows a schematic diagram of a network 100 for firmware upgrade of an electronic lockout device in accordance with an embodiment of the present disclosure.
  • the network 100 includes an electronic lockout device 110, a service server 120, and an upgrade server 130.
  • the service server 120 is used to manage firmware upgrades of numerous electronically locked devices.
  • the service server 120 can set upgrade content, generate an upgrade file, upload the file to the upgrade server, trigger an upgrade notification, and the like.
  • the upgrade server 130 is configured to receive and store the upgrade file from the service server 120 or other devices, and after receiving the upgrade request of the electronic lock device 110, can perform upgrade communication with the electronic lock device 110, and deliver the upgrade file to each Electronic lock device.
  • Both the business server 120 and the upgrade server 130 can be cloud servers or any other type of server system capable of carrying data.
  • a schematic appearance of the electronic lockout device 110 can be as shown in FIG. Apparently, the electronic lock device 110 includes two parts, a lock lever and a lock body, and the electronic lock device 110 is locked to the cargo compartment by passing the lock lever through the buckle or the lock hole of the cargo door in use. on.
  • the lock bar can be made of a flexible material having a diameter on the order of millimeters, such as about 5 mm, for greater flexibility.
  • the identification, barcode or two-dimensional code of the electronic lock device 110 is printed on the lock body, so that the terminal device can obtain the identification information of the electronic lock device 110 by scanning or inputting. It should be understood that the appearance of the electronic lockout device 110 of FIG. 2 is merely exemplary, and in other embodiments of the present disclosure, the electronic lockout device 110 may also have any other possible appearance structure.
  • the decapsulation of the electronic lock device can be implemented by a terminal device, which can be any type of mobile or wired terminal, such as a smart phone, a tablet computer, a notebook computer, or the like.
  • the terminal device communicates with the electronic lock device 110 through a specific communication method.
  • the communication method may be a low power, low cost or short range communication method such as Bluetooth, near field communication, radio frequency identification, and the like.
  • the communication mode may be wired communication.
  • the terminal device can also scan the barcode, the two-dimensional code or the identifier on the electronic lock device 110 to acquire the identification information of the electronic lock device 110.
  • the electronic lock device 110 communicates with the service server 120 and the upgrade server 130 by means of mobile communication, such as 2G, 3G, 4G or 5G cellular communication, WiFi communication, and the like.
  • mobile communication such as 2G, 3G, 4G or 5G cellular communication, WiFi communication, and the like.
  • the electronic lockout device 110 does not directly communicate with the service server 120 and the upgrade server 130, but communicates with the service server 120 and the upgrade server 130 by means of the terminal device, and the communication manner may also be the above move. way of communication.
  • FIG. 3 shows a block diagram of the structure of an electronic lockout device 300 in accordance with an embodiment of the present disclosure.
  • the electronic lockout device 300 can be used as the electronic lockout device 110 in the network 100 shown in FIG.
  • the electronic lockout device 300 includes a first communication unit 310, a processing unit 320, a storage unit 330, and a second communication unit 340.
  • the storage unit 330 and the second communication unit are shown by dashed lines, which means that they are not essential components, and in some embodiments of the present disclosure, the storage unit 330 and the second communication unit 340 may be omitted.
  • the first communication unit 310 is configured to communicate with the service server and the upgrade server.
  • the first communication unit 310 is a mobile communication unit that causes the electronic lockout device 300 to communicate with the service server and the upgrade server via mobile communication.
  • Processing unit 320 can be any type of processor or microprocessor or the like.
  • the processing unit 320 is configured to control the first communication unit 310 to communicate with the service server and the upgrade server, and further implement firmware upgrade of the electronic lock device 300.
  • the storage unit 330 can be any type of data storage unit for storing upgrade parameters, digital signatures, firmware files, and the like received from the server, and can also store pre-stored data, keys, hash values, and the like for performing secure authentication.
  • multiple versions of firmware files can be stored simultaneously in storage unit 330 such that processing unit 320 can invoke one of the firmware files and apply to electronic lock device 300 as needed.
  • the processing unit 320 can control the storage unit 330 to separate the new firmware file from the old firmware file in different storage areas. Stored so that when the electronic lock device 300 is upgraded using the new firmware file, once it is not working properly, the old firmware file can be switched back in time to ensure that the electronic lock device 300 can be in an active state.
  • the second communication unit 340 is configured to communicate with an associated device, which may be, for example, a terminal device, a reader, etc., as described above.
  • the second communication unit 340 may be a short-range communication unit, such as Bluetooth, near field communication, radio frequency identification, etc., and may also be a wired connection communication unit such as a USB interface unit or the like.
  • FIG. 4 shows a signaling diagram of a method 400 of firmware upgrade of the electronic lockout device 300 shown in FIG.
  • the firmware upgrade process is performed between the electronic lock device 300 and the service server 420 and the upgrade server 430, wherein the electronic lock device 300 includes a first communication unit 310 and a processing unit 320.
  • the electronic lock device 300 and the service server 420 and the upgrade server 430 may constitute a firmware upgrade network as shown in FIG. 1.
  • Steps S20, S35, S80, S85, and S90 in FIG. 4 are shown by dashed lines, which means that they are not necessary steps in the firmware upgrade method of the electronic lock device 300.
  • one or more of steps S20, S35, S80, S85, and S90 may be omitted.
  • the electronic lock device 300 receives a firmware upgrade notification from the service server 420. Specifically, the processing unit 320 in the electronic lock device 300 controls the first communication unit 310 to receive a firmware upgrade notification from the service server 420.
  • the firmware upgrade notification includes an upgrade parameter.
  • the upgrade parameter includes at least one of the following: an address of the upgrade server, a port for upgrading, an address of the service server, an identifier of the service server, port information of the service server, and service server verification information.
  • the processing unit 320 processes the parameters received in the firmware upgrade notification.
  • the parameter is an upgrade parameter such that the processing includes matching the received upgrade parameter to the stored upgrade parameter.
  • the stored upgrade parameters are stored in the storage unit 330.
  • the upgrade parameter may be an address of an upgrade server.
  • the upgrade notification is considered to be legal only when the address of the received upgrade server matches one of the upgrade server address lists stored in the storage unit, and then the subsequent upgrade step is performed. This guarantees the security of the upgrade to a certain extent.
  • the method proceeds to S30 to send a firmware upgrade request to the upgrade server 430.
  • the method proceeds to S35, and a message rejecting the upgrade is sent to the service server 420.
  • the parameter may be version information indicating the version to be upgraded to.
  • the processing includes comparing the received version information with current firmware version information.
  • the firmware upgrade request is sent to the upgrade server 430 only when the version indicated in the received version information is updated than the current firmware version. Otherwise, the method proceeds to S35, and a message rejecting the upgrade is sent to the service server 420.
  • communication between the electronic lockout device 300 and the upgrade server 430 is by encryption.
  • the electronic lockout device 300 may include a public key for encrypting the communication in the firmware upgrade request sent to the upgrade server 430 (eg, in accordance with any of the national secret algorithms SM1-SM4)
  • a public key for encrypting the communication in the firmware upgrade request sent to the upgrade server 430
  • a public key and an encryption device ID are enabled to enable the upgrade server 430 to perform key agreement with the electronic lock device 300 for the firmware upgrade process.
  • the key agreement process is implemented by the national secret algorithm, in other embodiments, it can also be performed by any other key negotiation algorithm that enables the two parties to determine the communication key, such as Diffie-Hellman. Key negotiation algorithm.
  • the electronic lockout device 300 receives a firmware upgrade response from the upgrade server 430. Specifically, the processing unit 320 in the electronic lockout device 300 controls the first communication unit 310 to receive a firmware upgrade response from the upgrade server 430.
  • the firmware upgrade response includes a digital signature.
  • the digital signature can be an official digital signature to avoid intrusion of illegal firmware.
  • processing unit 320 verifies the digital signature to determine if the upgrade to be performed is secure.
  • the electronic lock device 300 transmits a firmware upgrade confirmation message to the upgrade server 430, confirming that the firmware upgrade can be performed.
  • the processing unit 320 of the electronic lock device 300 controls the first communication unit 310 to send a firmware upgrade confirmation message to the upgrade server 430.
  • the verification of the digital signature is performed using a public key as described above. It should be understood that this verification can also be performed by any other suitable digital signature verification method.
  • processing unit 320 prior to entering S60, processing unit 320 also determines whether electronic lock device 300 is currently in an idle period. And, only when it is judged that the electronic lock device 300 is in the idle period, the process proceeds to S60.
  • the processing unit 320 may suspend execution of the method, and when the electronic lockout device 300 enters the idle period, it proceeds to S60.
  • Processing unit 320 can implement this functionality by setting a timer.
  • the processing unit 320 may control the first communication unit 310 to transmit idle period information to the upgrade server 430, the idle period information.
  • the time period in which the upgrade server 430 is instructed to transmit the upgrade data including the firmware file to the electronic lock device 300 is instructed.
  • the upgrade server 430 can arrange appropriate upgrade data transmission for each electronic lock device according to the idle time information fed back from each electronic lock device and combined with its hardware and/or network conditions when upgrading the large number of electronic lock devices 300. schedule. In a further embodiment, the upgrade server 430 can also send an upgrade data transmission schedule to the associated electronic lockout device 300 and confirm the schedule or schedule after obtaining an acknowledgement from the electronic lockout device. The section is scheduled.
  • the method may proceed to S60, that is, the processing unit 320 sends a firmware upgrade confirmation message to the upgrade server 430 to the control first communication unit 310. .
  • This enables the electronic lock device 300 to receive the upgrade data from the upgrade server 430 in the following step S70.
  • the first storage area and the second storage area for storing the upgrade data may be set in the storage unit 330 of the electronic lock device 300 such that if it is previously determined that the electronic lock device 300 is in the idle period, the received The upgrade data is stored to the first storage area, otherwise it is stored to the second storage area.
  • the electronic lock device 300 receives the upgrade data from the upgrade server 430. Specifically, the processing unit 320 of the electronic lockout device 300 controls the first communication unit 310 to receive upgrade data from the upgrade server 430.
  • the upgrade data includes firmware files and integrity data.
  • the firmware file is a file used to perform firmware upgrade of the electronic lock device 300.
  • the integrity data includes a checksum value for a cyclic redundancy check (CRC), such as a CRC-16 check value.
  • CRC cyclic redundancy check
  • the method then proceeds to S80 where integrity verification and hash value verification are performed. It should be noted that although two verifications are shown here, in other embodiments, only one of integrity verification and hash value verification may be performed.
  • the electronic lockout device 300 performs the following operations:
  • the received integrity data is compared to the calculated integrity data.
  • processing unit 320 of electronic lockout device 300 calculates integrity data from the firmware file and compares the received integrity data to the calculated integrity data.
  • step S90 If the two are consistent, it indicates that the integrity verification is passed, and the process proceeds to step S90. If the two are inconsistent, the process proceeds to S85, and an upgrade failure message is sent to the service server 420.
  • the electronic lock device 300 performs the following operations:
  • the first hash digest value is compared to the second hash digest value.
  • the process proceeds to S90, and the electronic lock device 300 is firmware upgraded. Otherwise, the process proceeds to S85, and an upgrade failure message is sent to the service server 420.
  • the operation of deriving the first hash digest value from the digital signature may be performed using the public key described above.
  • the first hash digest value can be derived from the digital signature by using the public key.
  • the received firmware file for the upgrade and the old firmware file before the upgrade may be stored separately in the electronic lock device, and the two firmware files are backed up each other.
  • the method 400 may further include: determining whether the electronic lock device is capable of normal operation; and using the old firmware file pair under the condition that the electronic lock device is not operating normally The electronic lock device is restored. This ensures that the electronic lock device will not be in a state of being inoperable.
  • the firmware upgrade process may be directed to an associated device that communicates with the electronic lockout device 300 via the second communication unit 340, not only for the electronic lockout device 300.
  • the upgrade data also includes firmware upgrade data for the associated device.
  • the electronic lockout device 300 also transmits the entire upgrade data or firmware upgrade data for the associated device to the associated device to implement a firmware upgrade of the associated device.
  • FIG. 5 shows a flow diagram of an example upgrade process in accordance with an embodiment of the present disclosure.
  • the process begins at S510, where the service server sends a firmware upgrade notification to the electronically locked device.
  • the service server is fed back to wait for the upgrade, and related data such as IP, port number, and new version number are recorded.
  • the electronic lock device receives an upgrade response from the upgrade server.
  • the process proceeds to S526, and the upgrade update command is sent to the upgrade server and the upgrade data of the memory record is erased.
  • the process proceeds to S528, and the total number of packages of the new firmware file, the CRC-16 check value of the new firmware file, and the memory are written. Further, in S530, a new firmware file is received and the following operations are performed: 1. Recording the packet sequence number and storing it in the memory; 2. Calculating the CRC-16 check value and storing it in the memory; 3. Writing the data to the specified flash address according to the rule .
  • the electronic lockout device compares the received CRC check value with the calculated CRC check value.
  • the firmware upgrade method can greatly improve the security of data in the electronic lock.
  • aspects of the embodiments disclosed herein may be implemented in an integrated circuit as a whole or in part, as one or more of one or more computers running on one or more computers.
  • a computer program eg, implemented as one or more programs running on one or more computer systems
  • implemented as one or more programs running on one or more processors eg, implemented as one or One or more programs running on a plurality of microprocessors, implemented as firmware, or substantially in any combination of the above, and those skilled in the art, in accordance with the present disclosure, will be provided with design circuitry and/or write software and / or firmware code capabilities.
  • signal bearing media include, but are not limited to, recordable media such as floppy disks, hard drives, compact disks (CDs), digital versatile disks (DVDs), digital tapes, computer memories, and the like; and transmission-type media such as digital and / or analog communication media (eg, fiber optic cable, waveguide, wired communication link, wireless communication link, etc.).

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Stored Programmes (AREA)

Abstract

一种电子关锁设备(110)及其固件升级方法。所述方法包括:接收来自业务服务器(120)的固件升级通知,所述固件升级通知包括升级参数;根据升级参数,向升级服务器(130)发送固件升级请求;从升级服务器(130)接收固件升级响应,所述固件升级响应包括数字签名;对所述数字签名进行验证,以确定是否进行升级;在所述数字签名通过验证的条件下,向升级服务器(130)发送升级确认;从升级服务器(130)接收包括固件文件的升级数据。

Description

电子关锁设备及其固件升级方法 技术领域
本公开涉及物流监管领域,具体地涉及一种电子关锁设备及其固件升级方法。
背景技术
在海关通关等领域中,需要防止所运输的或待查验的物品(例如,集装箱)在未经允许的情况下被打开,从而保证物品不被偷换为违禁品。电子关锁是一种常用的选择。
在电子关锁的使用过程中,随着系统功能的升级,需要不断对电子关锁的固件进行升级。目前,市场上没有提供对大规模关锁进行业务升级的解决方案。此外,目前的电子关锁没有考虑到在升级过程中的安全性问题。如果在固件升级的过程中出现电子关锁数字签名的泄露,则可能对货厢的安全性带来严重的威胁。此外,如果升级过程出现意外情况,现有技术也无法快速解决升级的故障。
发明内容
本公开提出了一种电子关锁设备及其固件升级方法。
根据本公开的一个方面,提出了一种电子关锁设备的固件升级方法。所述方法包括:接收来自业务服务器的固件升级通知,所述固件升级通知包括升级参数;根据升级参数,向升级服务器发送固件升级请求;从升级服务器接收固件升级响应,所述固件升级响应包括数字签名;对所述数字签名进行验证,以确定是否进行升级;在所述数字签名通过验证的条件下,向升级服务器发送升级确认;从升级服务器接收包括固件文件的升级数据。
在一个实施例中,所述升级数据包括固件文件和完整性数据。所述方法还包括:根据所述固件文件计算完整性数据;将所接收的完整性数据与所计算的完整性数据进行比较;在所接收的完整性数据与所计算的完整性数据一致的条件下,使用所述固件文件对所述电子关锁设备进行固件升级。
在一个实施例中,所述方法还包括:从所述数字签名导出第一散列摘要值;对所述固件文件进行散列运算,导出第二散列摘要值;将第一散列摘要值与第二 散列摘要值进行比较;在第一散列摘要值与第二散列摘要值相同的条件下,使用所述固件文件对所述电子关锁设备进行固件升级。
在一个实施例中,所述根据升级参数向升级服务器发送固件升级请求的步骤包括:将所接收的升级参数与所存储的升级参数进行匹配;在实现匹配的条件下,向升级服务器发送固件升级请求。
在一个实施例中,所述升级参数包括以下各项中的至少一项:升级服务器的地址、用于升级的端口、业务服务器的地址、业务服务器的标识、业务服务器的端口信息和业务服务器验证信息。
在一个实施例中,所述固件升级通知还包括指示将要升级到的版本的版本信息。所述方法还包括:根据所述版本信息,确定是否需要进行升级。
在一个实施例中,在向所述升级服务器发送升级确认之前,所述方法还包括:判断是否处于空闲时段;在处于空闲时段的条件下,向所述升级服务器发送升级确认。
在一个实施例中,在电子关锁设备不处于空闲时段的条件下,向所述升级服务器发送空闲时段信息,所述空闲时段信息指示所述升级服务器可以向所述电子关锁设备发送包括固件文件的升级数据的时段。
在一个实施例中,所述方法还包括:在所述电子关锁设备不处于空闲时段的条件下,向所述升级服务器发送所述升级确认;以及在从升级服务器接收包括固件文件的升级数据之后,在所述电子关锁设备处于空闲时段的条件下,将所述升级数据存储在所述电子关锁设备的存储单元的第一存储区域,以及在所述电子关锁设备不处于空闲时段的条件下,将所述升级数据存储在所述电子关锁设备的存储单元的与第一存储区域不同的第二存储区域。
在一个实施例中,所述方法还包括:将所接收的固件文件与升级前的旧固件文件独立存储在所述电子关锁设备中;在使用所接收的固件文件对电子关锁设备进行升级之后,判断电子关锁设备是否能够正常操作;在所述电子关锁设备不能正常操作的条件下,使用所述旧固件文件对所述电子关锁设备进行恢复。
在一个实施例中,所述电子关锁设备还与关联设备连接,并且所述升级数据还包括针对所述关联设备的固件升级数据,所述方法还包括:将所述升级数据或针对所述关联设备的固件升级数据发送到所述关联设备。
在一个实施例中,所述电子关锁设备通过近程通信或有线通信与关联设备进 行通信。
在一个实施例中,所述电子关锁设备通过移动通信与业务服务器和升级服务器进行通信。
在一个实施例中,所述完整性数据包括循环冗余校验(CRC)的校验值。
根据本公开的另一方面,还提出了一种电子关锁设备。所述电子关锁设备包括:第一通信单元,用于与业务服务器和升级服务器进行通信;处理单元,被配置为执行以下操作:控制所述第一通信单元接收来自业务服务器的固件升级通知,所述固件升级通知包括升级参数;对所述升级参数进行处理,并基于处理结果,控制所述第一通信单元向升级服务器发送固件升级请求;控制所述第一通信单元从升级服务器接收固件升级响应,所述固件升级响应包括数字签名;对所述数字签名进行验证,以确定所述升级是否安全;在所述数字签名通过验证的条件下,控制所述第一通信单元向升级服务器发送升级确认;控制所述第一通信单元从升级服务器接收包括固件文件的升级数据。
在一个实施例中,所述升级数据还包括完整性数据。所述处理单元还被配置为:根据所述固件文件计算完整性数据;将所接收的完整性数据与所计算的完整性数据进行比较;在所接收的完整性数据与所计算的完整性数据一致的条件下,使用所述固件文件对所述电子关锁设备进行固件升级。
在一个实施例中,所述处理单元还被配置为:从所述数字签名导出第一散列摘要值;对所述固件文件进行散列运算,导出第二散列摘要值;将第一散列摘要值与第二散列摘要值进行比较;在第一散列摘要值与第二散列摘要值相同的条件下,使用所述固件文件对所述电子关锁设备进行固件升级。
在一个实施例中,所述电子关锁设备还包括存储单元,所述处理单元还被配置为:将所接收的升级参数与存储单元中存储的升级参数进行匹配;在实现匹配的条件下,控制所述第一通信单元向升级服务器发送固件升级请求。
在一个实施例中,所述固件升级通知还包括指示将要升级到的版本的版本信息,所述处理单元还被配置为:根据所述版本信息,确定是否需要进行升级。
在一个实施例中,所述处理单元还被配置为:判断是否处于空闲时段;在处于空闲时段的条件下,控制所述第一通信单元向所述升级服务器发送升级确认。
在一个实施例中,所述处理单元还被配置为:在所述电子关锁设备不处于空闲时段的条件下,向所述升级服务器发送所述升级确认;以及在控制所述第一通 信单元从升级服务器接收包括固件文件的升级数据之后,在所述电子关锁设备处于空闲时段的条件下,将所述升级数据存储在所述电子关锁设备的存储单元的第一存储区域,以及在所述电子关锁设备不处于空闲时段的条件下,将所述升级数据存储在所述电子关锁设备的存储单元的与第一存储区域不同的第二存储区域。
在一个实施例中,所述处理单元还被配置为:将所接收的固件文件与升级前的旧固件文件独立存储在所述电子关锁设备中;在使用所接收的固件文件对电子关锁设备进行升级之后,判断电子关锁设备是否能够正常操作;在所述电子关锁设备不能正常操作的条件下,使用所述旧固件文件对所述电子关锁设备进行恢复。
在一个实施例中,所述电子关锁设备还包括第二通信单元。所述第二通信单元用于与关联设备进行通信。所述升级数据还包括针对所述关联设备的固件升级数据。所述处理单元还被配置为:控制所述第二通信单元将所述升级数据或针对所述关联设备的固件升级数据发送到所述关联设备。
在一个实施例中,所述第二通信单元是近程通信单元或有线通信单元。
在一个实施例中,所述第一通信单元是移动通信单元。
通过使用本公开所提出的电子关锁设备及其固件升级方法,可以批量对电子关锁设备进行远程无线升级,提高工作效率。并且,能够避免对锁体进行拆解,保留产品结构功能的完整性。此外,所述固件升级方法还能够大大提高电子关锁内数据的安全性。
附图说明
此处所说明的附图用来提供对本公开的进一步理解,构成本公开的一部分,本公开的示意性实施例及其说明用于解释本公开,并不构成对本公开的不当限定。在附图中:
图1示出了根据本公开实施例的电子关锁设备的固件升级网络的示意图。
图2示出了电子关锁设备的示意外观。
图3示出了根据本公开实施例的电子关锁设备的结构框图。
图4示出了对图3所示的电子关锁设备进行固件升级的方法的信令图。
图5示出了根据本公开实施例的示例升级流程的流程图。
具体实施方式
下面将详细描述本公开的具体实施例,应当注意,这里描述的实施例只用于举例说明,并不用于限制本公开。在以下描述中,为了提供对本公开的透彻理解,阐述了大量特定细节。然而,对于本领域普通技术人员显而易见的是:不必采用这些特定细节来实行本公开。在其他实例中,为了避免混淆本公开,未具体描述公知的电路、材料或方法。
在整个说明书中,对“一个实施例”、“实施例”、“一个示例”或“示例”的提及意味着:结合该实施例或示例描述的特定特征、结构或特性被包含在本公开至少一个实施例中。因此,在整个说明书的各个地方出现的短语“在一个实施例中”、“在实施例中”、“一个示例”或“示例”不一定都指同一实施例或示例。此外,可以以任何适当的组合和/或子组合将特定的特征、结构或特性组合在一个或多个实施例或示例中。此外,本领域普通技术人员应当理解,在此提供的附图都是为了说明的目的,并且附图不一定是按比例绘制的。这里使用的术语“和/或”包括一个或多个相关列出的项目的任何和所有组合。
以下参考附图对本公开进行具体描述。
首先,图1示出了根据本公开实施例的对电子关锁设备进行固件升级的网络100的示意图。
如图1所示,网络100包括电子关锁设备110、业务服务器120和升级服务器130。
业务服务器120用于对众多电子关锁设备的固件升级进行管理。业务服务器120能够设置升级内容、生成升级文件、将文件上传到升级服务器、触发升级通知等。
升级服务器130用于从业务服务器120或其他设备接收并存储升级文件,并且在接收到电子关锁设备110的升级请求后,能够与电子关锁设备110进行升级通信,将升级文件下发到各个电子关锁设备。
业务服务器120和升级服务器130都可以是云服务器或其他任何类型的能够承载数据的服务器系统。
电子关锁设备110的示意外观可如图2所示。从外观上看,电子关锁设备110包括锁杆和锁主体两部分,在使用时通过将锁杆穿过货厢门的扣环或锁孔来 将电子关锁设备110锁附于货厢之上。锁杆可以采用柔性材料制成,其直径为毫米量级,比如约5毫米,从而具有更强的适应性。锁主体上印刷有电子关锁设备110的标识、条形码或二维码,从而可以使终端设备通过扫码或输入来获取电子关锁设备110的标识信息。应该理解但是,图2中的电子关锁设备110的外观只是示例性的,在本公开的其他实施例中,电子关锁设备110还可以具有任何其他可行的外观结构。
电子关锁设备的施解封可以通过终端设备来实现,其可以是任何类型的移动或有线终端,比如智能手机、平板电脑、笔记本电脑等。终端设备通过特定的通信方式与电子关锁设备110进行通信。在一个实施例中,通信方式可以为低功耗、低成本或近距离通信方式,比如蓝牙、近场通信、射频识别等。在另一实施例中,所述通信方式可以为有线通信。如上所述,终端设备还能够对电子关锁设备110上的条形码、二维码或标识符进行扫描,以获取电子关锁设备110的标识信息。
电子关锁设备110通过移动通信方式与业务服务器120和升级服务器130进行通信,比如2G、3G、4G或5G蜂窝通信、WiFi通信等。
在另一实施例中,电子关锁设备110不与业务服务器120和升级服务器130直接进行通信,而是借助于终端设备与业务服务器120和升级服务器130进行通信,其通信方式同样可以是上述移动通信方式。
图3示出了根据本公开实施例的电子关锁设备300的结构框图。电子关锁设备300可以用作图1所示的网络100中的电子关锁设备110。
从图3可见,所述电子关锁设备300包括第一通信单元310、处理单元320、存储单元330和第二通信单元340。在图3中,存储单元330和第二通信单元通过虚线示出,这表示它们并不是必要组件,在本公开的一些实施例中,可以将存储单元330和第二通信单元340省略。
第一通信单元310用于与业务服务器和升级服务器进行通信。在一个实施例中,第一通信单元310是移动通信单元,它使得电子关锁设备300通过移动通信方式与业务服务器和升级服务器进行通信。
处理单元320可以是任何类型的处理器或微处理器等。处理单元320用于控制第一通信单元310与业务服务器和升级服务器进行通信,并进而实现对电子关锁设备300的固件升级。
存储单元330可以是任何类型的数据存储单元,其用于存储从服务器接收的升级参数、数字签名和固件文件等,还可存储用于进行安全验证的预存数据、密钥、散列值等。
在一个实施例中,存储单元330中能够同时存储多个版本的固件文件,使得处理单元320能够根据需要调用其中一个固件文件并应用于电子关锁设备300。举例来讲,在从服务器下载了新的固件文件以用于对电子关锁设备进行固件升级的情况中,处理单元320可以控制存储单元330在不同的存储区域将新固件文件与旧固件文件独立地存储,从而当使用新的固件文件对电子关锁设备300进行升级后,一旦无法正常操作,则可以及时地切换回旧的固件文件,以保证电子关锁设备300能够处于工作状态。
第二通信单元340用于与关联设备进行通信,所述关联设备可以是例如上文所述的终端设备、阅读器等。第二通信单元340可以是近程通信单元,例如,蓝牙、近场通信、射频识别等,还可以是有线连接通信单元例如USB接口单元等。
图4示出了对图3所示的电子关锁设备300进行固件升级的方法400的信令图。
从图4可见,所述固件升级过程是在电子关锁设备300与业务服务器420以及升级服务器430之间进行的,其中,电子关锁设备300包括第一通信单元310和处理单元320。电子关锁设备300与业务服务器420以及升级服务器430可以构成如图1所示的固件升级网络。图4中的步骤S20、S35、S80、S85和S90通过虚线示出,这表示它们并不是电子关锁设备300的固件升级方法中的必要步骤。在本公开的一些实施例中,可以省略步骤S20、S35、S80、S85和S90中的一个或多个。
首先,在S10中,电子关锁设备300从业务服务器420接收固件升级通知。具体地,电子关锁设备300中的处理单元320控制第一通信单元310从业务服务器420接收固件升级通知。
在一个实施例中,所述固件升级通知包括升级参数。作为示例,所述升级参数包括以下各项中的至少一项:升级服务器的地址、用于升级的端口、业务服务器的地址、业务服务器的标识、业务服务器的端口信息和业务服务器验证信息。
然后,在S20中,处理单元320对所在固件升级通知中接收的参数进行处理。
在一个实施例中,所述参数是升级参数,从而所述处理包括:将所接收的升级参数与所存储的升级参数进行匹配。其中,所存储的升级参数存储在存储单元330中。举例来讲,所述升级参数可以是升级服务器的地址。此时,只有当所接收的升级服务器的地址与存储单元中所存储的升级服务器地址列表中的一项匹配时,才认为所述升级通知是合法的,并进而进行后续升级步骤。这在一定程度上保证了升级的安全性。
具体地,在实现匹配的条件下,所述方法进入S30,向升级服务器430发送固件升级请求。
在没有实现匹配的条件下,所述方法进入S35,向业务服务器420发送拒绝升级的消息。
在另一实施例中,所述参数可以是指示将要升级到的版本的版本信息。从而,所述处理包括:将所接收的版本信息与当前固件版本信息进行比较。
只有在所接收的版本信息中指示的版本比当前固件版本更新时才进入S30,向升级服务器430发送固件升级请求。否则,所述方法进入S35,向业务服务器420发送拒绝升级的消息。
在一个实施例中,电子关锁设备300与升级服务器430之间的通信是通过加密方式进行的。在这一实施例中,一旦确认进行升级,电子关锁设备300在向升级服务器430发送的固件升级请求中可以包括用于加密通信的公钥(例如,符合国密算法SM1-SM4中的任一项的公钥)以及加密设备ID,以使得升级服务器430能够与电子关锁设备300针对此次固件升级过程进行密钥协商。需要指出的是,虽然这里示出了通过国密算法来实现密钥协商过程,但在其他实施例中同样可以通过任何其他能够使双方确定通信密钥的密钥协商算法进行,比如Diffie-Hellman密钥协商算法。
接下来,在S40中,电子关锁设备300从升级服务器430接收固件升级响应。具体地,电子关锁设备300中的处理单元320控制第一通信单元310从升级服务器430接收固件升级响应。
其中,所述固件升级响应包括数字签名。在一个实施例中,数字签名可以是官方数字签名,以避免非法固件的入侵。
然后,在S50中,处理单元320对所述数字签名进行验证,以确定将要进行的升级是否安全。
如果在S50中,数字签名通过验证,则确认将要进行的升级是安全的。从而,在S60中,电子关锁设备300向升级服务器430发送固件升级确认消息,确认可以进行固件升级。具体地,电子关锁设备300的处理单元320控制第一通信单元310向升级服务器430发送固件升级确认消息。
在一个实施例中,所述数字签名的验证是通过使用如上文所述的公钥来进行的。应该理解的是,还可以通过任何其他适当的数字签名验证方法来进行这一验证。
在一个实施例中,在进入S60之前,处理单元320还对电子关锁设备300当前是否处于空闲时段进行判断。并且,只有在判断电子关锁设备300处于空闲时段的情况下,才进入S60。
在一个实施例中,在判断电子关锁设备300没有处于空闲时段的情况下,处理单元320可以暂缓方法的执行,并且在电子关锁设备300进入空闲时段时,再进入S60。处理单元320可以通过设置定时器来实现这一功能。
备选地,在另一实施例中,在判断电子关锁设备300没有处于空闲时段的情况下,处理单元320可以控制第一通信单元310向升级服务器430发送空闲时段信息,所述空闲时段信息指示所述升级服务器430可以向所述电子关锁设备300发送包括固件文件的升级数据的时段。
升级服务器430在对大量电子关锁设备300进行升级时可以根据从各个电子关锁设备反馈的空闲时段信息,并结合其硬件和/或网络条件为每个电子关锁设备安排适当的升级数据发送时间表。在进一步的实施例中,升级服务器430还可以将升级数据发送时间表发送到相关电子关锁设备300,并在得到电子关锁设备的肯定应答后对所述时间表或时间表中经过确认的区段进行排程。
在另一实施例中,即使处理单元320判断电子关锁设备300处于非空闲时段,所述方法也可以进入S60,即处理单元320向控制第一通信单元310向升级服务器430发送固件升级确认消息。这使得电子关锁设备300能够在以下步骤S70中从升级服务器430接收升级数据。此时,可以在电子关锁设备300的存储单元330中设置用于存储升级数据的第一存储区域和第二存储区域,使得如果此前判断电子关锁设备300处于空闲时段,则将所接收的升级数据存储到第一存储区域,否则存储到第二存储区域。
接下来,在S70中,电子关锁设备300从升级服务器430接收升级数据。具 体地,电子关锁设备300的处理单元320控制第一通信单元310从升级服务器430接收升级数据。
在一个实施例中,升级数据包括固件文件和完整性数据。固件文件即用来对电子关锁设备300进行固件升级的文件。完整性数据包括循环冗余校验(CRC)的校验值,例如CRC-16校验值。
然后,所述方法进入S80,其中,进行完整性验证和散列值验证。应该指出的是,虽然这里示出了进行两种验证,但是在其他实施例中,可以只进行完整性验证和散列值验证之一。
关于完整性验证,电子关锁设备300执行以下操作:
根据固件文件计算完整性数据;
将所接收的完整性数据与所计算的完整性数据进行比较。
具体地,电子关锁设备300的处理单元320根据固件文件计算完整性数据,并将所接收的完整性数据与所计算的完整性数据进行比较。
如果二者一致,则表明完整性验证通过,等待进入步骤S90。如果二者不一致,则进入S85,向业务服务器420发送升级失败消息。
关于散列值验证,电子关锁设备300执行以下操作:
从数字签名导出第一散列摘要值;
对所述固件文件进行散列运算,导出第二散列摘要值;
将第一散列摘要值与第二散列摘要值进行比较。
如果二者一致,则进入S90,对电子关锁设备300进行固件升级。否则,进入S85,向业务服务器420发送升级失败消息。
需要指出的是,从数字签名导出第一散列摘要值的操作可以是利用上文所述的公钥进行的。在一个实施例中,可以通过使用所述公钥从数字签名中导出第一散列摘要值。
还可以对升级后的固件版本是否能够正常使用进行考虑。在一个实施例中,如上文所述,所接收的用于升级的固件文件与升级前的旧固件文件可以是独立存储在电子关锁设备中的,并且这两个固件文件互为备份。从而,在固件升级完成后,所述方法400还可以包括以下操作:判断电子关锁设备是否能够正常操作;以及在所述电子关锁设备不能正常操作的条件下,使用所述旧固件文件对所述电子关锁设备进行恢复。这保证了电子关锁设备不会处于无法正常工作的状态。
在一个实施例中,所述固件升级过程不但可以针对电子关锁设备300还可以针对通过第二通信单元340与电子关锁设备300进行通信的关联设备。此时,升级数据中还包括针对所述关联设备的固件升级数据。从而,电子关锁设备300还将整个升级数据或针对关联设备的固件升级数据发送到关联设备,以实现关联设备的固件升级。
图5示出了根据本公开实施例的示例升级流程的流程图。
所述流程开始于S510,其中,业务服务器向电子关锁设备发送固件升级通知。
然后,在S512中,判断升级通知中指示的将要升级到的固件版本号是否比电子关锁设备中的当前固件版本的版本号更高。
如果所指示的版本号并不比当前版本号更高,则进入S515,向业务服务器反馈无需进行固件升级。
如果版本号确实更高,则在S514中向业务服务器反馈等待进行升级,并记录相关数据,比如IP、端口号以及新的版本号等。
然后,在S516中,确定是否符合连接升级服务器的条件。
如果不符合,则进入S518,继续等待。
如果符合则,在S520中连接升级服务器并向其发送升级请求。
然后,在S522中,电子关锁设备从升级服务器接收升级响应。
接下来,在S524中,对升级响应中包括的数字签名进行验证。
如果没有通过验证,则进入S526,向升级服务器发送终止升级指令并擦除存储器记录的升级数据。
如果通过验证,则进入S528,记录新固件文件的总包数、新固件文件的CRC-16校验值并写入存储器。进而在S530中,接收新的固件文件并执行以下操作:1.记录包序号,存入存储器;2.计算CRC-16校验值,存入存储器;3.根据规则将数据写入指定闪存地址。
然后,进入S532,完成升级文件的接收。
接下来,在S534中,电子关锁设备将接收的CRC校验值与计算得到的CRC校验值进行比较。
如果二者一致,则在S536中,向业务服务器反馈升级成功,并清空存储器中的升级信息,设置存储器中的升级标志。最后,在S538中重启电子关锁,完 成固件升级。
如果二者不一致,则在S532中,向业务服务器反馈升级失败。
通过以上提出的电子关锁设备及其固件升级方法,可以批量对电子关锁设备进行远程无线升级,提高工作效率。并且,能够避免对锁体进行拆解,保留产品结构功能的完整性。此外,所述固件升级方法还能够大大提高电子关锁内数据的安全性。
以上的详细描述通过使用示意图、流程图和/或示例,已经阐述了众多实施例。在这种示意图、流程图和/或示例包含一个或多个功能和/或操作的情况下,本领域技术人员应理解,这种示意图、流程图或示例中的每一功能和/或操作可以通过各种结构、硬件、软件、固件或实质上它们的任意组合来单独和/或共同实现。在一个实施例中,本公开的实施例所述主题的若干部分可以通过专用集成电路(ASIC)、现场可编程门阵列(FPGA)、数字信号处理器(DSP)、或其他集成格式来实现。然而,本领域技术人员应认识到,这里所公开的实施例的一些方面在整体上或部分地可以等同地实现在集成电路中,实现为在一台或多台计算机上运行的一个或多个计算机程序(例如,实现为在一台或多台计算机系统上运行的一个或多个程序),实现为在一个或多个处理器上运行的一个或多个程序(例如,实现为在一个或多个微处理器上运行的一个或多个程序),实现为固件,或者实质上实现为上述方式的任意组合,并且本领域技术人员根据本公开,将具备设计电路和/或写入软件和/或固件代码的能力。此外,本领域技术人员将认识到,本公开所述主题的机制能够作为多种形式的程序产品进行分发,并且无论实际用来执行分发的信号承载介质的具体类型如何,本公开所述主题的示例性实施例均适用。信号承载介质的示例包括但不限于:可记录型介质,如软盘、硬盘驱动器、紧致盘(CD)、数字通用盘(DVD)、数字磁带、计算机存储器等;以及传输型介质,如数字和/或模拟通信介质(例如,光纤光缆、波导、有线通信链路、无线通信链路等)。
虽然已参照几个典型实施例描述了本公开,但应当理解,所用的术语是说明和示例性、而非限制性的术语。由于本公开能够以多种形式具体实施而不脱离公开的精神或实质,所以应当理解,上述实施例不限于任何前述的细节,而应在随 附权利要求所限定的精神和范围内广泛地解释,因此落入权利要求或其等效范围内的全部变化和改型都应为随附权利要求所涵盖。

Claims (15)

  1. 一种用于对电子关锁设备的固件升级方法,包括:
    接收来自业务服务器的固件升级通知,所述固件升级通知包括升级参数;
    根据升级参数,向升级服务器发送固件升级请求;
    从升级服务器接收固件升级响应,所述固件升级响应包括数字签名;
    对所述数字签名进行验证,以确定是否进行升级;
    在所述数字签名通过验证的条件下,向升级服务器发送升级确认;
    从升级服务器接收包括固件文件的升级数据。
  2. 根据权利要求1所述的方法,其中,所述升级数据还包括完整性数据,所述方法还包括:
    根据所述固件文件计算完整性数据;
    将所接收的完整性数据与所计算的完整性数据进行比较;
    在所接收的完整性数据与所计算的完整性数据一致的条件下,使用所述固件文件对所述电子关锁设备进行固件升级。
  3. 根据权利要求1所述的方法,其中,所述方法还包括:
    从所述数字签名导出第一散列摘要值;
    对所述固件文件进行散列运算,导出第二散列摘要值;
    将第一散列摘要值与第二散列摘要值进行比较;
    在第一散列摘要值与第二散列摘要值相同的条件下,使用所述固件文件对所述电子关锁设备进行固件升级。
  4. 根据权利要求1所述的方法,其中,所述根据升级参数向升级服务器发送固件升级请求的步骤包括:
    将所接收的升级参数与所存储的升级参数进行匹配;
    在实现匹配的条件下,向升级服务器发送固件升级请求。
  5. 根据权利要求1所述的方法,其中,在向所述升级服务器发送升级确认之前,所述方法还包括:
    判断所述电子关锁设备是否处于空闲时段;
    在所述电子关锁设备处于空闲时段的条件下,向所述升级服务器发送升级确认。
  6. 根据权利要求5所述的方法,还包括:
    在所述电子关锁设备不处于空闲时段的条件下,向所述升级服务器发送空闲时段信息,所述空闲时段信息指示所述电子关锁设备可以接收包括固件文件的升级数据的时段。
  7. 根据权利要求5所述的方法,还包括:
    在所述电子关锁设备不处于空闲时段的条件下,向所述升级服务器发送所述升级确认;以及
    在从升级服务器接收包括固件文件的升级数据之后,
    在所述电子关锁设备处于空闲时段的条件下,将所述升级数据存储在所述电子关锁设备的存储单元的第一存储区域,以及
    在所述电子关锁设备不处于空闲时段的条件下,将所述升级数据存储在所述电子关锁设备的存储单元的与第一存储区域不同的第二存储区域。
  8. 根据权利要求1所述的方法,其中,所述方法还包括:
    将所接收的固件文件与升级前的旧固件文件独立存储在所述电子关锁设备中;
    在使用所接收的固件文件对电子关锁设备进行升级之后,判断电子关锁设备是否能够正常操作;
    在所述电子关锁设备不能正常操作的条件下,使用所述旧固件文件对所述电子关锁设备进行恢复。
  9. 一种电子关锁设备,包括:
    通信单元,用于与业务服务器和升级服务器进行通信;
    处理单元,被配置为执行以下操作:
    控制所述第一通信单元接收来自业务服务器的固件升级通知,所述固件升级通知包括升级参数;
    对所述升级参数进行处理,并基于处理结果,控制所述第一通信单元向升级服务器发送固件升级请求;
    控制所述第一通信单元从升级服务器接收固件升级响应,所述固件升级响应包括数字签名;
    对所述数字签名进行验证,以确定是否进行升级;
    在所述数字签名通过验证的条件下,控制所述第一通信单元向升级服务器发 送升级确认;
    控制所述第一通信单元从升级服务器接收包括固件文件的升级数据。
  10. 根据权利要求9所述的电子关锁设备,其中,所述升级数据还包括完整性数据,所述处理单元还被配置为:
    根据所述固件文件计算完整性数据;
    将所接收的完整性数据与所计算的完整性数据进行比较;
    在所接收的完整性数据与所计算的完整性数据一致的条件下,使用所述固件文件对所述电子关锁设备进行固件升级。
  11. 根据权利要求9所述的电子关锁设备,其中,所述处理单元还被配置为:
    从所述数字签名导出第一散列摘要值;
    对所述固件文件进行散列运算,导出第二散列摘要值;
    将第一散列摘要值与第二散列摘要值进行比较;
    在第一散列摘要值与第二散列摘要值相同的条件下,使用所述固件文件对所述电子关锁设备进行固件升级。
  12. 根据权利要求9所述的电子关锁设备,其中,所述电子关锁设备还包括存储单元,并且所述处理单元还被配置为,在对所述升级参数进行处理的操作中:
    将所接收的升级参数与存储单元中存储的升级参数进行匹配;
    在实现匹配的条件下,控制所述第一通信单元向升级服务器发送固件升级请求。
  13. 根据权利要求9所述的电子关锁设备,其中,所述处理单元还被配置为:
    判断所述电子关锁设备是否处于空闲时段;
    在所述电子关锁设备处于空闲时段的条件下,控制所述第一通信单元向所述升级服务器发送升级确认。
  14. 根据权利要求13所述的电子关锁设备,其中,所述处理单元还被配置为:
    在所述电子关锁设备不处于空闲时段的条件下,向所述升级服务器发送所述升级确认;以及
    在控制所述第一通信单元从升级服务器接收包括固件文件的升级数据之后,
    在所述电子关锁设备处于空闲时段的条件下,将所述升级数据存储在所述电子关锁设备的存储单元的第一存储区域,以及
    在所述电子关锁设备不处于空闲时段的条件下,将所述升级数据存储在所述 电子关锁设备的存储单元的与第一存储区域不同的第二存储区域。
  15. 根据权利要求9所述的电子关锁设备,其中,所述处理单元还被配置为:
    将所接收的固件文件与升级前的旧固件文件独立存储在所述电子关锁设备中;
    在使用所接收的固件文件对电子关锁设备进行升级之后,判断电子关锁设备是否能够正常操作;
    在所述电子关锁设备不能正常操作的条件下,使用所述旧固件文件对所述电子关锁设备进行恢复。
PCT/CN2018/115434 2017-11-23 2018-11-14 电子关锁设备及其固件升级方法 WO2019100988A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201711187300.5 2017-11-23
CN201711187300.5A CN109828767A (zh) 2017-11-23 2017-11-23 电子关锁设备及其固件升级方法

Publications (1)

Publication Number Publication Date
WO2019100988A1 true WO2019100988A1 (zh) 2019-05-31

Family

ID=66631818

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/115434 WO2019100988A1 (zh) 2017-11-23 2018-11-14 电子关锁设备及其固件升级方法

Country Status (2)

Country Link
CN (1) CN109828767A (zh)
WO (1) WO2019100988A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111225056A (zh) * 2020-01-07 2020-06-02 杭州涂鸦信息技术有限公司 一种基于ota的智能门锁升级方法及系统
CN111901142B (zh) * 2020-06-17 2023-11-07 厦门亿联网络技术股份有限公司 一种用于嵌入式设备集群的固件静默升级方法及装置
CN112988691A (zh) * 2021-03-31 2021-06-18 深圳市优必选科技股份有限公司 一种基于嵌入式系统的文件更新方法、装置及终端设备

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101867694A (zh) * 2010-05-21 2010-10-20 中兴通讯股份有限公司 交互式网络电视iptv机顶盒的升级方法及系统
CN106572372A (zh) * 2016-11-14 2017-04-19 青岛海信宽带多媒体技术有限公司 一种机顶盒升级方法及机顶盒
CN106648669A (zh) * 2016-12-26 2017-05-10 广东芬尼克兹节能设备有限公司 产品设备远程固件升级方法及系统
CN107122207A (zh) * 2017-04-12 2017-09-01 青岛海信移动通信技术股份有限公司 软件升级方法、客户端设备及服务器

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101901318B (zh) * 2010-07-23 2011-11-30 北京工业大学 一种可信硬件设备及其使用方法
US20160196132A1 (en) * 2014-07-07 2016-07-07 Symphony Teleca Corporation Remote Embedded Device Update Platform Apparatuses, Methods and Systems
CN104166565B (zh) * 2014-08-11 2017-10-17 成都瑞博慧窗信息技术有限公司 一种智能显示终端固件升级方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101867694A (zh) * 2010-05-21 2010-10-20 中兴通讯股份有限公司 交互式网络电视iptv机顶盒的升级方法及系统
CN106572372A (zh) * 2016-11-14 2017-04-19 青岛海信宽带多媒体技术有限公司 一种机顶盒升级方法及机顶盒
CN106648669A (zh) * 2016-12-26 2017-05-10 广东芬尼克兹节能设备有限公司 产品设备远程固件升级方法及系统
CN107122207A (zh) * 2017-04-12 2017-09-01 青岛海信移动通信技术股份有限公司 软件升级方法、客户端设备及服务器

Also Published As

Publication number Publication date
CN109828767A (zh) 2019-05-31

Similar Documents

Publication Publication Date Title
JP6438113B2 (ja) 認証のための無線鍵管理
US9450947B2 (en) Apparatus and method for securing a debugging session
EP3889766B1 (en) Secure firmware upgrade method, device, on-board system, and vehicle
US9189642B2 (en) Safe processing of on-demand delete requests
JP6492162B2 (ja) ロック装置のための位置追跡
TWI384381B (zh) 升級記憶卡使其具有防止安全內容及應用之複製之安全性機制
JP6633228B2 (ja) 暗号を伴うデータセキュリティシステム
WO2019100988A1 (zh) 电子关锁设备及其固件升级方法
KR102540090B1 (ko) 전자 장치 및 그의 전자 키 관리 방법
WO2022127146A1 (zh) 车载服务授权激活方法、装置及车辆
US20080189695A1 (en) Updating of Data Instructions
TWI390938B (zh) 認證裝置以及認證方法
US11409872B2 (en) Confirming a version of firmware loaded to a processor-based device
JPWO2008004525A1 (ja) 情報処理装置、情報記録装置、情報処理システム、プログラムアップデート方法、プログラムおよび集積回路
US9471808B2 (en) File management system and method
CN109982308A (zh) 一种通过nfc通讯进行门锁固件升级的方法及其系统
TWI402715B (zh) 應用程式保護系統及方法
TW201537386A (zh) 具存取安全的資訊處理系統、方法、及電腦程式產品
US10382201B1 (en) Removable circuit for unlocking self-encrypting data storage devices
US20070266240A1 (en) Processing device constituting an authentication system, authentication system, and the operation method thereof
CN115915131B (zh) 车辆钥匙双向加密认证方法、系统、车辆绑定装置及nfc卡
TWI783216B (zh) 電子鎖及其控制方法
US20210405601A1 (en) Remote resetting to factory default settings; a method and a device
CN114255533A (zh) 智能锁系统及其实现方法
JP4885168B2 (ja) 外部メディア制御方法、システム及び装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18881128

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18881128

Country of ref document: EP

Kind code of ref document: A1