Program upgrading method and device for air conditioner, air conditioner and storage medium

文档序号:1934757 发布日期:2021-12-07 浏览:9次 中文

阅读说明:本技术 空调器的程序升级方法、装置、空调器和存储介质 (Program upgrading method and device for air conditioner, air conditioner and storage medium ) 是由 单联瑜 于 2021-09-14 设计创作,主要内容包括:本公开是关于一种空调器的程序升级方法、装置、空调器和存储介质,所述空调器包括存储器,所述存储器包括第一存储区和第二存储区,所述第一存储区存储有原程序文件,所述第二存储区被标记为闲置存储区;所述方法包括:接收程序升级指令,并根据所述程序升级指令向服务器发送下载请求,所述下载请求用于下载最新版本的程序文件;将所述最新版本的程序文件保存至所述第二存储区内;如果所述最新版本的程序文件下载完成,且空调器处于目标状态,则运行所述最新版本的程序文件,并将所述第一存储区中存储的原程序文件删除,以及将所述删除完所述原程序文件的第一存储区标记为闲置存储区。(The disclosure relates to a program upgrading method and device of an air conditioner, the air conditioner and a storage medium, wherein the air conditioner comprises a storage, the storage comprises a first storage area and a second storage area, the first storage area stores original program files, and the second storage area is marked as an idle storage area; the method comprises the following steps: receiving a program upgrading instruction, and sending a downloading request to a server according to the program upgrading instruction, wherein the downloading request is used for downloading a program file of a latest version; saving the program file of the latest version into the second storage area; and if the program file of the latest version is downloaded completely and the air conditioner is in a target state, operating the program file of the latest version, deleting the original program file stored in the first storage area, and marking the first storage area in which the original program file is deleted as an idle storage area.)

1. The program upgrading method of the air conditioner is characterized in that the air conditioner comprises a memory, the memory comprises a first memory area and a second memory area, the first memory area stores original program files, and the second memory area is marked as an idle memory area; the method comprises the following steps:

receiving a program upgrading instruction, and sending a downloading request to a server according to the program upgrading instruction, wherein the downloading request is used for downloading a program file of a latest version;

saving the program file of the latest version to the second storage area;

and if the program file of the latest version is downloaded completely and the air conditioner is in a target state, operating the program file of the latest version, deleting the original program file stored in the first storage area, and marking the first storage area in which the original program file is deleted as an idle storage area.

2. The program upgrading method of an air conditioner according to claim 1, wherein the receiving of the program upgrading command includes at least one of:

receiving a program upgrading instruction sent by the server;

receiving a program upgrading instruction sent by a remote controller;

and receiving a program upgrading instruction sent by the terminal equipment running the remote control program of the air conditioner.

3. The program upgrading method of an air conditioner according to claim 1 or 2, wherein the air conditioner has an indoor unit and an outdoor unit;

the receiving of the program upgrading instruction comprises:

and the indoor unit receives a program upgrading instruction.

4. The program upgrading method of an air conditioner according to claim 3, wherein the indoor unit includes an indoor unit memory, the indoor unit memory includes a first indoor unit storage area and a second indoor unit storage area, the first indoor unit storage area stores therein original indoor unit files among original program files, and the second indoor unit storage area is marked as an idle indoor unit storage area; the outdoor unit comprises an outdoor unit memory, the outdoor unit memory comprises a first outdoor unit storage area and a second outdoor unit storage area, original outdoor unit files in original program files are stored in the first outdoor unit storage area, and the second outdoor unit storage area is marked as an idle outdoor unit storage area.

5. The program upgrading method of an air conditioner according to claim 4, wherein the transmitting a download request to a server according to the program upgrading instruction comprises:

the indoor unit sends an indoor unit downloading request to the server, the indoor unit downloading request is used for downloading indoor unit files in the program files of the latest version, the outdoor unit sends an outdoor unit downloading request to the server, and the outdoor unit downloading request is used for downloading outdoor unit files in the program files of the latest version;

the saving the program file of the latest version to the second storage area includes:

the indoor unit stores the indoor unit file to the second indoor unit storage area, and the outdoor unit stores the outdoor unit file to the second outdoor unit storage area;

the operating the program file of the latest version, deleting the original program file stored in the first storage area, and marking the first storage area in which the original program file is deleted as an idle storage area, includes:

the indoor unit operates the indoor unit files, deletes original indoor unit files stored in the first indoor unit storage area, and marks the first indoor unit storage area where the original indoor unit files are deleted as an idle indoor unit storage area;

and the outdoor unit operates the outdoor unit files, deletes the original outdoor unit files stored in the first outdoor unit storage area, and marks the first outdoor unit storage area deleted with the original outdoor unit files as an idle outdoor unit storage area.

6. The program upgrading method of air conditioner according to claim 5, wherein the indoor unit has a first wireless transmission module accessing into a wireless network in the environment;

the indoor unit sends an indoor unit downloading request to the server, and the method comprises the following steps:

and sending an indoor unit downloading request to the server through the first wireless transmission module, wherein the indoor unit downloading request is used for downloading an indoor unit file in the program file with the latest version through the first wireless transmission module.

