CN108173720B - Control method and system of household appliance and household appliance system - Google Patents

Control method and system of household appliance and household appliance system Download PDF

Info

Publication number
CN108173720B
CN108173720B CN201711284486.6A CN201711284486A CN108173720B CN 108173720 B CN108173720 B CN 108173720B CN 201711284486 A CN201711284486 A CN 201711284486A CN 108173720 B CN108173720 B CN 108173720B
Authority
CN
China
Prior art keywords
mobile terminal
encrypted
communication module
server
key
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201711284486.6A
Other languages
Chinese (zh)
Other versions
CN108173720A (en
Inventor
蒋玉龙
薛继龙
徐凯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuxi Xiaojing Sharing Network Technology Co., Ltd.
Original Assignee
Wuxi Xiaojing Sharing Network Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuxi Xiaojing Sharing Network Technology Co ltd filed Critical Wuxi Xiaojing Sharing Network Technology Co ltd
Priority to CN201711284486.6A priority Critical patent/CN108173720B/en
Publication of CN108173720A publication Critical patent/CN108173720A/en
Application granted granted Critical
Publication of CN108173720B publication Critical patent/CN108173720B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/2803Home automation networks
    • H04L12/2816Controlling appliance services of a home automation network by calling their functionalities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/06Network architectures or network communication protocols for network security for supporting key management in a packet data network
    • H04L63/062Network architectures or network communication protocols for network security for supporting key management in a packet data network for key distribution, e.g. centrally by trusted party
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0869Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/02Protecting privacy or anonymity, e.g. protecting personally identifiable information [PII]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/04Key management, e.g. using generic bootstrapping architecture [GBA]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/2803Home automation networks
    • H04L2012/284Home automation networks characterised by the type of medium used
    • H04L2012/2841Wireless

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The invention discloses a control method and a control system of a household appliance and a household appliance system, wherein the household appliance system comprises a communication module connected with the household appliance, the communication module is communicated with a mobile terminal, and the method comprises the following steps: generating a random number after establishing connection with the mobile terminal, generating the authentication key according to the random number and a second key, and sending the random number to the mobile terminal; and receiving the encrypted control command sent by the mobile terminal, and decrypting the encrypted control command through the authentication key to enable the household appliance to execute the control command, so that the communication security can be ensured through technical means such as encryption.

Description

Control method and system of household appliance and household appliance system
Technical Field
The invention relates to the technical field of household appliances, in particular to a control method of a household appliance, a control system of the household appliance and a household appliance system.
Background
In the related art, some household appliances such as campus washing machines cannot be controlled through a panel, and are mostly controlled through a 2G module and the like. However, the problem in the related art is that when the 2G module is offline, the user cannot immediately wash the clothes, and the user needs to wait for network recovery and then can wash the clothes after the device is online.
Disclosure of Invention
The present invention is directed to solving, at least to some extent, one of the technical problems in the related art. Therefore, a first object of the present invention is to provide a method for controlling a home appliance, which can control the home appliance by a communication method and can ensure the security of communication.
A second object of the present invention is to provide a control system for a household appliance. A third object of the present invention is to propose a household appliance system.
In order to achieve the above object, a control method for a home appliance according to an embodiment of a first aspect of the present invention is applied to a home appliance system, where the home appliance system includes a communication module connected to the home appliance, and the communication module communicates with a mobile terminal, and the method includes the following steps: generating a random number after establishing connection with the mobile terminal, generating the authentication key according to the random number and a second key, and sending the random number to the mobile terminal; and receiving the encrypted control instruction sent by the mobile terminal, and decrypting the encrypted control instruction through the authentication key so as to enable the household appliance to execute the control instruction.
According to the control method of the household appliance, the communication module generates the random number after establishing connection with the mobile terminal, and generates the authentication key according to the random number and the second key, and sending the random number to the mobile terminal, the mobile terminal uploading the random number to the server after receiving the random number, the server generating an authentication key according to the random number and the second key, the mobile terminal also obtaining a control instruction, and uploads the control instruction to the server, the server encrypts the control instruction through the authentication key, the mobile terminal receives the encrypted control instruction sent by the server, then, the communication module receives the encrypted control command sent by the mobile terminal, decrypts the encrypted control command through the authentication key, the household appliance executes the control command, so that the communication safety can be ensured by technical means such as encryption and the like.
According to an embodiment of the present invention, the method for controlling a home appliance further includes: after the household appliance executes the control command, sending an execution success command to the mobile terminal, wherein the mobile terminal sends a state query command after receiving the execution success command; and receiving the state query instruction sent by the mobile terminal, and feeding back the state information of the household appliance to the mobile terminal, wherein the mobile terminal receives the state information and reports the state information to the server.
According to an embodiment of the present invention, the method for controlling a home appliance further includes: encrypting the state information by the authentication key; and sending the encrypted state information to the mobile terminal, wherein the mobile terminal receives the encrypted state information and reports the encrypted state information to the server.
According to an embodiment of the present invention, when the mobile terminal is bound to the communication module, the method further includes: encrypting the pre-stored first identification information through a first secret key; sending the encrypted first identification information to the mobile terminal, wherein the mobile terminal acquires second identification information of the household appliance and sends the encrypted first identification information and the encrypted second identification information to the server, and the server acquires binding information after judging that the first identification information is consistent with the second identification information, encrypts the binding information through the first key and sends the encrypted binding information to the mobile terminal; and receiving the encrypted binding information forwarded by the mobile terminal, decrypting the encrypted binding information through the first key, and storing the binding information so as to bind the mobile terminal with the communication module.
According to one embodiment of the invention, the binding information comprises a user identification code and a second key.
According to an embodiment of the present invention, when the mobile terminal is unbind from the communication module, the method further includes: receiving encrypted binding information sent by the mobile terminal, wherein the mobile terminal sends a unbinding request to the server, and the server sends the encrypted binding information to the mobile terminal after receiving the unbinding request; and when the encrypted binding information is judged to be consistent with the stored binding information, the mobile terminal and the communication module are unbound.
In order to achieve the above object, a control system for a home appliance according to an embodiment of a second aspect of the present invention includes a mobile terminal, a home appliance system, and a server, where the home appliance system includes a communication module connected to the home appliance, and the communication module communicates with the mobile terminal, where the communication module generates a random number after establishing a connection with the mobile terminal, and generates an authentication key according to the random number and a second key; the communication module also sends the random number to the mobile terminal; the mobile terminal uploads the random number to the server after receiving the random number; the server generates an authentication key according to the random number and the second key; the mobile terminal acquires a control instruction and uploads the control instruction to the server; the server encrypts the control instruction through the authentication key and sends the encrypted control instruction to the mobile terminal; the mobile terminal receives the encrypted control instruction and sends the encrypted control instruction to the communication module; and the communication module decrypts the encrypted control instruction through the authentication key so as to enable the household appliance to execute the control instruction.
According to the control system of the home appliance provided by the embodiment of the invention, the communication module generates the random number after establishing connection with the mobile terminal, and generates an authentication key according to the random number and the second key, the communication module also sends the random number to the mobile terminal, the mobile terminal uploads the random number to the server after receiving the random number, the server generates the authentication key according to the random number and the second key, the mobile terminal obtains a control instruction, and the control instruction is uploaded to a server, the server encrypts the control instruction through an authentication key, and sends the encrypted control instruction to the mobile terminal, the mobile terminal receives the encrypted control instruction, and sends the encrypted control command to the communication module, the communication module decrypts the encrypted control command through the authentication key, the household appliance executes the control command, so that the communication safety can be ensured by technical means such as encryption and the like.
According to one embodiment of the invention, the communication module sends an execution success instruction to the mobile terminal after the household appliance executes the control instruction; the mobile terminal receives the execution success instruction and sends a state query instruction to the communication module; the communication module receives the state query instruction and feeds back the state information of the household appliance to the mobile terminal; and the mobile terminal receives the state information and reports the state information to the server.
According to one embodiment of the invention, the communication module encrypts the state information of the household appliance through an authentication key and sends the encrypted state information to the mobile terminal; and the mobile terminal receives the encrypted state information and reports the encrypted state information to the server.
According to one embodiment of the invention, when the mobile terminal is bound with the communication module, the communication module encrypts pre-stored first identification information through a first secret key and sends the encrypted first identification information to the mobile terminal; the mobile terminal acquires second identification information of the household appliance and sends the encrypted first identification information and the encrypted second identification information to the server; the server acquires binding information after judging that the first identification information is consistent with the second identification information, and encrypts the binding information through the first key; the mobile terminal receives the encrypted binding information sent by the server and sends the encrypted binding information to the communication module; and the communication module decrypts the encrypted binding information through the first key and stores the binding information so as to bind the mobile terminal with the communication module.
According to one embodiment of the invention, the binding information comprises a user identification code and a second key.
According to one embodiment of the invention, when the mobile terminal is unbiased from the communication module, the mobile terminal sends a unbinding request to the server; the server feeds back the encrypted binding information after receiving the unbinding request; the mobile terminal receives the encrypted binding information fed back by the server and sends the encrypted binding information fed back by the server to the communication module; and the communication module unbinds the mobile terminal from the communication module when judging that the encrypted binding information is consistent with the stored binding information.
In order to achieve the above object, a household electrical appliance system according to an embodiment of a third aspect of the present invention includes a household electrical appliance and a communication module connected to the household electrical appliance, the communication module communicating with a mobile terminal, and the communication module includes: the generation module is used for generating a random number after establishing connection with the mobile terminal and generating the authentication key according to the random number and a second key; a third sending module, configured to send the random number to the mobile terminal; a third receiving module, configured to receive the encrypted control instruction sent by the mobile terminal; and the execution module is used for decrypting the encrypted control instruction through the authentication key so as to enable the household appliance to execute the control instruction.
According to the household appliance system provided by the embodiment of the invention, the generation module generates the random number after the communication module is connected with the mobile terminal, and generates an authentication key according to the random number and the second key, the third sending module sends the random number to the mobile terminal, the mobile terminal uploads the random number to the server after receiving the random number, the server generates the authentication key according to the random number and the second key, the mobile terminal also obtains a control instruction, the control instruction is uploaded to a server, the server encrypts the control instruction through an authentication key, the mobile terminal receives the encrypted control instruction sent by the server, a third receiving module receives the encrypted control instruction sent by the mobile terminal, an execution module decrypts the encrypted control instruction through the authentication key, the household appliance executes the control command, so that the communication safety can be ensured by technical means such as encryption and the like.
According to an embodiment of the present invention, the third sending module is further configured to send an execution success instruction to the mobile terminal after the household appliance executes the control instruction, where the mobile terminal sends a status query instruction after receiving the execution success instruction; the third receiving module is further configured to receive the status query instruction sent by the mobile terminal; the third sending module is further configured to feed back the state information of the home appliance to the mobile terminal, where the mobile terminal receives the state information and reports the state information to the server.
According to an embodiment of the present invention, the communication module further includes a first encryption module, wherein the first encryption module is further configured to encrypt the status information by the authentication key; the third sending module is further configured to send the encrypted state information to the mobile terminal, where the mobile terminal receives the encrypted state information and reports the encrypted state information to the server.
According to one embodiment of the invention, the communication module further comprises a second encryption module and a binding module, when the mobile terminal is bound with the communication module, the second encryption module is further used for encrypting the pre-stored first identification information through the first secret key during the binding, the third sending module is further configured to send the encrypted first identification information to the mobile terminal, wherein the mobile terminal acquires second identification information of the household appliance and sends the encrypted first identification information and the encrypted second identification information to the server, the server acquires binding information after judging that the first identification information is consistent with the second identification information, encrypting the binding information through the first key, and sending the encrypted binding information to the mobile terminal; the third receiving module is further configured to receive the encrypted binding information forwarded by the mobile terminal; the binding module is further configured to decrypt the encrypted binding information through the first key and store the binding information, so that the mobile terminal is bound with the communication module.
According to one embodiment of the invention, the binding information comprises a user identification code and a second key.
According to an embodiment of the present invention, the communication module further includes a unbinding module, and when the mobile terminal and the communication module are unbound, the third receiving module is further configured to receive encrypted binding information sent by the mobile terminal, where the mobile terminal sends an unbinding request to the server, and the server sends the encrypted binding information to the mobile terminal after receiving the unbinding request; and the unbinding module is used for unbinding the mobile terminal and the communication module when the encrypted binding information is judged to be consistent with the stored binding information.
Drawings
Fig. 1 is a flowchart of a control method of a home appliance according to an embodiment of the present invention, in which the method is applied to a mobile terminal;
fig. 2 is a flowchart of a control method of a home appliance according to an embodiment of the present invention, in which the method is applied to a mobile terminal;
fig. 3 is a flowchart of a control method of a home appliance according to another embodiment of the present invention, in which the method is applied to a mobile terminal;
fig. 4 is a flowchart of a binding operation in a control method of a home appliance according to an embodiment of the present invention, in which the method is applied to a mobile terminal;
fig. 5 is a flowchart of an unbinding operation in a control method of a home appliance according to an embodiment of the present invention, in which the method is applied to a mobile terminal;
fig. 6 is a flowchart of a control method of a home appliance according to an embodiment of the present invention, in which the method is applied to a home appliance system;
fig. 7 is a flowchart of a control method of a home appliance according to an embodiment of the present invention, in which the method is applied to a home appliance system;
fig. 8 is a flowchart of a control method of a home appliance according to another embodiment of the present invention, in which the method is applied to a home appliance system;
FIG. 9 is a flowchart of a binding operation in a control method of a home appliance according to an embodiment of the present invention, in which the method is applied to a home appliance system
Fig. 10 is a flowchart of an unbinding operation in a control method of a home appliance according to an embodiment of the present invention, in which the method is applied to a home appliance system;
fig. 11 is a block schematic diagram of a control system of a home appliance according to an embodiment of the present invention;
fig. 12 is an interactive view of a binding operation in a control system of a home appliance according to an embodiment of the present invention;
fig. 13 is an interactive view of an unbinding operation in a control system of a home appliance according to an embodiment of the present invention;
fig. 14 is an interaction diagram of a status reporting operation in a control system of a home appliance according to an embodiment of the present invention;
fig. 15 is an interactive view of a control operation in a control system of a home appliance according to an embodiment of the present invention;
FIG. 16 is a block schematic diagram of a mobile terminal according to an embodiment of the present invention;
FIG. 17 is a block diagram of a mobile terminal according to one embodiment of the present invention;
FIG. 18 is a block schematic diagram of a household appliance system in accordance with an embodiment of the present invention;
FIG. 19 is a block schematic diagram of a household appliance system in accordance with one embodiment of the present invention;
FIG. 20 is a block schematic diagram of a household appliance system in accordance with another embodiment of the present invention; and
fig. 21 is a block schematic view of a household appliance system according to yet another embodiment of the present invention.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are illustrative and intended to be illustrative of the invention and are not to be construed as limiting the invention.
A control method and system of a home appliance, a mobile terminal, and a home appliance system according to embodiments of the present invention are described below with reference to the accompanying drawings. Wherein the household appliance may be a washing machine.
Fig. 1 is a flowchart of a control method of a home appliance according to an embodiment of the present invention. The control method of the household appliance is applied to the mobile terminal, the mobile terminal is communicated with the communication module, such as near field communication, the communication module is connected with the household appliance, and the mobile terminal is further communicated with the server.
That is, the household appliance may communicate with the mobile terminal through the communication module, for example, the household appliance may transmit its own operation state to the mobile terminal through the communication module, and the household appliance may also receive an instruction transmitted by the mobile terminal through the communication module. The communication module is arranged on the household appliance, or the communication module can be arranged independently of the household appliance but connected with the household appliance. The communication module may be, in particular, a near field communication module, more particularly, a bluetooth module.
Correspondingly, the mobile terminal is provided with a first communication module which communicates with the communication module. The mobile terminal can also communicate with the server through a 2G/3G/4G communication module or a WiFi module.
As shown in fig. 1, the method for controlling a home appliance according to an embodiment of the present invention includes the steps of:
s1: and receiving the random number sent by the communication module, wherein the communication module generates the random number after establishing connection with the mobile terminal, generates an authentication key according to the random number and the second key, and sends the random number.
It should be noted that, after the mobile terminal is bound with the communication module, the random number sent by the communication module is received after connection is established with the communication module each time.
That is, each time the communication module is connected, the random number sent by the communication module is obtained, the random number and the second key PSK2 can generate an authentication key, and the state information of the household appliance and the control command are encrypted by the authentication key, so that the safety of the command is ensured and the command is prevented from being tampered.
In one embodiment of the present invention, the second key PSK2 may be randomly generated by the server, in other words, the server randomly generates a random second key PSK 2. And, the server may also transmit the second key PSK2 to the mobile terminal, which in turn transmits the second key PSK2 to the communication module.
S2: uploading the random number to a server, wherein the server generates an authentication key according to the random number and a second key;
s3: acquiring a control instruction, and uploading the control instruction to a server, wherein the server encrypts the control instruction through an authentication key and sends the encrypted control instruction;
it should be noted that, the mobile terminal may be installed with a matching application APP, and the user may control the household appliance through the application APP. For example, in the present embodiment, a user may input a control instruction through the application APP.
It should be added that after receiving the random number, the mobile terminal may directly obtain the control instruction, and report the obtained control instruction and the random number to the server at the same time, and the server generates the authentication key according to the random number and the second key, and then encrypts the control instruction by using the second key.
S4: and receiving the encrypted control instruction sent by the server, and sending the encrypted control instruction to the communication module, wherein the communication module decrypts the encrypted control instruction through the authentication key so as to enable the household appliance to execute the control instruction.
That is, in controlling the home appliance, a control instruction may be transmitted to the server, wherein the server may acquire address information such as a MAC address and encrypt and verify the control instruction and a user identification code such as a user ID with an authentication key. After receiving address information sent by a server and a control instruction and a user identification code which are encrypted by an authentication key, sending the control instruction and the user identification code which are encrypted by the authentication key to a communication module, wherein the communication module decrypts the encrypted control instruction and the user identification code through the authentication key to obtain the control instruction and the user identification code, compares the user identification code which is received by verification with the user identification code which is written in the communication module, and executes the control instruction if the user identification code and the user identification code are consistent.
Therefore, the control command is encrypted, the safety of the command is ensured, and the command is prevented from being tampered.
Further, as shown in fig. 2, according to an embodiment of the present invention, the method for controlling a home appliance further includes:
s5: receiving an execution success instruction sent by the communication module, wherein the communication module sends the execution success instruction after the household appliance executes the control instruction;
s6: sending a state query instruction to a communication module, wherein the communication module feeds back the state information of the household appliance after receiving the state query instruction;
s7: and receiving the state information fed back by the communication module and reporting the state information to the server.
That is, after the household appliance executes the control command, the successful execution command sent by the communication module can be received, the state query command can be sent to the communication module, and after the state information replied by the communication module is received, the state information is reported to the server.
Specifically, after the household appliance executes the control instruction, the state of the household appliance changes, and then the server can monitor the state of the household appliance in real time by receiving the state information replied by the communication module and reporting the state information to the server.
As described above, the specific process of the control method of the household appliance according to the embodiment of the present invention when controlling the household appliance is as follows:
and connecting a communication module (reconnection after disconnection), wherein the communication module generates a random number at each connection, and the communication module also generates an authentication key according to the random number and a second key PSK 2.
And reporting the random number to a server after receiving the random number sent by the communication module, wherein the server generates an authentication key according to the random number and a second key PSK 2.
And sending a control instruction to a server, wherein the server encrypts the control instruction and the user identification code by an authentication key, and after receiving the control instruction and the user identification code encrypted by the authentication key, sends the encrypted control instruction and the encrypted user identification code to a communication module, wherein the communication module verifies the encrypted control instruction and the encrypted user identification code and executes the control instruction after the control instruction and the encrypted user identification code are successfully verified.
After receiving a successful execution instruction sent by the communication module, sending a state query instruction to the communication module, and after receiving state information replied by the communication module, reporting the state information to the server.
Further, according to an embodiment of the present invention, as shown in fig. 3, the method for controlling a home appliance further includes:
s8: receiving the encrypted state information sent by the communication module, wherein the communication module encrypts the state information of the household appliance through the authentication key;
s9: and reporting the encrypted state information to a server.
That is to say, when the home appliance reports the status, after the home appliance is successfully bound with the home appliance, the communication module can acquire the status information of the home appliance at preset time intervals, encrypt the status information of the home appliance through the authentication key, receive the encrypted status information sent by the communication module, and report the encrypted status information to the server.
Therefore, the state information is encrypted, the safety of the command is ensured, and the command is prevented from being tampered.
As described above, the control method of the home appliance according to the embodiment of the present invention specifically processes the status reporting as follows:
and connecting a communication module (reconnection after disconnection), wherein the communication module generates a random number at each connection, and the communication module also generates an authentication key according to the random number and a second key PSK 2.
And reporting the random number to a server after receiving the random number sent by the communication module, wherein the server generates an authentication key according to the random number and a second key PSK 2.
After receiving the state information of the household appliance which is sent by the communication module and encrypted by the authentication key, reporting the state information encrypted by the authentication key to the server, wherein the server can decrypt and store the encrypted state information.
Further, according to an embodiment of the present invention, as shown in fig. 4, when the mobile terminal is bound to the communication module, the method further includes:
s11: and receiving the encrypted first identification information sent by the communication module, wherein the communication module encrypts the prestored first identification information through a first secret key.
It should be noted that, the mobile terminal may be installed with a matching application APP, and the user may control the household appliance through the application APP. For example, in the present embodiment, the user may control the mobile terminal to be bound with the communication module, i.e. with the household appliance, through the application APP.
The mobile terminal and the communication module can be bound according to the binding instruction.
It should be further noted that the first identification information is pre-stored in the communication module or the storage unit of the household appliance, and the first identification information may include an identification code of the household appliance, for example, an SN code of the household appliance.
Specifically, after communication is established with the communication module, at the time of initial binding, the encrypted first identification information is received by communicating with the communication module, wherein the communication module can encrypt the pre-stored first identification information by the first key. In other words, the first identification information encrypted by the first key may be read to the pass module. Wherein the first key may be pre-stored in the communication module.
S12: and acquiring second identification information of the household appliance, and sending the encrypted first identification information and the second identification information to the server, wherein the server acquires the binding information after judging that the first identification information is consistent with the second identification information, and encrypts the binding information through the first key.
Note that the communication module and the server initialize a unified first key PSK1 by default. In other words, the communication module and the server have a pre-stored unified first key PSK 1.
Wherein the binding information may include the user identification code and the second key. It should be noted that the user identification code and the second key may be encrypted separately, or the user identification code and the second key may be encrypted together.
Specifically, a two-dimensional code can be pasted on the body of the household appliance, second identification information is arranged in the two-dimensional code, and the second identification information can be obtained by scanning the two-dimensional code. The second identification information may include an identification code of the home appliance, for example, an SN code of the home appliance.
It should be noted that the second identification information may be encrypted or not. When the second identification information is encrypted, the second identification information may be encrypted with the same first key as the first identification information. At this time, the server can judge whether the first identification information is consistent with the second identification information by directly comparing whether the encrypted first identification information is consistent with the encrypted second identification information, and because the same key is used for encryption, when the encrypted first identification information is consistent with the encrypted second identification information, the first identification information is consistent with the second identification information. Or, the server may decrypt the encrypted first identification information and the encrypted second identification information, and then directly compare the first identification information with the second identification information to determine whether the first identification information is consistent with the second identification information. When the second identification information is not encrypted, the server may decrypt the encrypted first identification information first, then compare the first identification information with the second identification information, and determine whether the first identification information is consistent with the second identification information.
When the first identification information is consistent with the second identification information, it is indicated that the encrypted first identification information and the encrypted second identification information correspond to the same household appliance, that is, the household appliance corresponding to the communication module which sends the encrypted first identification information is the household appliance corresponding to the second identification information.
In addition, address information such as a MAC address of the mobile terminal may also be transmitted to the server together with the encrypted first identification information and second identification information. Thus, the server can send the binding information according to the MAC address.
Specifically, encrypted first identification information, such as an SN code, and second identification information, such as an SN code, in a two-dimensional code of a body of the home appliance may be provided to the server together with the MAC address, and the server may determine, according to the encrypted first identification information and the encrypted second identification information, whether the first identification information and the second identification information are identical, that is, whether the first identification information and the second identification information are the same home appliance, and if so, the server randomly generates a random second key PSK2, and encrypts the user identification code, that is, the user ID and the second key, by using the first key PSK 1.
S13: and receiving the encrypted binding information sent by the server, and sending the encrypted binding information to the communication module, wherein the communication module decrypts the encrypted binding information through the first key and stores the binding information so as to bind the mobile terminal and the communication module.
That is to say, after receiving the encrypted user identification code and the second key sent by the server, the communication module sends the encrypted user identification code and the second key to the communication module, decrypts the encrypted binding information through the first key to obtain the user identification code and the second key, and writes the obtained user identification code and the second key into the communication module, so as to bind the communication module, that is, the household appliance.
Further, after obtaining the user identification code and the second key, the communication module also judges whether the user identification code and the second key exist in the communication module, if not, the user identification code and the second key are written into the communication module if the user identification code and the second key are indicated as initial binding, and if the user identification code and the second key exist, the user identification code and the second key are not allowed to be written if the user identification code and the second key are not indicated as initial binding.
As described above, the specific process of the control method of the household appliance according to the embodiment of the present invention when performing the binding operation is as follows:
and connecting a communication module, wherein the communication module encrypts pre-stored first identification information, such as an SN code, through a first key PSK1, and replies the encrypted first identification information, and wherein the communication module can transmit the encrypted first identification information multiple times, such as twice.
Acquiring second identification information such as SN (serial number) codes, and uploading the encrypted first identification information, the encrypted second identification information and the encrypted address information to a server, wherein the server generates a second key when judging that the encrypted first identification information and the encrypted second identification information belong to the same household appliance; the server also encrypts a second key and a user identification code, such as a user ID, respectively, by the first key.
And forwarding the encrypted second key and the encrypted user identification code sent by the server to the communication module, wherein the communication module decrypts the encrypted second key through the first key to obtain the second key, decrypts the encrypted user identification code through the first key to obtain the user identification code, and stores the second key and the user identification code.
And receiving a binding success command sent by the communication module, and sending the binding success command to the server, wherein the server returns a reply message.
Further, according to an embodiment of the present invention, as shown in fig. 5, when the mobile terminal is unbound from the communication module, the method for controlling the home appliance further includes:
s14: and sending a unbinding request to the server, wherein the server feeds back the encrypted binding information after receiving the unbinding request.
In this embodiment, the user may control the mobile terminal to be unbundled from the communication module, i.e. from the household appliance, through the application APP.
The mobile terminal and the communication module can be unbound according to the unbinding instruction.
S15: and receiving the encrypted binding information fed back by the server, and sending the encrypted binding information fed back by the server to the communication module, wherein the communication module unbinds the mobile terminal from the communication module when judging that the encrypted binding information is consistent with the stored binding information.
Specifically, if the user wants to unbind the home appliance, the user needs to log in to the application APP and input an unbinding instruction, and after receiving the unbinding instruction through the application APP, sends an unbinding request to the server, and the server encrypts and verifies a second key PSK2 and a user identification code, such as a user ID, through a first key PSK1 according to the binding request.
The method comprises the steps of receiving a second key PSK2 and a user identification code which are sent by a server and encrypted through a first key PSK1, forwarding the second key PSK2 and the user identification code which are encrypted through a first key PSK1 to a communication module, comparing a second key PSK2 and the user identification code which are sent by the server and encrypted through the first key PSK1 with a second key PSK2 and the user identification code which are written in the communication module and encrypted through a first key PSK1, and if the second key PSK2 and the user identification code are consistent, restoring factory settings to unbind the mobile terminal and the communication module, so that other users can carry out configurations such as binding again.
As described above, the specific process of the control method of the household appliance according to the embodiment of the present invention when performing the unbinding operation is as follows:
and sending a unbinding request to a server, wherein the server encrypts and verifies a second key PSK2 and a user identification code such as a user ID through a first key PSK1 according to the binding request and then sends the encrypted second key PSK2 and the user identification code to the mobile terminal.
And then the second key PSK2 and the user identification code encrypted by the first key PSK1 are forwarded to the communication module, wherein the communication module restores factory settings according to the second key PSK2 and the user identification code encrypted by the first key PSK1 so as to be unbound with the communication module.
The communication module can also send an unbinding success instruction, and after receiving the unbinding success instruction sent by the communication module, the communication module also sends an unbinding success instruction to the server, wherein the server returns a reply message.
In summary, according to the control method of the home appliance in the embodiment of the present invention, the communication module generates a random number after establishing a connection with the mobile terminal and generates an authentication key according to the random number and the second key, the mobile terminal receives the random number sent by the communication module, and uploading the random number to the server to cause the server to generate an authentication key based on the random number and the second key, then the mobile terminal acquires the control instruction and uploads the control instruction to the server so that the server encrypts the control instruction through the authentication key, the mobile terminal further receives the encrypted control instruction sent by the server, and sends the encrypted control command to the communication module, the communication module decrypts the encrypted control command through the authentication key, the household appliance executes the control command, so that the communication safety can be ensured by technical means such as encryption and the like.
The embodiment of the invention also provides another control method of the household appliance.
Fig. 6 is a flowchart of a control method of a home appliance according to an embodiment of the present invention. The control method of the household appliance is applied to a household appliance system, the household appliance system comprises the household appliance and a communication module connected with the household appliance, the communication module is communicated with a mobile terminal, and the mobile terminal is further communicated with a server.
The communication module is arranged on the household appliance, or the communication module can be arranged independently of the household appliance but connected with the household appliance. In particular, the communication module may be a bluetooth module. Correspondingly, the mobile terminal is provided with a first communication module which communicates with the communication module. The mobile terminal can also communicate with the server through a 2G/3G/4G communication module or a WiFi module.
As shown in fig. 6, the method for controlling a home appliance according to an embodiment of the present invention includes the steps of:
s10: and generating a random number after establishing connection with the mobile terminal, generating an authentication key according to the random number and the second key, and sending the random number to the mobile terminal.
The mobile terminal uploads the random number to the server after receiving the random number, the server generates an authentication key according to the random number and the second key, the mobile terminal also obtains a control instruction and uploads the control instruction to the server, the server encrypts the control instruction through the authentication key, and the mobile terminal receives the encrypted control instruction sent by the server;
it should be noted that, after the mobile terminal is bound to the communication module, the random number is sent to the mobile terminal after each connection is established with the mobile terminal.
That is, each time the mobile terminal is connected, a random number is sent to the mobile terminal, the random number and the second key PSK2 can generate an authentication key, and the state information of the household appliance and the control command are encrypted by the authentication key, so that the security of the command is ensured, and the command is prevented from being tampered.
In one embodiment of the present invention, the second key PSK2 may be randomly generated by the server, in other words, the server randomly generates a random second key PSK 2. And, the server may also transmit the second key PSK2 to the mobile terminal, which in turn transmits the second key PSK2 to the communication module.
S20: and receiving the encrypted control instruction sent by the mobile terminal, and decrypting the encrypted control instruction through the authentication key so as to enable the household appliance to execute the control instruction.
It should be noted that, the mobile terminal may be installed with a matching application APP, and the user may control the household appliance through the application APP. For example, in the present embodiment, a user may input a control instruction through the application APP.
It should be further noted that, after receiving the random number, the mobile terminal may directly obtain the control instruction, and report the obtained control instruction and the random number to the server at the same time, and the server generates the authentication key according to the random number and the second key, and then encrypts the control instruction by using the second key.
That is, a control command and a user identification code which are encrypted by an authentication key and transmitted by the mobile terminal are received, wherein when the mobile terminal controls the household appliance, the mobile terminal can transmit the control command to the server, and the server can transmit address information, such as a MAC address, the control command and the user identification code, such as a user ID, which are encrypted by the authentication key and signed to the mobile terminal.
And then, decrypting the encrypted control command and the user identification code through the authentication key to obtain the control command and the user identification code, comparing the user identification code received by verification with the user identification code written in the communication module, and executing the control command if the user identification code is consistent with the user identification code written in the communication module.
Therefore, the control command is encrypted, the safety of the command is ensured, and the command is prevented from being tampered.
Further, as shown in fig. 7, according to an embodiment of the present invention, the method for controlling a home appliance further includes:
s30: after the household appliance executes the control command, sending an execution success command to the mobile terminal, wherein the mobile terminal sends a state query command after receiving the execution success command;
s40: and receiving a state query instruction sent by the mobile terminal, and feeding back the state information of the household appliance to the mobile terminal, wherein the mobile terminal receives the state information and reports the state information to the server.
That is, after the home appliance executes the control command, the home appliance may transmit a successful execution command to the mobile terminal, receive the status information transmitted by the mobile terminal, and then reply the status information to the mobile terminal, where the mobile terminal reports the status information to the server.
Specifically, after the household appliance executes the control instruction, the state of the household appliance changes, and then the server can monitor the state of the household appliance in real time by receiving the state information replied by the communication module and reporting the state information to the server.
As described above, the specific process of the control method of the household appliance according to the embodiment of the present invention when controlling the household appliance is as follows:
connect with the mobile terminal (wherein, reconnect after disconnecting with the mobile terminal), and generate the random number at each connection, and send the random number to the mobile terminal, and according to random number and second key PSK2, produce and authorize the cipher key. The mobile terminal reports the random number to the server; the mobile terminal sends a control instruction to the server; the server generates an authentication key according to the random number and a second key PSK2, and encrypts the control command and the user identification code through the authentication key; the server also sends the control instruction and the user identification code which are encrypted by the authentication key to the mobile terminal.
And receiving the encrypted control command and the user identification code issued by the mobile terminal, verifying the encrypted control command and the user identification code, and executing the control command after the verification is successful. And then, sending a successful execution instruction to the mobile terminal, and after receiving the state information sent by the mobile terminal, replying the state information to the mobile terminal, wherein the mobile terminal reports the state information to the server.
Further, according to an embodiment of the present invention, as shown in fig. 8, the method for controlling a home appliance further includes:
s50: encrypting the state information of the household appliance through the authentication key;
s60: and sending the encrypted state information to the mobile terminal, wherein the mobile terminal receives the encrypted state information and reports the encrypted state information to the server.
That is, when the home appliance reports the status, after the home appliance is successfully bound with the mobile terminal, the status information of the home appliance can be acquired at preset time intervals, the status information of the home appliance is encrypted through the authentication key, and then the encrypted status information is reported to the mobile terminal, wherein the mobile terminal reports the encrypted status information to the server.
Therefore, the state information is encrypted, the safety of the command is ensured, and the command is prevented from being tampered.
As described above, the control method of the home appliance according to the embodiment of the present invention specifically processes the status reporting as follows:
connect with the mobile terminal (wherein, reconnect after disconnecting with the mobile terminal), and generate the random number at each connection, and send the random number to the mobile terminal, and according to random number and second key PSK2, produce and authorize the cipher key. The mobile terminal reports the random number to the server; the server generates an authentication key from the random number and the second key PSK 2.
The state information of the household appliance is encrypted by the authentication key and then sent to the mobile terminal, wherein the mobile terminal reports the state information encrypted by the authentication key to the server, and the server can decrypt and store the encrypted state information.
Further, according to an embodiment of the present invention, as shown in fig. 9, when the mobile terminal is bound to the communication module, the method further includes:
s210: and encrypting the pre-stored first identification information through the first secret key.
S220: and sending the encrypted first identification information to the mobile terminal, wherein the mobile terminal acquires second identification information of the household appliance and sends the encrypted first identification information and the encrypted second identification information to the server, and the server acquires the binding information after judging that the first identification information is consistent with the second identification information, encrypts the binding information through the first key and sends the encrypted binding information to the mobile terminal.
It should be noted that, the mobile terminal may be installed with a matching application APP, and the user may control the household appliance through the application APP. For example, in the present embodiment, the user may control the mobile terminal to be bound with the communication module, i.e. with the household appliance, through the application APP.
The mobile terminal can receive a binding instruction input by a user and binds with the mobile terminal according to the binding instruction.
It should be further noted that the first identification information is pre-stored in the communication module or the storage unit of the household appliance, and the first identification information may include an identification code of the household appliance, for example, an SN code of the household appliance. The communication module and the server initialize a unified first key PSK1 by default. In other words, the communication module and the server have a pre-stored unified first key PSK 1.
Specifically, after communication is established with the mobile terminal, at the time of initial binding, pre-stored first identification information may be encrypted by a first key and transmitted to the mobile terminal, wherein the encrypted first identification information is received by communicating with the mobile terminal. More specifically, the mobile terminal may read first identification information encrypted by the first key to the pass module. Wherein the first key may be pre-stored in the communication module.
Wherein the binding information may include the user identification code and the second key. It should be noted that the user identification code and the second key may be encrypted separately, or the user identification code and the second key may be encrypted together.
Specifically, a two-dimensional code can be pasted on the body of the household appliance, second identification information is arranged in the two-dimensional code, and the mobile terminal can acquire the second identification information by scanning the two-dimensional code. The second identification information may include an identification code of the home appliance, for example, an SN code of the home appliance.
It should be noted that the second identification information may be encrypted or not. When the second identification information is encrypted, the second identification information may be encrypted with the same first key as the first identification information. At this time, the server can judge whether the first identification information is consistent with the second identification information by directly comparing whether the encrypted first identification information is consistent with the encrypted second identification information, and the server adopts the same key for encryption, so that when the encrypted first identification information is consistent with the encrypted second identification information, the first identification information is consistent with the second identification information. Or, the server may decrypt the encrypted first identification information and the encrypted second identification information, and then directly compare the first identification information with the second identification information to determine whether the first identification information is consistent with the second identification information. When the second identification information is not encrypted, the server may decrypt the encrypted first identification information first, then compare the first identification information with the second identification information, and determine whether the first identification information is consistent with the second identification information.
When the first identification information is consistent with the second identification information, it is indicated that the encrypted first identification information and the encrypted second identification information correspond to the same household appliance, that is, the household appliance corresponding to the communication module which sends the encrypted first identification information is the household appliance corresponding to the encrypted second identification information.
In addition, the mobile terminal may also transmit address information, such as a MAC address of the mobile terminal, to the server together with the encrypted first identification information and second identification information. Thus, the server can send binding information to the mobile terminal according to the MAC address.
Specifically, the mobile terminal may provide the encrypted first identification information, such as an SN code, and the second identification information, such as an SN code, in the two-dimensional code of the body of the home appliance, together with the MAC address, the server may determine, according to the encrypted first identification information and the encrypted second identification information, whether the first identification information and the second identification information are consistent, that is, whether the first identification information and the second identification information are the same home appliance, and if so, the server randomly generates a random second key PSK2, and encrypts and transmits the user identification code, that is, the user ID and the second key, to the mobile terminal through the first key PSK 1.
S230: and receiving the encrypted binding information forwarded by the mobile terminal, decrypting the encrypted binding information through the first key and storing the binding information so as to bind the mobile terminal with the communication module.
That is, the encrypted user identifier and the second key sent by the mobile terminal may be received, the encrypted binding information is decrypted by the first key to obtain the user identifier and the second key, and the obtained user identifier and the second key are written in, so as to be bound with the mobile terminal.
Further, after the user identification code and the second key are obtained, whether the user identification code and the second key exist in the communication module is judged, if the user identification code and the second key do not exist, the user identification code and the second key are written into the communication module if the user identification code and the second key do not exist, and if the user identification code and the second key exist, the user identification code and the second key are written into the communication module if the user identification code and the second key do not exist, the writing is not allowed.
As described above, the control method of the home appliance according to the embodiment of the present invention has the following flow when performing the binding operation:
and connecting the mobile terminal, encrypting the pre-stored first identification information such as the SN code by the first key PSK1, and sending the encrypted first identification information to the mobile terminal. The encrypted first identification information can be sent to the mobile terminal for multiple times, for example, twice. The mobile terminal acquires second identification information such as an SN (serial number) code, uploads the encrypted first identification information, the encrypted second identification information and address information to the server, and the server generates a second key when judging that the encrypted first identification information and the encrypted second identification information belong to the same household appliance; the server also encrypts a second key and a user identification code such as a user ID through the first key respectively and sends the encrypted second key and the encrypted user identification code to the mobile terminal; and the mobile terminal forwards the encrypted second secret key and the encrypted user identification code to the communication module.
And then, decrypting the encrypted second key through the first key to obtain a second key, decrypting the encrypted user identification code through the first key to obtain a user identification code, storing the second key and the user identification code, and sending a binding success instruction to the mobile terminal. The mobile terminal sends a binding success instruction to the server; the server sends a reply message to the mobile terminal.
Further, according to an embodiment of the present invention, as shown in fig. 10, when the mobile terminal is unbound from the communication module, the method for controlling the home appliance further includes:
s240: receiving encrypted binding information sent by a mobile terminal, wherein the mobile terminal sends a unbinding request to a server, and the server sends the encrypted binding information to the mobile terminal after receiving the unbinding request;
in this embodiment, the user may control the mobile terminal to be unbundled from the communication module, i.e. from the household appliance, through the application APP.
The mobile terminal can receive a unbinding instruction input by a user, and the mobile terminal and the communication module are unbound according to the unbinding instruction.
S250: and when the encrypted binding information is judged to be consistent with the stored binding information, the mobile terminal and the communication module are unbound.
Specifically, a second key PSK2 and a user identification code which are sent by the mobile terminal and encrypted through a first key PSK1 are received, wherein if the user wants to unbind the mobile terminal, the user needs to log in an application program APP and input a unbinding instruction, the mobile terminal sends a unbinding request to a server after receiving the unbinding instruction through the application program APP, the server encrypts the second key PSK2 and the user identification code such as a user ID through the first key PSK1 according to the binding request and checks the user identification code and sends the encrypted second key PSK2 and the encrypted user identification code through the first key PSK1 to the mobile terminal, and the mobile terminal forwards the encrypted second key PSK2 and the encrypted user identification code through the first key PSK 38.
Next, the second key PSK2 and the user identification code encrypted by the first key PSK1 sent by the server are compared with the second key PSK2 and the user identification code encrypted by the first key PSK1, which have been written in the communication module, and if they match, factory settings are restored to unbind the mobile terminal from the communication module, so that other users can perform configurations such as binding again.
As described above, the specific process of the control method of the household appliance according to the embodiment of the present invention when performing the unbinding operation is as follows:
and receiving a second key PSK2 and a user identification code which are forwarded by the mobile terminal and encrypted by a first key PSK1, wherein the mobile terminal sends a unbinding request to the server, and the server encrypts the second key PSK2 and the user identification code such as a user ID by the first key PSK1 according to the binding request and checks the label and then sends the encrypted second key PSK2 and the user identification code to the mobile terminal.
Next, factory settings are restored according to a second key PSK2 encrypted by the first key PSK1 and the user identification code, so that the mobile terminal is unbound from the communication module, and an unbinding success instruction is sent to the mobile terminal, wherein the mobile terminal sends the unbinding success instruction to the server; the server sends a reply message to the mobile terminal.
In summary, according to the control method of the home appliance in the embodiment of the present invention, the communication module generates a random number after establishing connection with the mobile terminal, and generates an authentication key according to the random number and the second key, and sends the random number to the mobile terminal, the mobile terminal uploads the random number to the server after receiving the random number, the server generates the authentication key according to the random number and the second key, the mobile terminal further obtains a control instruction and uploads the control instruction to the server, the server encrypts the control instruction through the authentication key, the mobile terminal receives the encrypted control instruction sent by the server, then, the communication module receives the encrypted control instruction sent by the mobile terminal, and decrypts the encrypted control instruction through the authentication key, so that the home appliance executes the control instruction, and thus, the user can select the near field communication mode to control the home appliance, and the security of communication is ensured by technical means such as encryption and the like.
The embodiment of the invention also provides a control system of the household appliance.
Fig. 11 is a block schematic diagram of a control system of a home appliance according to an embodiment of the present invention. As shown in fig. 11, the control system of the home appliance includes a mobile terminal 10, a home appliance system 20, and a server 30, the home appliance system 20 includes a home appliance 21 and a communication module 22 connected to the home appliance 21, the communication module 22 communicates with the mobile terminal 10, and the mobile terminal 10 also communicates with the server 30.
The communication module 22 is arranged on the household appliance 21, or the communication module 22 can be arranged independently of the household appliance 21 but connected to the household appliance 22. Specifically, the communication module 22 may be a bluetooth module. Accordingly, the mobile terminal 10 is provided with a first communication module for communicating with the communication module 22. The mobile terminal 10 may also communicate with the server 30 through a 2G/3G/4G communication module or a WiFi module.
Specifically, the communication module 22 generates a random number after establishing a connection with the mobile terminal 10, and generates an authentication key according to the random number and the second key; the communication module 22 also sends a random number to the mobile terminal 10; the mobile terminal 10 uploads the random number to the server 30 after receiving the random number; the server 30 generates an authentication key from the random number and the second key; the mobile terminal 10 acquires the control instruction and uploads the control instruction to the server 30; the server 30 encrypts the control command by the authentication key and transmits the encrypted control command to the mobile terminal 10; the mobile terminal 10 receives the encrypted control command and sends the encrypted control command to the communication module 22; the communication module 22 decrypts the encrypted control instruction by the authentication key to cause the home appliance 21 to execute the control instruction.
It should be noted that, after the mobile terminal 10 is bound with the communication module 22, the communication module 22 sends the random number to the mobile terminal 10 every time a connection is established with the mobile terminal 10.
That is, each time the mobile terminal 10 connects to the communication module 22, the mobile terminal obtains the random number sent by the communication module 22, and the random number and the second key PSK2 can generate the authentication key, and the state information of the home appliance 21 and the control command are encrypted by the authentication key, so as to ensure the security of the command and prevent the command from being tampered.
In one embodiment of the present invention, the second key PSK2 may be randomly generated by the server 30, in other words, the server 30 randomly generates a random second key PSK 2. Also, the server 30 may transmit the second key PSK2 to the mobile terminal 10, and the mobile terminal 10 may transmit the second key PSK2 to the communication module 22.
It should be further noted that the mobile terminal 10 may be installed with a matching application APP, and the user may control the household appliance through the application APP. For example, in the present embodiment, a user may input a control instruction through the application APP.
It should be further noted that, after receiving the random number, the mobile terminal 10 may directly obtain the control instruction, and report the obtained control instruction and the random number to the server 30 at the same time, and then the server 30 generates the authentication key according to the random number and the second key, and then encrypts the control instruction by using the second key.
That is, when the mobile terminal 10 controls the home appliance, the mobile terminal 10 may transmit a control command to the server 30, and the server 30 may transmit address information, such as a MAC address, and the control command and a user identification code, such as a user ID, encrypted and signed by an authentication key to the mobile terminal 10. The mobile terminal 10 transmits the control command and the user identification code encrypted by the authentication key to the communication module 22. The communication module 22 decrypts the encrypted control command and the user identification code by the authentication key to obtain the control command and the user identification code, compares the user identification code received by verification with the user identification code written in the communication module 22, and executes the control command if the user identification code is consistent with the user identification code.
Further, according to an embodiment of the present invention, the communication module 22 sends an execution success instruction to the mobile terminal 10 after the household appliance executes the control instruction; the mobile terminal 10 receives the execution success instruction and sends a status query instruction to the communication module 22; the communication module 22 receives the status query instruction and feeds back the status information of the household appliance to the mobile terminal 10; the mobile terminal 10 receives the status information and reports the status information to the server 30.
That is, after the home appliance executes the control command, the communication module 22 sends a successful execution command to the mobile terminal 10, the mobile terminal 10 sends a status query command to the communication module 22, the communication module 22 replies a query message to the mobile terminal 10, and the mobile terminal 10 reports the query message to the server 30.
Specifically, after the household appliance executes the control instruction, the state of the household appliance changes, and then the server can monitor the state of the household appliance in real time by receiving the state information replied by the communication module and reporting the state information to the server.
Further, according to an embodiment of the present invention, the communication module 22 encrypts the status information of the home appliance by the authentication key and transmits the encrypted status information to the mobile terminal 10; the mobile terminal 10 receives the encrypted status information and reports the encrypted status information to the server 30.
That is to say, when the home appliance 21 reports the status, after the mobile terminal 10 is successfully bound with the home appliance 21, the communication module 22 may obtain the status information of the home appliance 21 at preset time intervals, and encrypt the status information of the home appliance 21 by using the authentication key, and then the communication module 22 reports the encrypted status information to the mobile terminal 10, and the mobile terminal 10 reports the encrypted status information to the server 30.
Therefore, the state information is encrypted, the safety of the command is ensured, and the command is prevented from being tampered.
Further, according to an embodiment of the present invention, when the mobile terminal 10 is bound to the communication module 22, the communication module 22 encrypts the pre-stored first identification information by the first key and transmits the encrypted first identification information to the mobile terminal 10; the mobile terminal 10 acquires the second identification information of the home appliance 21, and sends the encrypted first identification information and the second identification information to the server 30; the server 30 acquires the binding information after judging that the first identification information is consistent with the second identification information, and encrypts the binding information through the first key; the mobile terminal 10 receives the encrypted binding information transmitted by the server 30 and transmits the encrypted binding information to the communication module 22; the communication module 22 decrypts the encrypted binding information by the first key and stores the binding information so that the mobile terminal 10 is bound with the communication module 22.
It should be noted that the mobile terminal 10 may be installed with a matching application APP, and the user may control the household appliance 21 through the application APP. For example, in the present embodiment, the user may control the mobile terminal 10 to be bound with the communication module 22, i.e. with the home appliance 21, through the application APP.
Wherein, the mobile terminal 10 can receive a binding command input by a user, and bind the mobile terminal 10 with the communication module 22 according to the binding command.
It should be further noted that the first identification information is pre-stored in the communication module 22 or the storage unit of the household appliance 21, and the first identification information may include an identification code of the household appliance 21, such as an SN code of the household appliance 21.
Specifically, after the mobile terminal 10 establishes communication with the communication module 22, the communication module 22 may encrypt pre-stored first identification information by a first key and transmit the encrypted first identification information to the mobile terminal 10 at the time of initial binding, and the mobile terminal 10 receives the encrypted first identification information by communicating with the communication module 22. In other words, the mobile terminal 10 may read the first identification information encrypted by the first key to the pass module. Wherein the first key may be pre-stored in the communication module 22.
It should also be noted that the communication module 22 and the server 30 initialize a unified first key PSK1 by default. In other words, the communication module 22 and the server 30 have a pre-stored unified first key PSK 1.
Wherein the binding information may include the user identification code and the second key. It should be noted that the user identification code and the second key may be encrypted separately, or the user identification code and the second key may be encrypted together.
Specifically, a two-dimensional code may be attached to the body of the household appliance 21, the two-dimensional code has second identification information, and the mobile terminal 10 may obtain the second identification information by scanning the two-dimensional code. The second identification information may include an identification code of the home appliance 21, for example, an SN code of the home appliance 21.
It should be noted that the second identification information may be encrypted or not. When the second identification information is encrypted, at this time, the server 30 may determine whether the first identification information is consistent with the second identification information by directly comparing whether the encrypted first identification information is consistent with the encrypted second identification information, and since the encryption is performed by using the same key, when the encrypted first identification information is consistent with the encrypted second identification information, the first identification information is consistent with the second identification information. Alternatively, the server 30 may decrypt the encrypted first identification information and the encrypted second identification information, and then directly compare the first identification information with the second identification information to determine whether the first identification information is consistent with the second identification information. When the second identification information is not encrypted, the server 30 may decrypt the encrypted first identification information, compare the first identification information with the second identification information, and determine whether the first identification information is consistent with the second identification information.
The second identification information may be encrypted with the same first key as the first identification information. When the first identification information is consistent with the second identification information, it is indicated that the encrypted first identification information and the encrypted second identification information correspond to the same household appliance 21, that is, the household appliance 21 corresponding to the communication module 22 that sends the encrypted first identification information is the household appliance 21 corresponding to the encrypted second identification information.
In addition, the mobile terminal 10 may also transmit address information, such as the MAC address of the mobile terminal 10, to the server 30 together with the encrypted first identification information and second identification information. Thus, the server 30 may transmit the binding information to the mobile terminal 10 according to the MAC address.
Specifically, the mobile terminal 10 may provide the encrypted first identification information, such as an SN code, and the second identification information, such as an SN code, in the two-dimensional code of the body of the home appliance 21 to the server 30 together with the MAC address, and the server 30 may determine whether the first identification information and the second identification information are identical, i.e., whether they are the same home appliance 21, according to the encrypted first identification information and the encrypted second identification information, and if so, the server 30 may randomly generate a random second key PSK2, and encrypt the user identification code, i.e., the user ID and the second key, by using the first key PSK1 and transmit the encrypted user identification code to the mobile terminal 10.
And after receiving the encrypted user identification code and the second key, the mobile terminal 10 sends the encrypted user identification code and the second key to the communication module 22, and the communication module 22 decrypts the encrypted binding information by using the first key to obtain the user identification code and the second key, and writes the obtained user identification code and the second key into the communication module 22, so as to bind the mobile terminal 10 with the communication module 22, that is, the household appliance 21.
Further, after obtaining the user identification code and the second key, the communication module 22 also determines whether the user identification code and the second key exist in the communication module 22, if not, it indicates that the user identification code and the second key are primarily bound, and writes the user identification code and the second key into the communication module 22, and if yes, it indicates that the user identification code and the second key are not primarily bound, and does not allow the writing.
Further, according to an embodiment of the present invention, when the mobile terminal 10 performs unbinding with the communication module 22, the mobile terminal 10 transmits a unbinding request to the server 30; the server 30 feeds back the encrypted binding information after receiving the unbinding request; the mobile terminal 10 receives the encrypted binding information fed back by the server 30 and sends the encrypted binding information fed back by the server 30 to the communication module 22; the communication module 22 unbinds the mobile terminal 10 from the communication module 22 when it is judged that the encrypted binding information is identical to the stored binding information.
In the present embodiment, the user may control the mobile terminal 10 to unbundle from the communication module 22, i.e., from the home appliance 21, through the application APP.
Wherein, the mobile terminal 10 can receive an unbinding instruction input by a user, and the mobile terminal 10 and the communication module 22 are unbound according to the unbinding instruction.
Specifically, if the user wants to unbind the home appliance 21 from the mobile terminal 10, the user needs to log in the application APP and input an unbinding instruction, the mobile terminal 10 sends an unbinding request to the server 30 after receiving the unbinding instruction through the application APP, the server 30 sends a second key PSK2 and a user identification code, such as a user ID, to the mobile terminal 10 after being encrypted and signed by the first key PSK1 according to the unbinding request, the mobile terminal 10 forwards the second key PSK2 and the user identification code encrypted by the first key PSK1 to the communication module 22, the communication module 22 compares the second key PSK2 and the user identification code encrypted by the first key PSK1 sent by the server 30 with the second key PSK2 and the user identification code encrypted by the first key PSK1 written in the communication module 22, and if they are identical, restores factory settings to unbind the mobile terminal 10 from the communication module 22, so that other users can perform configuration such as binding again.
As described above, when the control system of the home appliance 21 of the embodiment of the present invention performs the binding operation, the interaction between the mobile terminal 10, the server 30 and the communication module 22 may be as shown in fig. 12. The specific interaction process is as follows:
s101: the mobile terminal 10 is connected to a communication module 22.
S102: the communication module 22 encrypts pre-stored first identification information, such as an SN code, through the first key PSK1 and transmits the encrypted first identification information to the mobile terminal 10. Wherein, the communication module 22 may transmit the encrypted first identification information to the mobile terminal 10 multiple times, for example, twice.
S103: the mobile terminal 10 acquires the second identification information, such as the SN code, and uploads the encrypted first identification information, second identification information, and address information to the server 30.
S104: the server 30 generates the second key when judging that the encrypted first identification information and the second identification information belong to the same home appliance 21.
S105: the server 30 also encrypts a second key and a user identification code, such as a user ID, respectively, by the first key and transmits the encrypted second key and the encrypted user identification code to the mobile terminal 10.
S106: the mobile terminal 10 forwards the encrypted second key and the encrypted subscriber identity to the communication module 22.
S107: the communication module 22 decrypts the encrypted second key by the first key to obtain the second key, decrypts the encrypted user identification code by the first key to obtain the user identification code, and stores the second key and the user identification code.
S108: the communication module 22 also sends a binding success instruction to the mobile terminal 10.
S109: the mobile terminal 10 sends a binding success instruction to the server 30.
S110: the server 30 sends a reply message to the mobile terminal 10.
Thereby, the mobile terminal 10 can be bound with the home appliance 21.
As described above, when the control system of the home appliance 21 of the embodiment of the present invention performs the unbinding operation, the interaction among the mobile terminal 10, the server 30 and the communication module 22 may be as shown in fig. 13. The specific interaction process is as follows:
s201: the mobile terminal 10 sends a unbind request to the server 30.
S202: the server 30 encrypts and signs the second key PSK2 and the user identification code, such as the user ID, with the first key PSK1 according to the binding request, and transmits the encrypted and signed user identification code to the mobile terminal 10.
S203: the mobile terminal 10 forwards the second key PSK2 and the subscriber identity encrypted through the first key PSK1 to the communication module 22.
S204: the communication module 22 restores factory settings based on the second key PSK2 encrypted by the first key PSK1 and the user identification code to unbind the mobile terminal 10 from the communication module 22.
S205: the communication module 22 also sends a unbinding success instruction to the mobile terminal 10.
S206: the mobile terminal 10 transmits a unbinding success instruction to the server 30.
S207: the server 30 sends a reply message to the mobile terminal 10.
Thereby, the mobile terminal 10 can be unbound from the home appliance 21.
As described above, when the control system of the home appliance 21 according to the embodiment of the present invention performs status reporting, the interaction between the mobile terminal 10, the server 30 and the communication module 22 may be as shown in fig. 14. The specific interaction process is as follows:
s301: the mobile terminal 10 is connected to the communication module 22, wherein the mobile terminal 10 is reconnected after being disconnected from the communication module 22.
S302: the communication module 22 generates a random number at each connection and transmits the random number to the mobile terminal 10.
S303: the communication module 22 also generates an authentication key from the random number and a second key PSK 2.
S304: the mobile terminal 10 reports the random number to the server 30.
S305: the server 30 generates an authentication key from the random number and the second key PSK 2.
S306: the communication module 22 encrypts the status information of the home appliance 21 by the authentication key and transmits the encrypted status information to the mobile terminal 10.
S307: the mobile terminal 10 reports the state information encrypted by the authentication key to the server 30, wherein the server 30 can decrypt and store the encrypted state information.
As described above, in the control system of the home appliance 21 according to the embodiment of the present invention, when controlling the home appliance, the interaction between the mobile terminal 10, the server 30 and the communication module 22 may be as shown in fig. 15. The specific interaction process is as follows:
s401: the mobile terminal 10 connects to the communication module 22, wherein the mobile terminal 10 disconnects from the communication module 22 for reconnection.
S402: the communication module 22 generates a random number at each connection and transmits the random number to the mobile terminal 10.
S403: the communication module 22 also generates an authentication key from the random number and a second key PSK 2.
S404: the mobile terminal 10 reports the random number to the server 30.
S405: the mobile terminal 10 sends a control instruction to the server 30.
S406: the server 30 generates an authentication key from the random number and the second key PSK2, and encrypts the control command and the user identification code with the authentication key.
S407: the server 30 also transmits the control command and the user identification code encrypted with the authentication key to the mobile terminal 10.
S408: the mobile terminal 10 sends the encrypted control command and the user identification code to the communication module 22.
S409: the communication module 22 verifies the encrypted control command and the user identification code, and executes the control command after the verification is successful.
S410: the communication module 22 sends a successful execution instruction to the mobile terminal 10.
S411: the mobile terminal 10 transmits a status query instruction to the communication module 22.
S412: the communication module 22 replies status information to the mobile terminal 10.
S413: the mobile terminal 10 reports the status information to the server 30.
To sum up, according to the control system of the home appliance provided by the embodiment of the present invention, the communication module generates a random number after establishing a connection with the mobile terminal, and generates an authentication key according to the random number and the second key, the communication module further sends the random number to the mobile terminal, the mobile terminal uploads the random number to the server after receiving the random number, the server generates an authentication key according to the random number and the second key, the mobile terminal obtains a control instruction and uploads the control instruction to the server, the server encrypts the control instruction through the authentication key and sends the encrypted control instruction to the mobile terminal, the mobile terminal receives the encrypted control instruction and sends the encrypted control instruction to the communication module, the communication module decrypts the encrypted control instruction through the authentication key to enable the home appliance to execute the control instruction, so that the user can select a communication mode to control the home appliance, and the security of communication is ensured by technical means such as encryption and the like.
Corresponding to the above embodiments, an embodiment of the present invention further provides a mobile terminal, and since the mobile terminal provided in the embodiment of the present invention corresponds to the above embodiments, the foregoing embodiments are also applicable to the mobile terminal provided in this embodiment, and detailed description is not repeated in this embodiment.
Fig. 16 is a block schematic diagram of a mobile terminal according to an embodiment of the present invention. The mobile terminal communicates with a communication module connected to a home appliance, as shown in fig. 16, and the mobile terminal 10 includes: a first receiving module 101, a first transmitting module 103, a second receiving module 104 and a second transmitting module 105.
Specifically, the first receiving module 101 is configured to receive a random number sent by the communication module, where the communication module generates the random number after establishing a connection with the mobile terminal, generates an authentication key according to the random number and the second key, and sends the random number; the first sending module 103 is configured to upload the random number to the server, where the server generates an authentication key according to the random number and the second key, and the first sending module is further configured to obtain a control instruction and upload the control instruction to the server, where the server encrypts the control instruction through the authentication key and sends the encrypted control instruction; the second receiving module 104 is configured to receive the encrypted control instruction sent by the server; the second sending module 105 is configured to send the encrypted control instruction to the communication module, where the communication module decrypts the encrypted control instruction through the authentication key, so that the household appliance executes the control instruction.
According to an embodiment of the present invention, the first receiving module 101 is further configured to receive an execution success instruction sent by the communication module, where the communication module sends the execution success instruction after the home appliance executes the control instruction; the second sending module 105 is further configured to send a status query instruction to the communication module, where the communication module feeds back status information after receiving the status query instruction; the first receiving module 101 is further configured to receive state information of the home appliance fed back by the communication module; the first sending module 103 is further configured to report the status information to the server.
According to an embodiment of the present invention, the first receiving module 101 is further configured to receive encrypted status information sent by the communication module; the first sending module 103 is further configured to report the encrypted status information to the server, where the communication module encrypts the status information of the home appliance through the authentication key.
According to an embodiment of the present invention, as shown in fig. 17, the mobile terminal 10 further includes an obtaining module 102, wherein when the mobile terminal 10 is bound to the communication module, the first receiving module 101 is configured to receive the encrypted first identification information sent by the communication module, wherein the communication module encrypts the pre-stored first identification information by using a first key; the obtaining module 102 is configured to obtain second identification information of the home appliance; the first sending module 103 is configured to send the encrypted first identification information and the encrypted second identification information to the server, where the server obtains the binding information after determining that the first identification information is consistent with the second identification information, and encrypts the binding information through the first key; the second receiving module 104 is configured to receive the encrypted binding information sent by the server; the second sending module 105 is configured to send the encrypted binding information to the communication module, where the communication module decrypts the encrypted binding information through the first key and stores the binding information, so that the mobile terminal is bound with the communication module.
Wherein the binding information comprises the user identification code and the second key.
According to one embodiment of the present invention, when the mobile terminal 10 is unbind from the communication module, the first sending module 103 is further configured to send an unbinding request to the server, wherein the server feeds back the encrypted binding information after receiving the unbinding request; the second receiving module 104 is further configured to receive the encrypted binding information fed back by the server; the second sending module 105 is further configured to send the encrypted binding information fed back by the server to the communication module, where the communication module unbunds the mobile terminal and the communication module when determining that the encrypted binding information is consistent with the stored binding information.
To sum up, according to the mobile terminal provided in the embodiment of the present invention, the first receiving module receives the random number sent by the communication module, the communication module generates the random number after establishing connection with the mobile terminal, and generates the authentication key according to the random number and the second key, and sends the random number, the first sending module uploads the random number to the server, the server generates the authentication key according to the random number and the second key, and further obtains the control instruction and uploads the control instruction to the server, the server encrypts the control instruction by the authentication key and sends the encrypted control instruction, the second receiving module receives the encrypted control instruction sent by the server, the second sending module sends the encrypted control instruction to the communication module, and the communication module decrypts the encrypted control instruction by the authentication key to enable the home appliance to execute the control instruction, therefore, the user can select the communication mode to control the household appliance, and the safety of communication is ensured through technical means such as encryption.
Corresponding to the above embodiments, an embodiment of the present invention further provides a household appliance system, and since the household appliance system provided by the embodiment of the present invention corresponds to the above embodiments, the foregoing embodiments are also applicable to the household appliance system provided by the embodiment, and detailed description is not provided in this embodiment.
Fig. 18 is a block schematic diagram of a household appliance system according to an embodiment of the present invention. As shown in fig. 18, the home appliance system 20 includes a home appliance 21 and a communication module 22 connected to the home appliance 21, the communication module 22 communicates with the mobile terminal, and the communication module 22 includes: a third sending module 202, a third receiving module 203, an executing module 207 and a generating module 208.
The generating module 208 is configured to generate a random number after the communication module establishes a connection with the mobile terminal, and generate an authentication key according to the random number and the second key; the third sending module 202 is configured to send a random number to the mobile terminal, where the mobile terminal uploads the random number to the server after receiving the random number, the server generates an authentication key according to the random number and the second key, the mobile terminal further obtains a control instruction and uploads the control instruction to the server, the server encrypts the control instruction through the authentication key, and the mobile terminal receives the encrypted control instruction sent by the server; the third receiving module 203 is configured to receive the encrypted control instruction sent by the mobile terminal; the execution module 207 is configured to decrypt the encrypted control instruction through the authentication key, so that the home appliance executes the control instruction.
According to an embodiment of the present invention, the third sending module 202 is further configured to send an execution success instruction to the mobile terminal after the home appliance executes the control instruction, where the mobile terminal sends the status query instruction after receiving the execution success instruction; the third receiving module 203 is further configured to receive a status query instruction sent by the mobile terminal; the third sending module 202 is further configured to feed back the state information of the home appliance to the mobile terminal, where the mobile terminal receives the state information and reports the state information to the server.
According to an embodiment of the present invention, as shown in fig. 19, the communication module further includes a first encryption module 201, wherein the first encryption module 201 is further configured to encrypt the status information of the home appliance by an authentication key; the third sending module 202 is further configured to send the encrypted state information to the mobile terminal, where the mobile terminal receives the encrypted state information and reports the encrypted state information to the server.
According to an embodiment of the present invention, as shown in fig. 20, the communication module further includes a second encryption module 206 and a binding module 204, when the mobile terminal is bound to the communication module, wherein the second encryption module 206 is configured to encrypt the pre-stored first identification information by using the first key; the third sending module 202 is configured to send the encrypted first identification information to the mobile terminal, where the mobile terminal obtains second identification information of the home appliance, and sends the encrypted first identification information and the encrypted second identification information to the server, and the server obtains the binding information after judging that the first identification information is consistent with the second identification information, encrypts the binding information by using the first key, and sends the encrypted binding information to the mobile terminal; the third receiving module 203 is configured to receive the encrypted binding information forwarded by the mobile terminal; the binding module 204 is configured to decrypt the encrypted binding information through the first key and store the binding information, so that the mobile terminal is bound with the communication module.
Wherein the binding information comprises the user identification code and the second key.
According to an embodiment of the present invention, as shown in fig. 21, the communication module 22 further includes a unbinding module 205, when the mobile terminal and the communication module are unbound, wherein the third receiving module 203 is further configured to receive the encrypted binding information sent by the mobile terminal, wherein the mobile terminal sends an unbinding request to the server, and the server sends the encrypted binding information to the mobile terminal after receiving the unbinding request; the unbinding module 205 is configured to unbind the mobile terminal from the communication module when it is determined that the encrypted binding information is consistent with the stored binding information.
To sum up, according to the household appliance system provided in the embodiment of the present invention, the generation module generates a random number after the communication module establishes a connection with the mobile terminal, and generates an authentication key according to the random number and the second key, the third sending module sends the random number to the mobile terminal, the mobile terminal uploads the random number to the server after receiving the random number, the server generates an authentication key according to the random number and the second key, the mobile terminal further obtains a control instruction and uploads the control instruction to the server, the server encrypts the control instruction through the authentication key, the mobile terminal receives the encrypted control instruction sent by the server, the third receiving module receives the encrypted control instruction sent by the mobile terminal, and the execution module decrypts the encrypted control instruction through the authentication key, so that the household appliance executes the control instruction, and thus, a user can select a communication mode to control the household appliance, and the security of communication is ensured by technical means such as encryption and the like.
Corresponding to the above embodiments, an embodiment of the present invention further provides another mobile terminal, and since the mobile terminal provided by the embodiment of the present invention corresponds to the above embodiments, the foregoing embodiments are also applicable to the mobile terminal provided by the embodiment, and detailed description is not repeated in this embodiment.
According to one embodiment of the present invention, a mobile terminal communicates with a communication module, the communication module being connected to a home appliance, the mobile terminal including: a memory for storing executable program code and a processor; the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory for performing the steps of:
receiving a random number sent by a near field communication module, wherein the near field communication module generates the random number after establishing connection with the mobile terminal, generates an authentication key according to the random number and a second key, and sends the random number;
and uploading the random number to a server, wherein the server generates an authentication key according to the random number and the second key. (ii) a
Acquiring a control instruction, and uploading the control instruction to a server, wherein the server encrypts the control instruction through an authentication key and sends the encrypted control instruction;
and receiving the encrypted control instruction sent by the server, and sending the encrypted control instruction to the near field communication module, wherein the near field communication module decrypts the encrypted control instruction through the authentication key so as to enable the washing machine to execute the control instruction.
According to the mobile terminal provided by the embodiment of the invention, the communication module generates a random number after establishing connection with the mobile terminal and generates an authentication key according to the random number and the second key, the mobile terminal receives the random number sent by the communication module and uploads the random number to the server so that the server generates the authentication key according to the random number and the second key, then the mobile terminal obtains a control instruction and uploads the control instruction to the server so that the server encrypts the control instruction through the authentication key, the mobile terminal further receives the encrypted control instruction sent by the server and sends the encrypted control instruction to the communication module, and the communication module decrypts the encrypted control instruction through the authentication key so that the household appliance executes the control instruction, so that the communication security can be ensured through technical means such as encryption.
Corresponding to the above embodiments, an embodiment of the present invention further provides a household appliance system, and since the household appliance system provided by the embodiment of the present invention corresponds to the above embodiments, the foregoing embodiments are also applicable to the household appliance system provided by the embodiment, and detailed description is not provided in this embodiment.
According to an embodiment of the present invention, a home appliance system includes a home appliance and a communication module connected to the home appliance, the communication module communicating with a mobile terminal, the home appliance system including: a memory for storing executable program code and a processor; the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory for performing the steps of:
generating a random number after establishing connection with the mobile terminal, generating an authentication key according to the random number and the second key, and sending the random number to the mobile terminal;
and receiving the encrypted control instruction sent by the mobile terminal, and decrypting the encrypted control instruction through the authentication key so as to enable the household appliance to execute the control instruction.
According to the household appliance system provided by the embodiment of the invention, the communication module generates a random number after establishing connection with the mobile terminal, and generates an authentication key according to the random number and the second key, and sends the random number to the mobile terminal, the mobile terminal uploads the random number to the server after receiving the random number, the server generates the authentication key according to the random number and the second key, the mobile terminal also obtains a control instruction and uploads the control instruction to the server, the server encrypts the control instruction through the authentication key, the mobile terminal receives the encrypted control instruction sent by the server, then, the communication module receives the encrypted control instruction sent by the mobile terminal, and decrypts the encrypted control instruction through the authentication key, so that the household appliance executes the control instruction, and therefore, the communication security can be ensured through technical means such as encryption.
Furthermore, an embodiment of the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the control method of the home appliance of the foregoing embodiment, wherein the control method of the home appliance is applied to a mobile terminal.
An embodiment of the present invention further provides another non-transitory computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the control method of the household appliance of the foregoing embodiment, where the control method of the household appliance is applied to a household appliance system.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and alternate implementations are included within the scope of the preferred embodiment of the present invention in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present invention.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present invention may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc.
In the description of the present invention, it is to be understood that the terms "first", "second" and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implying any number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present invention, "a plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
In the present invention, unless otherwise expressly stated or limited, the terms "mounted," "connected," "secured," and the like are to be construed broadly and can, for example, be fixedly connected, detachably connected, or integrally formed; can be mechanically or electrically connected; they may be directly connected or indirectly connected through intervening media, or they may be connected internally or in any other suitable relationship, unless expressly stated otherwise. The specific meanings of the above terms in the present invention can be understood by those skilled in the art according to specific situations.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present invention.

Claims (18)

1. A control method of a household appliance is applied to a household appliance system, the household appliance system comprises a communication module connected with the household appliance, the communication module is communicated with a mobile terminal, and the method comprises the following steps:
the communication module generates a random number after establishing connection with the mobile terminal, generates an authentication key according to the random number and a second key, and sends the random number to the mobile terminal;
the mobile terminal uploads the random number to a server after receiving the random number, and the server generates the authentication key according to the random number and the second key;
the mobile terminal acquires a control instruction and uploads the control instruction to the server, and the server encrypts the control instruction through the authentication key and sends the encrypted control instruction to the mobile terminal; the mobile terminal receives the encrypted control instruction sent by the server and sends the encrypted control instruction to the communication module, and the communication module receives the encrypted control instruction sent by the mobile terminal and decrypts the encrypted control instruction through the authentication key so as to enable the household appliance to execute the control instruction.
2. The control method of a home appliance according to claim 1, further comprising:
after the household appliance executes the control command, sending an execution success command to the mobile terminal, wherein the mobile terminal sends a state query command after receiving the execution success command;
and receiving the state query instruction sent by the mobile terminal, and feeding back the state information of the household appliance to the mobile terminal, wherein the mobile terminal receives the state information and reports the state information to a server.
3. The control method of a home appliance according to claim 2, further comprising:
encrypting the state information by the authentication key;
and sending the encrypted state information to the mobile terminal, wherein the mobile terminal receives the encrypted state information and reports the encrypted state information to the server.
4. The method for controlling home appliances according to any one of claims 1 to 3, wherein when the mobile terminal is bound to the communication module, the method further comprises:
encrypting the pre-stored first identification information through a first secret key;
sending the encrypted first identification information to the mobile terminal, wherein the mobile terminal acquires second identification information of the household appliance and sends the encrypted first identification information and the encrypted second identification information to a server, and the server acquires binding information after judging that the first identification information is consistent with the second identification information, encrypts the binding information through the first key and sends the encrypted binding information to the mobile terminal;
and receiving the encrypted binding information forwarded by the mobile terminal, decrypting the encrypted binding information through the first key, and storing the binding information so as to bind the mobile terminal with the communication module.
5. The method of claim 4, wherein the binding information comprises a user identification code and a second key.
6. The method for controlling home appliances according to claim 4, wherein when the mobile terminal is unbound from the communication module, the method further comprises:
receiving encrypted binding information sent by the mobile terminal, wherein the mobile terminal sends a unbinding request to the server, and the server sends the encrypted binding information to the mobile terminal after receiving the unbinding request;
and when the encrypted binding information is judged to be consistent with the stored binding information, the mobile terminal and the communication module are unbound.
7. A household appliance control system is characterized by comprising a mobile terminal, a household appliance system and a server, wherein the household appliance system comprises a communication module connected with a household appliance, the communication module is communicated with the mobile terminal,
the communication module generates a random number after establishing connection with the mobile terminal and generates an authentication key according to the random number and a second key;
the communication module also sends the random number to the mobile terminal;
the mobile terminal uploads the random number to the server after receiving the random number;
the server generates an authentication key according to the random number and the second key;
the mobile terminal acquires a control instruction and uploads the control instruction to the server;
the server encrypts the control instruction through the authentication key and sends the encrypted control instruction to the mobile terminal;
the mobile terminal receives the encrypted control instruction and sends the encrypted control instruction to the communication module;
and the communication module decrypts the encrypted control instruction through the authentication key so as to enable the household appliance to execute the control instruction.
8. Household appliance control system according to claim 7,
the communication module sends an execution success instruction to the mobile terminal after the household appliance executes the control instruction;
the mobile terminal receives the execution success instruction and sends a state query instruction to the communication module;
the communication module receives the state query instruction and feeds back the state information of the household appliance to the mobile terminal;
and the mobile terminal receives the state information and reports the state information to the server.
9. Household appliance control system according to claim 7,
the communication module encrypts the state information of the household appliance through an authentication key and sends the encrypted state information to the mobile terminal;
and the mobile terminal receives the encrypted state information and reports the encrypted state information to the server.
10. The home appliance control system according to claim 7, wherein when the mobile terminal is bound to the communication module,
the communication module encrypts pre-stored first identification information through a first secret key and sends the encrypted first identification information to the mobile terminal;
the mobile terminal acquires second identification information of the household appliance and sends the encrypted first identification information and the encrypted second identification information to the server;
the server acquires binding information after judging that the first identification information is consistent with the second identification information, and encrypts the binding information through the first key;
the mobile terminal receives the encrypted binding information sent by the server and sends the encrypted binding information to the communication module; and
and the communication module decrypts the encrypted binding information through the first key and stores the binding information so as to bind the mobile terminal with the communication module.
11. The home appliance control system according to claim 10, wherein the binding information includes a user identification code and the second key.
12. The home appliance control system according to claim 10, wherein when the mobile terminal is unbound from the communication module,
the mobile terminal sends a unbinding request to the server;
the server feeds back the encrypted binding information after receiving the unbinding request;
the mobile terminal receives the encrypted binding information fed back by the server and sends the encrypted binding information fed back by the server to the communication module;
and the communication module unbinds the mobile terminal from the communication module when judging that the encrypted binding information is consistent with the stored binding information.
13. A household appliance system comprising a household appliance and a communication module connected to the household appliance, the communication module communicating with a mobile terminal, the communication module comprising:
the generation module is used for generating a random number after establishing connection with the mobile terminal and generating an authentication key according to the random number and a second key;
a third sending module, configured to send the random number to the mobile terminal; the mobile terminal uploads the random number to a server after receiving the random number; the server generates an authentication key according to the random number and the second key; the mobile terminal acquires a control instruction and uploads the control instruction to the server; the server encrypts the control instruction through the authentication key and sends the encrypted control instruction to the mobile terminal;
a third receiving module, configured to receive the encrypted control instruction sent by the mobile terminal;
and the execution module is used for decrypting the encrypted control instruction through the authentication key so as to enable the household appliance to execute the control instruction.
14. The household appliance system according to claim 13,
the third sending module is further configured to send an execution success instruction to the mobile terminal after the household appliance executes the control instruction, where the mobile terminal sends a status query instruction after receiving the execution success instruction;
the third receiving module is further configured to receive the status query instruction sent by the mobile terminal;
the third sending module is further configured to feed back the state information of the home appliance to the mobile terminal, where the mobile terminal receives the state information and reports the state information to the server.
15. The household appliance system according to claim 14, wherein the communication module further comprises a first encryption module, wherein,
the first encryption module is also used for encrypting the state information through the authentication key;
the third sending module is further configured to send the encrypted state information to the mobile terminal, where the mobile terminal receives the encrypted state information and reports the encrypted state information to the server.
16. The household appliance system according to any one of claims 13 to 15, wherein the communication module further comprises a second encryption module and a binding module, when the mobile terminal is bound with the communication module,
the second encryption module is also used for encrypting the pre-stored first identification information through a first secret key;
the third sending module is further configured to send the encrypted first identification information to the mobile terminal, where the mobile terminal obtains second identification information of the home appliance, and sends the encrypted first identification information and the encrypted second identification information to a server, and the server obtains binding information after determining that the first identification information is consistent with the second identification information, encrypts the binding information by using the first key, and sends the encrypted binding information to the mobile terminal;
the third receiving module is further configured to receive the encrypted binding information forwarded by the mobile terminal;
the binding module is further configured to decrypt the encrypted binding information through the first key and store the binding information, so that the mobile terminal is bound with the communication module.
17. The household appliance system according to claim 16, wherein the binding information comprises a user identification code and a second key.
18. The household appliance system according to claim 16, wherein the communication module further comprises a unbinding module which, when the mobile terminal is unbound from the communication module,
the third receiving module is further configured to receive encrypted binding information sent by the mobile terminal, where the mobile terminal sends a unbinding request to the server, and the server sends the encrypted binding information to the mobile terminal after receiving the unbinding request;
and the unbinding module is used for unbinding the mobile terminal and the communication module when the encrypted binding information is judged to be consistent with the stored binding information.
CN201711284486.6A 2017-12-07 2017-12-07 Control method and system of household appliance and household appliance system Active CN108173720B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711284486.6A CN108173720B (en) 2017-12-07 2017-12-07 Control method and system of household appliance and household appliance system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711284486.6A CN108173720B (en) 2017-12-07 2017-12-07 Control method and system of household appliance and household appliance system

Publications (2)

Publication Number Publication Date
CN108173720A CN108173720A (en) 2018-06-15
CN108173720B true CN108173720B (en) 2020-09-04

Family

ID=62524503

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711284486.6A Active CN108173720B (en) 2017-12-07 2017-12-07 Control method and system of household appliance and household appliance system

Country Status (1)

Country Link
CN (1) CN108173720B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109714769B (en) * 2018-12-28 2020-01-14 北京深思数盾科技股份有限公司 Information binding method, device, equipment and storage medium
CN110071908B (en) * 2019-03-13 2021-09-21 浙江大华技术股份有限公司 Terminal binding method and device, computer equipment and storage medium
CN112987581B (en) * 2019-12-16 2022-11-11 华为技术有限公司 Control method for intelligent household equipment, medium and terminal thereof
CN111415506B (en) * 2020-04-28 2022-03-18 成都新潮传媒集团有限公司 Safety encryption method of multimedia control system and multimedia terminal
CN111487887B (en) * 2020-04-29 2023-11-28 青岛海尔科技有限公司 Method and device for binding household appliances, user terminal, household appliances and server
CN114584412A (en) * 2020-11-30 2022-06-03 华为技术有限公司 Method for obtaining equipment control right and communication system
CN113341758B (en) * 2021-08-02 2021-11-12 创维电器股份有限公司 Intelligent household electrical appliance remote control system and method based on Internet
CN116094860A (en) * 2021-11-08 2023-05-09 美的集团股份有限公司 Distribution network method and system of household appliances, electronic equipment and computer storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101345773A (en) * 2008-08-13 2009-01-14 柳亮 Method, system and equipment for cross-platform monitoring remote device by using mobile terminal
CN101483563A (en) * 2008-01-07 2009-07-15 海尔集团公司 Control method and system for home network
CN106027258A (en) * 2016-05-05 2016-10-12 浪潮集团有限公司 TPM-based household appliance remote control method
CN106059869A (en) * 2016-07-26 2016-10-26 北京握奇智能科技有限公司 Internet of things smart home equipment safety control method and system
CN206002869U (en) * 2016-08-26 2017-03-08 特斯联(北京)科技有限公司 A kind of intelligent domestic system based on wireless sensor network
CN206451182U (en) * 2017-01-18 2017-08-29 芜湖美的厨卫电器制造有限公司 Lease purifying drinking appliance system for unlocking
CN107395751A (en) * 2017-08-23 2017-11-24 绵阳美菱软件技术有限公司 A kind of remote control system of intelligent household electrical appliance and method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10756964B2 (en) * 2015-05-29 2020-08-25 Espressif Systems (Shanghai) Co., Ltd. Internet of things configuration method and system for secure low-power-consumption proxy device
US10693714B2 (en) * 2015-05-29 2020-06-23 Espressif Systems (Shanghai) Pte Ltd Communication method for Wi-Fi internet of things equipment and Wi-Fi internet of things system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101483563A (en) * 2008-01-07 2009-07-15 海尔集团公司 Control method and system for home network
CN101345773A (en) * 2008-08-13 2009-01-14 柳亮 Method, system and equipment for cross-platform monitoring remote device by using mobile terminal
CN106027258A (en) * 2016-05-05 2016-10-12 浪潮集团有限公司 TPM-based household appliance remote control method
CN106059869A (en) * 2016-07-26 2016-10-26 北京握奇智能科技有限公司 Internet of things smart home equipment safety control method and system
CN206002869U (en) * 2016-08-26 2017-03-08 特斯联(北京)科技有限公司 A kind of intelligent domestic system based on wireless sensor network
CN206451182U (en) * 2017-01-18 2017-08-29 芜湖美的厨卫电器制造有限公司 Lease purifying drinking appliance system for unlocking
CN107395751A (en) * 2017-08-23 2017-11-24 绵阳美菱软件技术有限公司 A kind of remote control system of intelligent household electrical appliance and method

Also Published As

Publication number Publication date
CN108173720A (en) 2018-06-15

Similar Documents

Publication Publication Date Title
CN108173720B (en) Control method and system of household appliance and household appliance system
CN107645725B (en) Network configuration method and system, routing equipment and network access equipment
CN108923927B (en) System and method for provisioning dynamic QR code and BLE connections to a video camera
EP3314977B1 (en) Systems, methods, and apparatus to configure embedded devices
CN105472192B (en) The smart machine, terminal device and method realizing control security certificate and sharing
EP3537652B1 (en) Method for securely controlling smart home appliance and terminal device
CN109495358B (en) Network distribution method and network distribution system for household appliances
US20210211279A1 (en) Configuration systems and methods for secure operation of networked transducers
US11757874B2 (en) Mutual authentication system
CN105471974A (en) Intelligent equipment capable of realizing remote control, terminal equipment and method
US11758394B2 (en) Communication device and non-transitory computer-readable recording medium storing computer-readable instructions for communication device
CN108390873B (en) Authentication binding method, device and system for intelligent equipment
CN110224822B (en) Key negotiation method and system
CN109327823B (en) Networking method, device and system, ZigBee equipment and storage medium
US12005861B2 (en) Method for connecting bluetooth key to vehicle, vehicle bluetooth system, and bluetooth key
CN111726801A (en) Network security control method
CN114760112B (en) Wireless local area network-oriented intelligent home equipment networking method, system, equipment and storage medium
CN110740448A (en) Shared household appliance lease authorization control method and device
CN112512064B (en) Wireless distribution network method, wireless gateway and equipment to be accessed
CN111885091B (en) Secure communication method, device, equipment and storage medium
CN110430572A (en) The communication means and its communication system of a kind of eUICC card, eUICC card and management platform
JP2007088629A (en) Key sharing system, key sharing apparatus, and key sharing method
CN110034927B (en) Communication method and device
CN114338132A (en) Secret-free login method, client application, operator server and electronic equipment
JP2006524004A (en) Secret identifier for subscription renewal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20190805

Address after: 214028 No. 18 Changjiang South Road, Wuxi National High-tech Development Zone, Jiangsu Province

Applicant after: Wuxi Swan Electrical Appliances Co., Ltd.

Address before: 214028 Wuxi Changjiang Road, New District, Jiangsu, No. 18

Applicant before: Wuxi Xiaotianer Co., Ltd.

TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20190905

Address after: 214028 Whale A7 Floor, Wuxi Software Park, 111 Linghu Avenue, Xinwu District, Wuxi City, Jiangsu Province

Applicant after: Wuxi Xiaojing Sharing Network Technology Co., Ltd.

Address before: 214028 No. 18 Changjiang South Road, Wuxi National High-tech Development Zone, Jiangsu Province

Applicant before: Wuxi Swan Electrical Appliances Co., Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant