OTA upgrading device based on MQTT protocol

By introducing technologies such as security verification module, upgrade package management module and upgrade policy module in the OTA upgrade device, the problem of insufficient security and scalability of the MQTT protocol is solved, and an efficient and secure OTA upgrade process is achieved, suitable for large-scale device groups .

CN119233250AInactive Publication Date: 2024-12-31CHANGXING TAIHU ELECTRIC CORP

Patent Information

Application Number
CN202411772878.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-04
Publication Date
2024-12-31
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing OTA upgrade devices based on the MQTT protocol are weak in security, are vulnerable to man-in-the-middle attacks and malicious tampering, and are insufficient in scalability, making it difficult to effectively manage OTA upgrades of large-scale device groups.

Method used

An OTA upgrade device based on MQTT protocol was designed, including security verification module, upgrade package management module, communication protocol module, equipment management module and upgrade policy module, using technical encryption, digital signature, secure transmission protocol, differential upgrade, batch upgrade and other technologies such as intelligent scheduling ensure the security and efficient distribution of upgrade packages.

Benefits of technology

It improves the security and scalability of OTA upgrades, ensures the integrity and security of device firmware, is suitable for OTA upgrades of large-scale device groups, and provides efficient and reliable upgrade strategies and distribution mechanisms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119233250A_ABST
    Figure CN119233250A_ABST
Patent Text Reader

Abstract

The invention discloses an OTA upgrade device based on an MQTT protocol, which relates to the technical field of mobile communication and comprises a security verification module, an upgrade package management module, a communication protocol module, an equipment management module and an upgrade strategy module. The OTA upgrading device based on the MQTT protocol has extremely high security, not only can realize OTA upgrading based on the MQTT protocol, but also is relatively high in security, so that the OTA upgrading process is not easy to be maliciously tampered or replaced, and equipment firmware damage and malicious code introduction caused by tampering and replacement can be avoided. Besides, the OTA upgrading device is relatively good in expansibility, has an efficient and reliable upgrading strategy and a distribution mechanism, can be well applied to OTA upgrading of a large-scale equipment group, obtains relatively good upgrading experience, and can adapt to the development trend that the number of Internet of Things equipment is continuously increased.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of mobile communication technology, and in particular to an OTA upgrade device based on the MQTT protocol. Background Art

[0002] OTA, or Over-the-Air, is a wireless remote upgrade technology. OTA technology enables remote management of mobile terminal devices and SIM card data through the air interface of mobile communications. This technology allows devices to receive and install the latest software or firmware through wireless networks while connected to the Internet. At present, OTA technology is very mature and widely used in various smart device fields. OTA upgrade refers to an operation of remotely updating devices through wireless networks using OTA technology. Specifically, it means that the device automatically or manually downloads and installs the latest software or firmware while connected to the Internet, thereby enhancing, repairing or optimizing device functions.

[0003] An OTA upgrade device based on the MQTT protocol is a device that uses the MQTT protocol to remotely upgrade device firmware or software. This device communicates with the device through the MQTT protocol to download, install, and verify the upgrade package. As a lightweight message transmission protocol, the MQTT protocol has been widely used in the field of the Internet of Things. Its low power consumption, low overhead, and high reliability make it an ideal choice for OTA upgrades.

[0004] However, in actual use, due to the relatively weak security of the MQTT protocol itself, it is vulnerable to security threats such as man-in-the-middle attacks and injection attacks. As a result, during the OTA upgrade process, the upgrade package may not be strictly verified or encrypted, leading to malicious tampering or replacement, thereby causing damage to the device firmware or the introduction of malicious code. In addition, as the number of IoT devices continues to increase, the scalability of existing OTA upgrade devices is obviously insufficient, and there is a lack of efficient and reliable upgrade strategies and distribution mechanisms. In particular, for OTA upgrades of large-scale device groups, the application effect is extremely poor.

[0005] Therefore, it is urgent to improve this shortcoming. The present invention studies and improves the existing technology and its shortcomings, and provides an OTA upgrade device based on the MQTT protocol. Summary of the invention