7. The method for upgrading programs of an air conditioner according to claim 6, wherein the outdoor unit has a second wireless transmission module connected to a wireless network in the environment;

the outdoor unit sends an outdoor unit downloading request to the server, and the method comprises the following steps:

and sending an outdoor unit downloading request to the server through the second wireless transmission module, wherein the outdoor unit downloading request is used for downloading an outdoor unit file in the program file with the latest version through the second wireless transmission module.

8. The method of claim 6, wherein the outdoor unit has a second wireless transmission module, and the second wireless transmission module is coupled to the wireless network in the environment through the pairing with the first wireless transmission module;

the outdoor unit sends an outdoor unit downloading request to the server, and the method comprises the following steps:

and sending an outdoor unit downloading request to the server sequentially through the second wireless transmission module and the first wireless transmission module, wherein the outdoor unit downloading request is used for downloading an outdoor unit file in the program file of the latest version sequentially through the second wireless transmission module and the first wireless transmission module.

9. The program upgrading method of an air conditioner according to claim 1, further comprising:

acquiring a control instruction acquired by a main control board of the air conditioner;

if the latest command in the control commands is a shutdown command, determining that the air conditioner is in a target state;

if the latest command in the control commands is a non-shutdown command, acquiring the ambient temperature collected by a temperature sensor, and determining the set temperature of the air conditioner according to the control commands;

and if the ambient temperature is lower than a temperature threshold, determining that the air conditioner is in a target state, wherein the temperature threshold is equal to the set temperature or is higher than the set temperature by a preset temperature difference value.

10. The program upgrading method of an air conditioner according to claim 1, wherein the operating the latest version of the program file includes:

and checking the program file of the latest version, and running the program file of the latest version under the condition of successful checking.

11. The program upgrading method of an air conditioner according to claim 10, wherein the verifying the program file of the latest version includes:

and checking the program file of the latest version by using a cyclic redundancy check mode.

12. The program upgrading device of the air conditioner is characterized in that the air conditioner comprises a memory, the memory comprises a first storage area and a second storage area, original program files are stored in the first storage area, and the second storage area is marked as an idle storage area; the device comprises:

the download module is used for receiving a program upgrading instruction and sending a download request to a server according to the program upgrading instruction, wherein the download request is used for downloading a program file of the latest version;

the storage module is used for storing the program file of the latest version to the second storage area;

and the upgrading module is used for operating the program file of the latest version, deleting the original program file stored in the first storage area and marking the first storage area in which the original program file is deleted as an idle storage area if the program file of the latest version is downloaded completely and the air conditioner is in a target state.

13. An air conditioner, characterized in that the air conditioner comprises a memory for storing computer instructions executable on a processor, and a processor for performing the computer instructions based on the program upgrading method of the air conditioner according to any one of claims 1 to 11.

14. A computer-readable storage medium on which a computer program is stored, characterized in that the program realizes the program upgrading method of the air conditioner according to any one of claims 1 to 11 when executed by a processor.

Technical Field

The disclosure relates to the technical field of echo cancellation, in particular to a program upgrading method and device for an air conditioner, the air conditioner and a storage medium.

Background

The air conditioner can adjust parameters such as temperature, humidity, carbon dioxide concentration and the like of an indoor environment, and the parameters are related to air quality or comfort, so that the air conditioner is an electric appliance which is unavailable in life. The development of the air conditioner is rapid, the functions are increased, meanwhile, the running program in the air conditioner is continuously upgraded, and the air conditioner needs to acquire and run a new version of program file during upgrading. In the related art, when the air conditioner performs program upgrading, the operation effect of the air conditioner is often influenced, and the time for program upgrading is long, so that the comfort of a user is poor and the use experience is poor during program upgrading.

Disclosure of Invention

In order to overcome the problems in the related art, embodiments of the present disclosure provide a method and an apparatus for upgrading a program of an air conditioner, and a storage medium, so as to solve the defects in the related art.

According to a first aspect of the embodiments of the present disclosure, a method for upgrading a program of an air conditioner is provided, where the air conditioner includes a memory, the memory includes a first storage area and a second storage area, the first storage area stores an original program file, and the second storage area is marked as an idle storage area; the method comprises the following steps:

receiving a program upgrading instruction, and sending a downloading request to a server according to the program upgrading instruction, wherein the downloading request is used for downloading a program file of a latest version;

saving the program file of the latest version into the second storage area;

and if the program file of the latest version is downloaded completely and the air conditioner is in a target state, operating the program file of the latest version, deleting the original program file stored in the first storage area, and marking the first storage area in which the original program file is deleted as an idle storage area.

In one embodiment, the receiving program upgrade instructions includes at least one of:

receiving a program upgrading instruction sent by the server;

receiving a program upgrading instruction sent by a remote controller;

and receiving a program upgrading instruction sent by the terminal equipment running the remote control program of the air conditioner.

In one embodiment, the air conditioner has an indoor unit and an outdoor unit;

the receiving of the program upgrading instruction comprises:

and the indoor unit receives a program upgrading instruction.

