OTA upgrading method and system based on dual-protocol cooperative work, storage medium and equipment
By using MQTT and HTTPS protocols to subscribe and verify the OTA upgrade package at the same time on the vehicle terminal, the problem that a single protocol in the existing technology cannot take into account high transmission efficiency and high security is solved, and a more efficient and secure OTA upgrade process is achieved.
Patent Information
- Application Number
- CN202510101917.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-22
- Publication Date
- 2025-06-03
AI Technical Summary
The use of a single communication protocol in the prior art cannot take into account both high transmission efficiency and high security, resulting in insufficient efficiency and security during the OTA upgrade process.
Using the OTA upgrade method of dual-protocol collaborative work, the vehicle terminal subscribes and verifies the OTA upgrade package through the MQTT protocol and HTTPS protocol at the same time, and uses the real-time MQTT and HTTPS data integrity verification to ensure the security and effectiveness of the upgrade package.
By combining MQTT and HTTPS protocols, the efficiency and security of OTA upgrades are improved, and the problem that a single protocol cannot take into account both high efficiency and high security can be effectively solved.
Smart Images

Figure CN120091012A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of vehicle upgrades, and particularly relates to an OTA upgrade method, system, storage medium and device for dual-protocol collaborative work. Background Art
[0002] OTA (Over-The-Air) upgrade technology allows a vehicle to receive remote software and system updates via a wireless network. For pure electric vehicles, such upgrades can not only improve their response speed but also optimize battery management, thereby indirectly increasing the maximum driving range and bringing a more intelligent and energy-saving experience to the driver.
[0003] Currently, traditional OTA upgrade methods mainly rely on a single communication protocol, such as the MQTT protocol or the HTTPS protocol. The MQTT protocol has an advantage in real-time performance and has the advantages of being lightweight and low-power consumption; the HTTPS protocol has the advantage of high security and is suitable for verifying the integrity and authenticity of OTA upgrade packages from the device side to the server side.
[0004] However, the existing use of a single communication protocol cannot simultaneously take into account high transmission efficiency and high security. Summary of the Invention
[0005] Based on this, the purpose of the present invention is to provide an OTA upgrade method, system, storage medium and device for dual-protocol collaborative work, so as to solve the technical problem that the existing use of a single communication protocol cannot simultaneously take into account high transmission efficiency and high security in the background art.
[0006] The first aspect of the present invention lies in providing an OTA upgrade method for dual-protocol collaborative work. The OTA upgrade method is applied to a vehicle, and the vehicle includes an in-vehicle terminal and a server;
[0007] The OTA upgrade method includes:
[0008] Obtain the MQTT protocol and the HTTPS protocol;
[0009] When the in-vehicle terminal is running, simultaneously send a subscription request for the OTA upgrade package through the MQTT protocol and the HTTPS protocol;
[0010] When the in-vehicle terminal obtains the OTA upgrade package through the MQTT protocol, the in-vehicle terminal stores the OTA upgrade package and sends verification information of the OTA upgrade package to the server through the HTTPS protocol to verify the verification information in the OTA upgrade package;
[0011] Wherein, the verification information includes the hash value and the digest information in the OTA upgrade package;
[0012] If the verification information of the OTA upgrade package is qualified, the vehicle-mounted terminal performs an upgrade according to the OTA upgrade package.
[0013] Further, after the step of sending the verification information of the OTA upgrade package to the server side through the HTTPS protocol to verify the verification information in the OTA upgrade package, the following is further included:
[0014] If the verification information of the OTA upgrade package is unqualified, the vehicle-mounted terminal does not perform an upgrade according to the OTA upgrade package.
[0015] Further, in the step of, when the verification information of the OTA upgrade package is qualified, the vehicle-mounted terminal performs an OTA upgrade according to the OTA upgrade package, the following is further included:
[0016] When the verification results of both the hash value and the digest information are qualified, the vehicle-mounted terminal performs an upgrade according to the OTA upgrade package.
[0017] Further, in the step of, when the verification information of the OTA upgrade package is qualified, the vehicle-mounted terminal performs an OTA upgrade according to the OTA upgrade package, the following is further included:
[0018] When any one of the verification results of the hash value or the digest information is unqualified, the vehicle-mounted terminal does not perform an upgrade according to the OTA upgrade package.
[0019] Further, before the step of, when the verification information of the OTA upgrade package is qualified, the vehicle-mounted terminal performs an upgrade according to the OTA upgrade package, the following is further included:
[0020] Obtain the battery power parameter of the current vehicle;
[0021] When the verification information of the OTA upgrade package is qualified, integrate the battery power parameter to comprehensively determine whether the vehicle-mounted terminal performs the OTA upgrade package for upgrade.
[0022] Further, in the step of integrating the battery power parameter to comprehensively determine whether the vehicle-mounted terminal performs the OTA upgrade package for upgrade, it includes:
[0023] When the battery power parameter data meets the preset power parameter, the vehicle-mounted terminal performs an upgrade according to the OTA upgrade package.
[0024] Further, in the step of integrating the battery power parameter to comprehensively determine whether the vehicle-mounted terminal performs the OTA upgrade package for upgrade, the following is further included:
[0025] When the battery power parameter does not meet the preset power data, the in-vehicle terminal does not execute the OTA upgrade package for upgrade.
[0026] The second aspect of the present invention is to provide an OTA upgrade system for dual-protocol collaborative work, and the system includes:
[0027] An acquisition module, configured to acquire the MQTT protocol and the HTTPS protocol;
[0028] A request module, configured to, when the in-vehicle terminal is running, simultaneously send a subscription request for the OTA upgrade package through the MQTT protocol and the HTTPS protocol;
[0029] A verification module, configured to, when the in-vehicle terminal acquires the OTA upgrade package through the MQTT protocol, the in-vehicle terminal stores the OTA upgrade package, and sends verification information of the OTA upgrade package to the server side through the HTTPS protocol to verify the verification information in the OTA upgrade package;
[0030] Wherein, the verification information includes a hash value and summary information in the OTA upgrade package;
[0031] An execution module, configured to, if the verification information of the OTA upgrade package is qualified, perform an upgrade according to the in-vehicle terminal executing the OTA upgrade package.
[0032] The third aspect of the present invention is to provide a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the OTA upgrade method for dual-protocol collaborative work described above is implemented.
[0033] The fourth aspect of the present invention is to provide an OTA upgrade device for dual-protocol collaborative work, including a memory, a processor, and a computer program stored on the memory and executable on the processor, and when the processor executes the program, the OTA upgrade method for dual-protocol collaborative work described above is implemented.
[0034] Compared with the prior art, by using an OTA upgrade method, system, storage medium and device for dual-protocol collaborative work shown in the present invention, the beneficial effects are as follows:
[0035] In a dual-protocol collaborative OTA upgrade method provided by the present invention, the MQTT protocol and the HTTPS protocol are obtained; when the vehicle-mounted terminal is running, a subscription request is made to the OTA upgrade package through the MQTT protocol and the HTTPS protocol at the same time; when the vehicle-mounted terminal obtains the OTA upgrade package through the MQTT protocol, the vehicle-mounted terminal stores the OTA upgrade package, and sends the verification information of the OTA upgrade package to the server through the HTTPS protocol to verify the verification information in the OTA upgrade package; wherein the verification information includes the hash value and summary information in the OTA upgrade package; if the verification information of the OTA upgrade package is qualified, the OTA upgrade package is executed according to the vehicle-mounted terminal for upgrading. The present invention combines the real-time nature of MQTT and the data integrity verification of HTTPS to improve the efficiency of OTA upgrades, and utilizes the use of dual protocols and encryption algorithms to enhance the security of the OTA upgrade process, which can solve the technical problem that a single communication protocol in the prior art cannot take into account both high transmission efficiency and high security. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 It is a flow chart of the OTA upgrade method of dual-protocol collaborative operation in the first embodiment of the present invention;
[0037] Figure 2 Schematic diagram of an OTA upgrade system with dual protocols working in collaboration in a third embodiment of the present invention;
[0038] Figure 3 This is a schematic diagram of an OTA upgrade device with dual protocols working in collaboration in the fourth embodiment of the present invention.
[0039] The following specific implementation manner will further illustrate the present invention in conjunction with the above-mentioned drawings. DETAILED DESCRIPTION
[0040] In order to facilitate the understanding of the present invention, the present invention will be described more fully below with reference to the relevant drawings. Several embodiments of the present invention are given in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present invention more thorough and comprehensive.
[0041] It should be noted that when an element is referred to as being "fixed to" another element, it may be directly on the other element or there may be a central element. When an element is considered to be "connected to" another element, it may be directly connected to the other element or there may be a central element at the same time. The terms "vertical", "horizontal", "left", "right" and similar expressions used herein are for illustrative purposes only.
[0042] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the technical field to which this invention belongs. The terms used in the description of the present invention herein are for the purpose of describing specific embodiments only and are not intended to limit the present invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.
[0043] The first embodiment
[0044] Please refer to Figure 1 , which shows the OTA upgrade method for dual - protocol collaborative work in the first embodiment of the present invention. The OTA upgrade method is applied to a vehicle, and the vehicle includes an in - vehicle terminal and a server.
[0045] It should be noted that in this embodiment, the in - vehicle terminal and the server are units commonly available in the vehicle system. Since they belong to the conventional prior art in this field, no special description will be given here.
[0046] Specifically, the control method includes:
[0047] S01, Obtain the MQTT protocol and the HTTPS protocol.
[0048] It should be noted that in a vehicle, the MQTT protocol is generally deployed in an electronic control unit (ECU) that can be connected to the network to implement functions such as remote control, remote flashing, data uploading, remote diagnosis, and OTA (Over - The - Air). The HTTPS protocol in the vehicle is a secure communication protocol used to ensure the confidentiality, availability, and integrity during the data transmission process between the vehicle and the cloud or other external systems.
[0049] Since both the above - mentioned MQTT protocol and HTTPS protocol belong to the conventional prior art in this field, no special description will be given here.
[0050] S02, When the in - vehicle terminal is running, simultaneously send a subscription request for the OTA upgrade package through the MQTT protocol and the HTTPS protocol.
[0051] S03, When the in - vehicle terminal obtains the OTA upgrade package through the MQTT protocol, the in - vehicle terminal stores the OTA upgrade package and sends the verification information of the OTA upgrade package to the server through the HTTPS protocol to verify the verification information in the OTA upgrade package.
[0052] Specifically, the verification information includes the hash value and the digest information in the OTA upgrade package.
[0053] It should be noted that the in-vehicle terminal receives the OTA upgrade package through the MQTT protocol and sends the OTA upgrade package to the device side through the MQTT protocol. After receiving the OTA upgrade package, the in-vehicle terminal stores the OTA upgrade package in the memory. Subsequently, the in-vehicle terminal sends a verification request to the server through the HTTPS protocol to verify the integrity and authenticity of the OTA upgrade package, that is, to verify the above hash value and the above summary information.
[0054] S04, if the verification information of the OTA upgrade package is qualified, the in-vehicle terminal performs the OTA upgrade package for upgrading.
[0055] Specifically, when the verification results of both the hash value and the summary information are qualified, the in-vehicle terminal performs the OTA upgrade package for upgrading;
[0056] When any one of the verification results of the hash value or the summary information is unqualified, the in-vehicle terminal does not perform the OTA upgrade package for upgrading.
[0057] In some preferred embodiments, before the step of performing the OTA upgrade package for upgrading according to the in-vehicle terminal when the verification information of the OTA upgrade package is qualified, it further includes:
[0058] Obtain the battery power parameter of the current vehicle;
[0059] When the verification information of the OTA upgrade package is qualified, comprehensively judge whether the in-vehicle terminal performs the OTA upgrade package for upgrading by integrating the battery power parameter.
[0060] Specifically, when the battery power parameter data meets the preset power parameter, the in-vehicle terminal performs the OTA upgrade package for upgrading.
[0061] When the battery power parameter does not meet the preset power data, the in-vehicle terminal does not perform the OTA upgrade package for upgrading.
[0062] That is to say, before performing the OTA upgrade, the in-vehicle terminal will check whether the battery of the current vehicle is fully charged. If the power is insufficient, it will wait until the battery is charged before performing the OTA upgrade. This can avoid the problem of vehicle power loss caused by performing the OTA upgrade when the power is insufficient.
[0063] In summary, the OTA upgrade method with dual-protocol collaborative work shown in the first embodiment has at least the following beneficial effects compared with the OTA upgrade method in the prior art:
[0064] In an OTA upgrade method with dual - protocol collaborative work provided by the present invention, the MQTT protocol and the HTTPS protocol are obtained; when the in - vehicle terminal is running, subscription requests for the OTA upgrade package are simultaneously sent through the MQTT protocol and the HTTPS protocol; when the in - vehicle terminal obtains the OTA upgrade package through the MQTT protocol, the in - vehicle terminal stores the OTA upgrade package and sends the verification information of the OTA upgrade package to the server through the HTTPS protocol to verify the verification information in the OTA upgrade package; wherein, the verification information includes the hash value and the digest information in the OTA upgrade package; if the verification information of the OTA upgrade package is qualified, the OTA upgrade package is executed according to the in - vehicle terminal for upgrade. The present invention combines the real - time nature of MQTT and the data integrity verification of HTTPS, improves the efficiency of OTA upgrade, and enhances the security of the OTA upgrade process by using dual - protocols and encryption algorithms, and can solve the technical problem that a single communication protocol in the prior art cannot simultaneously achieve high transmission efficiency and high security.
[0065] Second Embodiment
[0066] On the other hand, the present invention also provides an OTA upgrade system with dual - protocol collaborative work. Please refer to Figure 2 , which shows the OTA upgrade system with dual - protocol collaborative work in the second embodiment of the present invention. The OTA upgrade system with dual - protocol collaborative work includes:
[0067] An acquisition module 11 for acquiring the MQTT protocol and the HTTPS protocol;
[0068] A request module 12 for, when the in - vehicle terminal is running, simultaneously sending subscription requests for the OTA upgrade package through the MQTT protocol and the HTTPS protocol;
[0069] A verification module 13 for, when the in - vehicle terminal obtains the OTA upgrade package through the MQTT protocol, the in - vehicle terminal stores the OTA upgrade package and sends the verification information of the OTA upgrade package to the server side through the HTTPS protocol to verify the verification information in the OTA upgrade package;
[0070] wherein, the verification information includes the hash value and the digest information in the OTA upgrade package;
[0071] An execution module 14 for, if the verification information of the OTA upgrade package is qualified, executing the OTA upgrade package according to the in - vehicle terminal for upgrade.
[0072] Third Embodiment
[0073] On the other hand, the present invention also proposes an OTA upgrade device with dual - protocol collaborative work. Please refer to Figure 3, shown is an OTA upgrade device for dual - protocol collaborative work in the third embodiment of the present invention, including a memory 20, a processor 10, and a computer program 30 stored on the memory and executable on the processor. When the processor 10 executes the computer program 30, it implements the OTA upgrade method for dual - protocol collaborative work as described above.
[0074] Among them, the device of the OTA upgrade method for dual - protocol collaborative work can specifically be a vehicle. In some embodiments, the processor 10 can be a Central Processing Unit (CPU), a controller, a microcontroller, a microprocessor, or other data - processing chips, which are used to run the program code stored in the memory 20 or process data, such as executing an access - restriction program, etc.
[0075] Among them, the memory 20 includes at least one type of readable storage medium. The readable storage medium includes flash memory, a hard disk, a multimedia card, a card - type memory (such as an SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the memory 20 can be an internal storage unit of the OTA upgrade device for dual - protocol collaborative work, such as the hard disk of the OTA upgrade device for dual - protocol collaborative work. In other embodiments, the memory 20 can also be an external storage device of the OTA upgrade device for dual - protocol collaborative work, such as a plug - in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc., equipped on the OTA upgrade device for dual - protocol collaborative work. Further, the memory 20 can also include both the internal storage unit and the external storage device of the OTA upgrade device for dual - protocol collaborative work. The memory 20 can not only be used to store application software and various types of data installed in the OTA upgrade device for dual - protocol collaborative work, but also be used to temporarily store data that has been output or will be output.
[0076] It should be noted that Figure 3 the structure shown does not constitute a limitation on the OTA upgrade device for dual - protocol collaborative work. In other embodiments, the OTA upgrade device for dual - protocol collaborative work can include fewer or more components than shown in the figure, or combine certain components, or have a different component layout.
[0077] The embodiment of the present invention also proposes a computer - readable storage medium, on which a computer program is stored. When the program is executed by a processor, it implements the OTA upgrade method for dual - protocol collaborative work as described above.
[0078] Those skilled in the art can understand that the logic or steps represented in the flowchart or otherwise described herein, for example, can be considered as a definite sequence list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable storage medium for use by an instruction execution system, apparatus, or device (such as a computer-based system, including a processor system or other systems that can fetch instructions from the instruction execution system, apparatus, or device and execute the instructions), or used in combination with these instruction execution systems, apparatus, or devices. For the purposes of this specification, a "computer-readable storage medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by or in combination with an instruction execution system, apparatus, or device.
[0079] More specific examples (non-exhaustive list) of computer-readable storage media include the following: an electrical connection part with one or more wirings (electronic device), a portable computer disk cartridge (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, a computer-readable storage medium can even be paper or other suitable media on which a program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other media, followed by editing, interpretation, or other suitable processing as necessary, and then stored in a computer memory.
[0080] It should be understood that various parts of the present invention can be implemented by hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, any one or a combination of the following techniques well known in the art can be used: discrete logic circuits with logic gate circuits for implementing logical functions on data signals, application-specific integrated circuits with suitable combinational logic gate circuits, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0081] In the description of this specification, the descriptions referring to terms such as "one embodiment", "some embodiments", "example", "specific example", or "some examples", etc. mean that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in a suitable manner in any one or more embodiments or examples.
[0082] The above embodiments merely represent several implementation manners of the present invention. The description thereof is relatively specific and detailed, but it should not be construed as a limitation on the scope of the patent for the present invention. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present invention, several modifications and improvements can still be made, and these all fall within the protection scope of the present invention. Therefore, the protection scope of the patent for the present invention shall be subject to the appended claims.
Claims
1. A dual-protocol collaborative OTA upgrade method, characterized in that: The OTA upgrade method is applied in a vehicle, wherein the vehicle includes an on-board terminal and a server; The OTA upgrade method includes: Get the MQTT protocol and HTTPS protocol; When the vehicle-mounted terminal is running, a subscription request is made to the OTA upgrade package through the MQTT protocol and the HTTPS protocol at the same time; When the vehicle terminal obtains the OTA upgrade package through the MQTT protocol, the vehicle terminal stores the OTA upgrade package and sends the verification information of the OTA upgrade package to the server through the HTTPS protocol to verify the verification information in the OTA upgrade package; The verification information includes the hash value and summary information in the OTA upgrade package; If the verification information of the OTA upgrade package is qualified, the OTA upgrade package is executed according to the vehicle-mounted terminal for upgrading.
2. The dual-protocol collaborative OTA upgrade method according to claim 1, characterized in that: After the step of sending the verification information of the OTA upgrade package to the server side through the HTTPS protocol to verify the verification information in the OTA upgrade package, the method further includes: If the verification information of the OTA upgrade package is unqualified, the vehicle-mounted terminal does not execute the OTA upgrade package for upgrading.
3. The dual-protocol collaborative OTA upgrade method according to claim 1, characterized in that: If the verification information of the OTA upgrade package is qualified, the step of executing the OTA upgrade according to the vehicle-mounted terminal executing the OTA upgrade package further includes: When the verification result of the hash value and the verification result of the summary information are both qualified, the OTA upgrade package is executed according to the vehicle terminal for upgrading.
4. The dual-protocol collaborative OTA upgrade method according to claim 3, characterized in that: If the verification information of the OTA upgrade package is qualified, the step of executing the OTA upgrade according to the vehicle-mounted terminal executing the OTA upgrade package further includes: When any one of the verification results of the hash value or the verification result of the summary information is unqualified, the vehicle-mounted terminal does not execute the OTA upgrade package for upgrading.
5. The dual-protocol collaborative OTA upgrade method according to claim 1, characterized in that: If the verification information of the OTA upgrade package is qualified, before the step of executing the OTA upgrade package for upgrading according to the vehicle-mounted terminal, the method further includes: Get the battery power parameters of the current vehicle; When the verification information of the OTA upgrade package is qualified, the battery power parameter is integrated to comprehensively determine whether the vehicle-mounted terminal executes the OTA upgrade package for upgrading.
6. The dual-protocol collaborative OTA upgrade method according to claim 5, characterized in that: The step of integrating the battery power parameter to comprehensively determine whether the vehicle-mounted terminal executes the OTA upgrade package for upgrading includes: When the battery power parameter data meets the preset power parameter, the vehicle-mounted terminal executes the OTA upgrade package for upgrading.
7. The dual-protocol collaborative OTA upgrade method according to claim 5, characterized in that: In the step of integrating the battery power parameter to comprehensively determine whether the vehicle-mounted terminal executes the OTA upgrade package for upgrading, it also includes: When the battery power parameter does not meet the preset power data, the vehicle-mounted terminal does not execute the OTA upgrade package for upgrading.
8. A dual-protocol collaborative OTA upgrade system, characterized in that: The system is used to implement the OTA upgrade method for dual-protocol collaborative work described in any one of claims 1-7, and the system includes: Acquisition module, used to obtain MQTT protocol and HTTPS protocol; A request module, used for making a subscription request for an OTA upgrade package through the MQTT protocol and the HTTPS protocol simultaneously when the vehicle-mounted terminal is running; A verification module, configured to, when the vehicle-mounted terminal obtains the OTA upgrade package through the MQTT protocol, store the OTA upgrade package by the vehicle-mounted terminal, and send the verification information of the OTA upgrade package to the server through the HTTPS protocol to verify the verification information in the OTA upgrade package; The verification information includes the hash value and summary information in the OTA upgrade package; An execution module is used to execute the OTA upgrade package for upgrading according to the vehicle-mounted terminal if the verification information of the OTA upgrade package is qualified.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, an OTA upgrade method for dual-protocol collaboration as claimed in any one of claims 1 to 7 is implemented.
10. An OTA upgrade device with dual protocols working together, characterized in that: The invention comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the program, an OTA upgrade method for dual-protocol collaboration according to any one of claims 1 to 7 is implemented.