[0006] The purpose of the present invention is to provide an OTA upgrade device based on the MQTT protocol to solve the problems raised in the above background technology.

[0007] To achieve the above object, the present invention provides the following technical solution: an OTA upgrade device based on the MQTT protocol, comprising the following modules: A security verification module, which is responsible for verifying the upgrade package to ensure that the upgrade package is not tampered with or replaced during transmission; An upgrade package management module, which is responsible for the upload, storage, distribution and version management of upgrade packages to track and manage upgrade packages of different versions; Communication protocol module, which is responsible for implementing MQTT communication between the device and the server, including request, receipt and confirmation of upgrade packages; A device management module, which is responsible for managing the upgrade status, progress and results of the device to ensure that the device is upgraded according to the predetermined plan; The upgrade strategy module is responsible for formulating and implementing efficient upgrade strategies to ensure that the device can complete the upgrade quickly and stably.

[0008] Furthermore, the security verification module specifically includes the following submodules: Technical encryption submodule: Use symmetric encryption or asymmetric encryption technology to encrypt the upgrade package to ensure that only authorized devices or servers can decrypt and access the upgrade package; Digital signature submodule: digitally signs the upgrade package and verifies it at the receiving end to ensure the integrity of the upgrade package and the authenticity of its source; Secure transmission protocol submodule: such as HTTPS, used to securely transmit upgrade packages between the device and the server.

[0009] Furthermore, the upgrade package management module specifically includes the following submodules: Upload submodule: responsible for receiving and verifying the upgrade package uploaded by the user or system. The verification process specifically includes checking the integrity, format correctness and compatibility of the upgrade package with the current system; Storage submodule: responsible for safely storing the verified upgrade package in a designated location or server, ensuring the security and availability of the upgrade package during the storage process for subsequent distribution and version management; Distribution submodule: responsible for distributing the upgrade package to the devices or systems that need to be upgraded, ensuring that the upgrade package can reach the target device accurately and quickly, and minimizing network delays and transmission errors; Version management submodule: responsible for tracking and managing the version information of the upgrade package, including version number, release date, upgrade content, and compatibility with other versions. It also provides version comparison and rollback functions to ensure the stability and recoverability of the system during the upgrade process. Logging submodule: used to record various log information during the upgrade process for subsequent analysis and troubleshooting; Permission management submodule: used to control the access and operation permissions of different users or systems to the upgrade package to ensure the security of the upgrade process; Notification and reporting submodule: used to send upgrade notifications and reports to users or administrators, including upgrade progress, results, and possible problems.

[0010] Furthermore, the verification process of the upload submodule is as follows: Check the integrity of the upgrade package: Calculate the checksum (such as MD5, SHA-1, SHA-256, etc.) of the upgrade package and compare it with the checksum provided during upload to verify that no data damage or tampering occurs during transmission. Verify that the file size of the upgrade package is consistent with expectations to further confirm data integrity. Verify the correctness of the upgrade package format: Check whether the file type is the expected upgrade package format (such as ZIP, TAR, CAB, etc.) and not other irrelevant file types. For compressed packages or installation packages, check whether their internal structure and file organization conform to established specifications or standards, and verify whether the metadata contained in the upgrade package (such as version information, installation instructions, dependencies, etc.) is complete and in the correct format; Check compatibility with the current system: Check whether the upgrade package is applicable to the operating system version of the current system, and whether the upgrade package supports the hardware configuration of the current system, including CPU, memory, storage, etc. Verify whether the upgrade package meets all necessary software dependency conditions, such as specific library files, drivers or application versions, and check the security compliance of the upgrade package by comparing it with the existing security policies, whitelists or blacklists to ensure that the upgrade package does not contain any known security vulnerabilities or malicious code; Signature verification: For digitally signed upgrade packages, verify the signature to confirm the authenticity and integrity of its source; User authority check: Verify that the user or system uploading the upgrade package has the corresponding authority and authorization.