In one embodiment, the indoor unit comprises an indoor unit memory, the indoor unit memory comprises a first indoor unit storage area and a second indoor unit storage area, the first indoor unit storage area stores original indoor unit files in original program files, and the second indoor unit storage area is marked as an idle indoor unit storage area; the outdoor unit comprises an outdoor unit memory, the outdoor unit memory comprises a first outdoor unit storage area and a second outdoor unit storage area, original outdoor unit files in original program files are stored in the first outdoor unit storage area, and the second outdoor unit storage area is marked as an idle outdoor unit storage area;

the sending of the download request to the server according to the program upgrading instruction comprises:

the indoor unit sends an indoor unit downloading request to the server, the indoor unit downloading request is used for downloading indoor unit files in the program files of the latest version, the outdoor unit sends an outdoor unit downloading request to the server, and the outdoor unit downloading request is used for downloading outdoor unit files in the program files of the latest version;

the saving the program file of the latest version into the second storage area includes:

the indoor unit stores the indoor unit file to the second indoor unit storage area, and the outdoor unit stores the outdoor unit file to the second outdoor unit storage area;

the operating the program file of the latest version, deleting the original program file stored in the first storage area, and marking the first storage area in which the original program file is deleted as an idle storage area, includes:

the indoor unit operates the indoor unit files, deletes original indoor unit files stored in the first indoor unit storage area, and marks the first indoor unit storage area where the original indoor unit files are deleted as an idle indoor unit storage area;

and the outdoor unit operates the outdoor unit files, deletes the original outdoor unit files stored in the first outdoor unit storage area, and marks the first outdoor unit storage area deleted with the original outdoor unit files as an idle outdoor unit storage area.

In one embodiment, the indoor unit has a first wireless transmission module accessing a wireless network within an environment;

the indoor unit sends an indoor unit downloading request to the server, and the method comprises the following steps:

and sending an indoor unit downloading request to the server through the first wireless transmission module, wherein the indoor unit downloading request is used for downloading an indoor unit file in the program file with the latest version through the first wireless transmission module.

In one embodiment, the outdoor unit has a second wireless transmission module in a wireless network accessed into the environment;

the outdoor unit sends an outdoor unit downloading request to the server, and the method comprises the following steps:

and sending an outdoor unit downloading request to the server through the second wireless transmission module, wherein the outdoor unit downloading request is used for downloading an outdoor unit file in the program file with the latest version through the second wireless transmission module.

In one embodiment, the outdoor unit has a second wireless transmission module, and the second wireless transmission module is paired with the first wireless transmission module to access a wireless network in an environment;

the outdoor unit sends an outdoor unit downloading request to the server, and the method comprises the following steps:

and sending an outdoor unit downloading request to the server sequentially through the second wireless transmission module and the first wireless transmission module, wherein the outdoor unit downloading request is used for downloading an outdoor unit file in the program file of the latest version sequentially through the second wireless transmission module and the first wireless transmission module.

In one embodiment, further comprising:

acquiring a control instruction acquired by a main control board of the air conditioner;

if the latest command in the control commands is a shutdown command, determining that the air conditioner is in a target state;

if the latest command in the control commands is a non-shutdown command, acquiring the ambient temperature collected by a temperature sensor, and determining the set temperature of the air conditioner according to the control commands;

and if the ambient temperature is lower than a temperature threshold, determining that the air conditioner is in a target state, wherein the temperature threshold is equal to the set temperature or is higher than the set temperature by a preset temperature difference value.

In one embodiment, the running the latest version of the program file includes:

and checking the program file of the latest version, and running the program file of the latest version under the condition of successful checking.

In one embodiment, the verifying the latest version of the program file includes:

and checking the program file of the latest version by using a cyclic redundancy check mode.

According to a second aspect of the embodiments of the present disclosure, there is provided a program upgrading apparatus for an air conditioner, the air conditioner including a memory, the memory including a first storage area and a second storage area, an original program file being stored in the first storage area, the second storage area being marked as an idle storage area; the device comprises:

the download module is used for receiving a program upgrading instruction and sending a download request to a server according to the program upgrading instruction, wherein the download request is used for downloading a program file of the latest version;

the storage module is used for storing the program file of the latest version into the second storage area;

and the upgrading module is used for operating the program file of the latest version, deleting the original program file stored in the first storage area and marking the first storage area in which the original program file is deleted as an idle storage area if the program file of the latest version is downloaded completely and the air conditioner is in a target state.

In one embodiment, the download module, when configured to receive the program upgrade instructions, is further configured to at least one of:

receiving a program upgrading instruction sent by the server;

receiving a program upgrading instruction sent by a remote controller;

and receiving a program upgrading instruction sent by the terminal equipment running the remote control program of the air conditioner.

In one embodiment, the air conditioner has an indoor unit and an outdoor unit;

the download module is used for receiving the program upgrading instruction and further used for:

and controlling the indoor unit to receive a program upgrading instruction.

In one embodiment, the indoor unit comprises an indoor unit memory, the indoor unit memory comprises a first indoor unit storage area and a second indoor unit storage area, the first indoor unit storage area stores original indoor unit files in original program files, and the second indoor unit storage area is marked as an idle indoor unit storage area; the outdoor unit comprises an outdoor unit memory, the outdoor unit memory comprises a first outdoor unit storage area and a second outdoor unit storage area, original outdoor unit files in original program files are stored in the first outdoor unit storage area, and the second outdoor unit storage area is marked as an idle outdoor unit storage area;

