Water heater firmware upgrade method, device and water heater
Firmware upgrade is performed by copying and decrypting the pre-stored encrypted upgrade driver in the water heater, which solves the problem of accidentally erasing firmware in traditional technology, improves the security and reliability of the upgrade, and is suitable for water heaters with complex systems.
Patent Information
- Application Number
- CN202011620672.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-31
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2040-12-31
AI Technical Summary
During the traditional water heater firmware upgrade process, it is easy for the driver upgrade to be triggered under abnormal circumstances, causing the firmware to be accidentally erased and written, resulting in abnormal operation or security issues.
By obtaining the firmware upgrade information, copy and decrypt the pre-stored encrypted upgrade driver, enable the decrypted upgrade driver for firmware upgrade, and clear the decrypted driver after the upgrade is completed to prevent accidental erasure and writing.
It effectively prevents accidental erasure of firmware programs, improves the security and reliability of firmware upgrades, simplifies the upgrade process, and reduces maintenance costs. It is especially suitable for water heaters with complex systems.
Smart Images

Figure CN112667269B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to a firmware upgrade method and device for a water heater, and a water heater. Background Art
[0002] Nowadays, more and more water heater products have networking functions and can generally be upgraded through remote online programs. However, in traditional technologies, due to the increasing number of functional modules of water heaters and the increasing complexity of operating programs, in order to achieve firmware upgrades for water heaters, water heaters are equipped with upgrade drivers to erase and write the firmware. If the upgrade driver is triggered under abnormal circumstances, the firmware will be mistakenly erased, resulting in abnormalities during the operation of the water heater and even safety issues. Summary of the invention
[0003] Based on this, it is necessary to provide a firmware upgrade method, device and water heater for a water heater to address the above technical problems.
[0004] In one embodiment, the present invention provides a method for upgrading firmware of a water heater, comprising:
[0005] Obtain firmware upgrade information; firmware upgrade information includes upgrade data and decryption key;
[0006] Copying the pre-stored encrypted upgrade driver to the first memory, and decrypting it according to the decryption key and the pre-stored decryption program; and storing the decrypted upgrade driver in the first memory;
[0007] Enable the decrypted upgrade driver and perform firmware upgrade based on the upgrade data.
[0008] In one embodiment, the firmware upgrade information also includes an identification of a corresponding functional module in the water heater;
[0009] Copy the pre-existing encrypted upgrade driver to the default storage area, which previously included:
[0010] It is determined that the identity information in the firmware upgrade information is consistent with the pre-stored identity information.
[0011] In one embodiment, the decrypted upgrade driver is enabled, and the firmware is upgraded based on the upgrade data, followed by:
[0012] After the firmware upgrade is stopped, the decrypted upgrade driver in the first memory is cleared.
[0013] In one embodiment, the first memory is a random access memory.
[0014] In one of the embodiments, the firmware upgrade information also includes an actual verification code;
[0015] Enable decrypted upgrade drivers and perform firmware upgrades based on upgrade data, including:
[0016] A check code is calculated for the upgrade data, and the calculated check code is compared with the actual check code and they are identical.
[0017] In one embodiment, the present invention further provides a firmware upgrade device for a water heater, comprising:
[0018] The firmware information acquisition module is used to acquire firmware upgrade information; the firmware upgrade information includes upgrade data and decryption key;
[0019] A decryption module, used for copying the pre-stored encrypted upgrade driver to the first memory, decrypting it according to the decryption key and the pre-stored decryption program; and storing the decrypted upgrade driver in the first memory;
[0020] The enabling module is used to enable the decrypted upgrade driver and perform firmware upgrade based on the upgrade data.
[0021] In one embodiment, the present invention further provides a water heater, comprising: a plurality of functional modules; each functional module is connected to the same communication bus;
[0022] The functional module includes a second memory and a processor; the second memory stores a computer program, and the processor implements a firmware upgrade method for the water heater when executing the computer program.
[0023] In one of the embodiments, the functional module further includes a first memory.
[0024] In one embodiment, the functional module is any one of a main control module, a water pump control module, a motor control module and an operation display module.
[0025] In one of the embodiments, it further includes: a communication circuit connected to the communication bus.
[0026] The present invention provides a method and device for upgrading the firmware of a water heater, and a water heater, which have at least the following technical effects:
[0027] The firmware upgrade method, device and water heater of the water heater of the present invention, after the corresponding functional module in the water heater obtains the firmware upgrade information, the pre-stored encrypted upgrade driver is copied to the first memory, and the upgrade driver is decrypted, and then the decrypted upgrade driver is enabled and the firmware upgrade is performed according to the upgrade data. In each embodiment of the present invention, when the functional module corresponding to the water heater performs the firmware upgrade, in order to prevent abnormal situations such as interference from jumping to the upgrade driver, causing the firmware program to be accidentally erased, resulting in the firmware program being lost or destroyed, the upgrade driver is pre-encrypted, and the original encrypted upgrade driver is copied during the firmware upgrade, and the firmware upgrade is performed by decrypting and running the copied upgrade driver. The execution program of the present invention is simple and easy to implement, and can prevent the occurrence of situations such as the original firmware program being accidentally erased under abnormal circumstances. At the same time, there is no need to transmit an additional upgrade driver, which is convenient for managing the firmware program of the water heater function module, and effectively improves the firmware upgrade efficiency. The present invention is particularly suitable for water heaters with relatively complex systems, further improving the security and reliability of firmware upgrades, and at the same time helping to reduce the manpower and material costs of later maintenance. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 A schematic diagram showing a flow chart of a method for upgrading the firmware of a water heater in one embodiment of the present invention is shown;
[0029] Figure 2 It shows a schematic structural diagram of a firmware upgrade device for a water heater in one embodiment of the present invention;
[0030] Figure 3 A schematic diagram of the structure of a water heater in one embodiment of the present invention is shown;
[0031] Figure 4 Another structural schematic diagram of a water heater in one embodiment of the present invention is shown. DETAILED DESCRIPTION
[0032] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.
[0033] The components of the embodiments of the present invention generally described and shown in the drawings herein may be arranged and designed in a variety of different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0034] Hereinafter, the terms "including", "having" and their cognates, which may be used in various embodiments of the present invention, are intended only to indicate specific features, numbers, steps, operations, elements, components or combinations of the foregoing items, and should not be understood as first excluding the existence of one or more other features, numbers, steps, operations, elements, components or combinations of the foregoing items or adding the possibility of one or more features, numbers, steps, operations, elements, components or combinations of the foregoing items.
[0035] Furthermore, the terms “first”, “second”, “third”, etc. are merely used for distinguishing descriptions and are not to be understood as indicating or implying relative importance.
[0036] Unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meanings as those generally understood by those skilled in the art to which the various embodiments of the present invention belong. The terms (such as those defined in generally used dictionaries) will be interpreted as having the same meanings as the contextual meanings in the relevant technical field and will not be interpreted as having idealized meanings or overly formal meanings unless clearly defined in the various embodiments of the present invention.
[0037] The firmware upgrade method of the water heater provided by the present invention can be applied to, for example, Figure 4 In the water heater shown. Each functional module in the water heater is connected to the same communication bus 50. Each functional module such as the main control module 510, the motor control module 520, the water pump control module 530 and the operation display module 540 has a processor for firmware upgrade, and can send upgrade instructions to the firmware upgrade module through the communication bus 50. The firmware upgrade module can be connected to the communication bus 50 of the water heater in various forms, such as Bluetooth or WIFI, and can communicate with the server through the network to obtain the corresponding firmware upgrade information according to the upgrade instruction, and send it to the corresponding functional module, or an external dedicated handheld device. The firmware upgrade information can be stored in the dedicated device in the form of a file.
[0038] See also Figure 1 In one embodiment, the present invention provides a method for upgrading the firmware of a water heater, comprising:
[0039] Step S110: Obtain firmware upgrade information; the firmware upgrade information includes upgrade data and a decryption key.
[0040] For example, the functional module of the water heater can obtain the firmware upgrade information through the firmware upgrade module. The functional module of the water heater can issue a firmware upgrade instruction to obtain the firmware upgrade information, or the firmware upgrade module can autonomously send the firmware upgrade information to the functional module. Among them, the upgrade data is used to upgrade the functional module, such as adding new functions or making up for existing defects.
[0041] Step S120: copy the pre-stored encrypted upgrade driver program to the first memory, decrypt it according to the decryption key and the pre-stored decryption program; and store the decrypted upgrade driver program in the first memory.
[0042] The upgrade driver is a driver used to write upgrade data to the functional module to complete the firmware upgrade of the functional module. The encrypted upgrade driver is, for example, a program that is pre-encrypted by an encryption key corresponding to a decryption key, and its encryption method is preferably a symmetric encryption method, which has a small amount of calculation, a fast encryption speed and high efficiency. The decryption program is an execution program used to decrypt the encrypted upgrade driver according to the decryption key. The first memory is an area for temporarily storing the copied encrypted upgrade driver, such as a random access memory.
[0043] The first memory is used to store the decrypted upgrade driver program, so that when the firmware upgrade is stopped, such as when the firmware upgrade is completed or the power is off, the first memory can be cleared, so as to clear the data in time to prevent the original firmware program from being erased by mistake, and further improve the reliability of the execution program. It is further convenient for management and timely calling, and no additional data transmission is required, which can reduce data loss during the transmission process. At the same time, since the encrypted upgrade driver program cannot operate normally, it can prevent the water heater from not operating normally due to being called by mistake. Furthermore, by decrypting it based on the decryption key and the decryption program, the on-demand calling program function for firmware upgrade can be realized, which further optimizes the reliability of the water heater firmware upgrade.
[0044] Step S130: Activate the decrypted upgrade driver and perform firmware upgrade based on the upgrade data.
[0045] The embodiment of the present invention can upgrade and repair the corresponding functional modules of the water heater, and protect the original driver program at the same time, thereby further ensuring the normal operation of the water heater.
[0046] The firmware upgrade method of the water heater of the present invention, after the corresponding functional module in the water heater obtains the firmware upgrade information, copies the pre-stored encrypted upgrade driver to the first memory, and decrypts the upgrade driver, then enables the decrypted upgrade driver and performs the firmware upgrade according to the upgrade data. In the embodiment of the present invention, when the functional module corresponding to the water heater performs the firmware upgrade, in order to prevent abnormal situations such as interference from jumping to the upgrade driver, causing the firmware program to be accidentally erased, resulting in the firmware program being lost or damaged, the upgrade driver is pre-encrypted, and the original encrypted upgrade driver is copied during the firmware upgrade, and the firmware upgrade is performed by decrypting and running the copied upgrade driver. The execution program of the present invention is simple and easy to implement, and can prevent the occurrence of situations such as the original firmware program being accidentally erased under abnormal circumstances. At the same time, there is no need to transmit an additional upgrade driver, which is convenient for managing the firmware program of the water heater function module, and effectively improves the firmware upgrade efficiency. The present invention is particularly suitable for water heaters with relatively complex systems, further improving the security and reliability of firmware upgrades, and at the same time helping to reduce the manpower and material costs of later maintenance.
[0047] In a specific embodiment, the firmware upgrade information also includes an identity identifier of a corresponding functional module in the water heater;
[0048] Copy the pre-existing encrypted upgrade driver to the default storage area, which previously included:
[0049] Step S10: determining whether the identity information in the firmware upgrade information is consistent with the pre-stored identity information.
[0050] Each functional module in the water heater has a different identity. For example, the corresponding functional module in the water heater determines whether the identity in the firmware upgrade information is consistent with its own pre-stored identity, thereby determining whether to perform the subsequent copying and decryption steps for firmware upgrade.
[0051] The firmware upgrade method for a water heater according to an embodiment of the present invention helps to upgrade the corresponding functional modules in the water heater as needed, effectively improving the efficiency of firmware upgrade. Furthermore, it can prevent damage and interference to the original programs of other functional modules due to abnormal conditions during firmware upgrade, resulting in the subsequent water heater being unable to operate normally, thereby improving the reliability of firmware upgrade information transmission. The embodiment of the present invention is particularly suitable for water heaters with relatively complex systems.
[0052] Further, copying the pre-stored encrypted upgrade driver to a preset storage area includes:
[0053] If it is determined that the identity information in the firmware upgrade information is inconsistent with the pre-stored identity information, the subsequent steps of copying and decrypting for firmware upgrade are not performed.
[0054] In a specific embodiment, the decrypted upgrade driver is enabled, and the firmware upgrade is performed based on the upgrade data, which then includes:
[0055] Step S20: After stopping the firmware upgrade, clearing the decrypted upgrade driver in the first memory.
[0056] The firmware upgrade method of the water heater of the embodiment of the present invention preferably clears the decrypted upgrade driver in the first memory when stopping the firmware upgrade, thereby ensuring that the original upgrade driver is intact and damaged, timely clearing data to prevent the original firmware from being accidentally erased, and further improving the reliability of the execution program. The embodiment of the present invention can help improve the firmware upgrade capability of each functional module of the water heater, thereby effectively making up for the defects of the accessory module.
[0057] In a specific embodiment, the first memory is a random access memory.
[0058] In the firmware upgrade method of the water heater of the embodiment of the present invention, the copied encrypted upgrade driver is stored in the random access memory, so as to facilitate quick access. When the firmware upgrade is stopped, such as when the upgrade is completed or the power is off, the upgrade driver stored therein can be automatically recycled, thereby preventing the upgrade driver from being mistakenly called due to abnormal conditions to erase the corresponding firmware program.
[0059] In a specific embodiment, the firmware upgrade information also includes an actual verification code;
[0060] Enable decrypted upgrade drivers and perform firmware upgrades based on upgrade data, including:
[0061] Step S210: Calculate the verification code for the upgrade data, and compare the calculated verification code with the actual verification code to determine if they are the same.
[0062] For example, a CRC (Cyclic Redundancy Check) check code calculation method may be used to calculate a check code for the upgrade data.
[0063] If the calculated checksum is equal to the actual checksum, the upgrade data is confirmed to be acquired correctly. Since the code program is prone to input errors during the transmission process, in order to reduce input errors, the program can be verified by calculating the checksum to prevent the firmware program from being invalid due to errors.
[0064] The firmware upgrade method for the water heater of the embodiment of the present invention has a relatively complete execution process. By verifying the upgrade data, the security and reliability of the water heater firmware upgrade are further improved, and it helps to reduce the manpower and material costs of subsequent maintenance.
[0065] Enable decrypted upgrade drivers and perform firmware upgrades based on upgrade data, including:
[0066] Calculate the check code for the upgrade data and compare the calculated check code with the actual check code. If the calculated check code is not equal to the actual check code, it means that the upgrade data is input incorrectly and can be retrieved again.
[0067] See also Figure 2 In one embodiment, the present invention further provides a firmware upgrade device for a water heater, comprising:
[0068] The firmware information acquisition module 310 is used to acquire firmware upgrade information; the firmware upgrade information includes upgrade data and a decryption key.
[0069] The decryption module 320 is used to copy the pre-stored encrypted upgrade driver program to the first memory, decrypt it according to the decryption key and the pre-stored decryption program, and store the decrypted upgrade driver program in the first memory.
[0070] The enabling module 330 is used to enable the decrypted upgrade driver and perform firmware upgrade based on the upgrade data.
[0071] In a specific embodiment, the firmware upgrade information also includes the identity of the corresponding functional module in the water heater.
[0072] It also includes: a judgment module, which is used to judge whether the identity information in the firmware upgrade information is consistent with the pre-stored identity information.
[0073] In a specific embodiment, it further includes: a clearing module, which is used to clear the decrypted upgrade driver in the first memory after stopping the firmware upgrade.
[0074] In a specific embodiment, the firmware upgrade information also includes an actual verification code.
[0075] It also includes: a verification module, which is used to calculate the verification code of the upgrade data, and compare the calculated verification code with the actual verification code to ensure that they are the same.
[0076] The specific definition of the firmware upgrade device for the water heater can be found in the definition of the firmware upgrade method for the water heater mentioned above, which will not be repeated here. Each module in the above-mentioned firmware upgrade device for the water heater can be implemented in whole or in part by software, hardware, and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0077] See also Figure 3In one embodiment, the present invention further provides a water heater, comprising: a plurality of functional modules 410 ; each functional module 410 is connected to the same communication bus 50 .
[0078] The functional module 410 includes a second memory 430 and a processor 440; the second memory 430 stores a computer program, and the processor 440 implements a firmware upgrade method for the water heater when executing the computer program.
[0079] It should be noted that the firmware upgrade method for the water heater in the embodiment of the present invention can refer to the above-mentioned definition of the firmware upgrade method for the water heater, which will not be repeated here.
[0080] The second memory 430 is used to store the acquired firmware upgrade information, the encrypted upgrade driver, and the pre-stored decryption program. For example, the second memory 430 can be divided into a driver storage area and a firmware upgrade program storage area, the driver storage area is used to store the encrypted upgrade driver, and the firmware upgrade storage area is used to store the firmware upgrade information. For example, when the firmware is upgraded, the encrypted upgrade driver is copied from the driver storage area and stored in the first memory and decrypted, then the upgrade data is retrieved from the firmware upgrade storage area, and the decrypted upgrade driver is enabled, so as to upgrade the firmware.
[0081] In a specific embodiment, the functional module also includes a random access memory.
[0082] In the water heater of the embodiment of the present invention, the copied encrypted upgrade driver is stored in the random access memory, so as to facilitate quick access. When the firmware upgrade is stopped, such as when the upgrade is completed or the power is off, the upgrade driver stored therein can be automatically recycled, thereby preventing the upgrade driver from being mistakenly called due to abnormal circumstances to erase the corresponding firmware program.
[0083] See also Figure 3 and Figure 4 In a specific embodiment, the functional module 410 is any one of a main control module 510 , a water pump control module 530 , a motor control module 520 and an operation display module 540 .
[0084] The water heater of the embodiment of the present invention can upgrade the firmware of the main functional modules, thereby adding new functions to the corresponding functional modules and compensating for the original defects, so as to improve the corresponding functions of the water heater. At the same time, it can prevent the original programs of other functional modules from being damaged due to abnormal conditions during the firmware upgrade, resulting in the subsequent abnormal function of the water heater.
[0085] See also Figure 4 In a specific embodiment, it also includes: a communication circuit 550 connected to the communication bus 50.
[0086] The communication circuit 550 can be used as a firmware upgrade module to obtain firmware upgrade information and transmit it to the corresponding functional module in the water heater through the communication bus 50. For example, the communication circuit 550 is a Bluetooth module or a WIFI module or a communication interface.
[0087] The water heater of the embodiment of the present invention has relatively complete functions and can effectively improve the efficiency and reliability of firmware upgrade.
[0088] In one embodiment, the present invention further provides a computer-readable storage medium having a computer program stored thereon, and a method for upgrading the firmware of a water heater is implemented when the computer program is executed by a processor.
[0089] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and structure diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in an alternative implementation, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the structure diagram and / or the flow chart, and the combination of boxes in the structure diagram and / or the flow chart, can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0090] In addition, the functional modules or units in the various embodiments of the present invention may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.
[0091] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a smart phone, a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0092] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A method for upgrading the firmware of a water heater, characterized in that: include: The functional module of the water heater obtains firmware upgrade information; The firmware upgrade information includes upgrade data, a decryption key and an identity of a corresponding functional module in the water heater; If it is determined that the identity information in the firmware upgrade information is consistent with the pre-stored identity information, the pre-stored encrypted upgrade driver is copied and stored in the first memory, and the encrypted upgrade driver is decrypted according to the decryption key and the pre-stored decryption program; and storing the decrypted upgrade driver in the first memory; Activate the decrypted upgrade driver and perform firmware upgrade based on the upgrade data; After stopping the firmware upgrade, clearing the decrypted upgrade driver in the first memory.
2. The method for upgrading the firmware of a water heater according to claim 1, characterized in that: The first memory is a random access memory.
3. The method for upgrading the firmware of a water heater according to claim 1, characterized in that: The firmware upgrade information also includes an actual verification code; The decrypted upgrade driver is enabled, and the firmware is upgraded based on the upgrade data, which includes: A check code is calculated for the upgrade data, and the calculated check code is compared with the actual check code. If the calculated check code is equal to the actual check code, it is determined that the upgrade data is correctly acquired.
4. A firmware upgrade device for a water heater, characterized in that: include: A firmware information acquisition module, used to obtain firmware upgrade information; The firmware upgrade information includes upgrade data, a decryption key and an identity of a corresponding functional module in the water heater; a decryption module, configured to copy the pre-stored encrypted upgrade driver program to the first memory after determining that the identity information in the firmware upgrade information is consistent with the pre-stored identity information, and decrypt the encrypted upgrade driver program according to the decryption key and the pre-stored decryption program; and storing the decrypted upgrade driver in the first memory; The enabling module is used to enable the decrypted upgrade driver program and perform firmware upgrade based on the upgrade data, and after stopping the firmware upgrade, clear the decrypted upgrade driver program in the first memory.
5. A water heater, characterized in that: include: Multiple functional modules; each of the functional modules is connected to the same communication bus; The functional module includes a second memory and a processor; the second memory stores a computer program, and the processor implements the firmware upgrade method of the water heater according to any one of claims 1 to 3 when executing the computer program.
6. The water heater according to claim 5, characterized in that: The functional module also includes the first memory.
7. The water heater according to claim 5, characterized in that: The functional module is any one of a main control module, a water pump control module, a motor control module and an operation display module.
8. The water heater according to claim 5, characterized in that: Also includes: A communication circuit is connected to the communication bus.
Citation Information
Patent Citations
Module version upgrading method and terminal apparatus
CN105468393A
Control method and control device for program memory and processor system thereof
CN105487875A
Data decryption method and device, and electronic equipment
CN108270787A
Application upgrading method and device, computer device and storage medium
CN110069266A
Upgrading method and device of vehicle assembly and electronic equipment
CN111399884A