[0011] Furthermore, the storage method of the storage submodule depends on factors such as the specific needs, performance requirements, and scalability of the device, including but not limited to a file system, a database, or a distributed storage system; The file system uses a local or network file system (such as NFS, SMB / CIFS, etc.) to store the upgrade package; The database stores the upgrade package as a binary large object (BLOB) in the database, providing advanced functions such as data consistency, transaction processing and access control; The distributed storage system uses a distributed file system (such as HDFS, Ceph, etc.) or object storage (such as Amazon S3, Google Cloud Storage, etc.) to store upgrade packages.

[0012] Furthermore, the distribution submodule formulates an upgrade package distribution strategy based on factors such as the type of device, geographical location, and network status, and the distribution process involves network communication, file transfer protocol, and device authentication; 1) Network communication The distribution submodule transmits the upgrade package from the server to the target device through network communication. The specific operation is as follows: the distribution submodule needs to establish a stable network connection with the target device through a wired network (such as Ethernet) or a wireless network (such as Wi-Fi, Bluetooth). After the connection is established, the upgrade package data starts to be transmitted to the target device through the network; 2) File Transfer Protocol The distribution submodule uses file transfer protocols to ensure that the upgrade package can be smoothly transferred from the server to the target device. The file transfer protocols include FTP (File Transfer Protocol, FTP is a widely used file transfer protocol that allows users to transfer files between computers on the network. The distribution submodule can use the FTP protocol to upload the upgrade package to the target device), SFTP (Secure File Transfer Protocol, SFTP is a secure version of FTP, which provides an encrypted file transfer channel to ensure the confidentiality and integrity of the data. The distribution submodule will choose to use SFTP when transmitting sensitive or important data), HTTP / HTTPS (Hypertext Transfer Protocol / Secure Hypertext Transfer Protocol, HTTP and HTTPS are the most commonly used protocols on the Web for transmitting data between clients and servers. The distribution submodule provides the upgrade package as a download link to the target device through HTTP / HTTPS, and the target device downloads the upgrade package through a browser or other HTTP client); 3) Device authentication Before distributing the upgrade package, the distribution submodule needs to authenticate the target device to ensure that only legitimate devices can receive the upgrade package. The device authentication specifically includes device identity verification (the distribution submodule verifies the identity of the target device by using device-specific identifiers (such as MAC address, serial number, etc.) or authentication credentials provided by the device (such as user name and password) to ensure that it is a legitimate and authorized device), device permission check (the distribution submodule needs to check whether the target device has the permission to receive the upgrade package, which is specifically determined based on factors such as the device type, model, organization or user role), and device status check (before distributing the upgrade package, the distribution submodule will check the current status of the target device, such as network connection status, whether there is sufficient storage space, etc., to ensure that the upgrade process can proceed smoothly).

[0013] Furthermore, the communication protocol module is based on the MQTT protocol and adopts a publish / subscribe mode for message transmission. In this mode, the sender (publisher) of the message sends the message to a specific topic, and the receiver (subscriber) who subscribes to the topic can receive the message. The MQTT broker acts as an intermediary between the publisher and the subscriber, responsible for the storage, forwarding and filtering of messages, and realizes asynchronous communication between devices. The implementation method is as follows: After the communication protocol module establishes a TCP connection with the MQTT broker, it uses the MQTT protocol for handshake and authentication. During the connection process, it sends a connection request, including client ID, user name, password and other information, and waits for the response of the broker. Once the connection is successfully established, the communication protocol module will send a subscription request, specifying the topic and QoS level to be subscribed, and the broker will push the relevant message to the subscriber based on the subscription request.

[0014] Furthermore, the MQTT defines three QoS levels, namely: QoS 0: at most once, no message delivery guarantee; QoS 1: At least once, ensuring that the message arrives at least once, but may be repeated; QoS 2: Exactly Once, ensures that a message arrives only once.