the download module is further configured to:

controlling the indoor unit to send an indoor unit downloading request to the server, wherein the indoor unit downloading request is used for downloading indoor unit files in the program files of the latest version, and controlling the outdoor unit to send an outdoor unit downloading request to the server, and the outdoor unit downloading request is used for downloading outdoor unit files in the program files of the latest version;

the saving module is further configured to:

controlling the indoor unit to store the indoor unit file into the second indoor unit storage area, and controlling the outdoor unit to store the outdoor unit file into the second outdoor unit storage area;

the upgrade module is further configured to:

controlling the indoor unit to operate the indoor unit files, deleting original indoor unit files stored in the first indoor unit storage area, and marking the first indoor unit storage area in which the original indoor unit files are deleted as an idle indoor unit storage area;

and controlling the outdoor unit to operate the outdoor unit files, deleting original outdoor unit files stored in the first outdoor unit storage area, and marking the first outdoor unit storage area deleted with the original outdoor unit files as an idle outdoor unit storage area.

In one embodiment, the indoor unit has a first wireless transmission module accessing a wireless network within an environment;

the download module is used for controlling the indoor unit to send an indoor unit download request to the server, and is further used for:

and sending an indoor unit downloading request to the server through the first wireless transmission module, wherein the indoor unit downloading request is used for downloading an indoor unit file in the program file with the latest version through the first wireless transmission module.

In one embodiment, the outdoor unit has a second wireless transmission module in a wireless network accessed into the environment;

the download module is used for controlling the outdoor unit to send an outdoor unit download request to the server, and is further used for:

and sending an outdoor unit downloading request to the server through the second wireless transmission module, wherein the outdoor unit downloading request is used for downloading an outdoor unit file in the program file with the latest version through the second wireless transmission module.

In one embodiment, the outdoor unit has a second wireless transmission module, and the second wireless transmission module is paired with the first wireless transmission module to access a wireless network in an environment;

the download module is used for controlling the outdoor unit to send an outdoor unit download request to the server, and is further used for:

and sending an outdoor unit downloading request to the server sequentially through the second wireless transmission module and the first wireless transmission module, wherein the outdoor unit downloading request is used for downloading an outdoor unit file in the program file of the latest version sequentially through the second wireless transmission module and the first wireless transmission module.

In one embodiment, the system further comprises a status module to:

acquiring a control instruction acquired by a main control board of the air conditioner;

if the latest command in the control commands is a shutdown command, determining that the air conditioner is in a target state;

if the latest command in the control commands is a non-shutdown command, acquiring the ambient temperature collected by a temperature sensor, and determining the set temperature of the air conditioner according to the control commands;

and if the ambient temperature is lower than a temperature threshold, determining that the air conditioner is in a target state, wherein the temperature threshold is equal to the set temperature or is higher than the set temperature by a preset temperature difference value.

In one embodiment, when the upgrade module is configured to run the program file of the latest version, the upgrade module is further configured to:

and checking the program file of the latest version, and running the program file of the latest version under the condition of successful checking.

In one embodiment, the upgrade module, when being configured to verify the program file of the latest version, is further configured to:

and checking the program file of the latest version by using a cyclic redundancy check mode.

According to a third aspect of the embodiments of the present disclosure, there is provided an air conditioner, the air conditioner comprising a memory and a processor, the memory is used for storing computer instructions executable on the processor, and the processor is used for the program upgrading method of the air conditioner based on the first aspect when executing the computer instructions.

According to a fourth aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the program upgrading method of the air conditioner of the first aspect.

The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:

the present disclosure sets a first storage area and a second storage area in a memory of an air conditioner, wherein the first storage area stores an original program file, the second storage area is marked as an idle storage area, therefore, after receiving the program upgrading instruction, the original program file is normally operated, the program file with the latest version is downloaded to the server, the program file with the latest version is stored in the second storage area, namely, the first storage area for storing the original program file is not influenced, and further the normal operation of the original program file is not influenced, and finally, when the program file of the latest version is downloaded and the air conditioner is in the target state, the program file of the latest version is operated, and then finishing the program upgrade, additionally deleting the original program file, and marking the emptied first storage area for storing the original program file as an idle storage area so as to store the program file with the updated version in the next upgrade. In the process of program upgrading for one time, the two storage areas are alternately used as the storage area for storing the original program file and the idle storage area, so that the program file of the latest version can be downloaded under the condition of not influencing the operation of the original program file every time the program is upgraded, the normal operation of the air conditioner is prevented from being influenced by the program upgrading, the comfort of a user during the program upgrading is improved, and the use experience of the user is improved.

Drawings

The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.

Fig. 1 is a flowchart illustrating a program upgrading method of an air conditioner according to an exemplary embodiment of the present disclosure;

fig. 2 is a flowchart illustrating a program upgrading method of an air conditioner according to another exemplary embodiment of the present disclosure;

fig. 3 is a schematic structural diagram of a program upgrading apparatus of an air conditioner according to an exemplary embodiment of the present disclosure.

Detailed Description

Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.

