Program upgrading method and device, electronic equipment, program upgrading system and storage medium
Through the coordinated work of the controller and the memory area of the wire controller, the problem of the wire controller program returning to the factory is solved, convenient and efficient program upgrades are achieved, and the upgrade success rate and storage space utilization are improved.
Patent Information
- Application Number
- CN202510232373.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-28
- Publication Date
- 2025-07-25
AI Technical Summary
The upgrade of the wire controller program requires returning to the factory, which leads to inconvenience in upgrading.
The storage area between the controller and the wire controller works in concert. By determining the size of the program to be upgraded by the wire controller, the second memory area is used to perform program upgrades, and if necessary, free up storage space or delete image elements to accommodate the program to be upgraded.
It improves the convenience and success rate of upgrade of the line controller program, optimizes the utilization of storage space, and enhances the compatibility of the program.
Smart Images

Figure CN120371334A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of terminal devices, and in particular, to a program upgrade method, apparatus, electronic device, program upgrade system, and storage medium. Background Art
[0002] At present, some working devices, such as heat pump devices, etc., generally configure a wired controller to facilitate controlling various functions of the heat pump device and viewing relevant parameters of the heat pump. Generally speaking, it is necessary to adjust various functions according to the actual use environment, and thus it is inevitable to adjust the wired controller program.
[0003] At present, when the wired controller program needs to be upgraded, it needs to be sent back to the factory for upgrading, resulting in great inconvenience in upgrading the wired controller program. Summary of the Invention
[0004] In view of this, an object of the present invention is to provide a program upgrade method, apparatus, electronic device, program upgrade system, and storage medium to improve the convenience of upgrading the wired controller program.
[0005] In a first aspect, an embodiment of the present invention provides a program upgrade method applied to a controller. The controller is used to connect to a wired controller. The wired controller includes a first storage area and a second storage area. The first storage area is used to store a first program for the wired controller to run, and the second storage area is used to store a program to be upgraded for the wired controller to run. The method includes: determining the program size of a first program to be upgraded that the wired controller is running; in response to the storage space of the second storage area being greater than or equal to the program size of the first program to be upgraded, downloading the first program to be upgraded and sending the first program to be upgraded to the wired controller. The wired controller is used to: store at least a part of the first program to be upgraded in the second storage area to complete the program upgrade based on at least a part of the first program to be upgraded stored in the second storage area.
[0006] In a possible implementation manner, the method further includes: in response to the storage space of the second storage area being less than the program size of the first program to be upgraded, rejecting the upgrade of the first program to be upgraded.
[0007] In a possible implementation, in response to the storage space of the second storage area being smaller than the program size of the first program to be upgraded, rejecting the upgrade of the first program to be upgraded includes: in response to the sum of the storage space of the second storage area and the first remaining storage space of the first storage area being smaller than the program size of the first program to be upgraded, rejecting the upgrade of the first program to be upgraded, where the first remaining storage space is the difference between the storage space of the first storage area and the program size of the first program; the method further includes: in response to the sum of the storage space of the second storage area and the first remaining storage space of the first storage area being greater than or equal to the program size of the first program to be upgraded, downloading the first program to be upgraded and sending the first program to be upgraded to the line controller, where the line controller is used to: store the first program component of the first program to be upgraded in the second storage area and store the second program component of the first program to be upgraded in the first remaining storage space, so as to complete the program upgrade based on the program components stored in the second storage area and the first remaining storage space.
[0008] In a possible implementation, the line controller further includes a display device for displaying image elements. In response to the sum of the storage space of the second storage area and the first remaining storage space of the first storage area being smaller than the program size of the first program to be upgraded, rejecting the upgrade of the first program to be upgraded includes: in response to the sum of the storage space of the second storage area and the first remaining storage space of the first storage area being smaller than the program size of the first program to be upgraded, determining the first occupied storage space occupied by the image elements related to at least one function in the first program; if the sum of the storage space of the second storage area, the first remaining storage space of the first storage area, and the first occupied storage space is smaller than the program size of the first program to be upgraded, then rejecting the upgrade of the first program to be upgraded; the method further includes: if the sum of the storage space of the second storage area, the first remaining storage space of the first storage area, and the first occupied storage space is greater than or equal to the program size of the first program to be upgraded, then sending the first program to be upgraded and a first instruction to the line controller, where the first instruction is used to: instruct the line controller to delete the image elements related to at least one function, and the line controller is used to: delete the image elements related to at least one function and disable at least one function based on the first instruction, and store the third program component of the first program to be upgraded in the second storage area, store the fourth program component of the first program to be upgraded in the first remaining storage space, and store the fifth program component of the first program to be upgraded in the first occupied storage space, so as to complete the program upgrade based on the program components stored in the second storage area, the first remaining storage space, and the first occupied storage space.
[0009] In a possible implementation, after sending the first program to be upgraded to the remote controller, the method further includes: in response to a second indication from the remote controller, deleting the first program to be upgraded stored in the controller, where the second indication is used to indicate that the remote controller has successfully upgraded the first program to be upgraded; in response to a third indication from the remote controller, resending the first program to be upgraded to the remote controller, so that the remote controller upgrades the first program to be upgraded again, where the third indication is used to indicate that the remote controller has failed to upgrade the first program to be upgraded.
[0010] In a possible implementation, the controller includes a third storage area, a fourth storage area, and a fifth storage area. The third storage area is used to store a second program that the controller runs, the fourth storage area is used to store a third program that the controller runs, and the program versions of the second program and the third program are different. The fifth storage area is used to store the program to be upgraded. Downloading the first program to be upgraded includes: in response to the storage space of the fifth storage area being greater than or equal to the program size of the first program to be upgraded, downloading the first program to be upgraded to the fifth storage area; in response to the storage space of the fifth storage area being less than the program size of the first program to be upgraded and the sum of the storage space of the fifth storage area and the target remaining storage space being greater than or equal to the program size of the first program to be upgraded, downloading the sixth program component of the first program to be upgraded to the fifth storage area and downloading the seventh program component of the first program to be upgraded to the target remaining storage space, where the target remaining storage space includes at least one of the second remaining storage space remaining in the third storage area or the third remaining storage space remaining in the fourth storage area.
[0011] In a possible implementation, the program version of the second program is lower than the program version of the third program, and the third program includes the program currently run by the controller. Before in response to the storage space of the fifth storage area being less than the program size of the first program to be upgraded and the sum of the storage space of the fifth storage area and the target remaining storage space being greater than or equal to the program size of the first program to be upgraded, the method further includes: deleting the second program stored in the third storage area; after sending the first program to be upgraded to the remote controller, the method further includes: downloading the second program to the third storage area.
[0012] In a second aspect, an embodiment of the present invention provides a program upgrade method, which is applied to a remote controller. The remote controller is used to connect to a controller. The remote controller includes a first storage area and a second storage area. The first storage area is used to store a first program that the remote controller runs, and the second storage area is used to store the program to be upgraded that the remote controller runs. The method includes: receiving a first program to be upgraded from the controller, where the first program to be upgraded is used to be run by the remote controller; storing at least part of the program components of the first program to be upgraded in the second storage area, so as to complete the program upgrade based on at least part of the program components stored in the second storage area.
[0013] In a possible implementation, at least part of the program components of the first program to be upgraded are stored in a second storage area, and program upgrade is completed based on at least part of the program components stored in the second storage area, including one of the following: storing all of the first program to be upgraded in the second storage area, and completing program upgrade based on the first program to be upgraded stored in the second storage area; or, storing a first program component of the first program to be upgraded in the second storage area and storing a second program component of the first program to be upgraded in a first remaining storage space, and completing program upgrade based on the program components stored in the second storage area and the first remaining storage space; or, deleting at least one function-related image element and disabling at least one function based on a first instruction sent by a remote controller, storing a third program component of the first program to be upgraded in the second storage area, storing a fourth program component of the first program to be upgraded in the first remaining storage space, and storing a fifth program component of the first program to be upgraded in a first occupied storage space, and completing program upgrade based on the program components stored in the second storage area, the first remaining storage space, and the first occupied storage space, where the first instruction is used to: instruct the remote controller to delete at least one function-related image element, and the remote controller further includes a display device for displaying the image element.
[0014] In a possible implementation, the method further includes: if the upgrade of the first program to be upgraded is successful, sending a second instruction to the controller, where the second instruction is used to: instruct the remote controller that the upgrade of the first program to be upgraded is successful; if the upgrade of the first program to be upgraded fails, sending a third instruction to the controller, where the third instruction is used to: instruct the remote controller that the upgrade of the first program to be upgraded fails; receiving the first program to be upgraded resent by the controller, and performing program upgrade based on the first program to be upgraded resent by the controller, where the first program to be upgraded is resent by the remote controller in response to the third instruction.
[0015] In a possible implementation, when receiving the first program to be upgraded resent by the controller, deleting the first program to be upgraded that has failed in upgrade.
[0016] In a possible implementation, the method further includes: if the cumulative number of failures in upgrading the first program to be upgraded is greater than a threshold number of times, reporting an error log of the upgrade program.
[0017] In a possible implementation, the step of completing program upgrade includes: replacing the program stored in the first storage area from a first program with the first program to be upgraded.
[0018] In a possible implementation, after completing program upgrade, the method further includes: deleting the program components related to the first program to be upgraded stored in other storage spaces except the first storage area, where the other storage spaces include the second storage area.
[0019] In a third aspect, an embodiment of the present invention provides a program upgrade device, which is applied to a controller. The controller is used to connect to a remote controller. The remote controller includes a first storage area and a second storage area. The first storage area is used to store a first program for the remote controller to run, and the second storage area is used to store a program to be upgraded for the remote controller to run. The device includes: a determination module, configured to determine the program size of a first program to be upgraded that the remote controller is running; a response module, configured to, in response to the storage space of the second storage area being greater than or equal to the program size of the first program to be upgraded, download the first program to be upgraded and send the first program to be upgraded to the remote controller. The remote controller is configured to: store at least a part of the first program to be upgraded in the second storage area, so as to complete the program upgrade based on at least a part of the first program to be upgraded stored in the second storage area.
[0020] In a fourth aspect, an embodiment of the present invention provides a program upgrade device, which is applied to a remote controller. The remote controller is used to connect to a controller. The remote controller includes a first storage area and a second storage area. The first storage area is used to store a first program for the remote controller to run, and the second storage area is used to store a program to be upgraded for the remote controller to run. The device includes: a receiving module, configured to receive a first program to be upgraded from the controller, and the first program to be upgraded is used to be run by the remote controller; a program upgrade module, configured to store at least a part of the program components of the first program to be upgraded in the second storage area, so as to complete the program upgrade based on at least a part of the program components stored in the second storage area.
[0021] In a fifth aspect, an embodiment of the present invention provides an electronic device, including a processor and a memory. The memory stores computer-executable instructions that can be executed by the processor. The processor executes the computer-executable instructions to implement the method of the first aspect or the second aspect.
[0022] In a sixth aspect, an embodiment of the present invention provides a program upgrade system, including a controller and a remote controller. Among them, the controller is configured to execute the steps of the method in the first aspect, and the remote controller is configured to execute the steps of the method in the second aspect.
[0023] In a seventh aspect, an embodiment of the present invention provides a computer-readable storage medium. The computer-readable storage medium stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions cause the processor to implement the method of the first aspect.
[0024] The embodiments of the present invention bring the following beneficial effects: The controller is connected to the remote controller, and the remote controller includes a first storage area and a second storage area. The first storage area is used to store the first program for the operation of the remote controller, and the second storage area is used to store the program to be upgraded for the operation of the remote controller. The controller determines the program size of the first program to be upgraded for the operation of the remote controller. Then, in response to the storage space of the second storage area being greater than or equal to the program size of the first program to be upgraded, the first program to be upgraded is downloaded and sent to the remote controller. Then, the remote controller stores at least part of the first program to be upgraded in the second storage area to complete the program upgrade based on at least part of the first program to be upgraded stored in the second storage area. In this way, the upgrade of the remote controller program can be realized through the controller connected to the remote controller, which can improve the convenience of the upgrade of the remote controller program. Moreover, when the storage space of the second storage area of the remote controller is greater than or equal to the program size of the first program to be upgraded, the controller pushes the first program to be upgraded to the remote controller to enable the remote controller to perform the program upgrade, which can also improve the success rate of the upgrade of the remote controller program.
[0025] Other features and advantages of the present invention will be described in the following specification, and in part, will be obvious from the specification, or will be understood by implementing the present invention. The objectives and other advantages of the present invention are achieved and obtained by the specific structures particularly pointed out in the specification, claims, and drawings.
[0026] To make the above objectives, features, and advantages of the present invention more obvious and understandable, the following specific preferred embodiments are given, and in conjunction with the accompanying drawings, the detailed description is as follows. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings required for the description of the specific embodiments or the prior art. Obviously, the following drawings are some embodiments of the present invention. For those skilled in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0028] Figure 1 It is a schematic diagram of an application scenario provided by an embodiment of the present invention; Figure 2 It is a schematic flowchart of a program upgrade method provided by an embodiment of the present invention; Figure 3 It is another schematic diagram of an application scenario provided by an embodiment of the present invention; Figure 4 It is another schematic flowchart of a program upgrade method provided by an embodiment of the present invention; Figure 5 It is a schematic structural diagram of a program upgrade device provided by an embodiment of the present invention; Figure 6 Schematic structural diagram of another program upgrade device provided by an embodiment of the present invention; Figure 7 Schematic structural diagram of an electronic device provided by an embodiment of the present invention. Specific embodiments
[0029] To make the objectives, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Apparently, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0030] Generally speaking, the wired controller of a heat pump device uses a single-chip microcomputer as the main control chip. The read-only memory (ROM) and random access memory (RAM) resources of the single-chip microcomputer are relatively few, and it is impossible to use one program to be compatible with multiple heat pump protocols. Moreover, there are many types of heat pumps on the market, and various functions often need to be adjusted according to the actual use environment, so it is inevitable to adjust the wired controller program. At present, when the wired controller program needs to be upgraded, it needs to be sent back to the factory for upgrading, resulting in great inconvenience in upgrading the wired controller program. Optionally, the heat pump device may at least include a wired controller. In some heat pump devices, the heat pump device further includes a controller.
[0031] In view of this, the embodiments of the present invention provide a program upgrade method, device, electronic device, program upgrade system and storage medium, which can improve the convenience of upgrading the wired controller program.
[0032] Please refer to Figure 1 , Figure 1 which is a schematic diagram of an application scenario provided by an embodiment of the present invention. As shown in the application scenario of Figure 1 , it includes a wired controller, a controller, an external communication module and a cloud data platform.
[0033] Among them, the wired controller is used to view the various functions of the working device and view the relevant parameters of the working device, such as viewing the various functions of a heat pump or an air conditioner and viewing the relevant parameters of a heat pump or an air conditioner. The controller is used to control the wired controller or provide an upgrade channel for remotely upgrading the wired controller program for the wired controller. The external communication module may be, for example, a Bluetooth module, a mobile communication module, a data transfer unit (DTU) or a wireless fidelity (WiFi) module, etc. The cloud data platform is used to store the running program of the wired controller. In addition, the cloud data platform may also be used to store the running program of the controller.
[0034] In this embodiment, the controller can be connected to the cloud data platform through an external communication module, download the program to be upgraded from the cloud data platform through the external communication module, and then send the program to be upgraded to the line controller, so as to realize the program upgrade of the line controller. Optionally, the controller is wired to the line controller, and the controller is connected to the cloud data platform through an external communication module.
[0035] Optionally, the controller can run the program through the controller chip, and the line controller can run the program through the line controller chip. That is to say, the method of this embodiment can be executed by the controller or the controller chip, and by the line controller or the line controller chip.
[0036] In another possible implementation, the external communication module can also be integrated in the controller, which is not limited here.
[0037] Please refer to Figure 2 , Figure 2 which is a schematic flowchart of a program upgrade method provided by an embodiment of the invention. As Figure 2 shown, the method can be applied to a controller and a line controller. The controller is connected to the line controller. The line controller includes a first storage area and a second storage area. The first storage area is used to store the first program that the line controller runs, for example, store the first program that the line controller is currently running. The second storage area is used to store the program to be upgraded that the line controller runs. That is, after the line controller upgrades the program to be upgraded, the program to be upgraded becomes the program that the line controller is currently running. As Figure 2 shown, the method can include: S210. The controller determines the program size of the first program to be upgraded that the line controller runs.
[0038] Among them, the program size of the first program to be upgraded can be understood as the data size of the program package of the first program to be upgraded.
[0039] S220. In response to the storage space of the second storage area being greater than or equal to the program size of the first program to be upgraded, the controller downloads the first program to be upgraded and sends the first program to be upgraded to the line controller.
[0040] In this embodiment, optionally, the first program to be upgraded can be stored in the cloud data platform. Then the controller can download the first program to be upgraded from the cloud data platform and then send the first program to be upgraded to the line controller.
[0041] S230. The line controller stores at least a part of the first program to be upgraded in the second storage area to complete the program upgrade based on at least a part of the first program to be upgraded stored in the second storage area.
[0042] In this embodiment, after receiving the first program to be upgraded from the controller, the remote controller stores at least a part of the first program to be upgraded in the second storage area, and thus completes the program upgrade based on at least a part of the first program to be upgraded stored in the second storage area.
[0043] It should be noted that storing at least a part of the first program to be upgraded in the second storage area may mean storing a partial program component of the first program to be upgraded in the second storage area, or storing all program components of the first program to be upgraded in the second storage area, which is not limited herein.
[0044] In this embodiment, the controller is connected to the remote controller. The remote controller includes a first storage area and a second storage area. The first storage area is used to store the first program for the remote controller to run, and the second storage area is used to store the program to be upgraded for the remote controller to run. The controller determines the program size of the first program to be upgraded for the remote controller to run; then, in response to the storage space of the second storage area being greater than or equal to the program size of the first program to be upgraded, the controller downloads the first program to be upgraded and sends the first program to be upgraded to the remote controller. Then, the remote controller stores at least a part of the first program to be upgraded in the second storage area to complete the program upgrade based on at least a part of the first program to be upgraded stored in the second storage area. In this way, the program upgrade of the remote controller can be realized through the controller connected to the remote controller, which can improve the convenience of the program upgrade of the remote controller. Moreover, when the storage space of the second storage area of the remote controller is greater than or equal to the program size of the first program to be upgraded, the controller can push the first program to be upgraded to the remote controller to enable the remote controller to perform the program upgrade, which can also improve the success rate of the program upgrade of the remote controller.
[0045] In a possible implementation manner, the method further includes: The controller rejects the upgrade of the first program to be upgraded in response to the storage space of the second storage area being less than the program size of the first program to be upgraded.
[0046] In this embodiment, if the storage space of the second storage area of the remote controller is less than the program size of the first program to be upgraded, the controller rejects the upgrade of the first program to be upgraded. In this way, the situation of upgrade failure caused by the storage of the second storage area being less than the program size of the first program to be upgraded can be reduced, which can improve the success rate of the remote controller upgrade and reduce the waste of resources caused by invalid upgrades.
[0047] In a possible implementation manner, the controller rejects the upgrade of the first program to be upgraded in response to the storage space of the second storage area being less than the program size of the first program to be upgraded, including: The controller rejects the upgrade of the first program to be upgraded in response to the sum of the storage space of the second storage area and the first remaining storage space of the first storage area being less than the program size of the first program to be upgraded, where the first remaining storage space is the difference between the storage space of the first storage area and the program size of the first program.
[0048] Correspondingly, the method further includes: The controller downloads the first program to be upgraded and sends the first program to be upgraded to the line controller in response to the sum of the storage space of the second storage area and the first remaining storage space of the first storage area being greater than or equal to the program size of the first program to be upgraded.
[0049] Among them, the first remaining space can be understood as the unused storage space remaining in the first storage area after storing the first program.
[0050] In this embodiment, if the sum of the storage space of the second storage area and the first remaining storage space of the first storage area is greater than or equal to the program size of the first program to be upgraded, it means that the line controller has enough storage space to accommodate the first program to be upgraded. Then the controller can download the first program to be upgraded and send the first program to be upgraded to the line controller. If the sum of the storage space of the second storage area and the first remaining storage space of the first storage area is less than the program size of the first program to be upgraded, it means that the storage space of the line controller is not enough to accommodate the first program to be upgraded. Therefore, the controller can reject the upgrade of the first program to be upgraded.
[0051] Correspondingly, the line controller stores the first program component of the first program to be upgraded in the second storage area and stores the second program component of the first program to be upgraded in the first remaining storage space, so as to complete the program upgrade based on the program components stored in the second storage area and the first remaining storage space.
[0052] Among them, the first program component and the second program component can be different program components in the first program to be upgraded. It should be noted that the first program component and the second program component can be part or all of the first program to be upgraded. That is to say, the first program component is a part of the first program to be upgraded, and the second program component is another part of the first program to be upgraded. In this embodiment, since the sum of the storage space of the second storage area and the first remaining storage space of the first storage area is greater than or equal to the program size of the first program to be upgraded, the first program component of the first program to be upgraded is stored in the second storage area and the second program component of the first program to be upgraded is stored in the first remaining storage space, so as to complete the program upgrade based on the program components stored in the second storage area and the first remaining storage space.
[0053] In this embodiment, by using the first remaining storage space of the first storage area and the second storage area to accommodate the first program to be upgraded, the storage space of the remote controller can be better utilized to accommodate a larger program to be upgraded, thereby improving the compatibility of the programs that can be upgraded.
[0054] In a possible implementation manner, the remote controller further includes a display device for displaying image elements. When the sum of the storage space of the second storage area and the first remaining storage space of the first storage area is less than the program size of the first program to be upgraded, the controller rejects the upgrade of the first program to be upgraded, including: When the sum of the storage space of the second storage area and the first remaining storage space of the first storage area is less than the program size of the first program to be upgraded, the controller determines the first occupied storage space occupied by the image elements related to at least one function in the first program; if the sum of the storage space of the second storage area, the first remaining storage space of the first storage area and the first occupied storage space is less than the program size of the first program to be upgraded, then the upgrade of the first program to be upgraded is rejected.
[0055] Among them, the function can be, for example, a control function, such as a control function for controlling the working parameters of a heat pump device, or a viewing function, such as a viewing function for viewing the working parameters of a heat pump device, etc., which are not limited here. Specifically, the first program includes the image elements related to the interface display. It should be understood that the display device can display the interface related to the function, and in the interface, the image elements related to the function need to be displayed. The specific image elements are related to the design of the interface, which are not limited here.
[0056] Correspondingly, the method further includes: If the sum of the storage space of the second storage area, the first remaining storage space of the first storage area and the first occupied storage space is greater than or equal to the program size of the first program to be upgraded, the controller sends the first program to be upgraded and a first instruction to the remote controller, and the first instruction is used for: instructing the remote controller to delete the image elements related to at least one function.
[0057] Among them, the first instruction is used to instruct the remote controller to delete the image elements related to at least one function, so that the remote controller deletes the image elements related to at least one function, and further frees up storage space to store part of the program composition of the first program to be upgraded.
[0058] In this embodiment, if the sum of the storage space of the second storage area and the first remaining storage space of the first storage area is less than the program size of the first program to be upgraded, the controller may further determine the first occupied storage space occupied by the image elements related to at least one function in the first program. If the sum of the storage space of the second storage area, the first remaining storage space of the first storage area, and the first occupied storage space is less than the program size of the first program to be upgraded, the controller rejects the upgrade of the first program to be upgraded. If the sum of the storage space of the second storage area, the first remaining storage space of the first storage area, and the first occupied storage space is greater than or equal to the program size of the first program to be upgraded, the controller sends the first program to be upgraded and a first instruction to the remote controller, and the remote controller deletes the image elements related to at least one function according to the first instruction, so that the remote controller can free up enough storage space to store the first program to be upgraded.
[0059] Correspondingly, the remote controller deletes the image elements related to at least one function and disables at least one function based on the first instruction, stores the third program component of the first program to be upgraded in the second storage area, stores the fourth program component of the first program to be upgraded in the first remaining storage space, and stores the fifth program component of the first program to be upgraded in the first occupied storage space, so as to complete the program upgrade based on the program components stored in the second storage area, the first remaining storage space, and the first occupied storage space.
[0060] Among them, the third program component, the fourth program component, and the fifth program component may be different program components in the first program to be upgraded. It should be noted that the third program component, the fourth program component, and the fifth program component may be part or all of the first program to be upgraded. That is to say, the third program component is a part of the first program to be upgraded, the fourth program component is another part of the first program to be upgraded, and the fifth program component is yet another part of the first program to be upgraded. In this embodiment, the remote controller may delete the image elements related to at least one function and disable at least one function based on the first instruction, store the third program component of the first program to be upgraded in the second storage area, store the fourth program component of the first program to be upgraded in the first remaining storage space, and store the fifth program component of the first program to be upgraded in the first occupied storage space, so as to complete the program upgrade based on the program components stored in the second storage area, the first remaining storage space, and the first occupied storage space.
[0061] In this embodiment, since the program needs to be upgraded, the old program (the first program) may no longer be used after the upgrade. Therefore, the controller may instruct the remote controller to delete the image elements related to at least one function in the first program, and the remote controller can free up a larger storage space in the first storage area, which can better utilize the storage space of the remote controller to accommodate a larger program to be upgraded, thereby improving the compatibility of the programs that can be upgraded.
[0062] In a possible implementation, after the controller sends the first program to be upgraded to the remote controller, the method further includes: The controller deletes the first program to be upgraded stored in the controller in response to a second indication from the remote controller, where the second indication is used to indicate that the remote controller has successfully upgraded the first program to be upgraded; The controller re-sends the first program to be upgraded to the remote controller in response to a third indication from the remote controller, so that the remote controller re-upgrades the first program to be upgraded, where the third indication is used to indicate that the remote controller has failed to upgrade the first program to be upgraded.
[0063] In this embodiment, if the remote controller successfully upgrades the first program to be upgraded, the remote controller sends a second indication to the controller to indicate that the remote controller has successfully upgraded the first program to be upgraded. Then the controller can delete the first program to be upgraded, thereby releasing the storage space of the controller. If the remote controller fails to upgrade the first program to be upgraded, it sends a third indication to the controller. After receiving the third indication, the controller re-sends the first program to be upgraded to the remote controller, so that the remote controller re-upgrades the first program to be upgraded. This can release the storage space of the controller when the upgrade is successful and upgrade again when the upgrade fails, which is beneficial to improving the success rate of the remote controller program upgrade.
[0064] In a possible implementation, when receiving the first program to be upgraded re-sent by the controller, the failed first program to be upgraded is deleted.
[0065] In this embodiment, when receiving the first program to be upgraded re-sent by the controller, the failed first program to be upgraded is deleted, which can release the storage space and thus improve the success rate of re-upgrading.
[0066] In a possible implementation, the method further includes: if the cumulative number of failures in upgrading the first program to be upgraded is greater than the number threshold, an error log of the upgrade program is reported.
[0067] In this embodiment, if the cumulative number of failures in upgrading the first program to be upgraded is greater than the number threshold, it indicates that there may be some abnormal reasons for the multiple upgrade failures. Then the error log of the upgrade program can be reported to analyze the reasons for the upgrade failures.
[0068] It should be noted that the number threshold can be set as needed, for example, set as an integer not less than 2, and there is no limitation here.
[0069] In a possible implementation, the controller includes a third storage area, a fourth storage area, and a fifth storage area. The third storage area is used to store the second program that the controller runs. The fourth storage area is used to store the third program that the controller runs. The program versions of the second program and the third program are different. The fifth storage area is used to store the program to be upgraded. The controller downloading the first program to be upgraded includes: The controller, in response to the storage space of the fifth storage area being greater than or equal to the program size of the first program to be upgraded, downloads the first program to be upgraded to the fifth storage area; or, the controller, in response to the storage space of the fifth storage area being less than the program size of the first program to be upgraded and the sum of the storage space of the fifth storage area and the target remaining storage space being greater than or equal to the program size of the first program to be upgraded, downloads the sixth program component of the first program to be upgraded to the fifth storage area and downloads the seventh program component of the first program to be upgraded to the target remaining storage space. The target remaining storage space includes at least one of the second remaining storage space remaining in the third storage area or the third remaining storage space remaining in the fourth storage area.
[0070] Among them, the second program and the third program can be the programs that the controller runs. Exemplarily, the second program can be the initial version program that the controller runs, for example, the program when the controller leaves the factory. The third program can be the program that the controller is currently running. In this embodiment, by saving the initial version program in the controller, when the controller runs abnormally, it can be reflashed using the stored initial version program, so that the controller can run normally, which can reduce the situation of abnormal operation of the controller.
[0071] The program components in this embodiment can be one or more. For example, the seventh program component can be one or more. Among them, the sixth program component and the seventh program component can be different program components in the first program to be upgraded. The second remaining storage space can refer to the storage space in the third storage area except for the space occupied by the second program. The third remaining storage space can be the storage space in the fourth storage area except for the space occupied by the third program. In this embodiment, if the storage space of the fifth storage area of the controller is greater than or equal to the program size of the first program to be upgraded, the first program to be upgraded is downloaded to the fifth storage area. In this way, the controller can obtain the first program to be upgraded from the fifth storage area and send it to the line controller. If the controller downloads the sixth program component of the first program to be upgraded to the fifth storage area and downloads the seventh program component of the first program to be upgraded to the target remaining storage space, the controller can obtain the sixth program component and the seventh program component from the fifth storage area and the target remaining storage space respectively, so as to form the first program to be upgraded and send it to the line controller.
[0072] In this embodiment, the controller downloads the sixth program component of the first program to be upgraded to the fifth storage area and downloads the seventh program component of the first program to be upgraded to the target remaining storage space, which can improve the success rate of the program upgrade of the remote controller.
[0073] It should be noted that the fifth storage area can not only be used to store the first program to be upgraded of the remote controller, but also be used to store the second program to be upgraded that the controller runs. That is to say, if the controller needs to upgrade the program it runs, the second program to be upgraded can be stored in the fifth storage area. In this way, the resource utilization rate of the storage space of the controller can be improved.
[0074] In a possible implementation manner, the program version of the second program is lower than the program version of the third program. The third program includes the program that the controller is currently running. Before the controller responds that the storage space of the fifth storage area is less than the program size of the first program to be upgraded and the sum of the storage space of the fifth storage area and the target remaining storage space is greater than or equal to the program size of the first program to be upgraded, the method further includes: The controller deletes the second program stored in the third storage area; after the controller sends the first program to be upgraded to the remote controller, the method further includes: The controller downloads the second program to the third storage area.
[0075] In this embodiment, the controller can delete the second program stored in the third storage area, so that the third storage area has more storage space to accommodate the first program to be upgraded. Then, after sending the first program to be upgraded to the remote controller or after the remote controller successfully upgrades the first program to be upgraded, the controller downloads the second program to the third storage area. In this way, the controller can not only accommodate the first program to be upgraded with a larger program size, but also reduce the abnormal operation of the controller.
[0076] It should be noted that in this embodiment, the controller can trigger the upgrade of the remote controller when the remote controller is in the working state or the non-working state, for example, by sending the first program to be upgraded to the remote controller.
[0077] It should be understood that correspondingly, in this embodiment, the remote controller can store at least part of the program components of the first program to be upgraded in the second storage area to complete the program upgrade based on at least part of the program components stored in the second storage area.
[0078] For example, the remote controller may store all of the first program to be upgraded in the second storage area to complete the program upgrade based on the first program to be upgraded stored in the second storage area; or store the first program component of the first program to be upgraded in the second storage area and store the second program component of the first program to be upgraded in the first remaining storage space to complete the program upgrade based on the program components stored in the second storage area and the first remaining storage space; or delete the image elements related to at least one function and disable at least one function based on the first instruction sent by the remote controller, and store the third program component of the first program to be upgraded in the second storage area, store the fourth program component of the first program to be upgraded in the first remaining storage space, and store the fifth program component of the first program to be upgraded in the first occupied storage space to complete the program upgrade based on the program components stored in the second storage area, the first remaining storage space, and the first occupied storage space. The first instruction is used to: instruct the remote controller to delete the image elements related to at least one function, and the remote controller further includes a display device for displaying the image elements.
[0079] In this embodiment, the steps for the remote controller to complete the program upgrade may include: replacing the program stored in the first storage area with the first program to be upgraded from the first program, that is, the first program stored in the first storage area is overwritten by the first program to be upgraded and becomes the first program to be upgraded.
[0080] In another possible implementation, the steps for the remote controller to complete the program upgrade may also be to point the program pointer to the storage space of the first program to be upgraded.
[0081] Optionally, since the remote controller may store some program components of the first program to be upgraded outside the first storage area, but can only run the first program to be upgraded in the first storage area during operation, after the remote controller completes the program upgrade, it deletes the program components related to the first program to be upgraded stored in other storage spaces except the first storage area. The other storage spaces include the second storage area. In this way, the storage resources of the remote controller can be released.
[0082] For ease of understanding, the solutions of the embodiments of the present application will be exemplarily described below with reference to the structural schematic diagrams of the remote controller and the controller.
[0083] Please refer to Figure 3 , Figure 3 which is another schematic diagram of an application scenario provided by the embodiment of the present invention. As Figure 3As shown in the figure, the controller includes a controller chip. The storage area of the controller chip is divided into at least four parts, including but not limited to a boot area 1, a program area 1, a backup area 1, and a temporary area 1. Among them, the boot area 1 is used to store the boot loader program to complete the relocation and startup of the application program; the program area 1 is used to save the initial version of the program; the backup area 1 is used to run the upgraded program, and the temporary area 1 is used to temporarily save the program data to be upgraded. The program area 1 can be called the third storage area, the backup area 1 can be called the fourth storage area, and the temporary area 1 can be called the fifth storage area. The program data to be upgraded can be, for example, the data of the program to be upgraded.
[0084] The remote controller includes a remote controller chip. The storage area of the remote controller chip is planned as follows: the chip storage area is divided into at least three parts. The boot area 2 is used to store the boot loader program to complete the relocation and startup of the application program; the program area 2 is used to save the application program; the temporary area 2 is used to temporarily save the program data to be upgraded. The program area 2 can be called the first storage area, and the temporary area 2 can be called the second storage area.
[0085] Please refer to Figure 4 , Figure 4 which is a schematic flowchart of another program upgrade method provided for the embodiment. As Figure 4 shown, the method may include: S410: The server sends the software to be upgraded to the external communication module, and the external communication module requests software upgrade from the controller.
[0086] In this embodiment, the server first sends the software code, software version number, and program size to be upgraded to the controller through the external communication module, and then waits for the controller to reply whether to allow the upgrade.
[0087] S420: The controller determines whether it meets the upgrade conditions.
[0088] In this embodiment, the controller compares the received software code, software version number, and program size to determine whether the upgrade to be performed is suitable for the remote controller to be upgraded, so as to avoid upgrading the wrong program. Specifically, the controller first verifies the integrity and authenticity of the upgrade information (such as software code, version number) received from the server. This is usually achieved through methods such as digital signatures and hash checks to prevent malicious attacks or data corruption. If the program to be upgraded is large and the space in the temporary area of the controller is insufficient, the unused space in the backup area is allocated to the temporary area. After the program is confirmed, the controller sends information about running the upgrade to the server through the external communication module.
[0089] S430: The controller receives the software program sent by the server and saves the program in the temporary area 1 of the controller.
[0090] S440: The controller sends the program in the temporary area 1 to the remote controller.
[0091] S450: The remote controller saves the program sent by the controller in the temporary area 2 of the remote controller.
[0092] S460: The remote controller verifies the program in the temporary area 2. After confirming that the program is complete and error-free, it starts to execute the jump area: copies the program in the temporary area 2 to the program area 2, resets the program, and runs the program area 2 again to start running the updated program.
[0093] In this embodiment, the remote controller can verify the integrity based on the software code and check the compatibility between the current system version and the software version to be upgraded based on the version number. If the new version is not compatible with the current system, the upgrade may cause the system to crash or the function to be abnormal.
[0094] S470: After the remote controller completes the upgrade, it replies to the controller that the upgrade is completed. The controller then reports the upgrade completion information to the external communication module, and finally the external communication module replies to the server that the upgrade is successful.
[0095] In this embodiment, after the remote controller completes the upgrade, the temporary area 2 of the remote controller and the temporary area 1 of the controller are emptied.
[0096] S480: If the remote controller does not reply to the controller about the upgrade completion information for a long time after the upgrade, return to execute the steps of S410.
[0097] In this embodiment, if the remote controller does not reply to the controller about the upgrade completion information for a long time after the upgrade, it is considered that there may be a packet loss situation when the controller obtains the program package from the server. Therefore, return to execute the steps of S410.
[0098] In this embodiment, various problems encountered by the user side are processed through remote upgrade, without the need for personnel to go to the site and without disassembling the heat pump. Moreover, the program storage area of the remote controller is only divided into three parts: the boost loader area, the program area, and the temporary area, without wasting program space, thereby reducing the limitation on the model of the main control chip of the remote controller for the remote upgrade function. In addition, the space of the controller's temporary area can be dynamically adjusted. When the memory of the controller's main control chip is small and the program of the remote controller is large, the remote controller upgrade can still be completed. Furthermore, the remote controller only communicates with the controller and does not communicate directly with the server. Therefore, the remote controller can realize remote upgrade without a networking module.
[0099] Please refer to Figure 5 , Figure 5 which is a schematic structural diagram of a program upgrade device provided by an embodiment of the present invention. The device in this embodiment is applied to the controller, as Figure 5 The device shown may include: A determination module 510 is configured to determine the program size of a first program to be upgraded that the line controller runs; a response module 520 is configured to, in response to the storage space of a second storage area being greater than or equal to the program size of the first program to be upgraded, download the first program to be upgraded and send the first program to be upgraded to the line controller, where the line controller is configured to store at least part of the first program to be upgraded in the second storage area to complete program upgrade based on at least part of the first program to be upgraded stored in the second storage area.
[0100] Please refer to Figure 6 , Figure 6 which is a schematic structural diagram of another program upgrade device provided by an embodiment of the present invention. The device of this embodiment is applied to a line controller. For example, Figure 6 the device shown may include: A receiving module 610 is configured to receive a first program to be upgraded from a controller, where the first program to be upgraded is used to be run by the line controller; a program upgrade module 620 is configured to store at least part of the program components of the first program to be upgraded in a second storage area to complete program upgrade based on at least part of the program components stored in the second storage area.
[0101] The program upgrade device provided by the embodiment of the present invention has the same technical features as the program upgrade method provided by the above embodiment, so it can also solve the same technical problems and achieve the same technical effects. The device of this embodiment may refer to the description of the method embodiment above and will not be elaborated here.
[0102] This embodiment further provides an electronic device, including a processor and a memory. The memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the above program upgrade method. The electronic device may be a server or a terminal device.
[0103] Refer to Figure 7 As shown, the electronic device includes a processor 100 and a memory 101. The memory 101 stores computer-executable instructions that can be executed by the processor 100, and the processor 100 executes the computer-executable instructions to implement the above program upgrade method.
[0104] Furthermore, Figure 7 the electronic device shown further includes a bus 102 and a communication interface 103. The processor 100, the communication interface 103, and the memory 101 are connected through the bus 102.
[0105] Among them, the memory 101 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk memory. The communication connection between this system network element and at least one other network element is realized through at least one communication interface 103 (which can be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. can be used. The bus 102 can be an ISA bus, a PCI bus, an EISA bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of simplicity of representation, Figure 7 only a bidirectional arrow is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0106] The processor 100 may be an integrated circuit chip with signal processing capabilities. In the implementation process, the steps of the above method can be completed by the integrated logic circuit in the hardware of the processor 100 or instructions in the form of software. The above-mentioned processor 100 may be a general-purpose processor, including a central processing unit (CPU for short), a network processor (NP for short), etc.; it may also be a digital signal processor (DSP for short), an application specific integrated circuit (ASIC for short), a field programmable gate array (FPGA for short), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. It can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present invention. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in combination with the embodiments of the present invention can be directly embodied as being executed and completed by a hardware decoding processor, or executed and completed by a combination of hardware and software modules in the decoding processor. The software module may be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. This storage medium is located in the memory 101, and the processor 100 reads the information in the memory 101 and combines its hardware to complete the steps of the method in the foregoing embodiments.
[0107] The processor in the above electronic device can implement the steps in the above program upgrade method by executing computer-executable instructions.
[0108] This embodiment also provides a system, which includes a controller and a remote controller. The controller and the remote controller are used to execute their respective steps in the above method embodiment.
[0109] This embodiment also provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the above program upgrade method.
[0110] The computer-executable instructions stored in the above computer-readable storage medium can implement the steps in the above program upgrade method by executing the computer-executable instructions.
[0111] This embodiment also provides a computer program product, which includes program codes. The instructions included in the program codes can be used to execute the methods in the foregoing method embodiments. For specific implementation, reference can be made to the method embodiments and will not be elaborated herein.
[0112] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the above-described system and device can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.
[0113] In addition, in the description of the embodiments of the present invention, unless otherwise clearly specified and limited, the terms "installation", "connection", and "connection" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be directly connected or indirectly connected through an intermediate medium, and it can be the communication inside two components. For those skilled in the art, the specific meanings of the above terms in the present invention can be understood according to specific situations.
[0114] If a function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods in the various embodiments of the present invention. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs that can store program codes.
[0115] In the description of the present invention, it should be noted that the orientation or positional relationship indicated by the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc. is based on the orientation or positional relationship shown in the drawings. It is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it should not be construed as a limitation to the present invention. In addition, the terms "first", "second", and "third" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance.
[0116] Finally, it should be noted that the above embodiments are only specific embodiments of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit it. The protection scope of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art within the technical scope disclosed by the present invention can still modify the technical solutions recorded in the foregoing embodiments, or can easily conceive of changes, or make equivalent replacements for some of the technical features; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered by the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims
1. A program upgrade method, characterized in that, Applied to a controller, the controller is used to connect to a remote controller. The remote controller includes a first storage area and a second storage area. The first storage area is used to store a first program for the operation of the remote controller, and the second storage area is used to store a program to be upgraded for the operation of the remote controller. The method includes: Determine the program size of a first program to be upgraded that is running on the remote controller; In response to the storage space of the second storage area being greater than or equal to the program size of the first program to be upgraded, download the first program to be upgraded and send the first program to be upgraded to the remote controller. The remote controller is used to: store at least a part of the first program to be upgraded in the second storage area to complete program upgrade based on at least a part of the first program to be upgraded stored in the second storage area.
2. The method according to claim 1, wherein The method further includes: In response to the storage space of the second storage area being less than the program size of the first program to be upgraded, reject the upgrade of the first program to be upgraded.
3. The method according to claim 2, wherein The step of, in response to the storage space of the second storage area being less than the program size of the first program to be upgraded, rejecting the upgrade of the first program to be upgraded, includes: In response to the sum of the storage space of the second storage area and the first remaining storage space of the first storage area being less than the program size of the first program to be upgraded, reject the upgrade of the first program to be upgraded. The first remaining storage space is the difference between the storage space of the first storage area and the program size of the first program. The method further includes: In response to the sum of the storage space of the second storage area and the first remaining storage space of the first storage area being greater than or equal to the program size of the first program to be upgraded, download the first program to be upgraded and send the first program to be upgraded to the remote controller. The remote controller is used to: store a first program component of the first program to be upgraded in the second storage area and store a second program component of the first program to be upgraded in the first remaining storage space to complete program upgrade based on the program components stored in the second storage area and the first remaining storage space.
4. The method according to claim 3, wherein The remote controller further includes a display device for displaying image elements. The step of, in response to the sum of the storage space of the second storage area and the first remaining storage space of the first storage area being less than the program size of the first program to be upgraded, rejecting the upgrade of the first program to be upgraded, includes: In response to the sum of the storage space of the second storage area and the first remaining storage space of the first storage area being less than the program size of the first program to be upgraded, determine the first occupied storage space occupied by image elements related to at least one function in the first program; If the sum of the storage space of the second storage area, the first remaining storage space of the first storage area, and the first occupied storage space is less than the program size of the first program to be upgraded, then reject the upgrade of the first program to be upgraded; The method further includes: If the storage space of the second storage area, the sum of the first remaining storage space of the first storage area and the first occupied storage space is greater than or equal to the program size of the first program to be upgraded, send the first program to be upgraded and a first indication to the line controller, where the first indication is used to: indicate the line controller to delete the image elements related to at least one function, and the line controller is used to: delete the image elements related to at least one function based on the first indication and disable at least one function, and store the third program component of the first program to be upgraded in the second storage area, store the fourth program component of the first program to be upgraded in the first remaining storage space, and store the fifth program component of the first program to be upgraded in the first occupied storage space, so as to complete the program upgrade based on the program components stored in the second storage area, the first remaining storage space and the first occupied storage space.
5. The method according to any one of claims 1-4, characterized in that, After sending the first program to be upgraded to the line controller, the method further includes: In response to a second indication from the line controller, delete the first program to be upgraded stored in the controller, where the second indication is used to: indicate that the line controller has successfully upgraded the first program to be upgraded; In response to a third indication from the line controller, re-send the first program to be upgraded to the line controller, so that the line controller re-upgrades the first program to be upgraded, where the third indication is used to: indicate that the line controller has failed to upgrade the first program to be upgraded.
6. The method according to any one of claims 1-4, characterized in that The controller includes a third storage area, a fourth storage area and a fifth storage area. The third storage area is used to store a second program that the controller runs, the fourth storage area is used to store a third program that the controller runs, the program versions of the second program and the third program are different, and the fifth storage area is used to store the program to be upgraded. The downloading of the first program to be upgraded includes: In response to the storage space of the fifth storage area being greater than or equal to the program size of the first program to be upgraded, download the first program to be upgraded to the fifth storage area; In response to the storage space of the fifth storage area being less than the program size of the first program to be upgraded and the sum of the storage space of the fifth storage area and the target remaining storage space being greater than or equal to the program size of the first program to be upgraded, download the sixth program component of the first program to be upgraded to the fifth storage area and download the seventh program component of the first program to be upgraded to the target remaining storage space, where the target remaining storage space includes at least one of the second remaining storage space remaining in the third storage area or the third remaining storage space remaining in the fourth storage area.
7. The method according to claim 6, wherein The program version of the second program is lower than the program version of the third program, and the third program includes the program currently run by the controller. Before the step of in response to the storage space of the fifth storage area being less than the program size of the first program to be upgraded and the sum of the storage space of the fifth storage area and the target remaining storage space being greater than or equal to the program size of the first program to be upgraded, the method further includes: Delete the second program stored in the third storage area; After sending the first program to be upgraded to the remote controller, the method further includes: Download the second program to the third storage area.
8. A program upgrade method, characterized in that, Applied to a remote controller that is used to connect to a controller. The remote controller includes a first storage area and a second storage area. The first storage area is used to store a first program for the remote controller to run, and the second storage area is used to store a program to be upgraded for the remote controller to run. The method includes: Receive a first program to be upgraded from the controller, where the first program to be upgraded is used to be run by the remote controller; Store at least part of the program components of the first program to be upgraded in the second storage area, so as to complete the program upgrade based on the at least part of the program components stored in the second storage area.
9. The method according to claim 8, characterized in that The storing at least part of the program components of the first program to be upgraded in the second storage area to complete the program upgrade based on the at least part of the program components stored in the second storage area includes one of the following: Store all of the first program to be upgraded in the second storage area to complete the program upgrade based on the first program to be upgraded stored in the second storage area; or, Store a first program component of the first program to be upgraded in the second storage area and store a second program component of the first program to be upgraded in a first remaining storage space, so as to complete the program upgrade based on the program components stored in the second storage area and the first remaining storage space; or, Delete at least one function-related image element and disable the at least one function based on a first instruction sent by the remote controller, and store a third program component of the first program to be upgraded in the second storage area, store a fourth program component of the first program to be upgraded in a first remaining storage space, and store a fifth program component of the first program to be upgraded in a first occupied storage space, so as to complete the program upgrade based on the program components stored in the second storage area, the first remaining storage space, and the first occupied storage space. The first instruction is used to: instruct the remote controller to delete the at least one function-related image element. The remote controller further includes a display device for displaying image elements.
10. The method according to claim 8 or 9, characterized in that The method further includes: If the upgrade of the first program to be upgraded is successful, send a second instruction to the controller. The second instruction is used to: instruct the remote controller that the upgrade of the first program to be upgraded is successful; If the upgrade of the first program to be upgraded fails, send a third instruction to the controller. The third instruction is used to: instruct the remote controller that the upgrade of the first program to be upgraded fails; Receive the first program to be upgraded re-sent by the controller, and perform program upgrade based on the first program to be upgraded re-sent by the controller. The first program to be upgraded is re-sent to the remote controller by the controller in response to the third instruction.
11. A program upgrade device, characterized in that, Applied to a controller which is used to connect to a remote controller. The remote controller includes a first storage area and a second storage area. The first storage area is used to store a first program for the operation of the remote controller, and the second storage area is used to store a program to be upgraded for the operation of the remote controller. The device includes: A determination module, configured to determine the program size of a first program to be upgraded that is running on the remote controller; A response module, configured to, in response to the storage space of the second storage area being greater than or equal to the program size of the first program to be upgraded, download the first program to be upgraded and send the first program to be upgraded to the remote controller. The remote controller is configured to store at least a part of the first program to be upgraded in the second storage area to complete program upgrade based on at least a part of the first program to be upgraded stored in the second storage area.
12. A program upgrade device, characterized in that, Applied to a remote controller which is used to connect to a controller. The remote controller includes a first storage area and a second storage area. The first storage area is used to store a first program for the operation of the remote controller, and the second storage area is used to store a program to be upgraded for the operation of the remote controller. The device includes: A receiving module, configured to receive a first program to be upgraded from the controller, and the first program to be upgraded is used to be run by the remote controller; A program upgrade module, configured to store at least a part of the program components of the first program to be upgraded in the second storage area to complete program upgrade based on the at least a part of the program components stored in the second storage area.
13. An electronic device, characterized in that, Comprising a processor and a memory. The memory stores computer-executable instructions that can be executed by the processor. The processor executes the computer-executable instructions to implement the method according to any one of claims 1-7, or to implement the method according to any one of claims 8-10.
14. A program upgrade system, characterized in that, Comprising a controller and a remote controller. Among them, the controller is configured to execute the steps of the method according to any one of claims 1-7, and the remote controller is configured to execute the steps of the method according to any one of claims 8-10.
15. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions cause the processor to implement the method according to any one of claims 1-7, or to implement the method according to any one of claims 8-10.