[0015] Furthermore, the device management module includes the following submodules: Status monitoring submodule: responsible for real-time monitoring of the upgrade status of the device, including whether it is online, upgrade progress, success, etc.; Exception handling submodule: responsible for handling abnormal situations that may occur during the upgrade process, such as network interruption, upgrade package damage, etc., and providing corresponding solutions or fallback mechanisms; User feedback submodule: provides a user feedback mechanism to collect problems and suggestions during the device upgrade process for subsequent optimization and improvement.

[0016] Furthermore, the upgrade strategy specifically includes: Differential upgrade: By comparing the differences between the old and new versions, only the changed parts of the device firmware or software are downloaded and updated, reducing the download time and traffic consumption of the upgrade package. Specific operations: The server uses a differential algorithm to extract the differences between the old and new firmware and generates a differential package. The client receives the differential package and applies the difference part to the old firmware through a specific restoration algorithm to generate a new firmware. Batch upgrade: Centrally manage and uniformly upgrade a group of devices to simplify the operation process and improve management efficiency. Specific operations: The upgrade strategy module formulates a plan containing a list of all devices to be upgraded and the upgrade steps, and distributes the new version of firmware or software to all devices through remote communication interfaces such as NB-IoT, WiFi, etc. After receiving the new version, the device will upgrade according to the predetermined steps; Intelligent scheduling: During the upgrade process, the upgrade strategy and resource allocation are dynamically adjusted according to factors such as device status, network conditions, and user needs, which can ensure the flexibility and efficiency of the upgrade process. Specific operations: The upgrade strategy module evaluates the upgrade timing and resource allocation based on device status (such as power, memory usage, etc.) and network conditions (such as network speed, stability, etc.). When the device is in good condition and the network conditions are excellent, the upgrade is given priority, and through intelligent algorithms, the priority and order of upgrade tasks are dynamically adjusted to ensure optimal utilization of resources.

[0017] The present invention provides an OTA upgrade device based on the MQTT protocol, which has the following beneficial effects: The present invention has extremely high security. It can not only realize OTA upgrade based on MQTT protocol, but also has high security, making it difficult to be maliciously tampered or replaced during OTA upgrade, thereby helping to avoid device firmware damage and introduction of malicious code caused by tampering and replacement. In addition, the OTA upgrade device has good scalability, efficient and reliable upgrade strategy and distribution mechanism, can be well applied to OTA upgrade of large-scale device groups, obtain better upgrade experience, and can adapt to the development trend of the increasing number of IoT devices. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 This is a schematic diagram of the overall structure of the OTA upgrade device based on the MQTT protocol of the present invention; Figure 2 It is a schematic diagram of the upgrade strategy of the OTA upgrade device based on the MQTT protocol of the present invention. DETAILED DESCRIPTION

[0019] The following embodiments of the present invention are described in further detail in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.