The terminology used in the present disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. As used in this disclosure and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.

It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present disclosure. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.

In the related art, when the air conditioner is upgraded, the original program cannot normally run, so that the running function of the air conditioner is forced to be stopped, the effect achieved by the function is influenced or even disappears, and the comfort and the use experience of a user are poor. For example, if the air conditioner normally starts program upgrading in the process of refrigeration, the refrigeration program is stopped, so that refrigeration cannot be performed in the process of program upgrading, the indoor air temperature rises, the comfort of a user is deteriorated, and the use experience is correspondingly reduced.

Based on this, in a first aspect, at least one embodiment of the present disclosure provides a program upgrading method for an air conditioner, please refer to fig. 1, which illustrates a flow of the method, including step S101 and step S103.

The program upgrading method of the air conditioner is applied to the air conditioner, and specifically can be applied to a main control board of the air conditioner or an MCU (micro controller Unit) special for the method. The air conditioner comprises a memory, wherein the memory comprises a first storage area and a second storage area, the first storage area is internally stored with an original program file, the main control board can read the original program file from the storage area and operate the original program file, so that the operation of each function of the air conditioner can be realized, the second storage area is marked as an idle storage area, and no file is stored in the storage area.

The program upgrade refers to the Air conditioner downloading the latest version of the program file from the server using an Over-the-Air Technology (OTA).

In step S101, a program upgrade instruction is received, and a download request is sent to a server according to the program upgrade instruction, where the download request is used to download a program file of a latest version.

The upgrading instruction can be sent by the server, namely when the version of the program file existing in the server is updated compared with the version of the program file in the air conditioner, the upgrading instruction can be sent to the air conditioner; the upgrading instruction can also be sent by a remote controller, namely, a user operates the remote controller to generate the upgrading instruction and sends the upgrading instruction to the air conditioner through infrared and other media; the upgrade instruction may also be generated by a remote control program of the air conditioner, for example, a user operates a terminal device running the remote control program of the air conditioner to generate the upgrade instruction, and the upgrade instruction is transmitted to the air conditioner through a medium such as bluetooth or a wireless network. The air conditioner may thus receive at least one of the following program upgrade instructions: receiving a program upgrading instruction sent by the server; receiving a program upgrading instruction sent by a remote controller; and receiving a program upgrading instruction sent by the terminal equipment running the remote control program of the air conditioner.

In one example, the air conditioner has an indoor unit and an outdoor unit, and the receiving of the program instruction in this step may mean that the indoor unit receives a program upgrade instruction. The indoor unit is generally installed indoors, the outdoor unit is generally installed outdoors, and when a user controls the air conditioner, the user often sends a control instruction to the indoor unit, for example, the user sends a start instruction, a refrigeration instruction, a temperature setting instruction, a shutdown instruction and the like to the indoor unit through a remote controller, and then, for example, the user sends the start instruction, the refrigeration instruction, the temperature setting instruction, the shutdown instruction and the like to the indoor unit through a terminal device running a remote control program of the air conditioner; and the indoor unit is easy to access the network indoors, so that the indoor unit is convenient to receive the control command sent by the server. The indoor unit and the outdoor unit can communicate with each other and transmit files, so that the indoor unit can trigger the program upgrading of the indoor unit and the outdoor unit at the same time after receiving the program upgrading instruction, the efficiency of triggering upgrading is improved, and response delay caused by unstable communication of the outdoor unit is avoided.

After receiving the download request, the server returns the program file of the latest version according to the transmission path of the download request.

In step S102, the program file of the latest version is saved into the second storage area.

When the program file with the latest version is downloaded, the storage address can be determined by identifying the mark of the idle storage area, so that the method is simple, convenient, accurate and reliable. The original program file is normally operated, the program file of the latest version is downloaded to the server at the same time, and the program file of the latest version is stored in the second storage area, namely the first storage area for storing the original program file is not influenced, and further the normal operation of the original program file is not influenced.

In step S103, if the program file of the latest version is downloaded completely and the air conditioner is in the target state, the program file of the latest version is executed, the original program file stored in the first storage area is deleted, and the first storage area in which the original program file is deleted is marked as an idle storage area.

The target state may be a standby state or a state of less power operation, among others. When the air conditioner is in a standby state, the original program file can be directly deleted, and the program file with the latest version can be operated when the air conditioner is started next time; when the air conditioner is in a low-frequency and low-power state, the air conditioner can be shut down firstly, then the original program file is deleted, and the program file of the latest version is operated after the air conditioner is restarted. The standby state does not perform any function, so that the effect of the function is not influenced; when the low-frequency low-power running is performed, the effect achieved by the running function is basically stable, and only the program file is replaced after the running is stopped (namely, the time for downloading the program file does not exist), so that the required time is short, the effect of the air conditioner is less influenced, the comfort of a user during program upgrading is improved, and the use experience of the user is improved.

And marking the first storage area deleted with the original program file as an idle storage area, namely transferring the mark of the idle storage area to the first storage area for storing the original program file, so that the function exchange of the two storage areas is completed, and therefore, a new idle storage area (namely the first storage area) can be used for storing the program file with an updated version when the program file is updated next time.

