Disclosure of Invention
The invention provides a generation method of dynamic model codes for an air conditioner, which aims at the problem that when the existing air conditioner online upgrades software, other controller schemes cannot be replaced in the later period.
The invention provides a generation method of dynamic model codes for an air conditioner, the air conditioner comprises an inner machine and an outer machine, the inner machine and the outer machine are respectively provided with an inner machine controller and an outer machine controller which are in communication connection with each other, the generation method comprises the following steps:
the method comprises the steps of obtaining an inner machine model and an outer machine model of an air conditioner, wherein the inner machine model is associated with an indoor MCU model of an inner machine controller, and the outer machine model is associated with an outdoor MCU model of an outer machine controller;
generating a switchboard model according to the internal machine model and the external machine model;
and determining a corresponding model identification code according to the telephone exchange model, wherein the model identification code is used for establishing connection between the air conditioner and the wireless network.
Optionally, acquiring the model number of the air conditioner and the model number of the air conditioner comprises:
the inner machine controller invokes the inner machine type number and sends the inner machine type number to the outer machine, and the outer machine controller invokes the outer machine type number and sends the outer machine type number to the inner machine, so that the inner machine controller and the outer machine controller both acquire the inner machine type number and the outer machine type number.
Optionally, generating the switchboard model according to the internal machine model and the external machine model includes:
the internal machine controller generates a switchboard model according to the internal machine model and the external machine model, and the external machine controller generates the switchboard model according to the internal machine model and the external machine model.
Optionally, determining the corresponding model identification code according to the switchboard model includes:
the internal machine controller queries an internal machine database according to the telephone switchboard model to determine whether a first identification code can be generated or not;
under the condition that the first identification code can be generated, the internal machine controller adopts the first identification code as the machine type identification code;
under the condition that the first identification code cannot be generated, the external machine controller queries an external machine database according to the telephone exchange model to generate a second identification code; and sending the second identification code to the internal machine controller, so that the internal machine controller adopts the second identification code as the model identification code.
Optionally, the generating method further includes:
under the condition that the internal machine controller reads the first identification bit and determines that the first identification bit is effective, the internal machine controller queries an internal machine database according to the telephone exchange model to generate a first identification code;
and under the condition that the external machine controller reads the second identification bit and determines that the second identification bit is valid, the external machine controller combines the external machine database according to the telephone exchange model to generate a second identification code.
The invention also provides an upgrading method of the air conditioner software based on the dynamic model code of the air conditioner, which comprises the following steps:
the WIFI module of the air conditioner receives a software upgrading instruction, and sends an upgrading and downloading request to the server, wherein the upgrading and downloading request comprises a model identification code corresponding to the air conditioner;
the server invokes a software upgrading packet according to the upgrading downloading request and the model identification code thereof, and sends the software upgrading packet to the WIFI module;
the WIFI module sends the software upgrade package to an inner machine controller of the air conditioner, and the inner machine controller extracts the inner machine software upgrade package and/or the outer machine software upgrade package according to the upgrade request instruction so as to upgrade the inner machine controller software, and/or sends the outer machine software upgrade package to the outer machine controller so as to upgrade the outer machine controller software.
Optionally, the upgrade of the internal machine controller is performed according to the upgrade package of the internal machine, or the upgrade of the external machine controller is performed according to the upgrade package of the external machine, which further includes:
the inner machine controller and the outer machine controller respectively read MCU model information in the inner machine upgrading packet and the outer machine upgrading packet, and only upgrade is performed under the condition that MCU signals are confirmed to be correct.
The invention also provides an air conditioner, which comprises a memory and a processor, wherein the memory stores computer instructions which can run on the processor, and the processor is used for executing the computer instructions and is based on the air conditioner software upgrading method based on the dynamic model code of the air conditioner.
The invention also provides a computer readable storage medium, on which a computer program is stored, which when executed by a processor, implements the above-described air conditioner software upgrading method based on dynamic model coding of an air conditioner.
The generation method of the dynamic model code for the air conditioner comprises the steps of obtaining an inner machine model and an outer machine model of the air conditioner, wherein the inner machine model is associated with an indoor MCU model of an inner machine controller, the outer machine model is associated with an outdoor MCU model of an outer machine controller, generating a switchboard model according to the inner machine model and the outer machine model, and finally determining a corresponding model identification code according to the switchboard model, wherein the model identification code is used for establishing connection between the air conditioner and a wireless network. Because the model identification code, namely the PID code, is associated with MCU models in different inner machine controllers and outer machine controllers, one of the MCU models in the inner machine controllers and the outer machine controllers is changed, and different PID codes are generated, so that when the inner machine controllers or the outer machine controllers of the MCU models are replaced in the after-sales process of the air conditioner, the PID is changed, and when the software is updated in a later period on line, the server can issue corresponding software update packages to the air conditioner according to the modified PID codes, so that the software in the indoor MCU of the inner machine controller and/or the outdoor MCU of the outer machine controller is updated, and the problem that in the prior art, due to the fact that the PID code of the air conditioner is in a fixed mode, update failure does not occur due to the fact that the software update packages correspond to the MCU models is avoided.
Detailed Description
The following describes specific embodiments of the present invention in detail with reference to the drawings. It should be understood that the detailed description and specific examples, while indicating and illustrating the invention, are not intended to limit the invention.
It should be noted that, if directional indications (such as up, down, left, right, front, and rear … …) are included in the embodiments of the present invention, the directional indications are merely used to explain the relative positional relationship, movement conditions, etc. between the components in a specific posture (as shown in the drawings), and if the specific posture is changed, the directional indications are correspondingly changed.
In addition, if there is a description of "first", "second", etc. in the embodiments of the present invention, the description of "first", "second", etc. is for descriptive purposes only and is not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In addition, the technical solutions of the embodiments may be combined with each other, but it is necessary to base that the technical solutions can be realized by those skilled in the art, and when the technical solutions are contradictory or cannot be realized, the combination of the technical solutions should be considered to be absent and not within the scope of protection claimed in the present invention.
The invention provides a generation method of dynamic model codes for an air conditioner, wherein the air conditioner comprises an inner machine and an outer machine, the inner machine and the outer machine are respectively provided with an inner machine controller and an outer machine controller which are in communication connection with each other, as shown in figure 1, the generation method comprises the following steps:
s100, acquiring an inner machine model and an outer machine model of the air conditioner, wherein the inner machine model is associated with an indoor MCU model of an inner machine controller, and the outer machine model is associated with an outdoor MCU model of an outer machine controller;
s200, generating a switchboard model according to the internal machine model and the external machine model;
s300, determining a corresponding model identification code according to the type of the switchboard, wherein the model identification code is used for establishing connection between the air conditioner and the wireless network.
In step S100, the model numbers of the internal unit and the external unit are mainly based on the model numbers of the internal unit controller and the external unit controller, specifically, the model numbers of the control main boards of the controllers, because the control main boards of the current air conditioner all have the main control chips, namely the indoor MCU and the outdoor MCU, the corresponding schemes of the control main boards are different if the model numbers of the MCUs are different. In order to distinguish the control main boards of different schemes, the model of the internal machine and the model of the external machine need to contain information related to the model of the MCU, for example, the model of one internal machine is 'XXXXRL 78G 13' or 'XXXXMR 86F 02', and the seven letters and the numbers at the back of the model respectively correspond to the MCU of one model of different brands.
In step S200, the switchboard model is generated according to the internal machine model and the external machine model, which may be simply obtained by stacking the internal machine model and the external machine model, or by extracting keywords in the internal machine model and the external machine model and adding other keywords to form the switchboard model.
In step S300, the model identification code, i.e., PID code, is a unique identification code for identifying a model, and may be a combination of a series of digits with a fixed length, where each PID code corresponds to a model of a switchboard, and the corresponding PID code may be obtained by querying a related database according to the model of the switchboard. The PID code is used to configure the network when the air conditioner establishes a connection with the wireless network. Specifically, the WIFI module of the air conditioner will send the PID code to the server based on the wireless network, and the server configures the APP software function of the corresponding control terminal, such as a mobile phone, according to the PID code, so that the function setting on the APP software is consistent with the function of the air conditioner, and for the air conditioner with different functions, the server can identify and configure the corresponding different APP software function interfaces because of the difference of the PID codes. If the air conditioner does not have the negative ion function, the corresponding negative ion function keys on the APP software are gray to show that the function can not be operated, and the functions can be configured by inquiring or calling the corresponding APP functions after the server acquires the PID code of the air conditioner.
As can be seen from the description of the above embodiment, since the master model is generated according to the internal machine model and the external machine model, and the internal machine model and the external machine model are respectively associated with the MCU models of the internal machine controller and the external machine controller, and the machine type identification code, i.e., the PID code, is generated by the master model, when the MCU model of one of the internal machine controller and the external machine controller is different, the corresponding final PID code will be different, so that the server can identify the internal machine controller or the external machine controller of the MCU of different models. Therefore, when the air conditioner is in the after-sales maintenance process, if the internal machine controller or the external machine controller of the MCU with different models is replaced, the PID codes are different, and at the moment, the server can reconfigure corresponding APP software according to the change of the PID codes. And if the online software upgrading function is executed in the later stage, the server can issue a software upgrading packet matched with the online software upgrading packet to the air conditioner according to the changed PID, and the air conditioner upgrades the software in the indoor MCU of the inner machine controller and/or the outdoor MCU of the outer machine controller after executing the software upgrading, so that the problem that the upgrading failure does not occur due to the fact that the software upgrading packet corresponds to the MCU model in the prior art because the PID code of the air conditioner is in a fixed mode is avoided.
The generation method of the dynamic model code for the air conditioner comprises the steps of obtaining an inner machine model and an outer machine model of the air conditioner, wherein the inner machine model is associated with an indoor MCU model of an inner machine controller, the outer machine model is associated with an outdoor MCU model of an outer machine controller, generating a switchboard model according to the inner machine model and the outer machine model, and finally determining a corresponding model identification code according to the switchboard model, wherein the model identification code is used for establishing connection between the air conditioner and a wireless network. Because the model identification code, namely the PID code, is associated with MCU models in different inner machine controllers and outer machine controllers, one of the MCU models in the inner machine controllers and the outer machine controllers is changed, and different PID codes are generated, so that when the inner machine controllers or the outer machine controllers of the MCU models are replaced in the after-sales process of the air conditioner, the PID is changed, and when the software is updated in a later period on line, the server can issue corresponding software update packages to the air conditioner according to the modified PID codes, so that the software in the indoor MCU of the inner machine controller and/or the outdoor MCU of the outer machine controller is updated, and the problem that in the prior art, due to the fact that the PID code of the air conditioner is in a fixed mode, update failure does not occur due to the fact that the software update packages correspond to the MCU models is avoided.
In some embodiments of the present invention, when obtaining an internal machine model and an external machine model of an air conditioner, since the internal machine and the external machine respectively include an internal machine controller and an external machine controller, the internal machine model is generally stored in a memory of the internal machine controller, and the memory may be an independent memory on the internal machine controller or be built in an MCU of the internal machine controller, and the internal machine controller can obtain an internal machine model by directly reading from the memory; and the external machine controller is also directly read from the memory of the external machine controller by the external machine controller in the same way. After the inner machine controller obtains the inner machine model, the inner machine model is sent to the outer machine controller based on communication, and after the outer machine controller obtains the outer machine model, the outer machine controller can also send the outer machine model to the inner machine controller based on communication, so that the inner machine controller and the outer machine controller both obtain the inner machine model and the outer machine model.
After the internal machine controller and the external machine controller acquire the internal machine model and the external machine model, the internal machine controller and the external machine controller can generate the total machine model. It should be noted that, the rules of generating the master model by the internal machine controller and the external machine controller according to the internal machine model and the external machine model are the same, for example, the internal machine model and the external machine model are directly overlapped in front and back. Thus, the total machine model generated by the inner machine controller and the outer machine controller are the same.
In some embodiments of the present invention, after each of the internal machine controller and the external machine controller generates a switchboard model, as shown in fig. 3, determining a corresponding model identification code according to the switchboard model includes:
s310, the internal machine controller queries an internal machine database according to the telephone switchboard model to determine whether a first identification code can be generated or not;
s320, under the condition that the first identification code can be generated, the internal machine controller adopts the first identification code as the machine type identification code;
s330, under the condition that the first identification code cannot be generated, the external machine controller queries an external machine database according to the telephone exchange model to generate a second identification code; and sending the second identification code to the internal machine controller, so that the internal machine controller adopts the second identification code as the model identification code.
The internal machine controller and the external machine controller may not each determine a corresponding model identification code according to the model of the total machine. The corresponding model identification code is generally required to be generated by a set rule according to the model of the switchboard, and the server can identify the model identification code after the later air conditioner is connected with a wireless network. Specifically, the predetermined rule may be that the model identification code is determined by using a switchboard model and obtained through database query, or is obtained through calculation by using a predetermined calculation rule, so that different switchboard models correspond to the unique corresponding principle of different model identification codes. Taking database query as an example, the memories of the inner machine controller and the outer machine controller respectively store the inner machine database and the outer machine database, so that various first identification codes and second identification codes are obtained according to the database query. If the internal machine controller and the external machine controller are developed in the same stage, the internal machine database and the external machine database are the same, so that various first identification codes and second identification codes can be obtained according to the inquiry of the telephone exchange model. Because the general WIFI module is generally arranged in the indoor unit, the indoor MCU in the indoor unit controller is generally in direct high-speed communication connection with the WIFI module, and the indoor unit controller and the outdoor unit controller are in low-speed communication connection, the indoor MCU transmits data to the WIFI module relatively to the outdoor unit controller, so that the first identification code is obtained by inquiring the indoor unit controller as preferential treatment, namely the indoor unit controller directly adopts the machine type identification code according to the first identification code inquired by the indoor unit database, and the second identification code inquired by the outdoor unit controller is not needed. If the inner machine controller and the outer machine controller are developed in different stages, such as the outer machine controller of other models is independently replaced due to after-sale maintenance in the later use process of the air conditioner, in addition, the outer machine controller scheme of the model is developed in a later auxiliary mode, and the main control MCU model is different, so that the outer machine database in the outer machine controller is up to date and contains the data related to the total machine model and the PID code corresponding to the new outer machine controller model, and the inner machine controller does not contain the data newly added in the later stage due to the previous development. Therefore, the first identification code can not be inquired in the internal machine database by the internal machine controller according to the telephone exchange model corresponding to the updated external machine model, the second identification code can be inquired by the external machine controller according to the telephone exchange model, the second identification code is then sent to the internal machine controller by the external machine controller, and the internal machine controller adopts the second identification code as the machine type identification code, namely the PID code.
Through the description of the embodiment, the principle that the model identification code generated by the internal machine controller is preferential is adopted, and the model identification code generated by the external machine controller is adopted only under the condition that the internal machine controller cannot generate the model identification code, so that the model identification code can be finally generated by changing the internal machine controller and/or the external machine controller in the after-sales maintenance process of the air conditioner, and the internal machine controller can be matched with a network according to the model identification code.
In some embodiments of the present invention, the control method further includes:
under the condition that the internal machine controller reads the first identification bit and determines that the first identification bit is effective, the internal machine controller queries an internal machine database according to the telephone exchange model to generate a first identification code;
and under the condition that the external machine controller reads the second identification bit and determines that the second identification bit is valid, the external machine controller combines the external machine database according to the telephone exchange model to generate a second identification code.
Aiming at the air conditioner in the prior art, the type of the air conditioner is fixed, and the corresponding type identification code is also fixed, the scheme of generating the type of the air conditioner according to the combination of the internal type and the external type and then obtaining the type identification code is provided in the embodiment of the invention, so as to be compatible with the problems brought by the upgrading software of the air conditioner with the fixed type of the air conditioner in the prior art. Before the first identification code and the second identification code are respectively generated, the software of the inner machine controller and the outer machine controller also respectively reads the first identification bit and the second identification bit, and only when the identification bits are respectively valid, the first identification code and the second identification code are respectively generated. The label positions are adapted to the scheme of generating the telephone switchboard model according to the combination of the internal telephone model and the external telephone model when effective, and are adapted to the scheme of fixing the telephone switchboard model when ineffective. When the software is updated by the conventional controller with a fixed switchboard model, such as an internal machine controller of the controller upgrades the software, the identification code is invalid when the first identification code is read, so that the internal machine controller cannot adopt the scheme that the conventional internal machine model and the external machine model are combined to generate the switchboard model and then query a database to obtain the machine type identification code, and adopts the scheme that the conventional fixed switchboard model corresponds to the fixed machine type identification code, so that the generated machine type identification code can be identified by a server after being distributed, the generated machine type identification code is configured to be an APP matched with the function of the air conditioner of the machine type, otherwise, when the other machine type identification code is identified by the server, the configured APP function can be mismatched, and the problem that the operation of the APP is wrong or invalid and fails is caused is solved.
The invention also provides an upgrading method of the air conditioner software based on the dynamic model code of the air conditioner, which is based on the embodiment, as shown in fig. 3, and the upgrading method of the air conditioner software comprises the following steps:
s10, a WIFI module of the air conditioner receives a software upgrading instruction, and the WIFI module sends an upgrading and downloading request to a server, wherein the upgrading and downloading request comprises a model identification code corresponding to the air conditioner;
s20, the server invokes a software upgrade package according to the upgrade request instruction and the model identification code thereof, and sends the software upgrade package to the WIFI module;
s30, the WIFI module sends the software upgrading package to an inner machine controller of the air conditioner, and the inner machine controller extracts the inner machine software upgrading package and/or the outer machine software upgrading package according to the upgrading request instruction to upgrade the inner machine controller software or sends the outer machine software upgrading package to the outer machine controller to upgrade the outer machine controller software.
The software upgrading instruction can be sent by a server, namely, the software version of the indoor unit controller and the software version of the outdoor unit controller of the current air conditioner are compared with the software version stored by the server by uploading the WIFI module of the air conditioner, and when the software version stored by the server is found to be updated, the software upgrading instruction can be sent to the air conditioner at the moment so as to be received by the WIFI module of the air conditioner, wherein the situation belongs to an automatic software upgrading instruction; the software upgrading instruction can also be a manual software upgrading instruction, namely, the software upgrading instruction is manually operated, for example, a user sends the software upgrading instruction to the air conditioner through the control APP end of the mobile terminal equipment so as to be received by the WIFI module. The WIFI module sends an upgrade downloading request of the software upgrade to a server connected with the air conditioner network according to the software upgrade instruction, wherein the upgrade downloading request comprises a model identification code corresponding to the air conditioner, and the model identification code is generated based on the mode mentioned in the embodiment.
After receiving the update download request sent by the WIFI module, the server can search a corresponding software update package in a database in the server based on the model identification code and issue the software update package to the WIFI module.
After receiving the software upgrading packet, the WIFI module sends the software upgrading packet to the indoor unit controller, the indoor unit controller splits the software upgrading packet into an indoor software upgrading packet and an outdoor software upgrading packet which are different bin files, determines whether the outdoor unit controller software needs to be upgraded according to a software upgrading instruction, and if the outdoor unit controller software only needs to be upgraded, the indoor unit controller does not need to send the outdoor unit software upgrading packet to the outdoor unit controller, and only executes software upgrading on an indoor MCU of the indoor unit controller; if the software of the outdoor unit controller is required to be updated, an outdoor unit software updating packet is sent to the outdoor unit controller, and after the outdoor unit controller receives the software updating packet, the software updating function is executed for the outdoor MCU of the outdoor unit controller.
Because the generation rule of the machine type identification code in the embodiment of the invention is related to the MCU types in different inner machine controllers and outer machine controllers, one of the MCU types in the inner machine controllers and the outer machine controllers is changed, and different machine type identification codes are generated, so that when the inner machine controllers or the outer machine controllers of the MCU types are replaced in the after-sales process of the air conditioner, the machine type identification codes are also changed, and when the software is updated on line in the later stage, the server can issue the corresponding correct software update package to the air conditioner according to the modified machine type identification codes, thereby realizing the software update in the indoor MCU of the inner machine controller and/or the outdoor MCU of the outer machine controller, and avoiding the problem that in the prior art, the failure of the update occurs due to the fact that the machine type identification code of the air conditioner is fixed, and the software update package is not corresponding to the MCU type.
In some embodiments of the present invention, when the internal machine controller is updated according to an internal machine upgrade package, or the external controller is updated according to an external machine upgrade package, the method further includes:
the inner machine controller and the outer machine controller respectively read MCU model information in the inner machine upgrading packet and the outer machine upgrading packet, and only upgrade is performed under the condition that MCU signals are confirmed to be correct.
In order to further ensure the accuracy of the indoor unit controller or the outdoor unit controller when the software upgrade is executed, before the upgrade is executed, the MCU of the controller can also respectively read the upgrade package, namely the MCU model information in the bin file, and the software upgrade function is executed only when the MCU model is determined to be consistent with the MCU, so that the problem of upgrade failure caused by inconsistent correspondence between the MCU model and the upgrade package is avoided once.
The invention also provides an air conditioner, as shown in fig. 4, which is a block diagram of a connection between a variable frequency air conditioner and a server, wherein the variable frequency air conditioner comprises an indoor unit and an outdoor unit, the indoor unit and the outdoor unit are respectively provided with an indoor unit controller and an outdoor unit controller, the indoor unit controller and the outdoor unit controller are generally connected with each other in a wired mode such as current communication, the indoor unit controller and the outdoor unit controller are respectively provided with a processor, namely an indoor MCU and an outdoor MCU, and the variable frequency air conditioner is also respectively provided with a memory, wherein the memory can be respectively arranged on the independent memories, such as an EEPROM, of the indoor unit controller and the outdoor unit controller, or respectively arranged in the indoor MCU and the outdoor MCU, or only one of an indoor main MCU and an outdoor main MCU. The indoor unit controller is also provided with a network module such as a WIFI module for realizing wireless network connection of the air conditioner, wherein the WIFI module is connected with the mobile terminal equipment such as a mobile phone through a connecting gateway such as a router and a server, the router is connected with the mobile terminal equipment such as the mobile phone, so that the mobile terminal equipment can realize wireless control of the air conditioner through the APP arranged on the mobile terminal equipment, and the server is used for remotely storing data and the like required by wireless control. When the indoor unit controller and the outdoor unit controller execute control software, namely computer instructions, the method for upgrading the air conditioner software based on the dynamic model code of the air conditioner is realized, so that the model identification code, namely the PID code, is associated with different models of the indoor unit controller and the outdoor unit controller, when one of the MCU in the indoor unit controller and the MCU in the outdoor unit controller is changed, different PID codes are generated, and accordingly, when the indoor unit controller or the outdoor unit controller of the MCU with different models of the air conditioner is replaced in the after-sale process, the PID is changed, and accordingly, when the software is upgraded online in the later period, the server can issue corresponding software upgrading packets to the air conditioner according to the modified PID codes, so that the software in the indoor MCU of the indoor unit controller and/or the outdoor MCU of the outdoor unit controller is upgraded, and the problem that in the prior art, upgrading failure does not occur due to the fact that the PID code of the air conditioner is a fixed mode is generated, and the software upgrading packets are not corresponding to the MCU is avoided.
The present invention also proposes a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the air conditioner software upgrade method of the dynamic model code based on an air conditioner mentioned in the above-mentioned embodiment.
In the description of the present specification, the descriptions of the terms "first embodiment," "second embodiment," "example," and the like, mean that a particular method, apparatus, or feature described in connection with the embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the particular features, methods, apparatus, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, the different embodiments or examples described in this specification and the features of the different embodiments or examples may be combined and combined by those skilled in the art without contradiction.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.