[0020] like Figure 1-Figure 2 As shown, the OTA upgrade device based on the MQTT protocol includes a security verification module, an upgrade package management module, a communication protocol module, a device management module, and an upgrade strategy module; Security verification module: responsible for verifying the upgrade package to ensure that the upgrade package is not tampered with or replaced during transmission; specifically includes the following sub-modules: Technical encryption submodule: Use symmetric encryption or asymmetric encryption technology to encrypt the upgrade package to ensure that only authorized devices or servers can decrypt and access the upgrade package; Digital signature submodule: digitally signs the upgrade package and verifies it at the receiving end to ensure the integrity of the upgrade package and the authenticity of its source; Secure transmission protocol submodule: such as HTTPS, used to securely transmit upgrade packages between the device and the server; Upgrade package management module: responsible for the upload, storage, distribution and version management of upgrade packages to track and manage upgrade packages of different versions; specifically includes the following sub-modules: 1. Upload submodule: responsible for receiving and verifying the upgrade package uploaded by the user or system. The verification process specifically includes checking the integrity, format correctness and compatibility of the upgrade package with the current system; In this embodiment, the verification process of the upload submodule is as follows: Check the integrity of the upgrade package: Calculate the checksum (such as MD5, SHA-1, SHA-256, etc.) of the upgrade package and compare it with the checksum provided during upload to verify that no data damage or tampering occurs during transmission. Verify that the file size of the upgrade package is consistent with expectations to further confirm data integrity. Verify the correctness of the upgrade package format: Check whether the file type is the expected upgrade package format (such as ZIP, TAR, CAB, etc.) and not other irrelevant file types. For compressed packages or installation packages, check whether their internal structure and file organization conform to established specifications or standards, and verify whether the metadata contained in the upgrade package (such as version information, installation instructions, dependencies, etc.) is complete and in the correct format; Check compatibility with the current system: Check whether the upgrade package is applicable to the operating system version of the current system, and whether the upgrade package supports the hardware configuration of the current system, including CPU, memory, storage, etc. Verify whether the upgrade package meets all necessary software dependency conditions, such as specific library files, drivers or application versions, and check the security compliance of the upgrade package by comparing it with the existing security policies, whitelists or blacklists to ensure that the upgrade package does not contain any known security vulnerabilities or malicious code; Signature verification: For digitally signed upgrade packages, verify the signature to confirm the authenticity and integrity of its source; User authority check: Check whether the user or system that uploads the upgrade package has the corresponding authority and authorization; 2. Storage submodule: responsible for safely storing the verified upgrade package in the designated location or server, ensuring the security and availability of the upgrade package during the storage process for subsequent distribution and version management; In this embodiment, the storage method of the storage submodule depends on factors such as the specific needs, performance requirements, and scalability of the device, including but not limited to a file system, a database, or a distributed storage system; File system Use local or network file system (such as NFS, SMB / CIFS, etc.) to store upgrade packages; The database stores the upgrade package as a binary large object (BLOB) in the database, providing advanced features such as data consistency, transaction processing, and access control; Distributed storage systems use distributed file systems (such as HDFS, Ceph, etc.) or object storage (such as AmazonS3, Google Cloud Storage, etc.) to store upgrade packages; 3. Distribution submodule: responsible for distributing the upgrade package to the devices or systems that need to be upgraded, ensuring that the upgrade package can reach the target device accurately and quickly, and minimizing network delays and transmission errors; In this embodiment, the distribution submodule formulates the upgrade package distribution strategy according to factors such as the type of device, geographical location, and network status, and the distribution process involves network communication, file transfer protocol, and device authentication; 1) Network communication The distribution submodule transmits the upgrade package from the server to the target device through network communication. The specific operation is as follows: the distribution submodule needs to establish a stable network connection with the target device through a wired network (such as Ethernet) or a wireless network (such as Wi-Fi, Bluetooth). After the connection is established, the upgrade package data starts to be transmitted to the target device through the network; 2) File Transfer Protocol The distribution submodule uses file transfer protocols to ensure that the upgrade package can be smoothly transferred from the server to the target device. The file transfer protocols include FTP (File Transfer Protocol, FTP is a widely used file transfer protocol that allows users to transfer files between computers on the network. The distribution submodule uses the FTP protocol to upload the upgrade package to the target device), SFTP (Secure File Transfer Protocol, SFTP is a secure version of FTP, which provides an encrypted file transfer channel to ensure data confidentiality and integrity. The distribution submodule will choose to use SFTP when transmitting sensitive or important data), HTTP / HTTPS (Hypertext Transfer Protocol / Secure Hypertext Transfer Protocol, HTTP and HTTPS are the most commonly used protocols on the Web for transmitting data between clients and servers. The distribution submodule provides the upgrade package as a download link to the target device through HTTP / HTTPS, and the target device downloads the upgrade package through a browser or other HTTP client); 3) Device authentication Before distributing the upgrade package, the distribution submodule needs to authenticate the target device to ensure that only legitimate devices can receive the upgrade package. The device authentication specifically includes device identity verification (the distribution submodule verifies the identity of the target device by using device-specific identifiers (such as MAC address, serial number, etc.) or authentication credentials provided by the device (such as user name and password) to ensure that it is a legitimate and authorized device), device permission check (the distribution submodule needs to check whether the target device has the permission to receive the upgrade package, which is determined based on factors such as the device type, model, organization or user role), and device status check (before distributing the upgrade package, the distribution submodule will check the current status of the target device, such as network connection status, whether there is sufficient storage space, etc., to ensure that the upgrade process can proceed smoothly); 4. Version management submodule: responsible for tracking and managing the version information of the upgrade package, including version number, release date, upgrade content, and compatibility with other versions. It also provides version comparison and rollback functions to ensure the stability and recoverability of the system during the upgrade process. 5. Log recording submodule: used to record various log information during the upgrade process for subsequent analysis and troubleshooting; 6. Permission management submodule: used to control the access and operation permissions of different users or systems to the upgrade package to ensure the security of the upgrade process; Notification and reporting submodule: used to send upgrade notifications and reports to users or administrators, including upgrade progress, results, and possible problems; Communication protocol module: responsible for implementing MQTT communication between the device and the server, including the request, receipt and confirmation of the upgrade package, etc. The communication protocol module is based on the MQTT protocol and adopts the publish / subscribe mode for message transmission. In this mode, the sender (publisher) of the message sends the message to a specific topic, and the receiver (subscriber) who subscribes to the topic can receive the message. The MQTT broker acts as an intermediary between the publisher and the subscriber, responsible for the storage, forwarding and filtering of messages, and realizes asynchronous communication between devices. Implementation method: After the communication protocol module establishes a TCP connection with the MQTT broker, it uses the MQTT protocol for handshake and authentication. During the connection process, it sends a connection request, including client ID, user name, password and other information, and waits for the broker's response. Once the connection is successfully established, the communication protocol module will send a subscription request, specifying the topic and QoS level to be subscribed, and the broker will push the relevant message to the subscriber according to the subscription request; In this embodiment, the function implementation operation of the communication protocol module is as follows: Publish message: The communication protocol module sends a publish request to send the message to the specified topic. The proxy stores the message in the queue and pushes the message to the corresponding subscriber according to the subscriber's QoS level. Processing messages: When the communication protocol module receives a message from the agent, it processes it accordingly based on the subject and content of the message, which may include parsing the message, updating the device status, triggering events, etc. Disconnect: When the communication protocol module no longer needs to communicate with the MQTT agent, it will send a disconnect request and wait for the agent's response. Once the connection is disconnected, the module will stop receiving and sending messages. In this embodiment, MQTT defines three QoS levels: QoS 0: at most once, no message delivery guarantee; QoS 1: At least once, ensuring that the message arrives at least once, but may be repeated; QoS 2: Exactly once, ensuring that a message arrives only once; Device management module: responsible for managing the upgrade status, progress and results of the device to ensure that the device is upgraded according to the predetermined plan; including the following sub-modules: Status monitoring submodule: responsible for real-time monitoring of the upgrade status of the device, including whether it is online, upgrade progress, success, etc.; Exception handling submodule: responsible for handling abnormal situations that may occur during the upgrade process, such as network interruption, upgrade package damage, etc., and providing corresponding solutions or fallback mechanisms; User feedback submodule: provides a user feedback mechanism to collect problems and suggestions during the device upgrade process for subsequent optimization and improvement; Upgrade strategy module: responsible for formulating and implementing efficient upgrade strategies to ensure that the equipment can be upgraded quickly and stably; the upgrade strategy specifically includes: Differential upgrade: By comparing the differences between the old and new versions, only the changed parts of the device firmware or software are downloaded and updated, reducing the download time and traffic consumption of the upgrade package. Specific operations: The server uses a differential algorithm to extract the differences between the old and new firmware and generates a differential package. The client receives the differential package and applies the difference part to the old firmware through a specific restoration algorithm to generate a new firmware. Batch upgrade: Centrally manage and uniformly upgrade a group of devices to simplify the operation process and improve management efficiency. Specific operations: The upgrade strategy module formulates a plan containing a list of all devices to be upgraded and the upgrade steps, and distributes the new version of firmware or software to all devices through remote communication interfaces such as NB-IoT, WiFi, etc. After receiving the new version, the device will upgrade according to the predetermined steps; Intelligent scheduling: During the upgrade process, the upgrade strategy and resource allocation are dynamically adjusted according to factors such as device status, network conditions, and user needs, which can ensure the flexibility and efficiency of the upgrade process. Specific operations: The upgrade strategy module evaluates the upgrade timing and resource allocation based on device status (such as power, memory usage, etc.) and network conditions (such as network speed, stability, etc.). When the device is in good condition and the network conditions are excellent, the upgrade is given priority, and through intelligent algorithms, the priority and order of upgrade tasks are dynamically adjusted to ensure optimal utilization of resources.