In addition, before the program file of the latest version is executed, the program file of the latest version may be checked, and the program file of the latest version may be executed if the check is successful. Specifically, a Cyclic Redundancy Check (CRC) mode may be used to Check the program file of the latest version, that is, a Cyclic Redundancy Check value is calculated according to the program file, and then the Cyclic Redundancy Check value carried in the program file is obtained, and if the two Cyclic Redundancy Check values are the same, the Check is successful. Through verification and then operation of the program file, the correctness of the program file can be ensured, and therefore all functions of the air conditioner can operate normally after the program file is operated.

The present disclosure sets a first storage area and a second storage area in a memory of an air conditioner, stores an original program file in the first storage area, marks the second storage area as a restricted storage area, therefore, after receiving the program upgrading instruction, the original program file is normally operated, the program file with the latest version is downloaded to the server, the program file with the latest version is stored in the second storage area, namely, the first storage area for storing the original program file is not influenced, and further the normal operation of the original program file is not influenced, and finally, when the program file of the latest version is downloaded and the air conditioner is in the target state, the program file of the latest version is operated, and then finishing the program upgrade, additionally deleting the original program file, and marking the emptied first storage area for storing the original program file as an idle storage area so as to store the program file with the updated version in the next upgrade. In the process of program upgrading for one time, the two storage areas are alternately used as the storage area for storing the original program file and the idle storage area, so that the program file of the latest version can be downloaded under the condition of not influencing the operation of the original program file every time the program is upgraded, the normal operation of the air conditioner is prevented from being influenced by the program upgrading, the comfort of a user during the program upgrading is improved, and the use experience of the user is improved.

In some embodiments of the present disclosure, an air conditioner includes an indoor unit and an outdoor unit, the indoor unit includes an indoor unit memory, the indoor unit memory includes a first indoor unit storage area and a first indoor unit storage area, an original indoor unit file in an original program file is stored in the first indoor unit storage area, and the second indoor unit storage area is marked as an idle indoor unit storage area; the outdoor unit comprises an outdoor unit memory, the outdoor unit memory comprises a first outdoor unit storage area and a second outdoor unit storage area, original outdoor unit files in original program files are stored in the first outdoor unit storage area, and the second outdoor unit storage area is marked as an idle outdoor unit storage area. Based on the above structure, after receiving the program upgrading instruction, the indoor unit of the air conditioner provided by the present application may upgrade the program according to the method shown in fig. 2, including steps S201 to S203.

In step S201, the indoor unit sends an indoor unit download request to the server, where the indoor unit download request is used to download an indoor unit file in the program file of the latest version, and the outdoor unit sends an outdoor unit download request to the server, where the outdoor unit download request is used to download an outdoor unit file in the program file of the latest version.

The indoor unit may have a first wireless transmission module in a wireless network accessed to an environment, so that in this step, an indoor unit download request may be sent to the server through the first wireless transmission module, where the indoor unit download request is used to download the indoor unit file in the program file of the latest version through the first wireless transmission module.

The outdoor unit is provided with a second wireless transmission module in a wireless network accessed into the environment, so that an outdoor unit downloading request can be sent to the server through the second wireless transmission module in the step, and the outdoor unit downloading request is used for downloading an outdoor unit file in the program file of the latest version through the second wireless transmission module.

The outdoor unit is provided with a second wireless transmission module, the second wireless transmission module is connected to a wireless network in an environment through pairing with the first wireless transmission module, so that an outdoor unit downloading request can be sent to the server sequentially through the second wireless transmission module and the first wireless transmission module in the step, and the outdoor unit downloading request is used for downloading an outdoor unit file in the program file of the latest version sequentially through the second wireless transmission module and the first wireless transmission module. In this way, the first wireless transmission module can transfer the program file when the second wireless transmission module downloads the program file, and the program file is not downloaded to the indoor unit.

The first wireless transmission module of the indoor unit can be accessed into a wireless network in an environment according to the following modes: the user uses the remote controller to reset the first wireless transmission module so as to enable the first wireless transmission module to be in a broadcasting state; a user downloads a remote control program of the air conditioner on terminal equipment, then the remote control program is used for scanning a two-dimensional code on an indoor unit of the air conditioner so as to realize Bluetooth connection with the first wireless transmission module, then the remote control program controls the first wireless transmission module to search an indoor wireless network, correct passwords are input after the networks are searched, and information such as account numbers and passwords of the wireless network is sent to the first wireless transmission module, so that the first wireless transmission module is accessed into the wireless network by using the account numbers and the passwords.

The second wireless transmission module of the outdoor unit can be accessed into the wireless network in the environment in the following way: the user uses the remote controller to reset the second wireless transmission module so as to enable the second wireless transmission module to be in a broadcasting state; a user downloads a remote control program of the air conditioner on terminal equipment, then the remote control program is used for scanning a two-dimensional code on an outdoor unit of the air conditioner so as to realize Bluetooth connection with the second wireless transmission module, then the remote control program controls the second wireless transmission module to search an indoor wireless network, correct passwords are input after the networks are searched, and information such as account numbers and passwords of the wireless network is sent to the second wireless transmission module, so that the second wireless transmission module is accessed into the wireless network by using the account numbers and the passwords. If the remote control program controls the second wireless transmission module not to search the wireless network in the environment, the second wireless transmission module is continuously controlled to search the first wireless transmission module and is paired after the first wireless transmission module is searched, so that the wireless network in the environment is accessed through the first wireless transmission module. The outdoor unit is often installed outdoors and is far away from a router of a wireless network in an environment (namely, indoors), so that the outdoor unit cannot access the network, and the indoor unit and the outdoor unit are close to each other and are generally positioned on two sides of a wall, so that the indoor unit and the outdoor unit can be accessed to the wireless network through pairing with the first wireless transmission module.

