Air conditioner upgrade method, air conditioner
By using two storage areas in the air conditioner to alternately write the data packet sequence number and determine the transmission location after breakpoint recovery, the problem of air conditioner software upgrade transmission interruption is solved, and the upgrade efficiency and user experience are improved.
Patent Information
- Application Number
- CN202210072036.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-21
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2042-01-21
AI Technical Summary
When the existing air conditioner outdoor unit software is upgraded, transmission interruption leads to low transmission efficiency and long transmission time, which affects the user experience.
Through short-line transmission between the indoor unit and the outdoor unit, two storage areas are used to alternately write the data packet sequence number. After the breakpoint is restored, the larger packet sequence number is determined to continue transmission, which avoids starting transmission from the initial data packet again and improves transmission efficiency. .
It shortens the software upgrade time of outdoor units, improves upgrade efficiency and user experience, avoids retransmissions caused by transmission breakpoints, and improves system stability.
Smart Images

Figure CN114443095B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of household appliances, and in particular to an air conditioner upgrading method and an air conditioner. Background Art
[0002] When the current air conditioner outdoor unit is performing a software upgrade, if the transmission of the data packet is interrupted due to power failure or other reasons, it is necessary to restart the transmission from the first data packet after the transmission connection is restored. The disadvantage of this transmission is that the transmission efficiency is low and the transmission time is relatively long, which affects the user experience. Summary of the invention
[0003] The present invention aims to solve at least one of the technical problems existing in the prior art. To this end, the present invention proposes an air conditioner upgrade method, which can improve the upgrade efficiency of outdoor unit software.
[0004] The present invention also provides an air conditioner using the air conditioner upgrading method.
[0005] According to the air conditioner upgrading method of the first aspect of the present invention, the air conditioner includes an indoor unit as a data sending end and an outdoor unit as a data receiving end, and the method includes the following steps: the data sending end sends a data packet to the data receiving end; when the data receiving end verifies the received data packet correctly, the confirmation packet is sent to the data sending end, and the confirmation packet contains the packet sequence number of the currently received data packet; the data sending end writes the packet sequence number in the received confirmation packet alternately into the first storage area and the second storage area; when a breakpoint occurs in the data transmission between the data sending end and the data receiving end and the data transmission connection is restored, a larger packet sequence number stored in the first storage area and the second storage area is determined; the data sending end sends a data packet corresponding to a packet sequence number after the larger packet sequence number to the data receiving end.
[0006] According to the air conditioner upgrade method of the present invention, short-line transmission is performed between the indoor unit and the outdoor unit to complete the software upgrade of the outdoor unit. On the one hand, it can avoid the need for the indoor unit and the outdoor unit to download upgrade packages from the server respectively for upgrading in the related technology, thereby avoiding the situation where the outdoor unit cannot be upgraded due to the inability to connect to the server. In addition, when a transmission breakpoint occurs, the breakpoint position can be accurately queried, and the transmission can be continued from the data packet at the breakpoint position, thereby avoiding retransmission from the starting data packet, which can greatly shorten the upgrade time of the outdoor unit, improve upgrade efficiency, and improve user experience.
[0007] According to some embodiments of the present invention, the air conditioner upgrading method also includes: during the data packet transmission process, when it is determined that the packet sequence number of the data packet currently written into one of the first storage area and the second storage area is greater than the packet sequence number of the other, erasing the smaller packet sequence number in preparation for the storage area corresponding to the smaller packet sequence number to write the packet sequence number of the next transmitted data packet.
[0008] According to some embodiments of the present invention, the air conditioner upgrade method further includes: determining whether the packet sequence number written into any one of the first storage area and the second storage area is less than the maximum packet sequence number of the data packet; if the packet sequence number written into any one of the first storage area and the second storage area is not less than the maximum packet sequence number of the data packet, the data sending segment sends a completion packet to the data receiving end, the completion packet includes the CRC check value of the total file of the control program of the upgraded version of the outdoor unit, and the data packet transmission is completed.
[0009] Furthermore, the air conditioner upgrade method also includes: after the data packet transmission is completed, the data receiving end verifies all data packets, and compares the calculated check value with the CRC check value of the total control program file of the outdoor unit upgrade version contained in the completion packet; if there is inconsistency, the data receiving end sends a data packet retransmission request to the data sending end, and the first processing module resends all data packets.
[0010] Furthermore, the data receiving end includes a download area and a data running area, and the data sending end sends a data packet to the data receiving end, specifically including: the data receiving end stores the received data packet in the download area, and the method also includes: if the verification is successful, copying all the data packets in the download area of the data sending end to the data running area of the data sending end; erasing the data packets in the download area.
[0011] In some embodiments, the air conditioner upgrade method also includes: during the data packet transmission process, determining whether the difference between the packet sequence number stored in the first storage area and the packet sequence number stored in the second storage area is equal to a set value, wherein the set value is the difference between the packet sequence numbers of two adjacent data packets; if the difference between the packet sequence number stored in the first storage area and the packet sequence number stored in the second storage area is not equal to the set value, the data sending end re-sends the data packet to the data receiving end starting from the starting data packet.
[0012] An air conditioner according to a second aspect of the present invention comprises an indoor unit as a data sending end and an outdoor unit as a data receiving end, wherein the data sending end comprises: a first storage module, the first storage module having a first storage area and a second storage area, when the data receiving end verifies that the received data packet is correct, the data sending end sends a confirmation packet to the data sending end, the confirmation packet contains the packet sequence number of the currently received data packet, and the data sending end writes the packet sequence number in the received confirmation packet alternately into the first storage area and the second storage area; a first processing module, the first processing module is used to determine the larger packet sequence number stored in the first storage area and the second storage area; the data receiving end comprises: a second storage module, the second storage module is used to store data packets; a second processing module, the second processing module is used to detect whether a breakpoint occurs in the data transmission between the indoor unit and the outdoor unit, and re-establish a data transmission connection with the data sending end after a breakpoint occurs.
[0013] Furthermore, the first processing module is also used to: during data packet transmission, determine whether the packet sequence number written into any one of the first storage area and the second storage area is less than the maximum packet sequence number of the data packet; when the first processing module determines that the packet sequence number stored in any one of the first storage area and the second storage area is not less than the maximum packet sequence number of the data packet, send a completion packet to the second processing module, and the completion packet includes the CRC check value of the total file of the control program of the upgraded version of the outdoor unit.
[0014] Furthermore, after receiving the completion packet, the second processing module verifies all data packets and compares the calculated verification value with the CRC verification value of the total control program file of the upgraded version of the outdoor unit contained in the completion packet; if there is inconsistency, the second processing module sends a data packet retransmission request to the first processing module, and the first processing module resends all data packets.
[0015] In a specific example, the second storage module includes: a download area, the download area is used to store data packets received by the data receiving end; and a data running area, the data running area is used to store data packets written from the download area when the verification is successful.
[0016] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 is a flow chart of an air conditioner upgrading method according to an embodiment of the present invention;
[0018] Figure 2is a flowchart of a specific embodiment of the air conditioner upgrading method according to an embodiment of the present invention;
[0019] Figure 3 is a schematic diagram of an air conditioner according to an embodiment of the present invention;
[0020] Figure 4 is a schematic diagram of an indoor unit according to an embodiment of the present invention;
[0021] Figure 5 is a schematic diagram of an outdoor unit according to an embodiment of the present invention.
[0022] Reference numerals:
[0023] Air Conditioner 100:
[0024] Indoor unit 10, first storage module 101, first processing module 102,
[0025] The outdoor unit 20 , the second storage module 201 , and the second processing module 202 . DETAILED DESCRIPTION
[0026] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and should not be construed as limiting the present invention.
[0027] Reference below Figure 1 and Figure 2 A method for upgrading an air conditioner according to an embodiment of the first aspect of the present invention is described.
[0028] like Figure 1As shown, according to the air conditioner upgrade method of the first embodiment of the present invention, the air conditioner includes an indoor unit 10 and an outdoor unit 20. When the indoor unit 10 and the outdoor unit 20 are upgraded in firmware, the upgrade files of the outdoor unit 20 and the indoor unit 10 can be merged into an upgrade package and deployed to the server, and then the merged upgrade package can be downloaded from the server to the indoor unit 10, and then the indoor unit 10 can send the upgrade file of the outdoor unit 20 to the outdoor unit 20 to achieve the overall upgrade of the air conditioner 100 system. Here, the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud storage, and big data and artificial intelligence platforms. When short-line transmission is performed between the indoor unit 10 and the outdoor unit 20, the indoor unit 10 can be used as a data transmitter, and the outdoor unit 20 can be used as a data receiver. The data transmission between the indoor unit 10 and the outdoor unit 20 can be transmitted through a transmission medium, or it can be WiFi transmission, or it can be Bluetooth transmission.
[0029] The air conditioner upgrading method of this embodiment comprises the following steps:
[0030] S1, the data sending end sends a data packet to the data receiving end;
[0031] S2, when the data receiving end verifies the received data packet correctly, it sends a confirmation packet to the data sending end, and the confirmation packet contains the packet sequence number of the currently received data packet;
[0032] S3, the data sending end writes the packet sequence number in the received confirmation packet into the first storage area and the second storage area alternately;
[0033] S4, when a breakpoint occurs in the data transmission between the data transmitting end and the data receiving end and the data transmission connection is restored, determining a larger packet sequence number stored in the first storage area and the second storage area;
[0034] S5, the data sending end sends a data packet corresponding to a packet sequence number following a larger packet sequence number to the data receiving end.
[0035] Specifically, the indoor unit 10 as the data transmitting end first cuts the upgrade package of the outdoor unit 20 into multiple data packets for transmission, and sets a packet number 1, 2, 3...N for each data packet. The data packet can be transmitted in a serial or parallel form. Among them, the storage device of the data transmitting end opens up two storage areas, namely the first storage area and the second storage area, and the initial data stored in the first storage area and the second storage area are both 0.
[0036] During the transmission process, the data transmitting end sends data packets to the data receiving end in sequence. For example, the data transmitting end first sends a data packet with a packet number of 1 to the data receiving end. After the data receiving end receives the data packet, it first performs a CRC check on the data packet. If the check fails, it means that the data information in the data packet has an error during the transmission process. At this time, the data receiving end can discard the data packet and then request the data transmitting end to resend the discarded data packet. If the check is correct, the data receiving end returns an Ack (receipt), i.e., a confirmation packet, to the data transmitting end to indicate that it has received the data packet with a packet number of 1. The confirmation packet can contain the packet number and checksum of the data packet currently received by the data receiving end. The data transmitting end writes the packet number 1 in the confirmation packet into the first storage area in. Then the second data packet is transmitted. When the data sending end receives the second confirmation packet returned by the data receiving end, the packet sequence number 2 in the second confirmation packet is written into the second storage area. After the data sending end has sent the data packet with packet sequence number 3 and received the third confirmation packet, the packet sequence number 3 in the third confirmation packet is again written into the first storage area. Similarly, the data sending end writes the packet sequence numbers in the received confirmation packets alternately into the first storage area and the second storage area until all data packets are transmitted successfully.
[0037] During the data packet transmission process, the data transmission between the data sending end and the data receiving end may be interrupted due to power failure, network disconnection, user operation and other events. When the cause of the breakpoint is eliminated, the data sending end and the data receiving end re-shake hands to establish a data transmission connection. At this time, in order to avoid restarting the transmission from the first data packet, it is necessary to first determine the transmission position when the breakpoint occurs, that is, the position of the data packet that has been transmitted when the breakpoint occurs. The specific determination method is as follows: the data sending end reads and determines the larger one of the packet sequence number stored in the first storage area and the packet sequence number stored in the second storage area. If the packet sequence number stored in the first storage area is greater than the packet sequence number stored in the second storage area, it means that the transmission position when the breakpoint occurs is the data packet corresponding to the packet sequence number stored in the first storage area, and the transmission can be continued from a data packet after the packet sequence number stored in the first storage area; if the packet sequence number stored in the second storage area is greater than the packet sequence number stored in the first storage area, it means that the transmission position when the breakpoint occurs is the data packet corresponding to the packet sequence number stored in the second storage area, and the transmission can be continued from a data packet after the packet sequence number stored in the second storage area.
[0038] According to the air conditioner upgrading method of the present invention, short-line transmission is performed between the indoor unit 10 and the outdoor unit 20 to complete the upgrading of the outdoor unit 20, which can avoid the need for the indoor unit 10 and the outdoor unit 20 to download the upgrade package from the server respectively for upgrading in the related art, thereby avoiding the situation that the outdoor unit 20 cannot be connected to the server and cannot be upgraded. At the same time, when a transmission breakpoint occurs, the breakpoint position can be accurately queried, and the transmission can be continued from the data packet at the breakpoint position, thereby avoiding retransmission from the starting data packet, which can greatly shorten the upgrading time of the outdoor unit 20, improve the upgrading efficiency, and improve the user experience.
[0039] Optionally, in some embodiments, the data receiving end may also be provided with two storage areas. During the data packet transmission process, after receiving the data packet, the data receiving end, if the data packet is verified to be correct, alternately writes the packet sequence number of the data packet into the two storage areas. After a breakpoint event occurs between the data sending end and the data receiving end and they re-shake hands to establish a data transmission connection, the data receiving end determines the larger packet sequence number stored in the two storage areas, and then the data receiving end sends the determined packet sequence number to the data sending end. The data sending end compares whether the two larger packet sequence numbers determined by itself and the data receiving end are the same. If they are the same, the data sending end sends a data packet corresponding to a packet sequence number after the packet sequence number to the data receiving end; if they are different, the data sending end writes the received packet sequence number into the corresponding storage area, and then the data sending end sends a data packet corresponding to the packet sequence number after the packet sequence number to the data receiving end.
[0040] According to some embodiments of the present invention, the air conditioner upgrade method further includes: during the data packet transmission process, when it is determined that the packet sequence number of the data packet currently written into one of the first storage area and the second storage area is greater than the packet sequence number of the other, erasing the smaller packet sequence number so that the storage area corresponding to the smaller packet sequence number is prepared to write the packet sequence number of the next transmitted data packet. This can avoid the memory occupation of the first storage area and the second storage area, and better save storage resources.
[0041] For example, during the normal transmission of a data packet, after the data sending end writes packet sequence number 1 into the first storage area, it indicates that the data packet with packet sequence number 1 has been successfully transmitted; on this basis, if the data sending end writes packet sequence number 2 into the second storage area, it indicates that the data packet with packet sequence number 2 has also been transmitted. At this time, the packet sequence number 1 of the first storage area can be erased, so that the data sending end can write the packet sequence number 3 in the received confirmation packet into the first storage area after sending the data packet with packet sequence number 3; similarly, when the packet sequence number 3 is successfully written into the first storage area, the data sending end erases the packet sequence number 2 of the second storage area, so that the data sending end can write the packet sequence number 4 in the received confirmation packet into the second storage area after sending the data packet with packet sequence number 4, thereby avoiding writing the packet sequence numbers of all data packets into the first storage area or the second storage area during the upgrade process, reducing memory usage, and saving memory resources of the data sending end.
[0042] According to some embodiments of the present invention, the air conditioner upgrade method also includes: during the data packet transmission process, determining whether the packet sequence number written to any one of the first storage area and the second storage area is less than the maximum packet sequence number of the data packet; if the packet sequence number written to any one of the first storage area and the second storage area is not less than the maximum packet sequence number of the data packet, the data sending segment sends a completion packet to the data receiving end, and the completion packet includes the CRC check value of the total file of the control program of the upgraded version of the outdoor unit.
[0043] Specifically, during the transmission of the data packet, it is detected and determined in real time whether the packet number stored in the first storage area or the second storage area is less than the maximum packet number of the data packet. When it is determined that the packet number written in any one of the first storage area and the second storage area is equal to the packet number of the largest data packet, it means that the data sending end has transmitted all data packets containing the upgraded version of the control program of the outdoor unit to the data receiving end. At this time, the data sending end can send a completion packet to the data receiving end. The completion packet contains the CRC check value of the total file of the upgraded version of the control program of the outdoor unit. Therefore, it can accurately determine whether all data packets are sent successfully, terminate the transmission in time, and save system overhead.
[0044] Furthermore, the air conditioner upgrade method may also include: after the data receiving end receives the completion packet, it verifies all data packets and compares the calculated check value with the CRC check value of the total file of the control program of the upgraded version of the outdoor unit contained in the completion packet; if there is inconsistency, the data receiving end sends a data packet retransmission request to the data sending end, and the data sending end resends all data packets to the data receiving end.
[0045] In order to avoid errors in data transmission, such as missing or duplicated data packets, an error correction mechanism can be established. Specifically, after the data transmitting end transmits all data packets to the data receiving end, the data receiving end checks the CRC values of all received data packets, and compares the calculated check value with the CRC check value of the total file of the control program of the outdoor unit upgrade version contained in the completion package. If they are completely consistent, the check is correct. If they are inconsistent, the check fails. If the check fails, the data receiving end and the data transmitting end restart the handshake to establish a data transmission connection. At the same time, the data receiving end erases the received data packets, and the data transmitting end resends all data packets to the data receiving end starting from the data packet with the packet number 1. After all data packets are sent successfully, the CRC check is performed again until the check succeeds. In this way, the correct transmission of the outdoor unit 20 upgrade package is achieved.
[0046] Furthermore, the data receiving end includes a download area and a data running area, and the data sending end sends a data packet to the data receiving end, specifically including: the data receiving end stores the received data packet in the download area, and the method also includes: if the verification is successful, copying all the data packets in the download area of the data sending end to the data running area of the data sending end; erasing the data packets in the download area.
[0047] Specifically, the data receiving end includes a download area and a data running area, wherein the outdoor unit 20 reads instructions and data from the data running area during operation, and the download area can be used only to temporarily receive and store data packets during the firmware upgrade process. In this way, the user can complete the upgrade without stopping the outdoor unit 20 during operation. In the process of the data sending end sending data packets to the data receiving end, the data receiving end first stores all received data packets in the download area. After all data packets are transmitted, a CRC check is performed on all data packets in the download area. If the check is successful, all data packets in the download area are copied to the data running area, the downloaded data packets are parsed, and the parsed data packets replace or overwrite the old board running software in the data running area, thereby completing the upgrade of the outdoor unit 20 running software. After the upgrade is completed, the data packets in the download area need to be erased in preparation for the next upgrade.
[0048] Optionally, as an alternative, the data receiving end may only include a data operation area. During the process of the data sending end sending a data packet to the data receiving end, the data receiving end may directly write the received data packet into the data operation area to overwrite the data packet of the old version. At this time, during the upgrade process of the air conditioner 100, the user cannot control the operation of the outdoor unit 20.
[0049] In some embodiments, the air conditioner upgrade method may further include: the server sends the upgrade package to the data sending end; the data sending end divides the upgrade package into multiple data packets of the same size.
[0050] Specifically, when the firmware of the indoor unit 10 and the outdoor unit 20 is upgraded, the upgrade files of the outdoor unit 20 and the indoor unit 10 can be merged into an upgrade package and uploaded to the server using PC software, and then the upgrade package is downloaded from the server to the indoor unit 10, and then the indoor unit 10 sends the upgrade package of the outdoor unit 20 to the outdoor unit 20 separately to achieve the overall upgrade of the air conditioner 100 system. As a result, the indoor unit 10 only needs to establish a data transmission connection with the server once, and the upgrade packages of the outdoor unit 20 and the indoor unit 10 can be downloaded to the indoor unit 10. The indoor unit 10 and the outdoor unit 20 communicate over short distances, and the transmission efficiency is higher, which can greatly improve the upgrade efficiency of the outdoor unit 20.
[0051] According to some embodiments of the present invention, the air conditioner upgrade method may further include: determining whether a breakpoint event occurs, where the breakpoint event includes: power failure or network disconnection or user operation, where power failure may include power failure or voltage instability, network disconnection such as complete network connection failure, or unstable network connection, poor signal, packet loss, etc., user operation such as user-triggered events such as user power on / off, temperature adjustment, wind speed, etc., or it may also be active control of the air conditioner 100 control system, such as defrosting, adjusting the wind guide angle and wind speed at a certain temperature, etc. If a breakpoint event is determined to occur, the data receiving end sends a connection request to the data sending end, the data sending end confirms the request and responds, the data receiving end and the data sending end restore the data transmission connection, and then perform the corresponding mechanism of breakpoint resumption.
[0052] According to some embodiments of the present invention, the air conditioner upgrade method also includes: during the data packet transmission process, determining whether the difference between the packet sequence number stored in the first storage area and the packet sequence number stored in the second storage area is equal to a set value, the set value being the difference between the packet sequence numbers of two adjacent data packets; if the difference between the packet sequence number stored in the first storage area and the packet sequence number stored in the second storage area is not equal to the set value, the data sending end resends the data packet to the data receiving end starting from the starting data packet.
[0053] For example, if the data transmitting end divides the upgrade package of the indoor unit into multiple data packets, and the sequence numbers set for the multiple data packets are 1, 2, 3...N in sequence, under normal conditions, the difference between the packet sequence numbers stored in the first storage area and the second storage area should always be 1, that is, the set value is 1. If the difference between the packet sequence numbers stored in the first storage area and the second storage area is greater than 1, it means that the data packet is lost, and the upgrade fails. The data transmitting end needs to retransmit the data packet with the packet sequence number 1 to the data receiving end; of course, the present invention is not limited to this. When the packet sequence numbers of multiple data packets are 2, 4, 6...2N, the set value is 2, and so on. In this way, by setting the error correction mechanism of this embodiment, the loss of data packets in the data transmission process can be prevented, ensuring the smooth upgrade of the outdoor unit.
[0054] The following describes an air conditioner 100 according to an embodiment of a second aspect of the present invention.
[0055] The air conditioner 100 according to the second embodiment of the present invention comprises an indoor unit 10 as a data transmitting end and an outdoor unit 20 as a data receiving end, wherein the data transmitting end comprises: a first storage module 101 and a first processing module 102. The data receiving end comprises: a second storage module 201 and a second processing module 202.
[0056] The first storage module 101 may be a dataflash memory (non-volatile data memory) of the indoor unit 10 or an external EEPROM (Electrically Erasable Programmable read only memory) or other memory devices. The first storage module 101 opens up a first storage area and a second storage area. For example, the first storage area may be a storage area with an address of M, and the second storage area may be a storage area with an address of N. Of course, the present invention is not limited thereto. The addresses of the first storage area and the second storage area in the memory device may be reasonably selected according to actual needs. During the data packet transmission process, when the second processing module 202 of the data receiving end verifies the received data packet correctly, it sends a confirmation packet to the data sending end. The confirmation packet includes the packet sequence number of the currently received data packet. The data sending end writes the packet sequence number in the received confirmation packet alternately into the first storage area and the second storage area. The first processing module 102 is used to determine the larger packet sequence number between the packet sequence number of the first storage area and the packet sequence number of the second storage area after a breakpoint occurs in the data transmission between the data sending end and the data receiving end and the data transmission connection is restored.
[0057] The second storage module 201 can be a dataflash memory (non-volatile data memory) of the outdoor unit 20 or an external EEPROM (Electrically Erasable Programmable read only memory) or other memory devices. The second storage module 201 is used to receive and store data packets; the second processing module 202 is used to detect whether a breakpoint occurs in the communication between the indoor unit 10 and the outdoor unit 20, and to re-establish a data transmission connection with the data sending end after a breakpoint occurs.
[0058] Specifically, the first processing module 102 of the indoor unit 10 divides the upgrade package of the outdoor unit 20 into multiple data packets, and sets a packet number 1, 2, 3...N for each data packet. The data packet can be transmitted in a serial or parallel form. The first storage module 101 opens up two storage areas, namely the first storage area and the second storage area. During the transmission process, the data sending end sends data packets to the data receiving end in sequence. For example, the data sending end first sends a data packet with a packet number of 1 to the data receiving end. After the data receiving end receives the data packet, the second processing module 202 verifies the data packet. When the verification is correct, the data receiving end returns an Ack (receipt), i.e., a confirmation packet, to the data sending end to indicate that it has received the data packet with a packet number of 1. The confirmation packet can contain the packet number and the checksum of the data packet currently received by the data receiving end. The data sending end writes the packet number 1 in the confirmation packet into the first storage area of the first storage module. Then the second data packet is transmitted. When the data sending end receives the second confirmation packet returned by the data receiving end, the packet sequence number 2 in the second confirmation packet is written into the second storage area of the first storage module; when the data sending end has sent the data packet with packet sequence number 3 and received the third confirmation packet, the packet sequence number 3 in the third confirmation packet is again written into the first storage area, and so on. The data sending end writes the packet sequence numbers in the received confirmation packets alternately into the first storage area and the second storage area until all data packets are transmitted successfully.
[0059] During the data packet transmission process, the data transmission between the data transmitting end and the data receiving end may be interrupted due to various conditions such as power failure, network disconnection, etc. When the cause of the breakpoint is eliminated, the data transmission connection is re-established between the first processing module 102 and the second processing module 202. At this time, in order to avoid restarting the transmission from the first data packet, it is necessary to first determine the transmission position when the breakpoint occurs, that is, the position of the data packet that has been transmitted when the breakpoint occurs. The specific operation is as follows: the first processing module 102 reads and determines the larger packet sequence number between the packet sequence number stored in the first storage area and the packet sequence number stored in the second storage area. If the packet sequence number stored in the first storage area is greater than the packet sequence number stored in the second storage area, it means that the transmission position when the breakpoint occurs is the data packet corresponding to the packet sequence number stored in the first storage area, and the transmission to the data receiving end can be continued from a data packet after the packet sequence number stored in the first storage area; if the packet sequence number stored in the second storage area is greater than the packet sequence number stored in the first storage area, it means that the transmission position when the breakpoint occurs is the data packet corresponding to the packet sequence number stored in the second storage area, and the transmission can be continued from a data packet after the packet sequence number stored in the second storage area.
[0060] According to the air conditioner of the present invention, short-line transmission is performed between the indoor unit 10 and the outdoor unit 20 to complete the upgrade of the outdoor unit 20, which can avoid the need for the indoor unit 10 and the outdoor unit 20 to download upgrade packages from the server respectively for upgrading in the related art, thereby avoiding the situation where the outdoor unit 20 cannot be connected to the server and cannot be upgraded. At the same time, when a transmission breakpoint occurs, the breakpoint position can be accurately queried, and the transmission can be continued from the data packet at the breakpoint position, thereby avoiding retransmission from the starting data packet, which can greatly shorten the upgrade time of the outdoor unit 20, improve upgrade efficiency, and improve user experience.
[0061] Furthermore, the first processing module 102 is also used to: during the data packet transmission process, determine whether the packet sequence number written into any one of the first storage area and the second storage area is less than the maximum packet sequence number of the data packet; if the packet sequence number written into any one of the first storage area and the second storage area is not less than the maximum packet sequence number of the data packet, it means that all data packets containing the upgraded version of the control program of the outdoor unit have been transmitted. At this time, the first processing module can send a completion packet to the second processing module, and the completion packet contains the CRC check value of the total file of the upgraded version of the control program of the outdoor unit.
[0062] Specifically, the first processing module 102 sends data packets to the second processing module 202 in sequence, and during the transmission process, the first processing module 102 detects and determines in real time whether the packet sequence number stored in any one of the first storage area and the second storage area is less than the maximum packet sequence number of the data packet. Since each packet sequence number written in the first storage area or the second storage area indicates that the data packet corresponding to the packet sequence number has been transmitted, when the first processing module 102 determines that the packet sequence number stored in any one of the first storage area and the second storage area is not less than or equal to the packet sequence number of the largest data packet, it indicates that the data sending end has transmitted all data packets to the data receiving end. At this time, the first processing module 102 can send a completion packet to the second processing module 202, and the completion packet contains the CRC check value of the total file of the control program of the upgraded version of the outdoor unit. In this way, it can be accurately determined whether all data packets are sent successfully, and the transmission is terminated in time, saving system overhead.
[0063] Furthermore, after receiving the completion packet, the second processing module 202 verifies all data packets; and compares the calculated check value with the CRC check value of the total file of the control program of the upgraded version of the outdoor unit contained in the completion packet; if there is inconsistency, the second processing module 202 sends a data packet retransmission request to the first processing module 102, and the first processing module 102 resends all data packets.
[0064] Specifically, the error correction mechanism also includes that after the data packet transmission of the first processing module 102 and the second processing module 202 is terminated, the second processing module 202 performs a CRC check (cyclic redundancy check) on all the data packets stored in the second storage module 201, and compares the calculated check value with the CRC check value of the total file of the control program of the upgraded version of the outdoor unit contained in the completion package; if the two are consistent, it means that all data packets are correct, and the next step can be performed, that is, replacing the old version of the outdoor unit control program; if they are inconsistent, the second processing module 202 and the first processing module restart the handshake to establish a data transmission connection, and at the same time, the second processing module 202 erases the received data packets in the second storage module 201, and the first processing module 102 resends all data packets to the second processing module 202 starting from the data packet with packet number 1. After all data packets are sent successfully, the second processing module 202 performs a CRC check again until the check is successful, thereby achieving reliable transmission of the upgrade package of the outdoor unit 20.
[0065] In a specific example, the second storage module 201 includes: a download area and a data operation area. The download area is used to store data packets received by the data receiving end; the data operation area is used to store data packets written from the download area when the verification is successful. The second processing module 202 reads instructions and data from the data operation area during operation, and the download area can be used only to temporarily receive and store data packets during the firmware upgrade process. In this way, the user can complete the upgrade without stopping the outdoor unit 20 during operation. In the process of sending data packets from the data sending end to the data receiving end, the data receiving end first stores all received data packets in the download area. After all data packets are transmitted, CRC verification is first performed on all data packets in the download area. If the verification is successful, all data packets in the download area are copied to the data operation area to replace or overwrite the running software of the old version in the data operation area, thereby completing the upgrade of the running software of the outdoor unit 20. After the upgrade is completed, the data packets in the download area need to be erased to prepare for the next upgrade.
[0066] In some embodiments, the first processing module 102 is also used to: during data packet transmission, determine whether the difference between the packet sequence number stored in the first storage area and the packet sequence number stored in the second storage area is equal to a set value, and the set value is the difference between the packet sequence numbers of two adjacent data packets; if the difference between the packet sequence number stored in the first storage area and the packet sequence number stored in the second storage area is not equal to the set value, the data sending end resends the data packet to the data receiving end starting from the starting data packet.
[0067] For example, if the data transmitting end divides the upgrade package of the indoor unit into multiple data packets, and the sequence numbers set for the multiple data packets are 1, 2, 3...N in sequence, under normal conditions, the difference between the packet sequence numbers stored in the first storage area and the second storage area should always be 1, that is, the set value is 1. If the difference between the packet sequence numbers stored in the first storage area and the second storage area is greater than 1, it means that the data packet is lost, and the upgrade fails. The data transmitting end needs to retransmit the data packet with the packet sequence number 1 to the data receiving end; of course, the present invention is not limited to this. When the packet sequence numbers of multiple data packets are 2, 4, 6...2N, the set value is 2, and so on. In this way, by setting the error correction mechanism of this embodiment, the loss of data packets in the data transmission process can be prevented, ensuring the smooth upgrade of the outdoor unit.
[0068] In the description of the present invention, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0069] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like 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, an electrical connection, or a communication; it can be a direct connection, or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0070] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0071] Although the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.
Claims
1. An air conditioner upgrading method, characterized in that: The air conditioner comprises an indoor unit as a data transmitting end and an outdoor unit as a data receiving end, and the method comprises the following steps: The data transmitting end sends a data packet to the data receiving end; When the data receiving end verifies that the received data packet is correct, the data sending end sends a confirmation packet, wherein the confirmation packet includes the packet sequence number of the currently received data packet; The data transmitting end writes the packet sequence number in the received confirmation packet into the first storage area and the second storage area alternately; When a breakpoint occurs in the data transmission between the data transmitting end and the data receiving end and the data transmission connection is restored, determining a larger packet sequence number stored in the first storage area and the second storage area; The data transmitting end sends a data packet corresponding to a packet sequence number following the larger packet sequence number to the data receiving end; During data packet transmission, determining whether a difference between a packet sequence number stored in the first storage area and a packet sequence number stored in the second storage area is equal to a set value, wherein the set value is a difference between packet sequence numbers of two adjacent data packets; If the difference between the packet sequence number stored in the first storage area and the packet sequence number stored in the second storage area is not equal to the set value, the data sending end re-sends the data packet to the data receiving end starting from the starting data packet.
2. The air conditioner upgrading method according to claim 1, characterized in that: Also includes: During data packet transmission, when it is determined that the packet sequence number of a data packet currently written into one of the first storage area and the second storage area is greater than the packet sequence number of the other, the smaller packet sequence number is erased so that the storage area corresponding to the smaller packet sequence number is prepared to write the packet sequence number of the next transmitted data packet.
3. The air conditioner upgrading method according to claim 1, characterized in that: Also includes: During data packet transmission, determining whether a packet sequence number written into any one of the first storage area and the second storage area is less than a maximum packet sequence number of a data packet; If the packet number written into any one of the first storage area and the second storage area is not less than the maximum packet number of the data packet, the data sending end sends a completion packet to the data receiving end, and the completion packet includes the CRC check value of the total file of the control program of the upgraded version of the outdoor unit.
4. The air conditioner upgrading method according to claim 3, characterized in that: Also includes: After receiving the completion packet, the data receiving end verifies all data packets and calculates the The check value is compared with the CRC check value of the total file of the control program of the outdoor unit upgrade version contained in the completion package; If they are inconsistent, the data receiving end sends a data packet retransmission request to the data sending end, and the data sending end resends all data packets to the data receiving end.
5. The air conditioner upgrading method according to claim 4, characterized in that: The data receiving end includes a download area and a data running area, and the data sending end sends a data packet to the data receiving end, specifically including: the data receiving end stores the received data packet in the download area, and the method further includes: If the verification is successful, copying all data packets in the download area of the data sending end to the data operation area of the data sending end; Erases the data packets in the download area.
6. An air conditioner, characterized in that: Adopting the air conditioner upgrading method as claimed in any one of claims 1 to 5; the air conditioner comprises an indoor unit as a data sending end and an outdoor unit as a data receiving end, wherein the data sending end comprises: a first storage module, wherein the first storage module has a first storage area and a second storage area, and when the data receiving end verifies that the received data packet is correct, the data sending end sends a confirmation packet to the data sending end, wherein the confirmation packet includes a packet sequence number of the currently received data packet, and the data sending end writes the packet sequence number in the received confirmation packet into the first storage area and the second storage area alternately; a first processing module, the first processing module being used to determine a larger packet sequence number stored in the first storage area and the second storage area; The data receiving end comprises: A second storage module, wherein the second storage module is used to store data packets; The second processing module is used to verify the received data packets and detect whether a breakpoint occurs in the data transmission between the indoor unit and the outdoor unit, and to re-establish a data transmission connection with the data sending end after a breakpoint occurs.
7. The air conditioner according to claim 6, characterized in that: The first processing module is further used to: during data packet transmission, determine whether the packet sequence number written into any one of the first storage area and the second storage area is less than the maximum packet sequence number of the data packet; When the first processing module determines that the packet number stored in any one of the first storage area and the second storage area is not less than the maximum packet number of the data packet, a completion packet is sent to the second processing module, and the completion packet includes the CRC check value of the total file of the control program of the upgraded version of the outdoor unit.
8. The air conditioner according to claim 7, characterized in that: The second processing module receives After the completion packet, all data packets are checked, and the calculated check value is compared with the CRC check value of the total file of the control program of the upgraded version of the outdoor unit contained in the completion packet; If they are inconsistent, the second processing module sends a data packet retransmission request to the first processing module, and the first processing module resends all data packets.
9. The air conditioner according to claim 8, characterized in that: The second storage module includes: a download area, the download area is used to store data packets received by the data receiving end; A data running area is used to store the data packet written from the download area when the verification is successful.
Citation Information
Patent Citations
Method and device for storing data of set top box
CN103440205A
Method, device and system for transmitting data
CN103457707A
Program upgrading method and program upgrading device of air conditioner, air conditioner and storage medium
CN113757950A