[0021] The embodiments of the present invention are given for the purpose of illustration and description, and are not intended to be exhaustive or to limit the invention to the disclosed forms. Many modifications and variations will be apparent to those of ordinary skill in the art. The embodiments are selected and described in order to better illustrate the principles and practical applications of the present invention and to enable those of ordinary skill in the art to understand the present invention and thereby design various embodiments with various modifications suitable for specific uses.

Claims

1. Based on the MQTT protocol OTA upgrade device, it is characterized by: Includes the following modules: A security verification module, which is responsible for verifying the upgrade package to ensure that the upgrade package is not tampered with or replaced during transmission; An upgrade package management module, which is responsible for the upload, storage, distribution and version management of upgrade packages to track and manage upgrade packages of different versions; A communication protocol module, which is responsible for implementing MQTT communication between the device and the server; A device management module, which is responsible for managing the upgrade status, progress and results of the device to ensure that the device is upgraded according to the predetermined plan; An upgrade strategy module, wherein the upgrade strategy module is responsible for formulating and implementing efficient upgrade strategies.

2. The MQTT protocol-based OTA upgrade device according to claim 1, characterized in that: The security verification module specifically includes the following submodules: Technical encryption submodule: Use symmetric encryption or asymmetric encryption technology to encrypt the upgrade package to ensure that only authorized devices or servers can decrypt and access the upgrade package; Digital signature submodule: digitally signs the upgrade package and verifies it at the receiving end to ensure the integrity of the upgrade package and the authenticity of its source; Secure transmission protocol submodule: used to securely transmit upgrade packages between the device and the server.