In this embodiment, the indoor unit and the outdoor unit are respectively connected to the wireless network through the wireless transmission module and respectively and independently download respective program files, and even when the second wireless communication module of the outdoor unit is connected to the wireless network through the first wireless communication module of the indoor unit in a pairing manner, the first wireless communication module only transfers the request and the file of the first wireless communication module and does not download the request and the file to the indoor unit. Therefore, time waste caused by downloading and transferring files of the outdoor unit by the indoor unit is avoided, transmission efficiency is improved, and program upgrading efficiency is improved.

In step S202, the indoor unit saves the indoor unit file to the second indoor unit storage area, and the outdoor unit saves the outdoor unit file to the second outdoor unit storage area.

Details of this step have already been described in detail in step S102, and are not repeated here.

In step S203, controlling the indoor unit to run the indoor unit file, deleting an original indoor unit file stored in the first indoor unit storage area, and marking the first indoor unit storage area where the original indoor unit file is deleted as an idle indoor unit storage area; and controlling the outdoor unit to operate the outdoor unit files, deleting original outdoor unit files stored in the first outdoor unit storage area, and marking the first outdoor unit storage area deleted with the original outdoor unit files as an idle outdoor unit storage area.

Details of this step have already been described in detail in step S103, and are not repeated here.

In some embodiments of the present disclosure, whether the air conditioner is in the target state may be determined as follows: firstly, acquiring a control instruction acquired by a main control board of an air conditioner; next, if the latest command in the control commands is a shutdown command, determining that the air conditioner is in a target state; next, if the latest instruction in the control instructions is a non-shutdown instruction, acquiring the ambient temperature acquired by a temperature sensor, and determining the set temperature of the air conditioner according to the control instructions; and finally, if the ambient temperature is lower than a temperature threshold, determining that the air conditioner is in a target state, wherein the temperature threshold is equal to the set temperature or is higher than the set temperature by a preset temperature difference value.

The main control board controls the operation of the air conditioner, and generates control instructions, such as a power-on instruction, a power-off instruction, a temperature setting instruction, an operation mode setting instruction and the like, in the control process, so that the control instructions can be obtained from the main control board, the obtained control instructions can represent the operation state of the air conditioner at the moment to a certain extent, and for example, if the latest control instruction is a power-off instruction, the air conditioner is in a standby state at the moment. Some states of the air conditioner cannot be accurately determined by using the control command, so that the states can be further determined according to the ambient temperature. The air conditioner may be provided with a temperature sensor, for example, a temperature sensor provided on the indoor unit, and the temperature sensor may collect an indoor ambient temperature and report the collected temperature to the main control board, so that the ambient temperature may be acquired from the main control board.

If the latest control instruction is a shutdown instruction, it indicates that the air conditioner is in a standby state at present, that is, a state in which no function is operated, and therefore, there is no situation that the operation of the air conditioner is affected when the program is upgraded in the state (that is, the operation of the original program file is stopped and the operation of the program file of the latest version is started), and there is no situation that the comfort and the user experience are affected, so that the standby state is determined as the target state.

When the latest control instruction is a non-shutdown instruction, the air conditioner is in a certain function of operation, such as cooling, heating and the like, that is, the air conditioner is not in a standby state, so that whether the air conditioner is in a low-frequency low-power state or not can be further determined.

The set temperature represents the temperature that the user wants the environment to reach, and the temperature threshold represents the temperature range that the user can accept, so when the ambient temperature is lower than the temperature threshold, it represents that the temperature effect that the present air conditioner reaches is close to the temperature that the user wants, or the temperature difference between the temperature effect that the air conditioner reaches and the set temperature is in the user acceptable range, so the air conditioner is in the stable stage or the fine tuning stage at this moment, namely in the state of low frequency and low power.

The temperature threshold range may be preset in advance, for example, set to the set temperature itself, or set to the set temperature +1 ℃. For example, when the set temperature is 24 ℃ and the temperature threshold is the set temperature itself, when the ambient temperature is lower than 24 ℃, the low-frequency and low-power state is determined; for another example, when the set temperature is 24 ℃ and the temperature threshold is +1 ℃, when the ambient temperature is lower than 25 ℃, the low-frequency and low-power state is determined.

According to a second aspect of the embodiments of the present disclosure, there is provided a program upgrading apparatus for an air conditioner, the air conditioner including a memory, the memory including a first storage area and a second storage area, an original program file being stored in the first storage area, the second storage area being marked as an idle storage area; referring to fig. 3, the structure of the apparatus is shown, including:

the downloading module 301 is configured to receive a program upgrading instruction, and send a downloading request to a server according to the program upgrading instruction, where the downloading request is used to download a program file of a latest version;

a saving module 302, configured to save the program file of the latest version into the second storage area;

the upgrade module 303 is configured to, if the program file of the latest version is downloaded completely and the air conditioner is in the target state, operate the program file of the latest version, delete the original program file stored in the first storage area, and mark the first storage area where the original program file is deleted as an idle storage area.

In one embodiment, the download module, when configured to receive the program upgrade instructions, is further configured to at least one of:

receiving a program upgrading instruction sent by the server;

receiving a program upgrading instruction sent by a remote controller;

and receiving a program upgrading instruction sent by the terminal equipment running the remote control program of the air conditioner.

In one embodiment, the air conditioner has an indoor unit and an outdoor unit;

the download module is used for receiving the program upgrading instruction and further used for:

and controlling the indoor unit to receive a program upgrading instruction.

In one embodiment, the indoor unit comprises an indoor unit memory, the indoor unit memory comprises a first indoor unit storage area and a second indoor unit storage area, the first indoor unit storage area stores original indoor unit files in original program files, and the second indoor unit storage area is marked as an idle indoor unit storage area; the outdoor unit comprises an outdoor unit memory, the outdoor unit memory comprises a first outdoor unit storage area and a second outdoor unit storage area, original outdoor unit files in original program files are stored in the first outdoor unit storage area, and the second outdoor unit storage area is marked as an idle outdoor unit storage area;

the download module is further configured to:

controlling the indoor unit to send an indoor unit downloading request to the server, wherein the indoor unit downloading request is used for downloading indoor unit files in the program files of the latest version, and controlling the outdoor unit to send an outdoor unit downloading request to the server, and the outdoor unit downloading request is used for downloading outdoor unit files in the program files of the latest version;

the saving module is further configured to:

controlling the indoor unit to store the indoor unit file into the second indoor unit storage area, and controlling the outdoor unit to store the outdoor unit file into the second outdoor unit storage area;

the upgrade module is further configured to:

controlling the indoor unit to operate the indoor unit files, deleting original indoor unit files stored in the first indoor unit storage area, and marking the first indoor unit storage area in which the original indoor unit files are deleted as an idle indoor unit storage area;

and controlling the outdoor unit to operate the outdoor unit files, deleting original outdoor unit files stored in the first outdoor unit storage area, and marking the first outdoor unit storage area deleted with the original outdoor unit files as an idle outdoor unit storage area.

In one embodiment, the indoor unit has a first wireless transmission module accessing a wireless network within an environment;

the download module is used for controlling the indoor unit to send an indoor unit download request to the server, and is further used for:

and sending an indoor unit downloading request to the server through the first wireless transmission module, wherein the indoor unit downloading request is used for downloading an indoor unit file in the program file with the latest version through the first wireless transmission module.

In one embodiment, the outdoor unit has a second wireless transmission module in a wireless network accessed into the environment;

the download module is used for controlling the outdoor unit to send an outdoor unit download request to the server, and is further used for:

and sending an outdoor unit downloading request to the server through the second wireless transmission module, wherein the outdoor unit downloading request is used for downloading an outdoor unit file in the program file with the latest version through the second wireless transmission module.

In one embodiment, the outdoor unit has a second wireless transmission module, and the second wireless transmission module is paired with the first wireless transmission module to access a wireless network in an environment;

the download module is used for controlling the outdoor unit to send an outdoor unit download request to the server, and is further used for:

and sending an outdoor unit downloading request to the server sequentially through the second wireless transmission module and the first wireless transmission module, wherein the outdoor unit downloading request is used for downloading an outdoor unit file in the program file of the latest version sequentially through the second wireless transmission module and the first wireless transmission module.

In one embodiment, the system further comprises a status module to:

acquiring a control instruction acquired by a main control board of the air conditioner;

if the latest command in the control commands is a shutdown command, determining that the air conditioner is in a target state;

if the latest command in the control commands is a non-shutdown command, acquiring the ambient temperature collected by a temperature sensor, and determining the set temperature of the air conditioner according to the control commands;

and if the ambient temperature is lower than a temperature threshold, determining that the air conditioner is in a target state, wherein the temperature threshold is equal to the set temperature or is higher than the set temperature by a preset temperature difference value.

In one embodiment, when the upgrade module is configured to run the program file of the latest version, the upgrade module is further configured to:

and checking the program file of the latest version, and running the program file of the latest version under the condition of successful checking.

In one embodiment, the upgrade module, when being configured to verify the program file of the latest version, is further configured to:

and checking the program file of the latest version by using a cyclic redundancy check mode.

With regard to the apparatus in the above-mentioned embodiments, the specific manner in which each module performs the operation has been described in detail in the first aspect with respect to the embodiment of the method, and will not be elaborated here.

According to a third aspect of the embodiments of the present disclosure, there is provided an air conditioner, the air conditioner comprising a memory and a processor, the memory is used for storing computer instructions executable on the processor, and the processor is used for the program upgrading method of the air conditioner based on the first aspect when executing the computer instructions.

According to a fourth aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the method of the first aspect.

Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

17页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种去中心化的空调机房控制方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!