3. The MQTT protocol-based OTA upgrade device according to claim 1, characterized in that: The upgrade package management module specifically includes the following submodules: Upload submodule: responsible for receiving and verifying the upgrade package uploaded by the user or system. The verification process specifically includes checking the integrity, format correctness and compatibility of the upgrade package with the current system; Storage submodule: responsible for safely storing the verified upgrade package in a designated location or server; Distribution submodule: responsible for distributing the upgrade package to the devices or systems that need to be upgraded; Version management submodule: responsible for tracking and managing the version information of the upgrade package, including version number, release date, upgrade content, and compatibility with other versions, while providing version comparison and rollback functions; Logging submodule: used to record various log information during the upgrade process; Permission management submodule: used to control the access and operation permissions of different users or systems to the upgrade package; Notification and reporting submodule: used to send upgrade notifications and reports to users or administrators, including upgrade progress, results, and possible problems.

4. The MQTT protocol-based OTA upgrade device according to claim 3, characterized in that: The verification process of the upload submodule is as follows: Check the integrity of the upgrade package: Calculate the checksum of the upgrade package and compare it with the checksum provided when uploading to verify that no data corruption or tampering occurs during transmission, and verify that the file size of the upgrade package is consistent with expectations; Verify the correctness of the format of the upgrade package: Check whether the file type is the expected upgrade package format. For compressed packages or installation packages, check whether their internal structure and file organization conform to established specifications or standards, and verify whether the metadata contained in the upgrade package is complete and in the correct format. Check compatibility with the current system: Check whether the upgrade package is applicable to the operating system version of the current system, whether the upgrade package supports the hardware configuration of the current system, verify whether the upgrade package meets all necessary software dependency conditions, and check the security compliance of the upgrade package by comparing it with the existing security policy, whitelist or blacklist; Signature verification: For digitally signed upgrade packages, verify the signature to confirm the authenticity and integrity of its source; User authority check: Verify that the user or system uploading the upgrade package has the corresponding authority and authorization.

5. The MQTT protocol-based OTA upgrade device according to claim 3, characterized in that: The storage method of the storage submodule depends on the specific needs, performance requirements and scalability factors of the device, including but not limited to a file system, a database or a distributed storage system; The file system uses a local or network file system to store the upgrade package; The database stores the upgrade package as a binary large object in the database, providing advanced functions such as data consistency, transaction processing and access control; The distributed storage system uses a distributed file system or object storage to store upgrade packages.

6. The MQTT protocol-based OTA upgrade device according to claim 3, characterized in that: The distribution submodule formulates an upgrade package distribution strategy based on the type, geographical location, and network status of the device, and the distribution process involves network communication, file transfer protocol, and device authentication; 1) Network communication The distribution submodule transmits the upgrade package from the server to the target device through network communication. The specific operation is as follows: the distribution submodule needs to establish a stable network connection with the target device through a wired network or a wireless network. After the connection is established, the upgrade package data starts to be transmitted to the target device through the network; 2) File Transfer Protocol The distribution submodule uses file transfer protocols to ensure that the upgrade package can be smoothly transferred from the server to the target device. The file transfer protocols include FTP, SFTP, and HTTP / HTTPS. 3) Device authentication Before distributing the upgrade package, the distribution submodule needs to authenticate the target device to ensure that only legitimate devices can receive the upgrade package. Device authentication specifically includes device identity verification, device permission check, and device status check.

7. The MQTT protocol-based OTA upgrade device according to claim 1, characterized in that: The communication protocol module is based on the MQTT protocol and adopts the publish / subscribe mode for message transmission to realize asynchronous communication between devices. The implementation method is: after the communication protocol module establishes a TCP connection with the MQTT agent, it uses the MQTT protocol for handshake and authentication. During the connection process, it sends a connection request and waits for the agent's response. Once the connection is successfully established, the communication protocol module will send a subscription request, specifying the topic and QoS level to be subscribed, and the agent will push the relevant message to the subscriber according to the subscription request.

8. The MQTT protocol-based OTA upgrade device according to claim 1, characterized in that: The MQTT defines three QoS levels: QoS 0: at most once, no message delivery guarantee; QoS 1: At least once, ensuring that the message arrives at least once, but may be repeated; QoS 2: Exactly Once, ensures that a message arrives only once.

9. The MQTT protocol-based OTA upgrade device according to claim 1, characterized in that: The device management module includes the following submodules: Status monitoring submodule: responsible for real-time monitoring of the upgrade status of the device; Exception handling submodule: responsible for handling abnormal situations that may occur during the upgrade process and providing corresponding solutions or fallback mechanisms; User feedback submodule: provides a user feedback mechanism to collect problems and suggestions during the device upgrade process.

10. The MQTT protocol-based OTA upgrade device according to claim 1, characterized in that: The upgrade strategy specifically includes: Differential upgrade: By comparing the differences between the old version and the new version, only the changed parts of the device firmware or software are downloaded and updated; Batch upgrade: Centrally manage and uniformly upgrade a group of devices; Intelligent scheduling: During the upgrade process, the upgrade strategy and resource allocation are dynamically adjusted according to device status, network conditions, and user demand factors.

Citation Information

Patent Citations

  • Cloud OTA upgrade package processing method, equipment, medium and device

    CN116263666A

  • OTA remote upgrading method for AGV

    CN117692328A

  • Developer platform control system based on OTA remote technology

    CN118158257A

  • A method of and devices for performing an over-the-air, OTA, upgrade in a network of communicatively interconnected devices

    WO2019180146A1

Cited By

  • Multi-patrolling device software collaborative upgrading method, device, equipment and medium

    CN121934865A

  • A method, apparatus, equipment and medium for collaborative software upgrade of multiple loitering aircraft

    CN121934865B