WO2021121125A1 - Control method for smart home devices and medium and terminal thereof - Google Patents

Control method for smart home devices and medium and terminal thereof Download PDF

Info

Publication number
WO2021121125A1
WO2021121125A1 PCT/CN2020/135318 CN2020135318W WO2021121125A1 WO 2021121125 A1 WO2021121125 A1 WO 2021121125A1 CN 2020135318 W CN2020135318 W CN 2020135318W WO 2021121125 A1 WO2021121125 A1 WO 2021121125A1
Authority
WO
WIPO (PCT)
Prior art keywords
key
client
smart home
ciphertext
service protection
Prior art date
Application number
PCT/CN2020/135318
Other languages
French (fr)
Chinese (zh)
Inventor
韩亚
衣强
甘璐
常新苗
范姝男
李实�
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2021121125A1 publication Critical patent/WO2021121125A1/en

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B15/00Systems controlled by a computer
    • G05B15/02Systems controlled by a computer electric
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/418Total factory control, i.e. centrally controlling a plurality of machines, e.g. direct or distributed numerical control [DNC], flexible manufacturing systems [FMS], integrated manufacturing systems [IMS], computer integrated manufacturing [CIM]
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/26Pc applications
    • G05B2219/2642Domotique, domestic, home control, automation, smart house
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Definitions

  • This application relates to the field of the Internet of Things, and in particular to a control method for smart home equipment, its medium, and a terminal.
  • control commands are required to be transmitted in the form of ciphertext in the channel and have the function of tamper-proof.
  • the smart home device receives the control instruction, it needs to authenticate the identity of the sender to ensure the legal identity of the instruction sender. Due to insufficient hardware capabilities of some smart home devices, certificates or public key mechanisms cannot be deployed. Therefore, such smart home devices cannot effectively authenticate the identity of the command sender.
  • the embodiment of the application provides a control method for smart home equipment and its medium and terminal.
  • the key of a symmetric algorithm is used to encrypt the control instructions for controlling the smart home equipment, and at the same time, the business protection code that identifies the legal identity of the user is used to ensure Compared with the asymmetric encryption algorithm, the security of command transmission is less computationally intensive. It is suitable for smart home devices that cannot deploy the public and private keys required by the asymmetric encryption algorithm due to hardware limitations.
  • an embodiment of the present application provides a control method for smart home equipment, including:
  • the first client uses the first key to encrypt the control instruction for controlling the smart home device, generates the control instruction ciphertext, and generates the first ciphertext verification information based on the service protection code, wherein the control instruction ciphertext It can be decrypted by the smart home device using the first key stored by itself, and the first cipher text verification information can be used by the smart home device to verify the control command password received by the smart home device.
  • the first client sends the generated control instruction ciphertext and the first ciphertext check information. That is, the key of the client to encrypt the control command is the same as the key of the smart home device to decrypt the ciphertext of the control command.
  • control instruction ciphertext and the first ciphertext check information generated by sending include:
  • the first client sends an instruction forwarding request to the server, where the instruction forwarding request includes the device ID of the smart home device, the control instruction ciphertext, and the first ciphertext verification information, and the instruction forwarding
  • the request is used to request the server to forward the control instruction ciphertext and the first ciphertext verification information to the smart home device identified by the device ID. That is, the server transparently transmits the control command ciphertext and the first ciphertext verification information, and does not make any modification to the control command ciphertext. This effectively avoids the problem of tampering with control instructions after the server is attacked.
  • control instruction ciphertext and the first ciphertext check information generated by sending include:
  • the first client sends the control instruction ciphertext and the first ciphertext verification information to the smart home device. That is, the client can directly send the control instruction ciphertext and the first ciphertext verification information to the smart home device without forwarding through the server.
  • the method further includes:
  • the first client sends a service protection code setting request to the server; the first client receives an initial service protection code from the server, where the initial service protection code is sent by the server in response to the service protection code setting request
  • the first client prompts the user to modify the initial service protection code to obtain the first service protection code; the first client stores the first service protection code, and prompts the user to record the first service protection code.
  • the server may generate a string of random codes as the initial service protection code. After the client receives it, the user modifies the initial service protection code and uses the modified as the service protection code.
  • the method further includes:
  • the first client requests the user to input a second service protection code to update the first service protection code, where the first service protection code is different from the second service protection code; the first client sends to the server A service protection code update request, where the service protection code update request is used to request the server to send a service protection code update notification to the second client, and the service protection code update notification is used to notify the second client from The user obtains the second service protection code to update the first service protection code on the second client, and the first client and the second client use the same account to log in to the server.
  • the method further includes:
  • the first client generates a random code, and generates a second key for updating the first key based on the random code, wherein the first key is different from the second key.
  • the generating a second key for updating the first key based on the random code includes:
  • the method further includes:
  • the first client generates first key verification information based on the service protection code and the random code, where the first key verification information can be used by the smart home device to verify whether the received random code is The same as the random code generated by the first client.
  • the first client generating first key verification information based on the service protection code and random code includes:
  • the first client uses a key-based message authentication code algorithm, uses the service protection code as an input key, and transforms the random code to generate the first key verification information.
  • the method further includes:
  • the first client sends a key update request to the server, where the key update request includes the random code and the first key verification information, and is used to request the server to send the key to the smart home
  • the device forwards the random code and the first key verification information.
  • the generating of the first ciphertext verification information based on the service protection code includes:
  • the first client uses the service protection code as an input key, and transforms the control instruction ciphertext through a key-based message authentication code algorithm to obtain the first ciphertext verification information.
  • the method further includes:
  • the first client sends the key encrypted by the service protection code to the second client, where the first client and the second client log in to the server through the same account.
  • the implementation of this application provides a control method for smart home devices, including:
  • the smart home device receives the control instruction ciphertext and the first ciphertext verification information; the smart home device checks whether the received control instruction ciphertext is based on its own service protection code and the first ciphertext verification information The ciphertext of the control instruction generated by the client is the same; when the smart home device verifies that the received ciphertext of the control instruction is the same as the ciphertext of the control instruction generated by the client, the smart home device uses its own first key to decrypt the The control instruction ciphertext obtains the control instruction; the smart home device executes the control instruction.
  • the smart home device verifies whether the received control instruction ciphertext is consistent with the client based on its own service protection code and the first ciphertext verification information.
  • the ciphertext of the control instruction generated by the terminal includes:
  • the smart home device uses its own service protection code as an input key, and transforms the received control instruction ciphertext through a key-based message authentication code algorithm to obtain the second ciphertext verification information;
  • the smart home device determines that the second ciphertext verification information is the same as the received first ciphertext verification information, it verifies that the received control instruction ciphertext is the same as the one generated by the client The control command ciphertext is the same.
  • the method further includes:
  • the smart home device receives the random code and the first key verification information sent by the server; the smart home device verifies whether the received random code is the same as the random code generated by the client according to the first key verification information; smart home When the device verifies that the received random code is the same as the random code generated by the client, it generates a second key based on the random code to update the first key in the smart home device.
  • the smart home device verifying whether the received random code is the same as the random code generated by the client according to the first key verification information includes:
  • the smart home device uses the service protection code as an input key, and transforms the received random code through a key-based message authentication code algorithm to generate second key verification information; the smart home device determines Whether the generated second key verification information is the same as the received first key verification information; the smart home device is verifying the first key verification information and the second key verification information If the verification information is the same, it is determined that the received random code is the same as the random code generated by the client.
  • the generating a second key based on the random code includes:
  • the smart home device uses the first key to encrypt the service protection code and the received random code to generate the second key.
  • the implementation of this application provides a control method for smart home devices, including:
  • the server receives an instruction forwarding request from the first client, where the instruction forwarding request includes the device ID of the smart home device, the control instruction ciphertext, and the first ciphertext verification information, wherein the control instruction ciphertext can be
  • the smart home device uses the first key stored by itself to decrypt, and the first cipher text verification information can be used by the smart home device to verify whether the cipher text of the control instruction received by the smart home device is consistent with The control instruction ciphertext generated by the first client is the same; the server forwards the control instruction ciphertext and the first ciphertext verification information to the smart home device identified by the device ID.
  • an electronic device in the implementation of this application, and the electronic device has the function of realizing the first client or the second client in the above-mentioned control method for smart home devices.
  • the function can be realized by hardware, or by hardware executing corresponding software.
  • the hardware or software includes one or more modules corresponding to the above-mentioned functions.
  • an electronic device in the implementation of the present application, and the electronic device has the function of realizing the server in the above-mentioned control method for smart home devices.
  • the function can be realized by hardware, or by hardware executing corresponding software.
  • the hardware or software includes one or more modules corresponding to the above-mentioned functions.
  • an electronic device in the implementation of the present application, and the electronic device has the function of realizing the smart home device in the above-mentioned control method for smart home device.
  • the function can be realized by hardware, or by hardware executing corresponding software.
  • the hardware or software includes one or more modules corresponding to the above-mentioned functions.
  • the implementation of the present application provides a computer-readable medium with instructions stored on the computer-readable medium.
  • the instructions When the instructions are executed on a machine, the machine executes any of the above-mentioned aspects of the first to third aspects.
  • the described control method for smart home equipment The described control method for smart home equipment.
  • a terminal in the implementation of this application, including:
  • One or more processors are One or more processors.
  • the memory is used to store instructions; when the instructions are executed by the one or more processors, the terminal is made to execute the control method for smart home devices described in any one of the first to third aspects above .
  • Fig. 1 shows a schematic structural diagram of an Internet of Things system 100 according to some embodiments of the present application.
  • Fig. 2 shows a schematic diagram of a process of activating a smart home device by a client according to some embodiments of the present application.
  • Fig. 3 shows a schematic flowchart of a client sending a control instruction to a smart home device through a server according to some embodiments of the present application.
  • Fig. 4 shows a schematic flow chart of a client directly sending a control instruction to a smart home device according to some embodiments of the present application.
  • Fig. 5 shows a schematic flow chart of a client obtaining a key required for an encryption control instruction from another client according to some embodiments of the present application.
  • Fig. 6 shows a schematic flow chart of setting a service protection code according to some embodiments of the present application.
  • Fig. 7 shows a schematic flow chart of updating a service protection code according to some embodiments.
  • Fig. 8 shows a schematic flow chart of updating a key according to some embodiments.
  • Fig. 9 shows a schematic structural diagram of an electronic device according to some embodiments of the present application.
  • Fig. 10 shows a schematic structural diagram of an electronic device according to some embodiments of the present application.
  • Fig. 11 shows a schematic structural diagram of an electronic device according to some embodiments of the present application.
  • Illustrative embodiments of the present application include, but are not limited to, a blockchain-based IP address prefix authentication method and device.
  • module can refer to or include an application specific integrated circuit (ASIC), an electronic circuit, a processor (shared, dedicated, or group) that executes one or more software or firmware programs And/or memory, combinational logic circuit, and/or other suitable hardware components that provide the described functions, or may be part of these hardware components.
  • ASIC application specific integrated circuit
  • processor shared, dedicated, or group
  • memory shared, dedicated, or group
  • combinational logic circuit and/or other suitable hardware components that provide the described functions, or may be part of these hardware components.
  • FIG. 1 shows a schematic diagram of the structure of the system 100.
  • the Internet of Things system 100 includes clients 101-1 to 101-n, a server 102, and smart home devices 103-1 to 103-n.
  • the client 101-1 to the client 101-n can use the key to encrypt the control command of at least one of the smart home devices 103-1 to 103-n, and use the service protection code to generate the control command secret.
  • the cipher text verification information of the text and then the server 102 sends the control command cipher text and the cipher text verification information to at least one of the smart home devices 103-1 to 103-n, or directly to the smart home devices 103-1 to 103 At least one of -n sends the control command ciphertext.
  • the client 101-1 to the client 101-n may be any terminal device used by the user to send the cipher text of the control instruction, etc., for example, may include, but not limited to, a laptop computer, a desktop computer, a tablet computer, and a mobile phone. Telephones, wearable devices, head-mounted displays, mobile email devices, portable game consoles, portable music players, reader devices, televisions with one or more processors embedded or coupled to them, or capable of accessing the Internet Other electronic equipment.
  • the server 102 can be used to receive the command forwarding request from the client 101-1 to the client 101-n, and forward the control command ciphertext and ciphertext verification information generated by the client 101-1 to the client 101-n to the smart home Devices 103-1 to 103-n.
  • the server 102 may be various types of servers, such as a cloud server, which is not limited here.
  • At least one of the smart home devices 103-1 to 103-n can be used to receive the control instruction ciphertext and ciphertext verification information generated by at least one of the client 101-1 to the client 101-n, and based on its own
  • the service protection code and the received ciphertext verification information verify the received instruction ciphertext
  • the control instruction ciphertext can be decrypted with its own key after the control instruction ciphertext verification is passed, and the decryption is performed Control instructions coming out.
  • the smart home devices 103-1 to 103-n can be any home devices that can receive control command ciphertext and ciphertext verification information, and execute control commands, for example, can include, but are not limited to, smart TVs, smart speakers , Smart sockets, smart door locks, smart weight (fat) scales, smart bulbs, smart fans, smart air conditioners, smart desk lamps, smart sweeping robots and other smart home appliances.
  • the client 101-1, the client 101-2, and the smart home device 103-1 are taken as examples to illustrate the process of implementing the control technology of the smart home device in the Internet of Things system 100.
  • FIG. 2 shows a schematic diagram of a process for the client 101-1 to activate the smart home device 103-1 according to some embodiments. Specifically, as shown in FIG. 2, the process of the client 101-1 activating the smart home device 103-1 includes:
  • the client 101-1 logs in to the server 102 through an account, and establishes a connection with the server 102.
  • the client 101-1 can establish a secure communication connection with the server 102 via HTTP (Hypertext Transfer Protocol).
  • HTTP Hypertext Transfer Protocol
  • the user starts the smart home device 103-1 for the first time, and the smart home device 103-1 can issue an SSID (Service Set Identifier) to the outside through wireless communication technologies such as Bluetooth and NFC (Near Field Communication).
  • the SSID is used to identify the smart home device 103-1.
  • the client 101-1 finds the SSID of the smart home device 103-1 when scanning.
  • the client 101-1 After scanning the SSID of the smart home device 103-1, the client 101-1 sends an activation request to the server 10 to obtain the activation code.
  • the activation request includes the SSID of the smart home device 103-1.
  • the server 102 After receiving the activation code acquisition request, the server 102 determines whether the smart home device 103-1 is a smart home device produced by a legal manufacturer according to the SSID in the activation request.
  • the server 102 returns an activation code after verifying that the smart home device 103-1 is produced by a legal manufacturer.
  • the activation code can be used by the smart home device 103-1 to connect to the server.
  • the client 101-1 After the client 101-1 receives the activation code, it uses the activation code to activate the smart home device 103-1, and configures basic information for the smart home device 103-1. For example, configuring basic information for the smart home device 103-1 may be to send the SSID and password of the wireless network to the smart home device 103-1, so that the smart home device 103-1 can log in to the wireless network.
  • the client 101-1 activates the smart home device 103-1, it generates a key S0 for the smart home device 103-1, and sets the service protection code T0 through the server 102.
  • the client 101-1 can randomly generate a key for encrypting the control command, and the key can be a key for encrypting the control command using a block encryption algorithm, so that the smart home device side can use the same key to Decrypt the cipher text of the control instruction.
  • the block encryption algorithm includes, but is not limited to, AES (Advanced Encryption Standard, Advanced Encryption Standard) algorithm, SM4 algorithm, SIMON algorithm, SPECK code algorithm, etc.
  • the service protection code is used to identify the legitimacy of the user issuing the instruction, that is, the client and the smart home device under the same account that log in to the server have the same service protection code. For example, if a user has multiple clients, or the user's family members use other clients, these clients can use the same account to log in to the server 102 to control the smart home device 103-1.
  • the service protection code may be a random string code sent by the server 102 for the same account, or a string set by the user. Refer to Figure 7 and Figure 8 for the setting and updating of the service protection code.
  • the block encryption key in the symmetric encryption algorithm has much lower requirements on the computing power of the device. Therefore, the technical solution of this application is suitable for non-deployment due to hardware limitations.
  • the symmetric encryption algorithm requires public and private keys for smart home devices.
  • the legal identity of the user is identified by the service protection code T, which can effectively check whether the encrypted control command has been tampered with during the transmission process, thereby ensuring the security of the encrypted control command.
  • the client 101-1 After the client 101-1 generates the key S0 and the service protection code T0, it establishes a connection with the smart home device 103-1. For example, the client 101-1 may establish a secure communication connection with the smart home device 103-1 through the CoAP protocol.
  • the client 101-1 sends the generated key S0 and the service protection code T0 to the smart home device 103-1.
  • the smart home device 103-1 encrypts and stores the password S0 and the business protection code T0.
  • the smart home device can be controlled by sending a control instruction.
  • the control instruction can be forwarded to the smart home device 103-1 through the server 120, or directly sent to the smart home device 103-1.
  • Fig. 3 shows a schematic flow chart of the client 101-1 sending a control instruction to the smart home device 103-1 through the server 120 according to some embodiments.
  • the process of the client 101-1 sending a control instruction to the smart home device 103-1 through the server 120 is as follows:
  • the client 101-1 logs in to the server 102 and establishes a connection with the server.
  • a communication connection can be established through technologies such as Wi-Fi, Bluetooth, and NFC.
  • the client 101-1 generates a control instruction P, encrypts the control instruction P with a key S, generates a control instruction ciphertext C, and uses the service protection code T to generate ciphertext verification information Vc1.
  • the key S can be the key S0, or other keys after updating.
  • the block encryption algorithm AES may be used to encrypt the control instruction with the key S to generate the control instruction ciphertext C.
  • the service protection code T is used as the input key of the HMAC (Hash-based Message Authentication Code) algorithm to transform the control command ciphertext to generate a MAC (Message Authentication Code) value.
  • the MAC value is the cipher text verification information Vc1.
  • the key S is used as the input key of the HMAC algorithm, and the service protection code is transformed to generate a MAC value, which is the ciphertext verification information Vc1.
  • the client 101-1 sends a control forwarding request to the server 102.
  • the control forwarding request includes the device ID that identifies the smart home device 103-1, the control instruction ciphertext C generated by the client 101-1, and the ciphertext verification information Vc1.
  • the device ID may be a logical ID generated by the server 102 and bound to the UUID of the smart home device 103, and used to identify the smart home device 103-1.
  • the server 102 After receiving the control forwarding request, the server 102 recognizes according to the device ID therein that the target device requested in the control forwarding request is the smart home device 103-1.
  • the server 102 After the server 102 recognizes the smart home device 103-1, it establishes a connection with the smart home device 103-1, and forwards the control instruction cipher text C and the cipher text verification information Vc1 in the control forwarding request to the smart home device 103-1 .
  • the smart home device 103-1 receives the control command cipher text C and the cipher text verification information Vc1 from the server 102, and after receiving the control command cipher text C and the cipher text verification information Vc1, it uses its own stored service protection code T and the cipher text verification information Vc1, using the same message code verification algorithm as the client 101-1 to generate the cipher text verification information Vc1, verify whether the received control command cipher text C is the same as the control command generated by the client 101-1 The ciphertext C is the same.
  • control instruction ciphertext C is the same as the control instruction ciphertext C generated by the client 101-1, then proceed to 314; otherwise, no processing is performed or a message indicating an error is sent to the server 102, and the server 102 receives After that, a control failure message can be sent to the client 101-1.
  • the smart home device 103-1 verifies whether the received control instruction ciphertext C is the same as the control instruction ciphertext C generated by the client 101-1 in the following manner:
  • the smart home device 103-1 also adopts the HMAC algorithm, and uses the service protection code T stored in itself as the input key to receive
  • the received control instruction ciphertext C is transformed to generate a MAC value, thereby obtaining the ciphertext verification information Vc2.
  • the client 101-1 compares the cipher text verification information Vc2 with the cipher text verification information Vc1 received from the server 102. If the two are the same, it is determined that the control instruction ciphertext C received from the server 102 is the same as the control instruction ciphertext C generated by the client 101-1.
  • Vc1 and Vc2 are not the same, it is determined that the control command cipher text C received from the server 102 is different from the control command cipher text C generated by the client 101-1, and the control command cipher text C may be tampered with during transmission.
  • the smart home device 103-1 verifies whether the received control instruction ciphertext C is the same as the control instruction ciphertext C generated by the client 101-1 in the following manner:
  • the smart home device 103-1 uses the HMAC algorithm when generating the cipher text verification information Vc1
  • the smart home device 103-1 also uses the HMAC algorithm, and uses the secret key S as the input key to protect the business stored by itself
  • the code is transformed to generate the MAC value, thereby obtaining the cipher text verification information Vc2.
  • the client 101-1 compares the cipher text verification information Vc2 with the cipher text verification information Vc1 received from the server 102. If the two are the same, it is determined that the control instruction ciphertext C received from the server 102 is the same as the control instruction ciphertext C generated by the client 101-1.
  • Vc1 and Vc2 are not the same, it is determined that the control command cipher text C received from the server 102 is different from the control command cipher text C generated by the client 101-1, and the control command cipher text C may be tampered with during transmission.
  • the smart home device 103-1 also uses the corresponding algorithm to generate the cipher text verification information Vc2.
  • the smart home device 103-1 uses the key S obtained in advance from the client 101-1 to decrypt the control instruction cipher text C to obtain the control instruction P.
  • the smart home device 103-1 executes the control instruction P.
  • the control instruction P may be to instruct it to turn on, adjust the purification mode, and so on.
  • the client implements the control of the smart home device through the server
  • the encryption and decryption of the control instruction is performed on the client side and the smart home device side respectively
  • the server only transmits the control instruction ciphertext and ciphertext correction. Verify the information so as to prevent the server from being attacked and control the security of the command.
  • the smart home device can verify whether the ciphertext of the control instruction is the same as the ciphertext of the control instruction generated by the client, thereby ensuring the security of the transmission of the control instruction ciphertext.
  • Fig. 4 shows a schematic flow chart of the client 101-1 directly sending a control instruction to the smart home device 103-1 according to some embodiments.
  • the process of the client 101-1 directly sending a control instruction to the smart home device 103-1 is as follows:
  • the client 101-1 establishes a connection with the smart home device 103-1.
  • a communication connection can be established through technologies such as Wi-Fi, Bluetooth, and NFC.
  • the client 101-1 generates a control instruction P, encrypts the control instruction P with a key S, generates a control instruction ciphertext C, and uses the service protection code T to generate ciphertext verification information Vc1.
  • the specific method for generating the command ciphertext C and the ciphertext verification information Vc1 is the same as that of 304 in FIG. 3, and will not be repeated here.
  • the client 101-1 sends the control instruction cipher text C and the cipher text verification information Vc1 to the smart home device 103-1.
  • the smart home device 103-1 receives the control command cipher text C and the cipher text verification information Vc1 from the client 101-1, and after receiving the control command cipher text C and the cipher text verification information Vc1, it uses its own storage Service protection code T and ciphertext verification information Vc1, using the same message code verification algorithm as the client 101-1 to generate ciphertext verification information Vc1, verify whether the received control command ciphertext C is generated by the client 101-1
  • the control command ciphertext C is the same.
  • the specific verification method is the same as that of 312 in FIG. 3, so it will not be repeated here.
  • the service protection code corresponds to the account used by the client 101-1 to log in to the server 102, or corresponding to the user of the smart home device 103-1.
  • the user can use multiple clients to realize the connection to the smart home device 103- 1 control. If the user wants to use a new client to control the smart home device 103-1, for example, use the client 101-m, the client 101-m needs to obtain the key required for the encryption control command from the client 101-1 S and obtain the service protection code T from the user.
  • Fig. 5 shows a schematic flow chart of the client 101-m obtaining the key S required by the encryption control instruction from the client 101- 1 according to some embodiments of the present application. Specifically, the process in which the client 101-m obtains the key S from the client 101-1 includes:
  • the client 101-1 establishes a connection with the client 101-m.
  • a communication connection can be established through technologies such as Wi-Fi, Bluetooth, and NFC.
  • the client 101-m sends a key acquisition request to the client 101-1.
  • the client 101-1 uses the service protection code T to encrypt the key S in response to the received key acquisition request.
  • the client 101-1 sends the key S encrypted by the service protection code T to the client 101-m.
  • the client 101-m After receiving the key S encrypted by the service protection code T, the client 101-m requests the user to input the service protection code T.
  • the client 101-m uses the service protection code T to decrypt the received encrypted key S, and then encrypts and stores the decrypted key S.
  • Fig. 6 shows a schematic flow chart of setting a service protection code according to some embodiments of the present application. Specifically, as shown in Figure 6, the process of the equipment service protection code T is as follows:
  • the client 101-1 logs in to the server 102 through an account, and establishes a connection with the server.
  • a communication connection can be established through technologies such as WiFi, Bluetooth, and NFC.
  • the client 101-1 sends a request for setting a service protection code to the server 102.
  • the server 102 After receiving the above request, the server 102 queries whether a service protection code has been assigned to the logged-in account. If it is found out that the server 102 has not assigned a service protection code to the logged-in account, enter 608; otherwise, an error message that the service protection code cannot be sent is returned.
  • the server 102 sends the protection code cipher text of the initial service protection code and the protection code verification information to the client 101-1.
  • the session key negotiated between the server 102 and the client 101-1 is used to encrypt the initial service protection code to obtain the protection code cipher text of the initial service protection code
  • the message verification code algorithm is used to generate the initial service protection
  • the protection code verification information of the code is used as the input key of the HMAC algorithm, and the protection code cipher text of the initial service protection code is converted to obtain the protection code verification information of the initial service protection code.
  • the client 101-1 verifies the received initial service protection code based on the protection code verification information to determine the integrity of the initial service protection code sent by the server 102. If the verification is passed, enter 612; otherwise, return an error message to the server 102.
  • the verification can be performed in the following manner: after the client 101-1 receives the verification information of the service protection code, it uses the same message verification code algorithm to calculate the verification information of the service protection code, and if the calculated service protection code is verified If the information is the same as the received service protection code verification information, it means that the verification passed.
  • the client 101-1 may use the session key negotiated between the server 102 and the client 101-1 to decrypt the received protection code ciphertext of the initial service protection code.
  • the client 101-1 may use the negotiated session key as the input key of the HMAC algorithm to convert the protection code cipher text of the initial service protection code to generate protection code verification information of the initial service protection code.
  • the generated protection code check information of the initial service protection code is compared with the received protection code check information of the initial service protection code. If the two are the same, it means that the check has passed.
  • the client 101-1 prompts the user to modify the received initial service protection code to obtain the service protection code T0.
  • the client 101-1 After detecting that the service protection code modified by the user complies with the predetermined rule, the client 101-1 encrypts and stores the service protection code T0 modified by the user, and prompts the user to record the service protection code T0.
  • the service protection code T in the foregoing embodiment may be T0, or may be another service protection code after T0 is updated.
  • the predetermined rule for the service protection code may be the requirement for the character type and the number of characters of the service protection code, for example, the requirement must be 8 digits, and must contain numbers, upper and lower case letters, special symbols, etc.
  • the client 101-1 sends the set protection code cipher text of the service protection code T and the protection code verification information of the service protection code T to the server 102.
  • the client 101-1 may encrypt the service protection code T with the session key negotiated by the server 102 and the client 101-1 to obtain the protection code ciphertext, and the client 101-1 may also use the server 102
  • the session key negotiated with the client 101-1 is used as the input key of the HMAC algorithm, and the service protection code T is converted to obtain the protection code verification information Vt1.
  • the server 102 receives the protection code cipher text of the service protection code T and the protection code verification information Vt1, and then verifies whether the received protection code cipher text of the service protection code T is the same as the client 101- 1 The ciphertext of the protection code of the set service protection code T is the same. If they are the same, it is determined that the service protection code is set successfully.
  • the server 102 may use the same algorithm as the client 101-1 to generate the protection code verification information of the service protection code T, generate the received verification information Vt2 of the service protection code T, and then verify the generated protection code information Vt2 is compared with the received protection code verification information Vt1, and if Vt1 and Vt2 are the same, it is determined that the received service protection code T is the same as the service protection code set by the client 101-1.
  • the server 102 uses the aforementioned negotiated session key as the input key of the HMAC algorithm to convert the received protection code cipher text to obtain the protection code verification information Vt2.
  • the server 102 may also use the negotiated session key to decrypt the ciphertext of the protection code to obtain the service protection code T.
  • the service protection code may also be directly the service protection code sent by the server 102 to the client 101-1 without modification by the user.
  • the client 101-1 may also update the service protection code T through the server 102.
  • FIG. 7 shows a schematic flow chart of updating the service protection code according to some embodiments. Specifically, as shown in FIG. 7, the process for the client 101-1 to update the service protection code T is as follows:
  • the client 101-1 logs in to the server 102 through an account, and establishes a connection with the server.
  • the client 101-1 receives a request from the user to update the service protection code. For example, the user can click the button to update the service protection code in the application software for managing the smart home device 103-1 to send the request.
  • the client 101-1 may set an update period to periodically send a service protection code update request to the server.
  • the server 102 may also periodically send a service protection code update request to the client 101-1, for example, once a month or once a week to improve the security of the service protection code.
  • the client 101-1 requests the user to input the updated service protection code T', and generates protection code verification information Vt1' based on the service protection code T'.
  • the HMAC algorithm can be used, the original service protection code T is used as the input key, and the updated service protection code T'is transformed to generate the verification information Vt1' of T'.
  • the client 101-1 sends a service protection code update request to the server 102, where the service protection code update request includes the updated service protection code T′ input by the user and the protection code verification information Vt1′ of the service protection code T′ .
  • the server 102 After receiving the service protection code update request, the server 102 uses the protection code verification information Vt1' to verify the service protection code T'.
  • the server 102 can use the same algorithm as the client 101-1 to generate the verification information Vt1', use the original service protection code T stored on the server 102 as a key, and transform the received service protection code T'to generate verification Information Vt2', and compare the generated verification information Vt2 with the verification information Vt1' of the received service protection code T'. If the comparison shows that the two are the same, it means that the verification is passed and enter 712; if they are different, it means that the verification is not passed, and an update failure message is sent to the client 101-1.
  • the server 102 sends a protection code update notification to clients other than the client 101-1 under the account used by the client 101-1 to log in to the server 102, so that the user can enter the updated service protection when using these clients Code T'.
  • the server sends a message indicating that the service protection code has been successfully updated to the client 101-1.
  • the client 101-1 may update the service protection code in other ways, for example, directly sending the original application to all clients and smart home devices 103-1 under the account used by the client 101-1 to log in to the server 102.
  • the updated service protection code T'encrypted by the service protection code T so that these devices can obtain the updated service protection code T'after receiving the T'encrypted by T.
  • Figure 8 shows a schematic diagram of a process for updating a key.
  • the process for the client 101-1 to update the key S includes:
  • the client 101-1 logs in to the server 102 through an account, and establishes a connection with the server 102.
  • the client 101-1 randomly generates a random code (RN code) used to update the key S, and uses the RN code, the key S and the service protection code T to calculate and generate a new key S1', and generates the key S1 'The key verification information Vs1.
  • RN code random code
  • the new key S1' can be calculated in the following manner:
  • the key S1' can also be calculated in other ways, for example, the service protection code T is used as the key, and the aforementioned block encryption algorithm is used to encrypt the RN code and the original key S to obtain a new Key S1', or use the original key S as a key, use the aforementioned block encryption algorithm to encrypt the RN code, and then add a service protection code to the end of the encrypted RN code to obtain a new key S1'. That is, as long as the information (such as service protection code and original key S) possessed by the smart home device 130-1 or other related clients (such as client 101-m) is used as the key of the block encryption algorithm to generate a new key S1' is fine.
  • the information such as service protection code and original key S
  • the smart home device 130-1 or other related clients such as client 101-m
  • the key verification information Vs1 can be calculated in the following manner:
  • the RN code is transformed to generate the MAC value, which is the key verification information Vs1.
  • the key verification information Vs1 can also be calculated in other ways.
  • the RN code is transformed to generate the MAC value, and the MAC value is the key verification information Vs1.
  • the new key S1' is converted to generate the MAC value, which is the key verification information Vs1. That is, as long as the information (such as the service protection code and the original key S) possessed by the smart home device 130-1 or other related clients (such as the client 101-m) is used as the key.
  • key-based message verification codes can also be used to generate the key verification information Vs1, which is not limited here.
  • the client 101-1 sends a key update request to the server 102.
  • the key update request may include the RN code and key verification information Vs1.
  • the server 102 determines the smart home devices and other clients under the account used by the client 101-1 to log in to the server 102. For example, it is determined that the account has a smart home device 103-1 and a client 101-m.
  • the server 102 establishes a connection with the determined smart home devices and clients, and forwards the RN code and key verification information Vs1 in the key update request to these smart home devices and clients, for example, to the smart home Device 103-1 and client 101-m.
  • the smart home device 103-1 and the client 101-m After the smart home device 103-1 and the client 101-m receive the RN code and key verification information Vs1, they use the received RN code, the service protection code T and the original key S stored by themselves, and the client 101-1 The method of generating a new key S1', generating a new key S2'.
  • the smart home device 103-1 and the client 101-m may calculate the new key S2' in the following manner:
  • the key S2' can also be calculated in other ways, for example, using the service protection code T stored in itself as the key, and using the aforementioned block encryption algorithm to encrypt the RN code and the original key S, Obtain the new key S2', or use the original key S as the key, use the aforementioned block encryption algorithm to encrypt the RN code, and then add the service protection code to the end of the encrypted RN code to obtain the new key S2'. That is, as long as the information (such as service protection code and original key S) possessed by the smart home device 130-1 or other related clients (such as client 101-m) is used as the key of the block encryption algorithm to generate a new key S1' is fine.
  • the smart home device 103-1 and the client 101-m use the received key verification information Vs1 to verify whether the generated new key S2' is the same as the key S1' generated by the client 101-1.
  • the smart home device 103-1 and the client 101-m can use the client 101-1 to generate the same message code authentication algorithm and key as the key verification information Vs1, generate the key verification information Vs2, and determine the generation Is Vs2 the same as Vs1? If the two are the same, it is determined that the generated new key S2' is the same as the key S1' generated by the client 101-1, and enters 816; otherwise, it is determined that the generated new key S2' is generated by the client 101-1
  • the keys S1' of are not the same, and a message that the update has failed is sent to the server 102.
  • the key verification information Vs2 can be calculated in the following manner:
  • the received RN code is transformed to generate a MAC value, which is the key verification information Vs2.
  • the key verification information Vs2 can also be calculated in other ways.
  • the received RN code is transformed to generate a MAC value, which is the key verification information Vs2.
  • the new key S2' is converted to generate the MAC value, and the MAC value is the key verification information Vs2. That is, as long as the information (such as the service protection code and the original key S) possessed by the smart home device 130-1 or other related clients (such as the client 101-m) is used as the key.
  • key-based message verification codes can also be used to generate the key verification information Vs2, which is not limited here.
  • the key S may also be updated in other ways.
  • the client 101-1 directly generates a new key different from the key S, and generates a new key based on the RN code, which is not limited here.
  • the client 101-1 may also directly send the random code and key verification information to the smart home device 103-1 and the client 101-m, instead of sending it through the server 102.
  • the other verification process and the process of generating a new key are the same as those described in FIG. 8, and will not be repeated here.
  • FIG. 9 shows a schematic diagram of the structure of the electronic device 900.
  • the electronic device 900 may be any one of a client, a smart home device, and a server in the aforementioned Internet of Things system 100.
  • the electronic device 900 includes a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, and a power management module 141, Battery 142, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone jack 170D, sensor module 180, buttons 190, motor 191, indicator 192, Camera 193, display screen 194, subscriber identification module (SIM) card interface 195, etc.
  • SIM subscriber identification module
  • the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and ambient light Sensor 180L, bone conduction sensor 180M, etc.
  • the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 900.
  • the electronic device 900 may include more or fewer components than shown, or combine certain components, or split certain components, or arrange different components.
  • the illustrated components can be implemented in hardware, software, or a combination of software and hardware.
  • the processor 110 may include one or more processing units.
  • the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), and an image signal processor. (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (NPU), etc.
  • the different processing units may be independent devices or integrated in one or more processors.
  • the processor 110 may be used to generate control instruction ciphertext, ciphertext verification information, protection code verification information, key verification information, etc., to implement the control instructions shown in Figures 2-8 of this application. The method of smart home equipment.
  • the controller can generate operation control signals according to the instruction operation code and timing signals to complete the control of fetching instructions and executing instructions.
  • a memory may also be provided in the processor 110 to store instructions and data.
  • the memory in the processor 110 is a cache memory.
  • the memory can store instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. Repeated accesses are avoided, the waiting time of the processor 110 is reduced, and the efficiency of the system is improved.
  • the processor 110 may include one or more interfaces.
  • the charging management module 140 is used to receive charging input from the charger.
  • the charger can be a wireless charger or a wired charger.
  • the charging management module 140 may receive the charging input of the wired charger through the USB interface 130.
  • the charging management module 140 may receive the wireless charging input through the wireless charging coil of the electronic device 900. While the charging management module 140 charges the battery 142, it can also supply power to the electronic device through the power management module 141.
  • the wireless communication function of the electronic device 900 can be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor.
  • the antenna 1 and the antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in the electronic device 900 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
  • Antenna 1 can be multiplexed as a diversity antenna of a wireless local area network.
  • the antenna can be used in combination with a tuning switch.
  • the mobile communication module 150 may provide a wireless communication solution including 2G/3G/4G/5G and the like applied to the electronic device 900.
  • the mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), and the like.
  • the mobile communication module 150 can receive electromagnetic waves by the antenna 1, and perform processing such as filtering, amplifying and transmitting the received electromagnetic waves to the modem processor for demodulation.
  • the mobile communication module 150 can also amplify the signal modulated by the modem processor, and convert it into electromagnetic waves for radiation via the antenna 1.
  • at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110.
  • at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be provided in the same device.
  • the wireless communication module 160 can provide applications on the electronic device 900 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), and global navigation satellites. System (global navigation satellite system, GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (infrared, IR) and other wireless communication solutions.
  • the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110.
  • the wireless communication module 160 may also receive a signal to be sent from the processor 110, perform frequency modulation, amplify, and convert it into electromagnetic waves to radiate through the antenna 2.
  • the antenna 1 of the electronic device 900 is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the electronic device 900 can communicate with the network and other devices through wireless communication technology.
  • the electronic device 900 implements a display function through a GPU, a display screen 194, an application processor, and the like.
  • the GPU is an image processing microprocessor, which is connected to the display screen 194 and the application processor.
  • the GPU is used to perform mathematical and geometric calculations and is used for graphics rendering.
  • the processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
  • the display screen 194 is used to display images, videos, and the like.
  • the display screen 194 includes a display panel.
  • the electronic device 900 can realize a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.
  • the external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, so as to expand the storage capacity of the electronic device 900.
  • the external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example, save music, video and other files in an external memory card.
  • the internal memory 121 may be used to store computer executable program code, where the executable program code includes instructions.
  • the internal memory 121 may include a storage program area and a storage data area.
  • the electronic device 900 can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor. For example, music playback, recording, etc.
  • the button 190 includes a power-on button, a volume button, and so on.
  • the button 190 may be a mechanical button. It can also be a touch button.
  • the electronic device 900 may receive key input, and generate key signal input related to user settings and function control of the electronic device 900.
  • the motor 191 can generate vibration prompts.
  • the indicator 192 may be an indicator light, which may be used to indicate the charging status, power change, or to indicate messages, missed calls, notifications, and so on.
  • the SIM card interface 195 is used to connect to the SIM card.
  • the electronic device 1000 may be any one of a client, a smart home device, and a server in the aforementioned Internet of Things system 100.
  • the electronic device 1000 may include one or more processors 1004, a system control logic 1008 connected to at least one of the processors 1004, a system memory 1012 connected to the system control logic 1008, and a system control logic 1008
  • a non-volatile memory (NVM) 1016 is connected, and a network interface 1020 is connected to the system control logic 1008.
  • NVM non-volatile memory
  • the processor 1004 may include one or more single-core or multi-core processors. In some embodiments, the processor 1004 may include any combination of a general-purpose processor and a special-purpose processor (for example, a graphics processor, an application processor, a baseband processor, etc.). In an embodiment in which the electronic device 1000 adopts an eNB (Evolved Node B, enhanced base station) 101 or a RAN (Radio Access Network, radio access network) controller 102, the processor 1004 may be configured to execute various conforming embodiments , For example, one or more of the multiple embodiments shown in FIGS. 2-8.
  • eNB evolved Node B, enhanced base station
  • RAN Radio Access Network, radio access network
  • system control logic 1008 may include any suitable interface controller to provide any suitable interface to at least one of the processors 1004 and/or any suitable device or component in communication with the system control logic 1008.
  • system control logic 1008 may include one or more memory controllers to provide an interface to the system memory 1012.
  • the system memory 1012 can be used to load and store data and/or instructions.
  • the memory 1012 of the electronic device 1000 may include any suitable volatile memory, such as a suitable dynamic random access memory (DRAM).
  • DRAM dynamic random access memory
  • the NVM/memory 1016 may include one or more tangible, non-transitory computer-readable media for storing data and/or instructions.
  • the NVM/memory 1016 may include any suitable non-volatile memory such as flash memory and/or any suitable non-volatile storage device, such as HDD (Hard Disk Drive, hard disk drive), CD (Compact Disc) , At least one of an optical disc drive and a DVD (Digital Versatile Disc, Digital Versatile Disc) drive.
  • the NVM/memory 1016 may include a part of the storage resources on the device where the electronic device 1000 is installed, or it may be accessed by the device, but not necessarily a part of the device.
  • the NVM/storage 1016 can be accessed through the network via the network interface 1020.
  • system memory 1012 and the NVM/memory 1016 may respectively include: a temporary copy and a permanent copy of the instruction 1024.
  • the instruction 1024 may include an instruction that, when executed by at least one of the processors 1004, causes the electronic device 1000 to implement the method shown in FIGS. 3-4.
  • the instructions 1024, hardware, firmware, and/or software components thereof may additionally/alternatively be placed in the system control logic 1008, the network interface 1020, and/or the processor 1004.
  • the network interface 1020 may include a transceiver for providing a radio interface for the electronic device 1000, and then communicate with any other suitable device (such as a front-end module, an antenna, etc.) through one or more networks.
  • the network interface 1020 may be integrated with other components of the electronic device 1000.
  • the network interface 1020 may be integrated with at least one of the processor 1004, the system memory 1012, the NVM/storage 1016, and the firmware device with instructions (not shown), when at least one of the processor 1004 executes the When instructed, the electronic device 1000 implements the method process shown in Figs. 2-8.
  • the network interface 1020 may further include any suitable hardware and/or firmware to provide a multiple input multiple output radio interface.
  • the network interface 1020 may be a network adapter, a wireless network adapter, a telephone modem and/or a wireless modem.
  • At least one of the processors 1004 may be packaged with the logic of one or more controllers for the system control logic 1008 to form a system in package (SiP). In one embodiment, at least one of the processors 1004 may be integrated on the same die with the logic of one or more controllers used for the system control logic 1008 to form a system on chip (SoC).
  • SiP system in package
  • SoC system on chip
  • the electronic device 1000 may further include: an input/output (I/O) device 1032.
  • the I/O device 1032 may include a user interface to enable the user to interact with the electronic device 1000; the design of the peripheral component interface enables the peripheral components to also interact with the electronic device 1000.
  • the electronic device 1000 further includes a sensor for determining at least one of environmental conditions and location information related to the electronic device 1000.
  • the user interface may include, but is not limited to, a display (e.g., liquid crystal display, touch screen display, etc.), speakers, microphones, one or more cameras (e.g., still image cameras and/or video cameras), flashlights (e.g., LED flash) and keyboard.
  • a display e.g., liquid crystal display, touch screen display, etc.
  • speakers e.g., speakers, microphones, one or more cameras (e.g., still image cameras and/or video cameras), flashlights (e.g., LED flash) and keyboard.
  • the peripheral component interface may include, but is not limited to, a non-volatile memory port, an audio jack, and a power interface.
  • the senor may include, but is not limited to, a gyroscope sensor, an accelerometer, a proximity sensor, an ambient light sensor, and a positioning unit.
  • the positioning unit may also be part of or interact with the network interface 1020 to communicate with components of the positioning network (eg, global positioning system (GPS) satellites).
  • GPS global positioning system
  • FIG. 11 shows another electronic device 1100 according to an embodiment of the present application.
  • the electronic device 1100 may be any one of a client, a smart home device, and a server in the aforementioned Internet of Things system 100.
  • the electronic device 1100 includes at least one processor 1110, a memory 1120, and a transceiver 1130.
  • the processor 1110 is coupled with the memory 1120 and the transceiver 1130.
  • the coupling in the embodiment of the present application is a direct or indirect coupling or a communication connection between devices, units, or modules, and may be in electrical, mechanical, or other forms. Information exchange between devices, units or modules.
  • the embodiment of the present application does not limit the connection medium between the foregoing transceiver 1130, the processor 1110, and the memory 1120.
  • the memory 1120, the processor 1110, and the transceiver 1130 may be connected by a bus, and the bus may be divided into an address bus, a data bus, a control bus, and the like.
  • the memory 1120 may be used to store program instructions.
  • the transceiver 1130 can be used to receive or transmit data.
  • the processor 1110 may be used to call program instructions stored in the memory 1120, so that the electronic device 1100 executes operations performed by any one of the client, smart home device, and server in FIGS. 2-8.
  • the processor 1110 may be a general-purpose processor, a digital signal processor, an application specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component.
  • the general-purpose processor may be a microprocessor or any conventional processor or the like.
  • the operations combined with the methods disclosed in the embodiments of the present application may be directly embodied as being executed and completed by a hardware processor, or executed and completed by a combination of hardware and software modules in the processor.
  • the memory 1120 may be a non-volatile memory or a volatile memory.
  • the memory is any other medium that can be used to carry or store desired program codes in the form of instructions or data structures and that can be accessed by a computer, but is not limited to this.
  • the memory in the embodiments of the present application may also be a circuit or any other device capable of realizing a storage function for storing program instructions and/or data.
  • the various embodiments of the mechanism disclosed in this application may be implemented in hardware, software, firmware, or a combination of these implementation methods.
  • the embodiments of the present application can be implemented as a computer program or program code executed on a programmable system.
  • the programmable system includes at least one processor and a storage system (including volatile and non-volatile memory and/or storage elements) , At least one input device and at least one output device.
  • Program codes can be applied to input instructions to perform the functions described in this application and generate output information.
  • the output information can be applied to one or more output devices in a known manner.
  • a processing system includes any system having a processor such as, for example, a digital signal processor (DSP), a microcontroller, an application specific integrated circuit (ASIC), or a microprocessor.
  • DSP digital signal processor
  • ASIC application specific integrated circuit
  • the program code can be implemented in a high-level programming language or an object-oriented programming language to communicate with the processing system.
  • assembly language or machine language can also be used to implement the program code.
  • the mechanism described in this application is not limited to the scope of any particular programming language. In either case, the language can be a compiled language or an interpreted language.
  • the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof.
  • the disclosed embodiments can also be implemented as instructions carried by or stored on one or more transient or non-transitory machine-readable (eg, computer-readable) storage media, which can be executed by one or more processors Read and execute.
  • the instructions can be distributed through a network or through other computer-readable media.
  • a machine-readable medium may include any mechanism for storing or transmitting information in a form readable by a machine (for example, a computer), including, but not limited to, floppy disks, optical disks, optical disks, read-only memories (CD-ROMs), magnetic Optical disk, read only memory (ROM), random access memory (RAM), erasable programmable read only memory (EPROM), electrically erasable programmable read only memory (EEPROM), magnetic or optical card, flash memory, or A tangible machine-readable memory used to transmit information (for example, carrier waves, infrared signals, digital signals, etc.) using the Internet with electric, optical, acoustic, or other forms of propagating signals. Therefore, a machine-readable medium includes any type of machine-readable medium suitable for storing or transmitting electronic instructions or information in a form readable by a machine (e.g., a computer).
  • each unit/module mentioned in each device embodiment of this application is a logical unit/module.
  • a logical unit/module can be a physical unit/module or a physical unit/ A part of the module can also be realized by a combination of multiple physical units/modules.
  • the physical realization of these logical units/modules is not the most important.
  • the combination of the functions implemented by these logical units/modules is the solution to this application.
  • the above-mentioned device embodiments of this application do not introduce units/modules that are not closely related to solving the technical problems proposed by this application. This does not mean that the above-mentioned device embodiments do not exist. Other units/modules.

Abstract

A control method for smart home devices (103-1, ..., 103-n) and a medium and a terminal thereof, which relate to the field of the Internet of Things. The method comprises: a first client (101-1) uses a first key to encrypt a control instruction for controlling the smart home devices (103-1, ..., 103-n), generates control instruction ciphertext, and generates first ciphertext check information on the basis of a service protection code, and the first client (101-1) sends the generated control instruction ciphertext and first ciphertext check information; the control method uses the key of a symmetric algorithm to encrypt the control instruction for controlling the smart home devices (103-1, ..., 103-n), and at the same time, uses the service protection code identifying a legal identity of a user to ensure the security of instruction transmission. Compared to asymmetric encryption algorithms, the volume of calculation for encryption and decryption is small, which is suitable for smart home devices where a public key and a private key required by asymmetric encryption algorithms cannot be deployed due to hardware limitations.

Description

用于智能家居设备的控制方法及其介质和终端Control method, medium and terminal for smart home equipment
本申请要求2019年12月16日递交的申请号为CN201911293948.X、发明名称为“用于智能家居设备的控制方法及其介质和终端”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed on December 16, 2019 with the application number CN201911293948.X and the title of the invention "control method for smart home equipment and its medium and terminal", the entire content of which is incorporated by reference In this application.
技术领域Technical field
本申请涉及物联网领域,特别涉及一种用于智能家居设备的控制方法及其介质和终端。This application relates to the field of the Internet of Things, and in particular to a control method for smart home equipment, its medium, and a terminal.
背景技术Background technique
随着物联网时代的到来,用户可以随时随地远程控制自家的智能家居设备。为保证用户通过客户端发出的控制指令的机密性、完整性和合法性,要求控制指令在信道中以密文形式传输,且具备防篡改功能。同时,智能家居设备接收到控制指令时,需要对发送方的身份进行认证,以保证指令发送方的合法身份。由于一些智能家居设备硬件能力不足,无法部署证书或者公钥机制。因此,这类智能家居设备无法有效地认证指令发送方的身份。With the advent of the Internet of Things era, users can remotely control their smart home devices anytime, anywhere. In order to ensure the confidentiality, integrity and legitimacy of the control commands sent by the user through the client, the control commands are required to be transmitted in the form of ciphertext in the channel and have the function of tamper-proof. At the same time, when the smart home device receives the control instruction, it needs to authenticate the identity of the sender to ensure the legal identity of the instruction sender. Due to insufficient hardware capabilities of some smart home devices, certificates or public key mechanisms cannot be deployed. Therefore, such smart home devices cannot effectively authenticate the identity of the command sender.
发明内容Summary of the invention
本申请实施例提供了一种用于智能家居设备的控制方法及其介质和终端,采用对称算法的密钥对控制智能家居设备的控制指令进行加密,同时利用标识用户合法身份的业务保护码确保指令传输的安全性,相较于非对称加密算法,加密解密的计算量小,适用于由于硬件限制而无法部署非对称加密算法所需的公钥和私钥的智能家居设备。The embodiment of the application provides a control method for smart home equipment and its medium and terminal. The key of a symmetric algorithm is used to encrypt the control instructions for controlling the smart home equipment, and at the same time, the business protection code that identifies the legal identity of the user is used to ensure Compared with the asymmetric encryption algorithm, the security of command transmission is less computationally intensive. It is suitable for smart home devices that cannot deploy the public and private keys required by the asymmetric encryption algorithm due to hardware limitations.
第一方面,本申请实施例提供了一种用于智能家居设备的控制方法,包括:In the first aspect, an embodiment of the present application provides a control method for smart home equipment, including:
第一客户端采用第一密钥对用于控制智能家居设备的控制指令进行加密,生成控制指令密文,并基于业务保护码生成第一密文校验信息,其中,所述控制指令密文能够被所述智能家居设备采用自身存储的所述第一密钥解密,所述第一密文校验信息能够被所述智能家居设备用于校验所述智能家居设备接收到的控制指令密文是否与所述第一客户端生成的控制指令密文相同;第一客户端发送生成的所述控制指令密文和第一密文校验信息。即客户端加密控制指令的密钥和智能家居设备解密控制指令密文的密钥相同。The first client uses the first key to encrypt the control instruction for controlling the smart home device, generates the control instruction ciphertext, and generates the first ciphertext verification information based on the service protection code, wherein the control instruction ciphertext It can be decrypted by the smart home device using the first key stored by itself, and the first cipher text verification information can be used by the smart home device to verify the control command password received by the smart home device. Whether the text is the same as the control instruction ciphertext generated by the first client; the first client sends the generated control instruction ciphertext and the first ciphertext check information. That is, the key of the client to encrypt the control command is the same as the key of the smart home device to decrypt the ciphertext of the control command.
在上述第一方面的一种可能的实现中,所述发送生成的所述控制指令密文和第一密文校验信息包括:In a possible implementation of the foregoing first aspect, the control instruction ciphertext and the first ciphertext check information generated by sending include:
所述第一客户端向服务器发送指令转发请求,其中,所述指令转发请求包括智能家居设备的设备ID、所述控制指令密文和所述第一密文校验信息,并且所述指令转发请求用于 请求所述服务器向所述设备ID标识的智能家居设备转发所述控制指令密文和所述第一密文校验信息。即服务器透明传输控制指令密文和第一密文校验信息,不对控制指令密文做任何修改。从而有效避免服务器被攻击后,控制指令被篡改的问题。The first client sends an instruction forwarding request to the server, where the instruction forwarding request includes the device ID of the smart home device, the control instruction ciphertext, and the first ciphertext verification information, and the instruction forwarding The request is used to request the server to forward the control instruction ciphertext and the first ciphertext verification information to the smart home device identified by the device ID. That is, the server transparently transmits the control command ciphertext and the first ciphertext verification information, and does not make any modification to the control command ciphertext. This effectively avoids the problem of tampering with control instructions after the server is attacked.
在上述第一方面的一种可能的实现中,所述发送生成的所述控制指令密文和第一密文校验信息包括:In a possible implementation of the foregoing first aspect, the control instruction ciphertext and the first ciphertext check information generated by sending include:
所述第一客户端向所述智能家居设备发送所述控制指令密文和第一密文校验信息。即客户端可以直接向智能家居设备发送控制指令密文和第一密文校验信息,不通过服务器转发。The first client sends the control instruction ciphertext and the first ciphertext verification information to the smart home device. That is, the client can directly send the control instruction ciphertext and the first ciphertext verification information to the smart home device without forwarding through the server.
在上述第一方面的一种可能的实现中,所述方法还包括:In a possible implementation of the foregoing first aspect, the method further includes:
第一客户端向服务器发送业务保护码设置请求;第一客户端从所述服务器接收初始业务保护码,其中,所述初始业务保护码是所述服务器响应于所述业务保护码设置请求发送的;第一客户端提示用户修改所述初始业务保护码以得到第一业务保护码;第一客户端存储所述第一业务保护码,并提示用户记录所述第一业务保护码。例如,服务器可以生成一串随机码做为初始业务保护码,客户端接收到后,用户对初始业务保护码进行修改,将修改后的作为业务保护码使用。The first client sends a service protection code setting request to the server; the first client receives an initial service protection code from the server, where the initial service protection code is sent by the server in response to the service protection code setting request The first client prompts the user to modify the initial service protection code to obtain the first service protection code; the first client stores the first service protection code, and prompts the user to record the first service protection code. For example, the server may generate a string of random codes as the initial service protection code. After the client receives it, the user modifies the initial service protection code and uses the modified as the service protection code.
在上述第一方面的一种可能的实现中,所述方法还包括:In a possible implementation of the foregoing first aspect, the method further includes:
第一客户端请求用户输入第二业务保护码以更新所述第一业务保护码,其中,所述第一业务保护码与所述第二业务保护码不同;第一客户端向所述服务器发送业务保护码更新请求,其中,所述业务保护码更新请求用于请求所述服务器向第二客户端发送业务保护码更新通知,其中,业务保护码更新通知用于通知所述第二客户端从用户获取所述第二业务保护码,以更新所述第二客户端上的第一业务保护码,所述第一客户端和第二客户端登录所述服务器所用的账号相同。The first client requests the user to input a second service protection code to update the first service protection code, where the first service protection code is different from the second service protection code; the first client sends to the server A service protection code update request, where the service protection code update request is used to request the server to send a service protection code update notification to the second client, and the service protection code update notification is used to notify the second client from The user obtains the second service protection code to update the first service protection code on the second client, and the first client and the second client use the same account to log in to the server.
在上述第一方面的一种可能的实现中,所述方法还包括:In a possible implementation of the foregoing first aspect, the method further includes:
所述第一客户端生成随机码,并基于所述随机码生成用于更新所述第一密钥的第二密钥,其中,所述第一密钥与所述第二密钥不同。The first client generates a random code, and generates a second key for updating the first key based on the random code, wherein the first key is different from the second key.
在上述第一方面的一种可能的实现中,所述采基于所述随机码生成用于更新所述第一密钥的第二密钥包括:In a possible implementation of the foregoing first aspect, the generating a second key for updating the first key based on the random code includes:
采用所述第一密钥对所述随机码和业务保护码进行加密,生成所述第二密钥。Encrypting the random code and the service protection code by using the first key to generate the second key.
在上述第一方面的一种可能的实现中,所述方法还包括:In a possible implementation of the foregoing first aspect, the method further includes:
第一客户端基于所述业务保护码和随机码生成第一密钥校验信息,其中,所述第一密钥校验信息能够被所述智能家居设备用于校验接收到的随机码是否与所述第一客户端生成的随机码相同。The first client generates first key verification information based on the service protection code and the random code, where the first key verification information can be used by the smart home device to verify whether the received random code is The same as the random code generated by the first client.
在上述第一方面的一种可能的实现中,所述第一客户端基于所述业务保护码和随机码生成第一密钥校验信息包括:In a possible implementation of the foregoing first aspect, the first client generating first key verification information based on the service protection code and random code includes:
所述第一客户端采用基于密钥的消息认证码算法,以所述业务保护码为输入密钥,对所述随机码进行变换生成所述第一密钥校验信息。The first client uses a key-based message authentication code algorithm, uses the service protection code as an input key, and transforms the random code to generate the first key verification information.
在上述第一方面的一种可能的实现中,所述方法还包括:In a possible implementation of the foregoing first aspect, the method further includes:
所述第一客户端向服务器发送密钥更新请求,其中,所述密钥更新请求包括所述随机 码和所述第一密钥校验信息,并且用于请求所示服务器向所述智能家居设备转发所述随机码和所述第一密钥校验信息。The first client sends a key update request to the server, where the key update request includes the random code and the first key verification information, and is used to request the server to send the key to the smart home The device forwards the random code and the first key verification information.
在上述第一方面的一种可能的实现中,所述基于业务保护码生成第一密文校验信息包括:In a possible implementation of the foregoing first aspect, the generating of the first ciphertext verification information based on the service protection code includes:
所述第一客户端将所述业务保护码作为输入密钥,通过基于密钥的消息认证码算法对所述控制指令密文进行变换,得到所述第一密文校验信息。The first client uses the service protection code as an input key, and transforms the control instruction ciphertext through a key-based message authentication code algorithm to obtain the first ciphertext verification information.
在上述第一方面的一种可能的实现中,所述方法还包括:In a possible implementation of the foregoing first aspect, the method further includes:
所述第一客户端向第二客户端发送由所述业务保护码加密的所述密钥,其中,所述第一客户端和第二客户端通过同一账号登录服务器。The first client sends the key encrypted by the service protection code to the second client, where the first client and the second client log in to the server through the same account.
第二方面,本申请实施里提供了一种用于智能家居设备的控制方法,包括:In the second aspect, the implementation of this application provides a control method for smart home devices, including:
智能家居设备接收控制指令密文和第一密文校验信息;智能家居设备根据自身具有的业务保护码和所述第一密文校验信息,校验接收到的所述控制指令密文是否与客户端生成的控制指令密文相同;智能家居设备在校验出接收到的控制指令密文与客户端生成的控制指令密文相同的情况下,通过自身具有的第一密钥解密所述控制指令密文得到控制指令;所述智能家居设备执行所述控制指令。The smart home device receives the control instruction ciphertext and the first ciphertext verification information; the smart home device checks whether the received control instruction ciphertext is based on its own service protection code and the first ciphertext verification information The ciphertext of the control instruction generated by the client is the same; when the smart home device verifies that the received ciphertext of the control instruction is the same as the ciphertext of the control instruction generated by the client, the smart home device uses its own first key to decrypt the The control instruction ciphertext obtains the control instruction; the smart home device executes the control instruction.
在上述第二方面的一种可能的实现中,所述智能家居设备根据自身具有的业务保护码和所述第一密文校验信息,校验接收到的所述控制指令密文是否与客户端生成的控制指令密文相同包括:In a possible implementation of the above second aspect, the smart home device verifies whether the received control instruction ciphertext is consistent with the client based on its own service protection code and the first ciphertext verification information. The ciphertext of the control instruction generated by the terminal includes:
所述智能家居设备将所述自身具有的业务保护码作为输入密钥,通过基于密钥的消息认证码算法对接收到的所述控制指令密文进行变换得到第二密文校验信息;所述智能家居设备在确定所述第二密文校验信息与接收到的所述第一密文校验信息相同的情况下,校验出接收到的所述控制指令密文与客户端生成的控制指令密文相同。The smart home device uses its own service protection code as an input key, and transforms the received control instruction ciphertext through a key-based message authentication code algorithm to obtain the second ciphertext verification information; When the smart home device determines that the second ciphertext verification information is the same as the received first ciphertext verification information, it verifies that the received control instruction ciphertext is the same as the one generated by the client The control command ciphertext is the same.
在上述第二方面的一种可能的实现中,所述方法还包括:In a possible implementation of the above second aspect, the method further includes:
智能家居设备接收服务器发送的随机码和第一密钥校验信息;智能家居设备根据所述第一密钥校验信息校验接收到的随机码是否与客户端生成的随机码相同;智能家居设备在校验出接收到的随机码与客户端生成的随机码相同的情况下,基于所述随机码生成第二密钥,以更新所述智能家居设备中的第一密钥。The smart home device receives the random code and the first key verification information sent by the server; the smart home device verifies whether the received random code is the same as the random code generated by the client according to the first key verification information; smart home When the device verifies that the received random code is the same as the random code generated by the client, it generates a second key based on the random code to update the first key in the smart home device.
在上述第二方面的一种可能的实现中,所述智能家居设备根据所述第一密钥校验信息校验接收到的随机码是否与客户端生成的随机码相同包括:In a possible implementation of the above second aspect, the smart home device verifying whether the received random code is the same as the random code generated by the client according to the first key verification information includes:
所述智能家居设备将所述业务保护码作为输入密钥,通过基于密钥的消息认证码算法对接收到的所述随机码进行变换生成第二密钥校验信息;所述智能家居设备确定生成的所述第二密钥校验信息是否与接收到的所述第一密钥校验信息相同;智能家居设备在校验出所述第一密钥校验信息与所述第二密钥校验信息相同的情况下,确定接收到的随机码与客户端生成的随机码相同。The smart home device uses the service protection code as an input key, and transforms the received random code through a key-based message authentication code algorithm to generate second key verification information; the smart home device determines Whether the generated second key verification information is the same as the received first key verification information; the smart home device is verifying the first key verification information and the second key verification information If the verification information is the same, it is determined that the received random code is the same as the random code generated by the client.
在上述第二方面的一种可能的实现中,所述基于所述随机码生成第二密钥包括:In a possible implementation of the foregoing second aspect, the generating a second key based on the random code includes:
所述智能家居设备采用所述第一密钥对所述业务保护码和接收到的所述随机码进行加密,生成所述第二密钥。The smart home device uses the first key to encrypt the service protection code and the received random code to generate the second key.
第三方面,本申请实施里提供了一种用于智能家居设备的控制方法,包括:In the third aspect, the implementation of this application provides a control method for smart home devices, including:
服务器从第一客户端接收指令转发请求,其中,所述指令转发请求包括智能家居设备的设备ID、控制指令密文和第一密文校验信息,其中,所述控制指令密文能够被所述智能家居设备采用自身存储的所述第一密钥解密,所述第一密文校验信息能够被所述智能家居设备用于校验所述智能家居设备接收到的控制指令密文是否与所述第一客户端生成的控制指令密文相同;所述服务器向所述设备ID标识的所述智能家居设备转发所述控制指令密文和第一密文校验信息。The server receives an instruction forwarding request from the first client, where the instruction forwarding request includes the device ID of the smart home device, the control instruction ciphertext, and the first ciphertext verification information, wherein the control instruction ciphertext can be The smart home device uses the first key stored by itself to decrypt, and the first cipher text verification information can be used by the smart home device to verify whether the cipher text of the control instruction received by the smart home device is consistent with The control instruction ciphertext generated by the first client is the same; the server forwards the control instruction ciphertext and the first ciphertext verification information to the smart home device identified by the device ID.
第四方面,本申请实施里提供了一种电子设备,该电子设备具有实现上述用于智能家居设备的控制方法中的第一客户端或者第二客户端的功能。所述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。所述硬件或软件包括一个或多于一个与上述功能相对应的模块。In a fourth aspect, an electronic device is provided in the implementation of this application, and the electronic device has the function of realizing the first client or the second client in the above-mentioned control method for smart home devices. The function can be realized by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above-mentioned functions.
第五方面,本申请实施里提供了一种电子设备,该电子设备具有实现上述用于智能家居设备的控制方法中的服务器的功能。所述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。所述硬件或软件包括一个或多于一个与上述功能相对应的模块。In a fifth aspect, an electronic device is provided in the implementation of the present application, and the electronic device has the function of realizing the server in the above-mentioned control method for smart home devices. The function can be realized by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above-mentioned functions.
第六方面,本申请实施里提供了一种电子设备,该电子设备具有实现上述用于智能家居设备的控制方法中的智能家居设备的功能。所述功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。所述硬件或软件包括一个或多于一个与上述功能相对应的模块。In the sixth aspect, an electronic device is provided in the implementation of the present application, and the electronic device has the function of realizing the smart home device in the above-mentioned control method for smart home device. The function can be realized by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above-mentioned functions.
第七方面,本申请实施里提供了一种计算机可读介质,所述计算机可读介质上存储有指令,该指令在机器上执行时使机器执行上述第一至第三方面中任一方面所述的用于智能家居设备的控制方法。In the seventh aspect, the implementation of the present application provides a computer-readable medium with instructions stored on the computer-readable medium. When the instructions are executed on a machine, the machine executes any of the above-mentioned aspects of the first to third aspects. The described control method for smart home equipment.
第八方面,本申请实施里提供了一种终端,包括:In an eighth aspect, a terminal is provided in the implementation of this application, including:
一个或多个处理器;以及One or more processors; and
存储器,用于存储指令;当所述指令被所述一个或多个处理器执行时,使得所述终端执行上述第一至第三方面中任一方面所述的用于智能家居设备的控制方法。The memory is used to store instructions; when the instructions are executed by the one or more processors, the terminal is made to execute the control method for smart home devices described in any one of the first to third aspects above .
附图说明Description of the drawings
图1根据本申请的一些实施例,示出了物联网系统100的结构示意图。Fig. 1 shows a schematic structural diagram of an Internet of Things system 100 according to some embodiments of the present application.
图2根据本申请的一些实施例,示出了客户端激活智能家居设备的一种流程示意图。Fig. 2 shows a schematic diagram of a process of activating a smart home device by a client according to some embodiments of the present application.
图3根据本申请的一些实施例,示出了客户端通过服务器向智能家居设备发送控制指令的流程示意图。Fig. 3 shows a schematic flowchart of a client sending a control instruction to a smart home device through a server according to some embodiments of the present application.
图4根据本申请的一些实施例,示出了客户端直接向智能家居设备发送控制指令的流程示意图。Fig. 4 shows a schematic flow chart of a client directly sending a control instruction to a smart home device according to some embodiments of the present application.
图5根据本申请的一些实施例,示出了一客户端从另一客户端获取加密控制指令所需的密钥的流程示意图。Fig. 5 shows a schematic flow chart of a client obtaining a key required for an encryption control instruction from another client according to some embodiments of the present application.
图6根据本申请的一些实施例,示出了一种设置业务保护码的流程示意图。Fig. 6 shows a schematic flow chart of setting a service protection code according to some embodiments of the present application.
图7根据一些实施例,示出了一种更新业务保护码的流程示意图。Fig. 7 shows a schematic flow chart of updating a service protection code according to some embodiments.
图8根据一些实施例,示出了一种更新密钥的流程示意图。Fig. 8 shows a schematic flow chart of updating a key according to some embodiments.
图9根据本申请的一些实施例,示出了一种电子设备的结构示意图。Fig. 9 shows a schematic structural diagram of an electronic device according to some embodiments of the present application.
图10根据本申请的一些实施例,示出了一种电子设备的结构示意图。Fig. 10 shows a schematic structural diagram of an electronic device according to some embodiments of the present application.
图11根据本申请的一些实施例,示出了一种电子设备的结构示意图。Fig. 11 shows a schematic structural diagram of an electronic device according to some embodiments of the present application.
具体实施例Specific embodiment
本申请的说明性实施例包括但不限于基于区块链的IP地址前缀认证方法和设备。Illustrative embodiments of the present application include, but are not limited to, a blockchain-based IP address prefix authentication method and device.
可以理解,如本文所使用的,术语“模块””可以指代或者包括专用集成电路(ASIC)、电子电路、执行一个或多个软件或固件程序的处理器(共享、专用、或群组)和/或存储器、组合逻辑电路、和/或提供所描述的功能的其他适当硬件组件,或者可以作为这些硬件组件的一部分。It is understood that, as used herein, the term "module" can refer to or include an application specific integrated circuit (ASIC), an electronic circuit, a processor (shared, dedicated, or group) that executes one or more software or firmware programs And/or memory, combinational logic circuit, and/or other suitable hardware components that provide the described functions, or may be part of these hardware components.
下面将结合附图对本申请的实施例作进一步地详细描述。The embodiments of the present application will be described in further detail below in conjunction with the accompanying drawings.
根据本申请的一些实施例公开了一种物联网系统100。图1示出了该系统100的结构示意图。According to some embodiments of the present application, an IoT system 100 is disclosed. FIG. 1 shows a schematic diagram of the structure of the system 100.
具体地,如图1所示,该物联网系统100包括客户端101-1至客户端101-n、服务器102、智能家居设备103-1至103-n。其中,客户端101-1至客户端101-n中的至少一个能够利用密钥加密控制智能家居设备103-1至103-n中的至少一个的控制指令,并利用业务保护码生成控制指令密文的密文校验信息,然后通过服务器102向智能家居设备103-1至103-n中的至少一个发送控制指令密文和密文校验信息,或者直接向智能家居设备103-1至103-n中的至少一个发送控制指令密文。可以理解,客户端101-1至客户端101-n可以是任何用户用于发送控制指令密文等的终端设备,例如,可以包括但不限于,膝上型计算机、台式计算机、平板计算机、移动电话、可穿戴设备、头戴式显示器、移动电子邮件设备、便携式游戏机、便携式音乐播放器、阅读器设备、其中嵌入或耦接有一个或多个处理器的电视机、或能够访问网络的其他电子设备。Specifically, as shown in FIG. 1, the Internet of Things system 100 includes clients 101-1 to 101-n, a server 102, and smart home devices 103-1 to 103-n. Wherein, at least one of the client 101-1 to the client 101-n can use the key to encrypt the control command of at least one of the smart home devices 103-1 to 103-n, and use the service protection code to generate the control command secret. The cipher text verification information of the text, and then the server 102 sends the control command cipher text and the cipher text verification information to at least one of the smart home devices 103-1 to 103-n, or directly to the smart home devices 103-1 to 103 At least one of -n sends the control command ciphertext. It can be understood that the client 101-1 to the client 101-n may be any terminal device used by the user to send the cipher text of the control instruction, etc., for example, may include, but not limited to, a laptop computer, a desktop computer, a tablet computer, and a mobile phone. Telephones, wearable devices, head-mounted displays, mobile email devices, portable game consoles, portable music players, reader devices, televisions with one or more processors embedded or coupled to them, or capable of accessing the Internet Other electronic equipment.
服务器102可以用于接收客户端101-1至客户端101-n的指令转发请求,将客户端101-1至客户端101-n生成的控制指令密文和密文校验信息转发给智能家居设备103-1至103-n。服务器102可以是各种类型的服务器,如云服务器,在此不做限制。The server 102 can be used to receive the command forwarding request from the client 101-1 to the client 101-n, and forward the control command ciphertext and ciphertext verification information generated by the client 101-1 to the client 101-n to the smart home Devices 103-1 to 103-n. The server 102 may be various types of servers, such as a cloud server, which is not limited here.
智能家居设备103-1至103-n中的至少一个可以用于接收客户端101-1至客户端101-n中的至少一个生成的控制指令密文和密文校验信息,并基于自身具有的业务保护码和接收到的密文校验信息校验接收到的指令密文,还可以在对控制指令密文校验通过后采用自身具有的密钥将控制指令密文解密,并执行解密出来的控制指令。可以理解,智能家居设备103-1至103-n可以是任何能够接收控制指令密文和密文校验信息,并执行控制指令的家居设备,例如,可以包括但是不限于,智能电视、智能音箱、智能插座、智能门锁、智能体重(脂)称、智能灯泡、智能风扇、智能空调、智能台灯、智能扫地机器人等各种智能的家居电器设备。At least one of the smart home devices 103-1 to 103-n can be used to receive the control instruction ciphertext and ciphertext verification information generated by at least one of the client 101-1 to the client 101-n, and based on its own The service protection code and the received ciphertext verification information verify the received instruction ciphertext, and the control instruction ciphertext can be decrypted with its own key after the control instruction ciphertext verification is passed, and the decryption is performed Control instructions coming out. It can be understood that the smart home devices 103-1 to 103-n can be any home devices that can receive control command ciphertext and ciphertext verification information, and execute control commands, for example, can include, but are not limited to, smart TVs, smart speakers , Smart sockets, smart door locks, smart weight (fat) scales, smart bulbs, smart fans, smart air conditioners, smart desk lamps, smart sweeping robots and other smart home appliances.
下面的描述中以客户端101-1、客户端101-2、智能家居设备103-1为例,说明在物联网系统100中实现对智能家居设备的控制技术的过程。In the following description, the client 101-1, the client 101-2, and the smart home device 103-1 are taken as examples to illustrate the process of implementing the control technology of the smart home device in the Internet of Things system 100.
在客户端101-1初次使用智能家居设备103-1时,需要激活智能家居设备103-1。图2根据一些实施例示出了客户端101-1激活智能家居设备103-1的一种流程示意图。具体地, 如图2所示,客户端101-1激活智能家居设备103-1的过程包括:When the client 101-1 uses the smart home device 103-1 for the first time, the smart home device 103-1 needs to be activated. Fig. 2 shows a schematic diagram of a process for the client 101-1 to activate the smart home device 103-1 according to some embodiments. Specifically, as shown in FIG. 2, the process of the client 101-1 activating the smart home device 103-1 includes:
202:客户端101-1通过账号登录服务器102,并与服务器102建立连接。202: The client 101-1 logs in to the server 102 through an account, and establishes a connection with the server 102.
可以理解,客户端101-1可以通过HTTP(超文本传输协议)与服务器102建立安全的通信连接。It can be understood that the client 101-1 can establish a secure communication connection with the server 102 via HTTP (Hypertext Transfer Protocol).
204:用户首次启动智能家居设备103-1,智能家居设备103-1可以通过蓝牙、NFC(Near Field Communication,近场通信)等无线通信技术对外发布SSID(Service Set Identifier,服务集标识)。其中SSID用于标识智能家居设备103-1。204: The user starts the smart home device 103-1 for the first time, and the smart home device 103-1 can issue an SSID (Service Set Identifier) to the outside through wireless communication technologies such as Bluetooth and NFC (Near Field Communication). The SSID is used to identify the smart home device 103-1.
206:客户端101-1在进行扫描时发现智能家居设备103-1的SSID。206: The client 101-1 finds the SSID of the smart home device 103-1 when scanning.
208:客户端101-1在扫描到智能家居设备103-1的SSID后,向服务器10发送激活请求以获取激活码。其中,激活请求中包括智能家居设备103-1的SSID。208: After scanning the SSID of the smart home device 103-1, the client 101-1 sends an activation request to the server 10 to obtain the activation code. Wherein, the activation request includes the SSID of the smart home device 103-1.
210:服务器102接收到激活码获取请求后,根据激活请求中的SSID确定智能家居设备103-1是否为合法厂商生产的智能家居设备。210: After receiving the activation code acquisition request, the server 102 determines whether the smart home device 103-1 is a smart home device produced by a legal manufacturer according to the SSID in the activation request.
212:服务器102在校验智能家居设备103-1是合法厂商生产的后,返回激活码。在一些实施例中,激活码能够被智能家居设备103-1用于连接服务器。212: The server 102 returns an activation code after verifying that the smart home device 103-1 is produced by a legal manufacturer. In some embodiments, the activation code can be used by the smart home device 103-1 to connect to the server.
214:客户端101-1接收到激活码后,采用激活码激活智能家居设备103-1,并为智能家居设备103-1配置基本信息。例如,为智能家居设备103-1配置基本信息可以是向智能家居设备103-1发送无线网络的SSID和密码,以使得智能家居设备103-1能够登录无线网络。214: After the client 101-1 receives the activation code, it uses the activation code to activate the smart home device 103-1, and configures basic information for the smart home device 103-1. For example, configuring basic information for the smart home device 103-1 may be to send the SSID and password of the wireless network to the smart home device 103-1, so that the smart home device 103-1 can log in to the wireless network.
216:客户端101-1激活智能家居设备103-1后,生成用于智能家居设备103-1的密钥S0,并通过服务器102设置业务保护码T0。216: After the client 101-1 activates the smart home device 103-1, it generates a key S0 for the smart home device 103-1, and sets the service protection code T0 through the server 102.
可以理解,客户端101-1可以随机生成密钥,用于加密控制指令,并且,该密钥可以是利用分组加密算法加密控制指令的密钥,以便智能家居设备侧能够通过同样的密钥来解密控制指令密文。其中,分组加密算法包括但不限于,AES(Advanced Encryption Standard,高级加密标准)算法、SM4算法、SIMON算法、SPECK码算法等。It can be understood that the client 101-1 can randomly generate a key for encrypting the control command, and the key can be a key for encrypting the control command using a block encryption algorithm, so that the smart home device side can use the same key to Decrypt the cipher text of the control instruction. Among them, the block encryption algorithm includes, but is not limited to, AES (Advanced Encryption Standard, Advanced Encryption Standard) algorithm, SM4 algorithm, SIMON algorithm, SPECK code algorithm, etc.
此外,可以理解,业务保护码用于标识发出指令的用户的合法性,即登录服务器的同一账号下的客户端和智能家居设备具有相同的业务保护码。例如,某一用户具有多个客户端,或者用户的家人使用其他客户端,这些客户端可以采用同一账号登录服务器102,实现对智能家居设备103-1的控制。业务保护码可以是服务器102针对同一账号发送的随机串码,也可以是用户设置的字符串。关于业务保护码的设置和更新可以参考图7和图8。In addition, it can be understood that the service protection code is used to identify the legitimacy of the user issuing the instruction, that is, the client and the smart home device under the same account that log in to the server have the same service protection code. For example, if a user has multiple clients, or the user's family members use other clients, these clients can use the same account to log in to the server 102 to control the smart home device 103-1. The service protection code may be a random string code sent by the server 102 for the same account, or a string set by the user. Refer to Figure 7 and Figure 8 for the setting and updating of the service protection code.
相较于非对称加密算法中的公钥和私钥设置,对称加密算法中的分组加密密钥对设备的计算能力要求低很多,因此,本申请的技术方案适用于由于硬件限制而无法部署非对称加密算法所需的公钥和私钥的智能家居设备。此外,通过业务保护码T标识用户的合法身份,能够有效校验被加密的控制指令在传输过程中是否被篡改,从而保证加密的控制指令的安全性。Compared with the public key and private key settings in the asymmetric encryption algorithm, the block encryption key in the symmetric encryption algorithm has much lower requirements on the computing power of the device. Therefore, the technical solution of this application is suitable for non-deployment due to hardware limitations. The symmetric encryption algorithm requires public and private keys for smart home devices. In addition, the legal identity of the user is identified by the service protection code T, which can effectively check whether the encrypted control command has been tampered with during the transmission process, thereby ensuring the security of the encrypted control command.
218:客户端101-1生成密钥S0和业务保护码T0之后,与智能家居设备103-1建立连接。例如,客户端101-1可以通过CoAP协议与智能家居设备103-1建立安全的通信连接。218: After the client 101-1 generates the key S0 and the service protection code T0, it establishes a connection with the smart home device 103-1. For example, the client 101-1 may establish a secure communication connection with the smart home device 103-1 through the CoAP protocol.
220:客户端101-1向智能家居设备103-1发送生成的密钥S0和业务保护码T0。220: The client 101-1 sends the generated key S0 and the service protection code T0 to the smart home device 103-1.
222:智能家居设备103-1加密存储密码S0和业务保护码T0。222: The smart home device 103-1 encrypts and stores the password S0 and the business protection code T0.
在客户端101-1完成对智能家居设备103-1的激活后,可以通过发送控制指令来控制智能家居设备,控制指令可以通过服务器120转发给智能家居设备103-1,也可以直接发送给智能家居设备103-1。图3根据一些实施例,示出了客户端101-1通过服务器120向智能家居设备103-1发送控制指令的流程示意图。After the client 101-1 completes the activation of the smart home device 103-1, the smart home device can be controlled by sending a control instruction. The control instruction can be forwarded to the smart home device 103-1 through the server 120, or directly sent to the smart home device 103-1. Household equipment 103-1. Fig. 3 shows a schematic flow chart of the client 101-1 sending a control instruction to the smart home device 103-1 through the server 120 according to some embodiments.
如图3所示,客户端101-1通过服务器120向智能家居设备103-1发送控制指令的过程如下:As shown in FIG. 3, the process of the client 101-1 sending a control instruction to the smart home device 103-1 through the server 120 is as follows:
302:客户端101-1登录服务器102,并与服务器建立连接。例如,可以通过Wi-Fi、蓝牙、NFC等技术建立通信连接。302: The client 101-1 logs in to the server 102 and establishes a connection with the server. For example, a communication connection can be established through technologies such as Wi-Fi, Bluetooth, and NFC.
304:客户端101-1生成控制指令P,并通过密钥S加密控制指令P生成控制指令密文C,并利用业务保护码T生成密文校验信息Vc1。其中,密钥S可以是密钥S0,也可以是更新后的其他密钥。304: The client 101-1 generates a control instruction P, encrypts the control instruction P with a key S, generates a control instruction ciphertext C, and uses the service protection code T to generate ciphertext verification information Vc1. Among them, the key S can be the key S0, or other keys after updating.
例如,在一些实施例中,可以通过分组加密算法AES,采用密钥S对控制指令加密生成控制指令密文C。然后,以业务保护码T作为HMAC(Hash-based Message Authentication Code,哈希消息认证码)算法的输入密钥,对控制指令密文进行变换生成MAC(Message Authentication Code,消息认证码)值,该MAC值即为密文校验信息Vc1。For example, in some embodiments, the block encryption algorithm AES may be used to encrypt the control instruction with the key S to generate the control instruction ciphertext C. Then, the service protection code T is used as the input key of the HMAC (Hash-based Message Authentication Code) algorithm to transform the control command ciphertext to generate a MAC (Message Authentication Code) value. The MAC value is the cipher text verification information Vc1.
此外,在一些实施例中,以密钥S作为HMAC算法的输入密钥,对业务保护码进行变换生成MAC值,该MAC值即为密文校验信息Vc1。In addition, in some embodiments, the key S is used as the input key of the HMAC algorithm, and the service protection code is transformed to generate a MAC value, which is the ciphertext verification information Vc1.
此外,可以理解,也可以采用其他基于密钥的消息认证码算法生成控制指令密文C的密文校验信息Vc1,在此不做限制,例如采用CBC MAC算法(一种基于对称密码实现的消息认证码算法)生成密文校验信息Vc1。In addition, it can be understood that other key-based message authentication code algorithms can also be used to generate the cipher text verification information Vc1 of the control command cipher text C, which is not limited here, for example, the CBC MAC algorithm (a kind of implementation based on symmetric cryptography) Message authentication code algorithm) generates cipher text verification information Vc1.
306:客户端101-1向服务器102发送控制转发请求。其中,控制转发请求包括标识智能家居设备103-1的设备ID、客户端101-1生成的控制指令密文C和密文校验信息Vc1。其中,在一些实施例中,设备ID可以是服务器102生成的与智能家居设备103的UUID绑定的逻辑ID,用于标识智能家居设备103-1。306: The client 101-1 sends a control forwarding request to the server 102. Wherein, the control forwarding request includes the device ID that identifies the smart home device 103-1, the control instruction ciphertext C generated by the client 101-1, and the ciphertext verification information Vc1. Among them, in some embodiments, the device ID may be a logical ID generated by the server 102 and bound to the UUID of the smart home device 103, and used to identify the smart home device 103-1.
308:服务器102接收到控制转发请求后,根据其中的设备ID识别出控制转发请求中所请求的目标设备为智能家居设备103-1。308: After receiving the control forwarding request, the server 102 recognizes according to the device ID therein that the target device requested in the control forwarding request is the smart home device 103-1.
310:服务器102识别出智能家居设备103-1后,与智能家居设备103-1建立连接,并向智能家居设备103-1转发控制转发请求中的控制指令密文C和密文校验信息Vc1。310: After the server 102 recognizes the smart home device 103-1, it establishes a connection with the smart home device 103-1, and forwards the control instruction cipher text C and the cipher text verification information Vc1 in the control forwarding request to the smart home device 103-1 .
312:智能家居设备103-1从服务器102接收控制指令密文C和密文校验信息Vc1,并在接收到控制指令密文C和密文校验信息Vc1后,利用自身存储的业务保护码T和密文校验信息Vc1,采用客户端101-1生成密文校验信息Vc1相同的消息码验证算法,校验接收到的控制指令密文C是否与客户端101-1生成的控制指令密文C相同。312: The smart home device 103-1 receives the control command cipher text C and the cipher text verification information Vc1 from the server 102, and after receiving the control command cipher text C and the cipher text verification information Vc1, it uses its own stored service protection code T and the cipher text verification information Vc1, using the same message code verification algorithm as the client 101-1 to generate the cipher text verification information Vc1, verify whether the received control command cipher text C is the same as the control command generated by the client 101-1 The ciphertext C is the same.
如果校验出接收到的控制指令密文C与客户端101-1生成的控制指令密文C相同,则进入314;否则,不做任何处理或者向服务器102发送表示错误的消息,服务器102收到后可以向客户端101-1发送控制失败的消息。If it is verified that the received control instruction ciphertext C is the same as the control instruction ciphertext C generated by the client 101-1, then proceed to 314; otherwise, no processing is performed or a message indicating an error is sent to the server 102, and the server 102 receives After that, a control failure message can be sent to the client 101-1.
具体地,在一些实施例中,智能家居设备103-1通过以下方式校验接收到的控制指令密文C是否与客户端101-1生成的控制指令密文C相同:Specifically, in some embodiments, the smart home device 103-1 verifies whether the received control instruction ciphertext C is the same as the control instruction ciphertext C generated by the client 101-1 in the following manner:
如上所述,如果客户端101-1生成密文校验信息Vc1时采用了HMAC算法,则智能 家居设备103-1也采用HMAC算法,以自身存储的业务保护码T为输入密钥,对接收到的控制指令密文C进行变换生成MAC值,从而得到密文校验信息Vc2。客户端101-1将密文校验信息Vc2和从服务器102接收到密文校验信息Vc1进行比对。如果两者相同,则确定从服务器102接收到的控制指令密文C与客户端101-1生成的控制指令密文C相同。如果Vc1和Vc2不相同,则确定从服务器102接收到的控制指令密文C与客户端101-1生成的控制指令密文C不相同,控制指令密文C在传输过程中可能被篡改。As mentioned above, if the client 101-1 adopts the HMAC algorithm when generating the cipher text verification information Vc1, the smart home device 103-1 also adopts the HMAC algorithm, and uses the service protection code T stored in itself as the input key to receive The received control instruction ciphertext C is transformed to generate a MAC value, thereby obtaining the ciphertext verification information Vc2. The client 101-1 compares the cipher text verification information Vc2 with the cipher text verification information Vc1 received from the server 102. If the two are the same, it is determined that the control instruction ciphertext C received from the server 102 is the same as the control instruction ciphertext C generated by the client 101-1. If Vc1 and Vc2 are not the same, it is determined that the control command cipher text C received from the server 102 is different from the control command cipher text C generated by the client 101-1, and the control command cipher text C may be tampered with during transmission.
在另外一些实施例中,智能家居设备103-1通过以下方式校验接收到的控制指令密文C是否与客户端101-1生成的控制指令密文C相同:In some other embodiments, the smart home device 103-1 verifies whether the received control instruction ciphertext C is the same as the control instruction ciphertext C generated by the client 101-1 in the following manner:
如上所述,如果客户端101-1生成密文校验信息Vc1时采用了HMAC算法,则智能家居设备103-1也采用HMAC算法,以密钥S作为输入密钥,对自身存储的业务保护码进行变换生成MAC值,从而得到密文校验信息Vc2。客户端101-1将密文校验信息Vc2和从服务器102接收到密文校验信息Vc1进行比对。如果两者相同,则确定从服务器102接收到的控制指令密文C与客户端101-1生成的控制指令密文C相同。如果Vc1和Vc2不相同,则确定从服务器102接收到的控制指令密文C与客户端101-1生成的控制指令密文C不相同,控制指令密文C在传输过程中可能被篡改。As described above, if the client 101-1 uses the HMAC algorithm when generating the cipher text verification information Vc1, the smart home device 103-1 also uses the HMAC algorithm, and uses the secret key S as the input key to protect the business stored by itself The code is transformed to generate the MAC value, thereby obtaining the cipher text verification information Vc2. The client 101-1 compares the cipher text verification information Vc2 with the cipher text verification information Vc1 received from the server 102. If the two are the same, it is determined that the control instruction ciphertext C received from the server 102 is the same as the control instruction ciphertext C generated by the client 101-1. If Vc1 and Vc2 are not the same, it is determined that the control command cipher text C received from the server 102 is different from the control command cipher text C generated by the client 101-1, and the control command cipher text C may be tampered with during transmission.
可以理解,如果客户端101-1生成密文校验信息Vc1时采用其他基于密钥的消息验证算法,此时,智能家居设备103-1也采用对应的算法生成密文校验信息Vc2。It can be understood that if the client 101-1 uses other key-based message verification algorithms when generating the cipher text verification information Vc1, at this time, the smart home device 103-1 also uses the corresponding algorithm to generate the cipher text verification information Vc2.
314:则智能家居设备103-1采用预先从客户端101-1获取的密钥S对控制指令密文C进行解密,得到控制指令P。314: The smart home device 103-1 uses the key S obtained in advance from the client 101-1 to decrypt the control instruction cipher text C to obtain the control instruction P.
316:智能家居设备103-1执行控制指令P。例如,如果智能家居设备103-1为空气净化器,控制指令P可以是指令其开机、调节净化模式等。316: The smart home device 103-1 executes the control instruction P. For example, if the smart home device 103-1 is an air purifier, the control instruction P may be to instruct it to turn on, adjust the purification mode, and so on.
通过上述描述可以看出,在客户端通过服务器实现对智能家居设备的控制的过程中,控制指令的加密解密分别在客户端和智能家居设备侧进行,服务器只是传输控制指令密文和密文校验信息,从而能够防止服务器被攻击时,控制指令的安全性。此外,如上所述,基于业务保护码,智能家居设备能够验证控制指令密文是否与客户端生成的控制指令密文相同,从而确保控制指令密文传输的安全性。It can be seen from the above description that when the client implements the control of the smart home device through the server, the encryption and decryption of the control instruction is performed on the client side and the smart home device side respectively, and the server only transmits the control instruction ciphertext and ciphertext correction. Verify the information so as to prevent the server from being attacked and control the security of the command. In addition, as described above, based on the service protection code, the smart home device can verify whether the ciphertext of the control instruction is the same as the ciphertext of the control instruction generated by the client, thereby ensuring the security of the transmission of the control instruction ciphertext.
图4根据一些实施例,示出了客户端101-1直接向智能家居设备103-1发送控制指令的流程示意图。Fig. 4 shows a schematic flow chart of the client 101-1 directly sending a control instruction to the smart home device 103-1 according to some embodiments.
具体的,客户端101-1直接向智能家居设备103-1发送控制指令的过程如下:Specifically, the process of the client 101-1 directly sending a control instruction to the smart home device 103-1 is as follows:
402:客户端101-1与智能家居设备103-1建立连接。例如,可以通过Wi-Fi、蓝牙、NFC等技术建立通信连接。402: The client 101-1 establishes a connection with the smart home device 103-1. For example, a communication connection can be established through technologies such as Wi-Fi, Bluetooth, and NFC.
404:客户端101-1生成控制指令P,并通过密钥S加密控制指令P生成控制指令密文C,并利用业务保护码T生成密文校验信息Vc1。生成指令密文C和密文校验信息Vc1的具体方式与上述图3的304相同,在此不再赘述。404: The client 101-1 generates a control instruction P, encrypts the control instruction P with a key S, generates a control instruction ciphertext C, and uses the service protection code T to generate ciphertext verification information Vc1. The specific method for generating the command ciphertext C and the ciphertext verification information Vc1 is the same as that of 304 in FIG. 3, and will not be repeated here.
406:客户端101-1向智能家居设备103-1发送控制指令密文C和密文校验信息Vc1。406: The client 101-1 sends the control instruction cipher text C and the cipher text verification information Vc1 to the smart home device 103-1.
408:智能家居设备103-1从客户端101-1接收控制指令密文C和密文校验信息Vc1,并在接收到控制指令密文C和密文校验信息Vc1后,利用自身存储的业务保护码T和密文校验信息Vc1,采用客户端101-1生成密文校验信息Vc1相同的消息码验证算法,校验接 收到的控制指令密文C是否与客户端101-1生成的控制指令密文C相同。具体的校验方式与上述图3中的312相同,故在此不再赘述。408: The smart home device 103-1 receives the control command cipher text C and the cipher text verification information Vc1 from the client 101-1, and after receiving the control command cipher text C and the cipher text verification information Vc1, it uses its own storage Service protection code T and ciphertext verification information Vc1, using the same message code verification algorithm as the client 101-1 to generate ciphertext verification information Vc1, verify whether the received control command ciphertext C is generated by the client 101-1 The control command ciphertext C is the same. The specific verification method is the same as that of 312 in FIG. 3, so it will not be repeated here.
410和412与上述图3中的314和316相同,故在此不再赘述。410 and 412 are the same as 314 and 316 in FIG. 3, so they will not be repeated here.
如前所述,业务保护码与客户端101-1登录服务器102所使用的账号对应,或者说与智能家居设备103-1的用户对应,用户可以使用多个客户端实现对智能家居设备103-1的控制。如果用户想要使用新的客户端实现对智能家居设备103-1的控制,例如使用客户端101-m,则客户端101-m需要从客户端101-1获取加密控制指令所需的密钥S和从用户获取业务保护码T。图5根据本申请的一些实施例,示出了客户端101-m从客户端101-1获取加密控制指令所需的密钥S的流程示意图。具体地,客户端101-m从客户端101-1获取密钥S的过程包括:As mentioned earlier, the service protection code corresponds to the account used by the client 101-1 to log in to the server 102, or corresponding to the user of the smart home device 103-1. The user can use multiple clients to realize the connection to the smart home device 103- 1 control. If the user wants to use a new client to control the smart home device 103-1, for example, use the client 101-m, the client 101-m needs to obtain the key required for the encryption control command from the client 101-1 S and obtain the service protection code T from the user. Fig. 5 shows a schematic flow chart of the client 101-m obtaining the key S required by the encryption control instruction from the client 101- 1 according to some embodiments of the present application. Specifically, the process in which the client 101-m obtains the key S from the client 101-1 includes:
502:客户端101-1与客户端101-m建立连接。例如,可以通过Wi-Fi、蓝牙、NFC等技术建立通信连接。502: The client 101-1 establishes a connection with the client 101-m. For example, a communication connection can be established through technologies such as Wi-Fi, Bluetooth, and NFC.
504:客户端101-m向客户端101-1发送密钥获取请求。504: The client 101-m sends a key acquisition request to the client 101-1.
506:客户端101-1响应于接收到的密钥获取请求,利用业务保护码T加密密钥S。506: The client 101-1 uses the service protection code T to encrypt the key S in response to the received key acquisition request.
508:客户端101-1向客户端101-m发送被业务保护码T加密的密钥S。508: The client 101-1 sends the key S encrypted by the service protection code T to the client 101-m.
510:客户端101-m接收到被业务保护码T加密的密钥S后,请求用户输入业务保护码T。510: After receiving the key S encrypted by the service protection code T, the client 101-m requests the user to input the service protection code T.
512:客户端101-m采用业务保护码T对接收到的被加密的密钥S进行解密,然后加密存储解密后的密钥S。512: The client 101-m uses the service protection code T to decrypt the received encrypted key S, and then encrypts and stores the decrypted key S.
如前所述,用户在使用客户端101-1登录服务器102激活智能家居设备103-1时,可以通过服务器102设置业务保护码。图6根据本申请的一些实施例,示出了一种设置业务保护码的流程示意图。具体地,如图6所示,设备业务保护码T的过程如下:As mentioned above, when the user logs in to the server 102 using the client 101-1 to activate the smart home device 103-1, the server 102 can set the service protection code. Fig. 6 shows a schematic flow chart of setting a service protection code according to some embodiments of the present application. Specifically, as shown in Figure 6, the process of the equipment service protection code T is as follows:
602:客户端101-1通过账号登录服务器102,并与服务器建立连接。例如,可以通过WiFi、蓝牙、NFC等技术建立通信连接。602: The client 101-1 logs in to the server 102 through an account, and establishes a connection with the server. For example, a communication connection can be established through technologies such as WiFi, Bluetooth, and NFC.
604:客户端101-1向服务器102发送设置业务保护码的请求。604: The client 101-1 sends a request for setting a service protection code to the server 102.
606:服务器102接收到上述请求后,查询是否为登录的账号分配过业务保护码。如果查询出服务器102未为登录的账号分配过业务保护码,则进入608;否则,返回无法发送业务保护码的错误信息。606: After receiving the above request, the server 102 queries whether a service protection code has been assigned to the logged-in account. If it is found out that the server 102 has not assigned a service protection code to the logged-in account, enter 608; otherwise, an error message that the service protection code cannot be sent is returned.
608:服务器102向客户端101-1发送初始业务保护码的保护码密文和保护码校验信息。例如,在一些实施例中,采用服务器102与客户端101-1协商的会话密钥加密初始业务保护码,得到初始业务保护码的保护码密文,并采用消息验证码算法,生成初始业务保护码的保护码校验信息。例如,将会话密钥作为HMAC算法的输入密钥,对初始业务保护码的保护码密文进行转换,得到初始业务保护码的保护码校验信息。608: The server 102 sends the protection code cipher text of the initial service protection code and the protection code verification information to the client 101-1. For example, in some embodiments, the session key negotiated between the server 102 and the client 101-1 is used to encrypt the initial service protection code to obtain the protection code cipher text of the initial service protection code, and the message verification code algorithm is used to generate the initial service protection The protection code verification information of the code. For example, the session key is used as the input key of the HMAC algorithm, and the protection code cipher text of the initial service protection code is converted to obtain the protection code verification information of the initial service protection code.
610:客户端101-1基于保护码校验信息对接收到的初始业务保护码进行校验,以确定服务器102发送的初始业务保护码的完整性。在校验通过的情况下,进入612;否则,向服务器102返回错误信息。610: The client 101-1 verifies the received initial service protection code based on the protection code verification information to determine the integrity of the initial service protection code sent by the server 102. If the verification is passed, enter 612; otherwise, return an error message to the server 102.
具体地,可以通过以下方式进行校验:客户端101-1收到业务保护码校验信息后,使用相同的消息验证码算法计算业务保护码校验信息,如果计算得到的业务保护码校验信息 与收到的业务保护码校验信息相同,则表示校验通过。Specifically, the verification can be performed in the following manner: after the client 101-1 receives the verification information of the service protection code, it uses the same message verification code algorithm to calculate the verification information of the service protection code, and if the calculated service protection code is verified If the information is the same as the received service protection code verification information, it means that the verification passed.
例如,在一些实施例中,客户端101-1可以采用服务器102与客户端101-1协商的会话密钥对接收到的初始业务保护码的保护码密文进行解密。并且,客户端101-1可以以上述协商的会话密钥作为HMAC算法的输入密钥,对初始业务保护码的保护码密文进行转换,生成初始业务保护码的保护码校验信息。将生成的初始业务保护码的保护码校验信息和接收到的初始业务保护码的保护码校验信息进行比较,如果两者相同,则表示校验通过。For example, in some embodiments, the client 101-1 may use the session key negotiated between the server 102 and the client 101-1 to decrypt the received protection code ciphertext of the initial service protection code. In addition, the client 101-1 may use the negotiated session key as the input key of the HMAC algorithm to convert the protection code cipher text of the initial service protection code to generate protection code verification information of the initial service protection code. The generated protection code check information of the initial service protection code is compared with the received protection code check information of the initial service protection code. If the two are the same, it means that the check has passed.
612:客户端101-1提示用户对接收到的初始业务保护码进行修改,得到业务保护码T0。612: The client 101-1 prompts the user to modify the received initial service protection code to obtain the service protection code T0.
614:客户端101-1在检测到用户修改的业务保护码符合预定规则后,加密存储用户修改后的业务保护码T0,并提示用户记录业务保护码T0。可以理解,上述实施例中的业务保护码T可以是T0,也可以是将T0更新后的其他业务保护码。614: After detecting that the service protection code modified by the user complies with the predetermined rule, the client 101-1 encrypts and stores the service protection code T0 modified by the user, and prompts the user to record the service protection code T0. It can be understood that the service protection code T in the foregoing embodiment may be T0, or may be another service protection code after T0 is updated.
对业务保护码的预定规则可以是对业务保护码的字符类型、字符数要求,例如要求必须为8位,必须包含数字、大小写字母、特殊符号等。The predetermined rule for the service protection code may be the requirement for the character type and the number of characters of the service protection code, for example, the requirement must be 8 digits, and must contain numbers, upper and lower case letters, special symbols, etc.
616:客户端101-1向服务器102发送设置好的业务保护码T的保护码密文和业务保护码T的保护码校验信息。616: The client 101-1 sends the set protection code cipher text of the service protection code T and the protection code verification information of the service protection code T to the server 102.
例如,在一些实施例中,客户端101-1可以以服务器102与客户端101-1协商的会话密钥加密业务保护码T,得到保护码密文,客户端101-1还可以以服务器102与客户端101-1协商的会话密钥作为HMAC算法的输入密钥,对业务保护码T进行转换,得到保护码校验信息Vt1。For example, in some embodiments, the client 101-1 may encrypt the service protection code T with the session key negotiated by the server 102 and the client 101-1 to obtain the protection code ciphertext, and the client 101-1 may also use the server 102 The session key negotiated with the client 101-1 is used as the input key of the HMAC algorithm, and the service protection code T is converted to obtain the protection code verification information Vt1.
618:服务器102接收到业务保护码T的保护码密文和保护码校验信息Vt1,然后根据保护码校验信息Vt1验证接收到的业务保护码T的保护码密文是否与客户端101-1设置的业务保护码T的保护码密文相同。如果相同,则确定业务保护码设置成功。618: The server 102 receives the protection code cipher text of the service protection code T and the protection code verification information Vt1, and then verifies whether the received protection code cipher text of the service protection code T is the same as the client 101- 1 The ciphertext of the protection code of the set service protection code T is the same. If they are the same, it is determined that the service protection code is set successfully.
例如,服务器102可以采用与客户端101-1生成业务保护码T的保护码校验信息相同的算法,生成接收到的业务保护码T的校验信息Vt2,然后将生成的保护码校验信息Vt2和接收的保护码校验信息Vt1进行比较,如果Vt1和Vt2相同,则确定接收到的业务保护码T与客户端101-1设置的业务保护码相同。例如,在一些实施例中,服务器102以上述协商的会话密钥为HMAC算法的输入密钥,对接收到的保护码密文进行转换,得到保护码校验信息Vt2。For example, the server 102 may use the same algorithm as the client 101-1 to generate the protection code verification information of the service protection code T, generate the received verification information Vt2 of the service protection code T, and then verify the generated protection code information Vt2 is compared with the received protection code verification information Vt1, and if Vt1 and Vt2 are the same, it is determined that the received service protection code T is the same as the service protection code set by the client 101-1. For example, in some embodiments, the server 102 uses the aforementioned negotiated session key as the input key of the HMAC algorithm to convert the received protection code cipher text to obtain the protection code verification information Vt2.
服务器102在校验通过后,还可以采用上述协商的会话密钥,解密保护码密文,得到业务保护码T。After passing the verification, the server 102 may also use the negotiated session key to decrypt the ciphertext of the protection code to obtain the service protection code T.
可以理解,在一些实施例中,业务保护码也可以不经用户修改,直接是服务器102发送给客户端101-1的业务保护码。It can be understood that, in some embodiments, the service protection code may also be directly the service protection code sent by the server 102 to the client 101-1 without modification by the user.
此外,在一些实施例中,客户端101-1还可以通过服务器102更新业务保护码T,图7根据一些实施例,示出了一种更新业务保护码的流程示意图。具体地,如图7所示,客户端101-1更新业务保护码T的过程如下:In addition, in some embodiments, the client 101-1 may also update the service protection code T through the server 102. FIG. 7 shows a schematic flow chart of updating the service protection code according to some embodiments. Specifically, as shown in FIG. 7, the process for the client 101-1 to update the service protection code T is as follows:
702:客户端101-1通过账号登录服务器102,并与服务器建立连接。702: The client 101-1 logs in to the server 102 through an account, and establishes a connection with the server.
704:客户端101-1接收到用户要更新业务保护码的请求。例如,用户可以在管理智能家居设备103-1的应用软件中点击更新业务保护码的按钮来发送请求。704: The client 101-1 receives a request from the user to update the service protection code. For example, the user can click the button to update the service protection code in the application software for managing the smart home device 103-1 to send the request.
此外,在一些实施例中,客户端101-1可以设置更新周期,以定期向服务器发送业务保护码的更新请求。In addition, in some embodiments, the client 101-1 may set an update period to periodically send a service protection code update request to the server.
此外,在一些实施例中,服务器102也可以定期向客户端101-1发送业务保护码更新请求,例如,每月一次,每周一次,以提高业务保护码的安全性。In addition, in some embodiments, the server 102 may also periodically send a service protection code update request to the client 101-1, for example, once a month or once a week to improve the security of the service protection code.
706:客户端101-1请求用户输入更新的业务保护码T',并基于业务保护码T'生成保护码校验信息Vt1'。例如,可以采用HMAC算法,将原业务保护码T作为输入密钥,对更新后的业务保护码T'进行变换生成T'的校验信息Vt1'。706: The client 101-1 requests the user to input the updated service protection code T', and generates protection code verification information Vt1' based on the service protection code T'. For example, the HMAC algorithm can be used, the original service protection code T is used as the input key, and the updated service protection code T'is transformed to generate the verification information Vt1' of T'.
708:客户端101-1向服务器102发送业务保护码更新请求,其中,业务保护码更新请求包括用户输入的更新后的业务保护码T'和业务保护码T'的保护码校验信息Vt1'。708: The client 101-1 sends a service protection code update request to the server 102, where the service protection code update request includes the updated service protection code T′ input by the user and the protection code verification information Vt1′ of the service protection code T′ .
710:服务器102接收到业务保护码更新请求后,采用保护码校验信息Vt1'对业务保护码T'进行校验。710: After receiving the service protection code update request, the server 102 uses the protection code verification information Vt1' to verify the service protection code T'.
例如,服务器102可以采用客户端101-1生成校验信息Vt1'相同的算法,将服务器102上存储的原业务保护码T作为密钥,对接收到的业务保护码T'进行变换生成校验信息Vt2',并将生成的校验信息Vt2与接收到业务保护码T'的校验信息Vt1'进行比对。如果比对出两者相同,则表示校验通过,进入712;如果不同,则表示校验未通过,向客户端101-1发送更新失败的消息。For example, the server 102 can use the same algorithm as the client 101-1 to generate the verification information Vt1', use the original service protection code T stored on the server 102 as a key, and transform the received service protection code T'to generate verification Information Vt2', and compare the generated verification information Vt2 with the verification information Vt1' of the received service protection code T'. If the comparison shows that the two are the same, it means that the verification is passed and enter 712; if they are different, it means that the verification is not passed, and an update failure message is sent to the client 101-1.
712:服务器102向客户端101-1登录服务器102所用的账号下的除了客户端101-1外的其他客户端发送保护码更新通知,以使得用户在使用这些客户端时输入更新后的业务保护码T'。712: The server 102 sends a protection code update notification to clients other than the client 101-1 under the account used by the client 101-1 to log in to the server 102, so that the user can enter the updated service protection when using these clients Code T'.
714:服务器向客户端101-1发送业务保护码更新成功的消息。714: The server sends a message indicating that the service protection code has been successfully updated to the client 101-1.
在一些实施例中,客户端101-1可以采取其他方式更新业务保护码,例如,直接向客户端101-1登录服务器102所用的账号下的所有客户端和智能家居设备103-1发送采用原业务保护码T加密的更新后的业务保护码T',以使得这些设备在接收到被T加密后的T'后,得到更新后的业务保护码T'。In some embodiments, the client 101-1 may update the service protection code in other ways, for example, directly sending the original application to all clients and smart home devices 103-1 under the account used by the client 101-1 to log in to the server 102. The updated service protection code T'encrypted by the service protection code T, so that these devices can obtain the updated service protection code T'after receiving the T'encrypted by T.
为了提高安全性,在一些实施例中,需要对密钥定期或者不定时的更新。图8示出了一种更新密钥的流程示意图。具体地,如图8所示,客户端101-1对密钥S进行更新的过程包括:In order to improve security, in some embodiments, the key needs to be updated regularly or irregularly. Figure 8 shows a schematic diagram of a process for updating a key. Specifically, as shown in FIG. 8, the process for the client 101-1 to update the key S includes:
802:客户端101-1通过账号登录服务器102,并与服务器102建立连接。802: The client 101-1 logs in to the server 102 through an account, and establishes a connection with the server 102.
804:客户端101-1随机生成用于更新密钥S的随机码(RN码),并利用RN码、密钥S和业务保护码T计算生成新的密钥S1',并生成密钥S1'的密钥校验信息Vs1。804: The client 101-1 randomly generates a random code (RN code) used to update the key S, and uses the RN code, the key S and the service protection code T to calculate and generate a new key S1', and generates the key S1 'The key verification information Vs1.
具体地,在一些实施例中,可以通过以下方式计算出新的密钥S1':Specifically, in some embodiments, the new key S1' can be calculated in the following manner:
将原密钥S作为密钥,采用前述分组加密算法加密RN码和业务保护码T,得到新的密钥S1'。例如,可以采用AES(Advanced Encryption Standard,高级加密标准)算法、SM4算法、SIMON算法、SPECK码算法等Use the original key S as a key, and use the aforementioned block encryption algorithm to encrypt the RN code and the service protection code T to obtain a new key S1'. For example, AES (Advanced Encryption Standard, Advanced Encryption Standard) algorithm, SM4 algorithm, SIMON algorithm, SPECK code algorithm, etc. can be used
可以理解,在本申请各实施例中,也可以采用其他方式计算密钥S1',例如,将业务保护码T作为密钥,采用前述分组加密算法加密RN码和原密钥S,得到新的密钥S1',或者将原密钥S作为密钥,采用前述分组加密算法加密RN码,然后在加密后的RN码的末尾加上业务保护码,得到新的密钥S1'。即只要是将智能家居设备130-1或者其他相关 客户端(如客户端101-m)自身具备的信息(如业务保护码和原密钥S)作为分组加密算法的密钥生成新的密钥S1'即可。It can be understood that in each embodiment of the present application, the key S1' can also be calculated in other ways, for example, the service protection code T is used as the key, and the aforementioned block encryption algorithm is used to encrypt the RN code and the original key S to obtain a new Key S1', or use the original key S as a key, use the aforementioned block encryption algorithm to encrypt the RN code, and then add a service protection code to the end of the encrypted RN code to obtain a new key S1'. That is, as long as the information (such as service protection code and original key S) possessed by the smart home device 130-1 or other related clients (such as client 101-m) is used as the key of the block encryption algorithm to generate a new key S1' is fine.
在一些实施例中,可以通过以下方式计算出密钥校验信息Vs1:In some embodiments, the key verification information Vs1 can be calculated in the following manner:
采用HMAC算法,以业务保护码T为密钥,对RN码进行变换生成MAC值,该MAC值即为密钥校验信息Vs1。Using the HMAC algorithm, using the service protection code T as the key, the RN code is transformed to generate the MAC value, which is the key verification information Vs1.
可以理解,在本申请各实施例中,也可以采用其他方式计算出密钥校验信息Vs1。例如,采用HMAC算法,以原密钥S为密钥,对RN码进行变换生成MAC值,该MAC值即为密钥校验信息Vs1。或者,采用业务保护码T或者原密钥S为密钥,对新的密钥S1'进行转换生成MAC值,该MAC值即为密钥校验信息Vs1。即只要是将智能家居设备130-1或者其他相关客户端(如客户端101-m)自身具备的信息(如业务保护码和原密钥S)作为密钥即可。It can be understood that, in the embodiments of the present application, the key verification information Vs1 can also be calculated in other ways. For example, using the HMAC algorithm, using the original key S as the key, the RN code is transformed to generate the MAC value, and the MAC value is the key verification information Vs1. Or, using the service protection code T or the original key S as the key, the new key S1' is converted to generate the MAC value, which is the key verification information Vs1. That is, as long as the information (such as the service protection code and the original key S) possessed by the smart home device 130-1 or other related clients (such as the client 101-m) is used as the key.
如前所述,也可以采用其他基于密钥的消息验证码生成密钥校验信息Vs1,在此不做限制。As mentioned above, other key-based message verification codes can also be used to generate the key verification information Vs1, which is not limited here.
806:客户端101-1向服务器102发送密钥更新请求。其中,密钥更新请求可以包括RN码和密钥校验信息Vs1。806: The client 101-1 sends a key update request to the server 102. The key update request may include the RN code and key verification information Vs1.
808:服务器102确定客户端101-1登录服务器102所用账号下的各智能家居设备和其他客户端。例如,确定出该账号下具有智能家居设备103-1和客户端101-m。808: The server 102 determines the smart home devices and other clients under the account used by the client 101-1 to log in to the server 102. For example, it is determined that the account has a smart home device 103-1 and a client 101-m.
810:服务器102与确定的这些智能家居设备和客户端建立连接,并将密钥更新请求中的RN码和密钥校验信息Vs1转发给这些智能家居设备和客户端,例如,转发给智能家居设备103-1和客户端101-m。810: The server 102 establishes a connection with the determined smart home devices and clients, and forwards the RN code and key verification information Vs1 in the key update request to these smart home devices and clients, for example, to the smart home Device 103-1 and client 101-m.
812:智能家居设备103-1和客户端101-m接收到RN码和密钥校验信息Vs1后,利用接收到的RN码、自身存储的业务保护码T和原密钥S,采用客户端101-1生成新的密钥S1'的方法,生成新的密钥S2'。812: After the smart home device 103-1 and the client 101-m receive the RN code and key verification information Vs1, they use the received RN code, the service protection code T and the original key S stored by themselves, and the client 101-1 The method of generating a new key S1', generating a new key S2'.
具体地,在一些实施例中,可以智能家居设备103-1和客户端101-m通过以下方式计算出新的密钥S2':Specifically, in some embodiments, the smart home device 103-1 and the client 101-m may calculate the new key S2' in the following manner:
将自身存储的原密钥S作为密钥,采用前述分组加密算法加密RN码和业务保护码T,得到新的密钥S2'。例如,可以采用AES(Advanced Encryption Standard,高级加密标准)算法、SM 4算法、SIMON算法、SPECK码算法等Use the original key S stored by itself as the key, and use the aforementioned block encryption algorithm to encrypt the RN code and the service protection code T to obtain a new key S2'. For example, AES (Advanced Encryption Standard, Advanced Encryption Standard) algorithm, SM 4 algorithm, SIMON algorithm, SPECK code algorithm, etc. can be used
可以理解,在本申请各实施例中,也可以采用其他方式计算密钥S2',例如,将自身存储的业务保护码T作为密钥,采用前述分组加密算法加密RN码和原密钥S,得到新的密钥S2',或者将原密钥S作为密钥,采用前述分组加密算法加密RN码,然后在加密后的RN码的末尾加上业务保护码,得到新的密钥S2'。即只要是将智能家居设备130-1或者其他相关客户端(如客户端101-m)自身具备的信息(如业务保护码和原密钥S)作为分组加密算法的密钥生成新的密钥S1'即可。It can be understood that in the embodiments of the present application, the key S2' can also be calculated in other ways, for example, using the service protection code T stored in itself as the key, and using the aforementioned block encryption algorithm to encrypt the RN code and the original key S, Obtain the new key S2', or use the original key S as the key, use the aforementioned block encryption algorithm to encrypt the RN code, and then add the service protection code to the end of the encrypted RN code to obtain the new key S2'. That is, as long as the information (such as service protection code and original key S) possessed by the smart home device 130-1 or other related clients (such as client 101-m) is used as the key of the block encryption algorithm to generate a new key S1' is fine.
814:智能家居设备103-1和客户端101-m利用接收到的密钥校验信息Vs1校验生成的新的密钥S2'是否与客户端101-1生成的密钥S1'相同。814: The smart home device 103-1 and the client 101-m use the received key verification information Vs1 to verify whether the generated new key S2' is the same as the key S1' generated by the client 101-1.
具体地,智能家居设备103-1和客户端101-m可以采用客户端101-1生成密钥校验信息Vs1相同的消息码认证算法和密钥,生成密钥校验信息Vs2,并判断生成的Vs2是否与 Vs1相同。如果两者相同,则确定生成的新的密钥S2'与客户端101-1生成的密钥S1'相同,进入816;否则,确定生成的新的密钥S2'与客户端101-1生成的密钥S1'不相同,向服务器102发送更新失败的消息。Specifically, the smart home device 103-1 and the client 101-m can use the client 101-1 to generate the same message code authentication algorithm and key as the key verification information Vs1, generate the key verification information Vs2, and determine the generation Is Vs2 the same as Vs1? If the two are the same, it is determined that the generated new key S2' is the same as the key S1' generated by the client 101-1, and enters 816; otherwise, it is determined that the generated new key S2' is generated by the client 101-1 The keys S1' of are not the same, and a message that the update has failed is sent to the server 102.
在一些实施例中,可以通过以下方式计算出密钥校验信息Vs2:In some embodiments, the key verification information Vs2 can be calculated in the following manner:
采用HMAC算法,以自身存储业务保护码T为密钥,对接收到的RN码进行变换生成MAC值,该MAC值即为密钥校验信息Vs2。Using the HMAC algorithm, using its own storage service protection code T as a key, the received RN code is transformed to generate a MAC value, which is the key verification information Vs2.
可以理解,在本申请各实施例中,也可以采用其他方式计算出密钥校验信息Vs2。例如,采用HMAC算法,以原密钥S为密钥,对接收到的RN码进行变换生成MAC值,该MAC值即为密钥校验信息Vs2。或者,采用业务保护码T或者原密钥S为密钥,对新的密钥S2'进行转换生成MAC值,该MAC值即为密钥校验信息Vs2。即只要是将智能家居设备130-1或者其他相关客户端(如客户端101-m)自身具备的信息(如业务保护码和原密钥S)作为密钥即可。It can be understood that, in the embodiments of the present application, the key verification information Vs2 can also be calculated in other ways. For example, using the HMAC algorithm and using the original key S as the key, the received RN code is transformed to generate a MAC value, which is the key verification information Vs2. Or, using the service protection code T or the original key S as the key, the new key S2' is converted to generate the MAC value, and the MAC value is the key verification information Vs2. That is, as long as the information (such as the service protection code and the original key S) possessed by the smart home device 130-1 or other related clients (such as the client 101-m) is used as the key.
如前所述,也可以采用其他基于密钥的消息验证码生成密钥校验信息Vs2,在此不做限制。As mentioned above, other key-based message verification codes can also be used to generate the key verification information Vs2, which is not limited here.
816:加密存储新生成的密钥S2'。816: The newly generated key S2' is encrypted and stored.
可以理解,在其他实施方式中,也可以采用其他方式更新密钥S。例如,客户端101-1直接生成不同于密钥S的新密钥,而基于RN码生成新的密钥,在此不做限制。It can be understood that in other embodiments, the key S may also be updated in other ways. For example, the client 101-1 directly generates a new key different from the key S, and generates a new key based on the RN code, which is not limited here.
可以理解,在其他实施例中,客户端101-1也可以直接向智能家居设备103-1和客户端101-m发送随机码和密钥校验信息,而不通过服务器102发送。其他的校验过程和生成新的密钥的过程与上述图8中的描述相同,在此不再赘述。It can be understood that, in other embodiments, the client 101-1 may also directly send the random code and key verification information to the smart home device 103-1 and the client 101-m, instead of sending it through the server 102. The other verification process and the process of generating a new key are the same as those described in FIG. 8, and will not be repeated here.
图9示出了电子设备900的结构示意图。FIG. 9 shows a schematic diagram of the structure of the electronic device 900.
电子设备900可以是上述物联网系统100中的客户端、智能家居设备和服务器中的任一个。具体地,如图9所示,电子设备900包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。The electronic device 900 may be any one of a client, a smart home device, and a server in the aforementioned Internet of Things system 100. Specifically, as shown in FIG. 9, the electronic device 900 includes a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, and a power management module 141, Battery 142, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone jack 170D, sensor module 180, buttons 190, motor 191, indicator 192, Camera 193, display screen 194, subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and ambient light Sensor 180L, bone conduction sensor 180M, etc.
可以理解的是,本发明实施例示意的结构并不构成对电子设备900的具体限定。在本申请另一些实施例中,电子设备900可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 900. In other embodiments of the present application, the electronic device 900 may include more or fewer components than shown, or combine certain components, or split certain components, or arrange different components. The illustrated components can be implemented in hardware, software, or a combination of software and hardware.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器 (digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。在一些实施例中,处理器110可以用于生成控制指令密文、密文校验信息、保护码校验信息,密钥校验信息等,以实现本申请图2-8中的用于控制智能家居设备的方法。The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), and an image signal processor. (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (NPU), etc. Among them, the different processing units may be independent devices or integrated in one or more processors. In some embodiments, the processor 110 may be used to generate control instruction ciphertext, ciphertext verification information, protection code verification information, key verification information, etc., to implement the control instructions shown in Figures 2-8 of this application. The method of smart home equipment.
控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The controller can generate operation control signals according to the instruction operation code and timing signals to complete the control of fetching instructions and executing instructions.
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。A memory may also be provided in the processor 110 to store instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory can store instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. Repeated accesses are avoided, the waiting time of the processor 110 is reduced, and the efficiency of the system is improved.
在一些实施例中,处理器110可以包括一个或多个接口。In some embodiments, the processor 110 may include one or more interfaces.
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过电子设备900的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为电子设备供电。The charging management module 140 is used to receive charging input from the charger. Among them, the charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive the charging input of the wired charger through the USB interface 130. In some embodiments of wireless charging, the charging management module 140 may receive the wireless charging input through the wireless charging coil of the electronic device 900. While the charging management module 140 charges the battery 142, it can also supply power to the electronic device through the power management module 141.
电子设备900的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。The wireless communication function of the electronic device 900 can be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor.
天线1和天线2用于发射和接收电磁波信号。电子设备900中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。The antenna 1 and the antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device 900 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example: Antenna 1 can be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antenna can be used in combination with a tuning switch.
移动通信模块150可以提供应用在电子设备900上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。The mobile communication module 150 may provide a wireless communication solution including 2G/3G/4G/5G and the like applied to the electronic device 900. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), and the like. The mobile communication module 150 can receive electromagnetic waves by the antenna 1, and perform processing such as filtering, amplifying and transmitting the received electromagnetic waves to the modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor, and convert it into electromagnetic waves for radiation via the antenna 1. In some embodiments, at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110. In some embodiments, at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be provided in the same device.
无线通信模块160可以提供应用在电子设备900上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。The wireless communication module 160 can provide applications on the electronic device 900 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), and global navigation satellites. System (global navigation satellite system, GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (infrared, IR) and other wireless communication solutions. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be sent from the processor 110, perform frequency modulation, amplify, and convert it into electromagnetic waves to radiate through the antenna 2.
在一些实施例中,电子设备900的天线1和移动通信模块150耦合,天线2和无线通 信模块160耦合,使得电子设备900可以通过无线通信技术与网络以及其他设备通信。In some embodiments, the antenna 1 of the electronic device 900 is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the electronic device 900 can communicate with the network and other devices through wireless communication technology.
电子设备900通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The electronic device 900 implements a display function through a GPU, a display screen 194, an application processor, and the like. The GPU is an image processing microprocessor, which is connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and is used for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
显示屏194用于显示图像,视频等。显示屏194包括显示面板。The display screen 194 is used to display images, videos, and the like. The display screen 194 includes a display panel.
电子设备900可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。The electronic device 900 can realize a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备900的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, so as to expand the storage capacity of the electronic device 900. The external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example, save music, video and other files in an external memory card.
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。内部存储器121可以包括存储程序区和存储数据区。The internal memory 121 may be used to store computer executable program code, where the executable program code includes instructions. The internal memory 121 may include a storage program area and a storage data area.
电子设备900可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。The electronic device 900 can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor. For example, music playback, recording, etc.
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备900可以接收按键输入,产生与电子设备900的用户设置以及功能控制有关的键信号输入。马达191可以产生振动提示。指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。SIM卡接口195用于连接SIM卡。The button 190 includes a power-on button, a volume button, and so on. The button 190 may be a mechanical button. It can also be a touch button. The electronic device 900 may receive key input, and generate key signal input related to user settings and function control of the electronic device 900. The motor 191 can generate vibration prompts. The indicator 192 may be an indicator light, which may be used to indicate the charging status, power change, or to indicate messages, missed calls, notifications, and so on. The SIM card interface 195 is used to connect to the SIM card.
现在参考图10,所示为根据本申请的一个实施例的电子设备1000的框图。电子设备1000可以是上述物联网系统100中的客户端、智能家居设备和服务器中的任一个。在一个实施例中,电子设备1000可以包括一个或多个处理器1004,与处理器1004中的至少一个连接的系统控制逻辑1008,与系统控制逻辑1008连接的系统内存1012,与系统控制逻辑1008连接的非易失性存储器(NVM)1016,以及与系统控制逻辑1008连接的网络接口1020。Referring now to FIG. 10, shown is a block diagram of an electronic device 1000 according to an embodiment of the present application. The electronic device 1000 may be any one of a client, a smart home device, and a server in the aforementioned Internet of Things system 100. In one embodiment, the electronic device 1000 may include one or more processors 1004, a system control logic 1008 connected to at least one of the processors 1004, a system memory 1012 connected to the system control logic 1008, and a system control logic 1008 A non-volatile memory (NVM) 1016 is connected, and a network interface 1020 is connected to the system control logic 1008.
在一些实施例中,处理器1004可以包括一个或多个单核或多核处理器。在一些实施例中,处理器1004可以包括通用处理器和专用处理器(例如,图形处理器,应用处理器,基带处理器等)的任意组合。在电子设备1000采用eNB(Evolved Node B,增强型基站)101或RAN(Radio Access Network,无线接入网)控制器102的实施例中,处理器1004可以被配置为执行各种符合的实施例,例如,如图2-8所示的多个实施例中的一个或多个。In some embodiments, the processor 1004 may include one or more single-core or multi-core processors. In some embodiments, the processor 1004 may include any combination of a general-purpose processor and a special-purpose processor (for example, a graphics processor, an application processor, a baseband processor, etc.). In an embodiment in which the electronic device 1000 adopts an eNB (Evolved Node B, enhanced base station) 101 or a RAN (Radio Access Network, radio access network) controller 102, the processor 1004 may be configured to execute various conforming embodiments , For example, one or more of the multiple embodiments shown in FIGS. 2-8.
在一些实施例中,系统控制逻辑1008可以包括任意合适的接口控制器,以向处理器1004中的至少一个和/或与系统控制逻辑1008通信的任意合适的设备或组件提供任意合适的接口。In some embodiments, the system control logic 1008 may include any suitable interface controller to provide any suitable interface to at least one of the processors 1004 and/or any suitable device or component in communication with the system control logic 1008.
在一些实施例中,系统控制逻辑1008可以包括一个或多个存储器控制器,以提供连接到系统内存1012的接口。系统内存1012可以用于加载以及存储数据和/或指令。在一些实施例中电子设备1000的内存1012可以包括任意合适的易失性存储器,例如合适的动态随机存取存储器(DRAM)。In some embodiments, the system control logic 1008 may include one or more memory controllers to provide an interface to the system memory 1012. The system memory 1012 can be used to load and store data and/or instructions. In some embodiments, the memory 1012 of the electronic device 1000 may include any suitable volatile memory, such as a suitable dynamic random access memory (DRAM).
NVM/存储器1016可以包括用于存储数据和/或指令的一个或多个有形的、非暂时性的计算机可读介质。在一些实施例中,NVM/存储器1016可以包括闪存等任意合适的非易失 性存储器和/或任意合适的非易失性存储设备,例如HDD(Hard Disk Drive,硬盘驱动器),CD(Compact Disc,光盘)驱动器,DVD(Digital Versatile Disc,数字通用光盘)驱动器中的至少一个。The NVM/memory 1016 may include one or more tangible, non-transitory computer-readable media for storing data and/or instructions. In some embodiments, the NVM/memory 1016 may include any suitable non-volatile memory such as flash memory and/or any suitable non-volatile storage device, such as HDD (Hard Disk Drive, hard disk drive), CD (Compact Disc) , At least one of an optical disc drive and a DVD (Digital Versatile Disc, Digital Versatile Disc) drive.
NVM/存储器1016可以包括安装电子设备1000的装置上的一部分存储资源,或者它可以由设备访问,但不一定是设备的一部分。例如,可以经由网络接口1020通过网络访问NVM/存储1016。The NVM/memory 1016 may include a part of the storage resources on the device where the electronic device 1000 is installed, or it may be accessed by the device, but not necessarily a part of the device. For example, the NVM/storage 1016 can be accessed through the network via the network interface 1020.
特别地,系统内存1012和NVM/存储器1016可以分别包括:指令1024的暂时副本和永久副本。指令1024可以包括:由处理器1004中的至少一个执行时导致电子设备1000实施如图3-4所示的方法的指令。在一些实施例中,指令1024、硬件、固件和/或其软件组件可另外地/替代地置于系统控制逻辑1008,网络接口1020和/或处理器1004中。In particular, the system memory 1012 and the NVM/memory 1016 may respectively include: a temporary copy and a permanent copy of the instruction 1024. The instruction 1024 may include an instruction that, when executed by at least one of the processors 1004, causes the electronic device 1000 to implement the method shown in FIGS. 3-4. In some embodiments, the instructions 1024, hardware, firmware, and/or software components thereof may additionally/alternatively be placed in the system control logic 1008, the network interface 1020, and/or the processor 1004.
网络接口1020可以包括收发器,用于为电子设备1000提供无线电接口,进而通过一个或多个网络与任意其他合适的设备(如前端模块,天线等)进行通信。在一些实施例中,网络接口1020可以集成于电子设备1000的其他组件。例如,网络接口1020可以集成于处理器1004的,系统内存1012,NVM/存储器1016,和具有指令的固件设备(未示出)中的至少一种,当处理器1004中的至少一个执行所述指令时,电子设备1000实现如图2-8所示的方法过程。The network interface 1020 may include a transceiver for providing a radio interface for the electronic device 1000, and then communicate with any other suitable device (such as a front-end module, an antenna, etc.) through one or more networks. In some embodiments, the network interface 1020 may be integrated with other components of the electronic device 1000. For example, the network interface 1020 may be integrated with at least one of the processor 1004, the system memory 1012, the NVM/storage 1016, and the firmware device with instructions (not shown), when at least one of the processor 1004 executes the When instructed, the electronic device 1000 implements the method process shown in Figs. 2-8.
网络接口1020可以进一步包括任意合适的硬件和/或固件,以提供多输入多输出无线电接口。例如,网络接口1020可以是网络适配器,无线网络适配器,电话调制解调器和/或无线调制解调器。The network interface 1020 may further include any suitable hardware and/or firmware to provide a multiple input multiple output radio interface. For example, the network interface 1020 may be a network adapter, a wireless network adapter, a telephone modem and/or a wireless modem.
在一个实施例中,处理器1004中的至少一个可以与用于系统控制逻辑1008的一个或多个控制器的逻辑封装在一起,以形成系统封装(SiP)。在一个实施例中,处理器1004中的至少一个可以与用于系统控制逻辑1008的一个或多个控制器的逻辑集成在同一管芯上,以形成片上系统(SoC)。In one embodiment, at least one of the processors 1004 may be packaged with the logic of one or more controllers for the system control logic 1008 to form a system in package (SiP). In one embodiment, at least one of the processors 1004 may be integrated on the same die with the logic of one or more controllers used for the system control logic 1008 to form a system on chip (SoC).
电子设备1000可以进一步包括:输入/输出(I/O)设备1032。I/O设备1032可以包括用户界面,使得用户能够与电子设备1000进行交互;外围组件接口的设计使得外围组件也能够与电子设备1000交互。在一些实施例中,电子设备1000还包括传感器,用于确定与电子设备1000相关的环境条件和位置信息的至少一种。The electronic device 1000 may further include: an input/output (I/O) device 1032. The I/O device 1032 may include a user interface to enable the user to interact with the electronic device 1000; the design of the peripheral component interface enables the peripheral components to also interact with the electronic device 1000. In some embodiments, the electronic device 1000 further includes a sensor for determining at least one of environmental conditions and location information related to the electronic device 1000.
在一些实施例中,用户界面可包括但不限于显示器(例如,液晶显示器,触摸屏显示器等),扬声器,麦克风,一个或多个相机(例如,静止图像照相机和/或摄像机),手电筒(例如,发光二极管闪光灯)和键盘。In some embodiments, the user interface may include, but is not limited to, a display (e.g., liquid crystal display, touch screen display, etc.), speakers, microphones, one or more cameras (e.g., still image cameras and/or video cameras), flashlights (e.g., LED flash) and keyboard.
在一些实施例中,外围组件接口可以包括但不限于非易失性存储器端口、音频插孔和电源接口。In some embodiments, the peripheral component interface may include, but is not limited to, a non-volatile memory port, an audio jack, and a power interface.
在一些实施例中,传感器可包括但不限于陀螺仪传感器,加速度计,近程传感器,环境光线传感器和定位单元。定位单元还可以是网络接口1020的一部分或与网络接口1020交互,以与定位网络的组件(例如,全球定位系统(GPS)卫星)进行通信。In some embodiments, the sensor may include, but is not limited to, a gyroscope sensor, an accelerometer, a proximity sensor, an ambient light sensor, and a positioning unit. The positioning unit may also be part of or interact with the network interface 1020 to communicate with components of the positioning network (eg, global positioning system (GPS) satellites).
图11所示为根据本申请的实施例的另一种电子设备1100。电子设备1100可以是上述物联网系统100中的客户端、智能家居设备和服务器中的任一个。电子设备1100包括至少一个处理器1110、存储器1120和收发器1130。其中,处理器1110与存储器1120和收发 器1130耦合,本申请实施例中的耦合是装置、单元或模块之间的直接或间接耦合或者通信连接,可以是电性,机械或其它的形式,用于装置、单元或模块之间的信息交互。本申请实施例中不限定上述收发器1130、处理器1110以及存储器1120之间的连接介质。例如,根据本申请的一些实施例,存储器1120、处理器1110以及收发器1130之间可以通过总线连接,所述总线可以分为地址总线、数据总线、控制总线等。FIG. 11 shows another electronic device 1100 according to an embodiment of the present application. The electronic device 1100 may be any one of a client, a smart home device, and a server in the aforementioned Internet of Things system 100. The electronic device 1100 includes at least one processor 1110, a memory 1120, and a transceiver 1130. The processor 1110 is coupled with the memory 1120 and the transceiver 1130. The coupling in the embodiment of the present application is a direct or indirect coupling or a communication connection between devices, units, or modules, and may be in electrical, mechanical, or other forms. Information exchange between devices, units or modules. The embodiment of the present application does not limit the connection medium between the foregoing transceiver 1130, the processor 1110, and the memory 1120. For example, according to some embodiments of the present application, the memory 1120, the processor 1110, and the transceiver 1130 may be connected by a bus, and the bus may be divided into an address bus, a data bus, a control bus, and the like.
存储器1120可以用于存储程序指令。收发器1130可以用于接收或发送数据。处理器1110可以用于调用存储器1120中存储的程序指令,使得电子设备1100执行图2-8中客户端、智能家居设备和服务器中的任一个所执行的操作。The memory 1120 may be used to store program instructions. The transceiver 1130 can be used to receive or transmit data. The processor 1110 may be used to call program instructions stored in the memory 1120, so that the electronic device 1100 executes operations performed by any one of the client, smart home device, and server in FIGS. 2-8.
根据本申请的一些实施例,处理器1110可以是通用处理器、数字信号处理器、专用集成电路、现场可编程门阵列或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件,可以实现或者执行本申请实施例中的公开的各方法、操作及逻辑框图。通用处理器可以是微处理器或者任何常规的处理器等。结合本申请实施例所公开的方法的操作可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。According to some embodiments of the present application, the processor 1110 may be a general-purpose processor, a digital signal processor, an application specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component. Implement or execute the methods, operations, and logical block diagrams disclosed in the embodiments of the present application. The general-purpose processor may be a microprocessor or any conventional processor or the like. The operations combined with the methods disclosed in the embodiments of the present application may be directly embodied as being executed and completed by a hardware processor, or executed and completed by a combination of hardware and software modules in the processor.
根据本申请的一些实施例,存储器1120可以是非易失性存储器,还可以是易失性存储器。存储器是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。本申请实施例中的存储器还可以是电路或者其它任意能够实现存储功能的装置,用于存储程序指令和/或数据。According to some embodiments of the present application, the memory 1120 may be a non-volatile memory or a volatile memory. The memory is any other medium that can be used to carry or store desired program codes in the form of instructions or data structures and that can be accessed by a computer, but is not limited to this. The memory in the embodiments of the present application may also be a circuit or any other device capable of realizing a storage function for storing program instructions and/or data.
本申请公开的机制的各实施例可以被实现在硬件、软件、固件或这些实现方法的组合中。本申请的实施例可实现为在可编程系统上执行的计算机程序或程序代码,该可编程系统包括至少一个处理器、存储系统(包括易失性和非易失性存储器和/或存储元件)、至少一个输入设备以及至少一个输出设备。The various embodiments of the mechanism disclosed in this application may be implemented in hardware, software, firmware, or a combination of these implementation methods. The embodiments of the present application can be implemented as a computer program or program code executed on a programmable system. The programmable system includes at least one processor and a storage system (including volatile and non-volatile memory and/or storage elements) , At least one input device and at least one output device.
可将程序代码应用于输入指令,以执行本申请描述的各功能并生成输出信息。可以按已知方式将输出信息应用于一个或多个输出设备。为了本申请的目的,处理系统包括具有诸如例如数字信号处理器(DSP)、微控制器、专用集成电路(ASIC)或微处理器之类的处理器的任何系统。Program codes can be applied to input instructions to perform the functions described in this application and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of this application, a processing system includes any system having a processor such as, for example, a digital signal processor (DSP), a microcontroller, an application specific integrated circuit (ASIC), or a microprocessor.
程序代码可以用高级程序化语言或面向对象的编程语言来实现,以便与处理系统通信。在需要时,也可用汇编语言或机器语言来实现程序代码。事实上,本申请中描述的机制不限于任何特定编程语言的范围。在任一情形下,该语言可以是编译语言或解释语言。The program code can be implemented in a high-level programming language or an object-oriented programming language to communicate with the processing system. When needed, assembly language or machine language can also be used to implement the program code. In fact, the mechanism described in this application is not limited to the scope of any particular programming language. In either case, the language can be a compiled language or an interpreted language.
在一些情况下,所公开的实施例可以以硬件、固件、软件或其任何组合来实现。所公开的实施例还可以被实现为由一个或多个暂时或非暂时性机器可读(例如,计算机可读)存储介质承载或存储在其上的指令,其可以由一个或多个处理器读取和执行。例如,指令可以通过网络或通过其他计算机可读介质分发。因此,机器可读介质可以包括用于以机器(例如,计算机)可读的形式存储或传输信息的任何机制,包括但不限于,软盘、光盘、光碟、只读存储器(CD-ROMs)、磁光盘、只读存储器(ROM)、随机存取存储器(RAM)、可擦除可编程只读存储器(EPROM)、电可擦除可编程只读存储器(EEPROM)、磁卡或光卡、闪存、或用于利用因特网以电、光、声或其他形式的传播信号来传输信息(例如,载波、红外信号数字信号等)的有形的机器可读存储器。因此,机器可读介质包括适合于以机器(例如,计算机)可读的形式存储或传输电子指令或信息的任何类型的机器可读介 质。In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments can also be implemented as instructions carried by or stored on one or more transient or non-transitory machine-readable (eg, computer-readable) storage media, which can be executed by one or more processors Read and execute. For example, the instructions can be distributed through a network or through other computer-readable media. Therefore, a machine-readable medium may include any mechanism for storing or transmitting information in a form readable by a machine (for example, a computer), including, but not limited to, floppy disks, optical disks, optical disks, read-only memories (CD-ROMs), magnetic Optical disk, read only memory (ROM), random access memory (RAM), erasable programmable read only memory (EPROM), electrically erasable programmable read only memory (EEPROM), magnetic or optical card, flash memory, or A tangible machine-readable memory used to transmit information (for example, carrier waves, infrared signals, digital signals, etc.) using the Internet with electric, optical, acoustic, or other forms of propagating signals. Therefore, a machine-readable medium includes any type of machine-readable medium suitable for storing or transmitting electronic instructions or information in a form readable by a machine (e.g., a computer).
在附图中,可以以特定布置和/或顺序示出一些结构或方法特征。然而,应该理解,可能不需要这样的特定布置和/或排序。而是,在一些实施例中,这些特征可以以不同于说明性附图中所示的方式和/或顺序来布置。另外,在特定图中包括结构或方法特征并不意味着暗示在所有实施例中都需要这样的特征,并且在一些实施例中,可以不包括这些特征或者可以与其他特征组合。In the drawings, some structural or method features may be shown in a specific arrangement and/or order. However, it should be understood that such a specific arrangement and/or ordering may not be required. Rather, in some embodiments, these features may be arranged in a different manner and/or order than shown in the illustrative drawings. In addition, the inclusion of structural or method features in a particular figure does not imply that such features are required in all embodiments, and in some embodiments, these features may not be included or may be combined with other features.
需要说明的是,本申请各设备实施例中提到的各单元/模块都是逻辑单元/模块,在物理上,一个逻辑单元/模块可以是一个物理单元/模块,也可以是一个物理单元/模块的一部分,还可以以多个物理单元/模块的组合实现,这些逻辑单元/模块本身的物理实现方式并不是最重要的,这些逻辑单元/模块所实现的功能的组合才是解决本申请所提出的技术问题的关键。此外,为了突出本申请的创新部分,本申请上述各设备实施例并没有将与解决本申请所提出的技术问题关系不太密切的单元/模块引入,这并不表明上述设备实施例并不存在其它的单元/模块。It should be noted that each unit/module mentioned in each device embodiment of this application is a logical unit/module. Physically, a logical unit/module can be a physical unit/module or a physical unit/ A part of the module can also be realized by a combination of multiple physical units/modules. The physical realization of these logical units/modules is not the most important. The combination of the functions implemented by these logical units/modules is the solution to this application. The key to the technical question raised. In addition, in order to highlight the innovative part of this application, the above-mentioned device embodiments of this application do not introduce units/modules that are not closely related to solving the technical problems proposed by this application. This does not mean that the above-mentioned device embodiments do not exist. Other units/modules.
需要说明的是,在本专利的示例和说明书中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that in the examples and specification of this patent, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply There is any such actual relationship or sequence between these entities or operations. Moreover, the terms "include", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes those that are not explicitly listed Other elements of, or also include elements inherent to this process, method, article or equipment. If there are no more restrictions, the element defined by the phrase "including one" does not exclude the existence of other same elements in the process, method, article, or equipment that includes the element.
虽然通过参照本申请的某些优选实施例,已经对本申请进行了图示和描述,但本领域的普通技术人员应该明白,可以在形式上和细节上对其作各种改变,而不偏离本申请的精神和范围。Although the present application has been illustrated and described by referring to certain preferred embodiments of the present application, those of ordinary skill in the art should understand that various changes can be made in form and details without departing from the present application. The spirit and scope of the application.

Claims (20)

  1. 一种用于智能家居设备的控制方法,其特征在于,包括:A control method for smart home equipment, which is characterized in that it comprises:
    第一客户端采用第一密钥对用于控制智能家居设备的控制指令进行加密,生成控制指令密文,并基于业务保护码生成第一密文校验信息,其中,所述控制指令密文能够被所述智能家居设备采用自身存储的所述第一密钥解密,所述第一密文校验信息能够被所述智能家居设备用于校验所述智能家居设备接收到的控制指令密文是否与所述第一客户端生成的控制指令密文相同;The first client uses the first key to encrypt the control instruction for controlling the smart home device, generates the control instruction ciphertext, and generates the first ciphertext verification information based on the service protection code, wherein the control instruction ciphertext It can be decrypted by the smart home device using the first key stored by itself, and the first cipher text verification information can be used by the smart home device to verify the control command password received by the smart home device. Whether the text is the same as the control instruction cipher text generated by the first client;
    第一客户端发送生成的所述控制指令密文和第一密文校验信息。The first client sends the generated control instruction ciphertext and the first ciphertext check information.
  2. 如权利要求1所述的方法,其特征在于,所述发送生成的所述控制指令密文和第一密文校验信息包括:The method according to claim 1, wherein said sending the generated control instruction ciphertext and first ciphertext check information comprises:
    所述第一客户端向服务器发送指令转发请求,其中,所述指令转发请求包括智能家居设备的设备ID、所述控制指令密文和所述第一密文校验信息,并且所述指令转发请求用于请求所述服务器向所述设备ID标识的智能家居设备转发所述控制指令密文和所述第一密文校验信息。The first client sends an instruction forwarding request to the server, where the instruction forwarding request includes the device ID of the smart home device, the control instruction ciphertext, and the first ciphertext verification information, and the instruction forwarding The request is used to request the server to forward the control instruction ciphertext and the first ciphertext verification information to the smart home device identified by the device ID.
  3. 如权利要求1所述的方法,其特征在于,所述发送生成的所述控制指令密文和第一密文校验信息包括:The method according to claim 1, wherein said sending the generated control instruction ciphertext and first ciphertext check information comprises:
    所述第一客户端向所述智能家居设备发送所述控制指令密文和第一密文校验信息。The first client sends the control instruction ciphertext and the first ciphertext verification information to the smart home device.
  4. 如权利要求1至3中任一项所述的方法,其特征在于,还包括:The method according to any one of claims 1 to 3, further comprising:
    第一客户端向服务器发送业务保护码设置请求;The first client sends a service protection code setting request to the server;
    第一客户端从所述服务器接收初始业务保护码,其中,所述初始业务保护码是所述服务器响应于所述业务保护码设置请求发送的;The first client receives an initial service protection code from the server, where the initial service protection code is sent by the server in response to the service protection code setting request;
    第一客户端提示用户修改所述初始业务保护码以得到第一业务保护码;The first client prompts the user to modify the initial service protection code to obtain the first service protection code;
    第一客户端存储所述第一业务保护码,并提示用户记录所述第一业务保护码。The first client stores the first service protection code, and prompts the user to record the first service protection code.
  5. 如权利要求4所述的方法,其特征在于,还包括:The method of claim 4, further comprising:
    第一客户端请求用户输入第二业务保护码以更新所述第一业务保护码,其中,所述第一业务保护码与所述第二业务保护码不同;The first client requests the user to input a second service protection code to update the first service protection code, where the first service protection code is different from the second service protection code;
    第一客户端向所述服务器发送业务保护码更新请求,其中,所述业务保护码更新请求用于请求所述服务器向第二客户端发送业务保护码更新通知,The first client sends a service protection code update request to the server, where the service protection code update request is used to request the server to send a service protection code update notification to the second client,
    其中,业务保护码更新通知用于通知所述第二客户端从用户获取所述第二业务保护码,以更新所述第二客户端上的第一业务保护码,所述第一客户端和第二客户端登录所述服务器所用的账号相同。Wherein, the service protection code update notification is used to notify the second client to obtain the second service protection code from the user to update the first service protection code on the second client, the first client and The account used by the second client to log in to the server is the same.
  6. 如权利要求1至5中任一项所述的方法,其特征在于,还包括:The method according to any one of claims 1 to 5, further comprising:
    所述第一客户端生成随机码,并基于所述随机码生成用于更新所述第一密钥的第二密钥,其中,所述第一密钥与所述第二密钥不同。The first client generates a random code, and generates a second key for updating the first key based on the random code, wherein the first key is different from the second key.
  7. 如权利要求6所述的方法,其特征在于,所述采基于所述随机码生成用于更新所述第一密钥的第二密钥包括:7. The method of claim 6, wherein said generating a second key for updating said first key based on said random code comprises:
    采用所述第一密钥对所述随机码和业务保护码进行加密,生成所述第二密钥。Encrypting the random code and the service protection code by using the first key to generate the second key.
  8. 如权利要求7所述的方法,其特征在于,还包括:The method of claim 7, further comprising:
    第一客户端基于所述业务保护码和随机码生成第一密钥校验信息,其中,所述第一密钥校验信息能够被所述智能家居设备用于校验接收到的随机码是否与所述第一客户端生成的随机码相同。The first client generates first key verification information based on the service protection code and the random code, where the first key verification information can be used by the smart home device to verify whether the received random code is The same as the random code generated by the first client.
  9. 如权利要求8所述的方法,其特征在于,所述第一客户端基于所述业务保护码和随机码生成第一密钥校验信息包括:The method according to claim 8, wherein the first client generating first key verification information based on the service protection code and random code comprises:
    所述第一客户端采用基于密钥的消息认证码算法,以所述业务保护码为输入密钥,对所述随机码进行变换生成所述第一密钥校验信息。The first client uses a key-based message authentication code algorithm, uses the service protection code as an input key, and transforms the random code to generate the first key verification information.
  10. 如权利要求8或9所述的方法,其特征在于,还包括:The method according to claim 8 or 9, further comprising:
    所述第一客户端向服务器发送密钥更新请求,其中,所述密钥更新请求包括所述随机码和所述第一密钥校验信息,并且用于请求所示服务器向所述智能家居设备转发所述随机码和所述第一密钥校验信息。The first client sends a key update request to the server, where the key update request includes the random code and the first key verification information, and is used to request the server to send the key to the smart home The device forwards the random code and the first key verification information.
  11. 如权利要求1所述的方法,其特征在于,所述基于业务保护码生成第一密文校验信息包括:The method according to claim 1, wherein said generating the first ciphertext verification information based on the service protection code comprises:
    所述第一客户端将所述业务保护码作为输入密钥,通过基于密钥的消息认证码算法对所述控制指令密文进行变换,得到所述第一密文校验信息。The first client uses the service protection code as an input key, and transforms the control instruction ciphertext through a key-based message authentication code algorithm to obtain the first ciphertext verification information.
  12. 如权利要求1所述的方法,其特征在于,还包括:The method of claim 1, further comprising:
    所述第一客户端向第二客户端发送由所述业务保护码加密的所述密钥,其中,所述第一客户端和第二客户端通过同一账号登录服务器。The first client sends the key encrypted by the service protection code to the second client, where the first client and the second client log in to the server through the same account.
  13. 一种用于智能家居设备的控制方法,其特征在于,包括:A control method for smart home equipment, which is characterized in that it comprises:
    智能家居设备接收控制指令密文和第一密文校验信息;The smart home device receives the control instruction ciphertext and the first ciphertext verification information;
    智能家居设备根据自身具有的业务保护码和所述第一密文校验信息,校验接收到的所述控制指令密文是否与客户端生成的控制指令密文相同;The smart home device checks whether the received control instruction ciphertext is the same as the control instruction ciphertext generated by the client according to the business protection code it has and the first ciphertext verification information;
    智能家居设备在校验出接收到的控制指令密文与客户端生成的控制指令密文相同的情况下,通过自身具有的第一密钥解密所述控制指令密文得到控制指令;When the smart home device verifies that the received control instruction ciphertext is the same as the control instruction ciphertext generated by the client, the smart home device decrypts the control instruction ciphertext with its own first key to obtain the control instruction;
    所述智能家居设备执行所述控制指令。The smart home device executes the control instruction.
  14. 如权利要求13所述的方法,其特征在于,所述智能家居设备根据自身具有的业务保护码和所述第一密文校验信息,校验接收到的所述控制指令密文是否与客户端生成的控制指令密文相同包括:The method according to claim 13, wherein the smart home device checks whether the received control instruction ciphertext is consistent with the client based on the service protection code it has and the first ciphertext verification information. The control instruction ciphertext generated by the terminal includes:
    所述智能家居设备将所述自身具有的业务保护码作为输入密钥,通过基于密钥的消息认证码算法对接收到的所述控制指令密文进行变换得到第二密文校验信息;The smart home device uses the service protection code it has as an input key, and transforms the received control instruction ciphertext through a key-based message authentication code algorithm to obtain second ciphertext verification information;
    所述智能家居设备在确定所述第二密文校验信息与接收到的所述第一密文校验信息相同的情况下,校验出接收到的所述控制指令密文与客户端生成的控制指令密文相同。When the smart home device determines that the second cipher text verification information is the same as the received first cipher text verification information, the smart home device verifies that the received control instruction cipher text is generated by the client The ciphertext of the control command is the same.
  15. 如权利要求13或14所述的方法,其特征在于,还包括:The method according to claim 13 or 14, further comprising:
    智能家居设备接收服务器发送的随机码和第一密钥校验信息;The smart home device receives the random code and the first key verification information sent by the server;
    智能家居设备根据所述第一密钥校验信息校验接收到的随机码是否与客户端生成的随机码相同;The smart home device verifies whether the received random code is the same as the random code generated by the client according to the first key verification information;
    智能家居设备在校验出接收到的随机码与客户端生成的随机码相同的情况下,基于所述随机码生成第二密钥,以更新所述智能家居设备中的第一密钥。When the smart home device verifies that the received random code is the same as the random code generated by the client, the second key is generated based on the random code to update the first key in the smart home device.
  16. 如权利要求15所述的方法,其特征在于,所述智能家居设备根据所述第一密钥校验信息校验接收到的随机码是否与客户端生成的随机码相同包括:The method of claim 15, wherein the smart home device checking whether the received random code is the same as the random code generated by the client according to the first key verification information comprises:
    所述智能家居设备将所述业务保护码作为输入密钥,通过基于密钥的消息认证码算法对接收到的所述随机码进行变换生成第二密钥校验信息;The smart home device uses the service protection code as an input key, and transforms the received random code through a key-based message authentication code algorithm to generate second key verification information;
    所述智能家居设备确定生成的所述第二密钥校验信息是否与接收到的所述第一密钥校验信息相同;Determining, by the smart home device, whether the generated second key verification information is the same as the received first key verification information;
    智能家居设备在校验出所述第一密钥校验信息与所述第二密钥校验信息相同的情况下,确定接收到的随机码与客户端生成的随机码相同。When the smart home device verifies that the first key verification information is the same as the second key verification information, it determines that the received random code is the same as the random code generated by the client.
  17. 如权利要求15所述的方法,其特征在于,所述基于所述随机码生成第二密钥包括:The method of claim 15, wherein the generating a second key based on the random code comprises:
    所述智能家居设备采用所述第一密钥对所述业务保护码和接收到的所述随机码进行加密,生成所述第二密钥。The smart home device uses the first key to encrypt the service protection code and the received random code to generate the second key.
  18. 一种用于智能家居设备的控制方法,其特征在于,包括:A control method for smart home equipment, which is characterized in that it comprises:
    服务器从第一客户端接收指令转发请求,其中,所述指令转发请求包括智能家居设备的设备ID、控制指令密文和第一密文校验信息,其中,所述控制指令密文能够被所述智能家居设备采用自身存储的所述第一密钥解密,所述第一密文校验信息能够被所述智能家居设备用于校验所述智能家居设备接收到的控制指令密文是否与所述第一客户端生成的控制指令密文相同;The server receives an instruction forwarding request from the first client, where the instruction forwarding request includes the device ID of the smart home device, the control instruction ciphertext, and the first ciphertext verification information, wherein the control instruction ciphertext can be The smart home device uses the first key stored in itself to decrypt, and the first cipher text verification information can be used by the smart home device to verify whether the cipher text of the control instruction received by the smart home device is consistent with The control instruction ciphertexts generated by the first client are the same;
    所述服务器向所述设备ID标识的所述智能家居设备转发所述控制指令密文和第一密文校验信息。The server forwards the control instruction ciphertext and the first ciphertext verification information to the smart home device identified by the device ID.
  19. 一种计算机可读介质,其特征在于,所述计算机可读介质上存储有指令,该指令在机器上执行时使机器执行权利要求1至18中任一项所述的用于智能家居设备的控制方法。A computer-readable medium, characterized in that instructions are stored on the computer-readable medium, and when the instructions are executed on a machine, the machine executes the smart home device according to any one of claims 1 to 18. Control Method.
  20. 一种终端,包括:A terminal including:
    一个或多个处理器;以及One or more processors; and
    存储器,用于存储指令;当所述指令被所述一个或多个处理器执行时,使得所述终端执行权利要求1至18中任一项所述的用于智能家居设备的控制方法。The memory is used to store instructions; when the instructions are executed by the one or more processors, the terminal is made to execute the control method for smart home devices according to any one of claims 1 to 18.
PCT/CN2020/135318 2019-12-16 2020-12-10 Control method for smart home devices and medium and terminal thereof WO2021121125A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201911293948.X 2019-12-16
CN201911293948.XA CN112987581B (en) 2019-12-16 2019-12-16 Control method for intelligent household equipment, medium and terminal thereof

Publications (1)

Publication Number Publication Date
WO2021121125A1 true WO2021121125A1 (en) 2021-06-24

Family

ID=76343226

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/135318 WO2021121125A1 (en) 2019-12-16 2020-12-10 Control method for smart home devices and medium and terminal thereof

Country Status (2)

Country Link
CN (1) CN112987581B (en)
WO (1) WO2021121125A1 (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113777935A (en) * 2021-08-16 2021-12-10 珠海格力电器股份有限公司 Control method and device of intelligent equipment and computer readable storage medium
CN114268502A (en) * 2021-12-24 2022-04-01 北京深思数盾科技股份有限公司 Intelligent device activation method, server, terminal device and intelligent device
CN114285665A (en) * 2021-12-30 2022-04-05 北京天融信网络安全技术有限公司 Method and device for converting password encryption mode
CN114499964A (en) * 2021-12-24 2022-05-13 青岛海尔科技有限公司 Device control method and apparatus, storage medium, and electronic apparatus
CN114756011A (en) * 2022-05-27 2022-07-15 西安电子科技大学 Intelligent home abnormity detection method based on TV-PKEET
CN115021895A (en) * 2021-11-19 2022-09-06 荣耀终端有限公司 Data protection method and system and electronic equipment
CN115766281A (en) * 2022-12-09 2023-03-07 北京深盾科技股份有限公司 Method, system, electronic device and storage medium for preventing replay attack
WO2023050913A1 (en) * 2021-09-29 2023-04-06 达闼科技(北京)有限公司 Smart device cloud server access method and apparatus, medium, device and system
CN116170802A (en) * 2023-04-26 2023-05-26 浙江鹏信信息科技股份有限公司 Internet of things communication method, system and computer readable storage medium
CN117135626A (en) * 2023-10-25 2023-11-28 北京数盾信息科技有限公司 Safe Internet of things control system based on high-speed encryption technology

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115567565A (en) * 2021-06-30 2023-01-03 华为技术有限公司 Equipment control method and device
CN113392419B (en) * 2021-07-05 2022-12-23 南方电网科学研究院有限责任公司 Safety synchronization control method, device and equipment based on Chinese remainder theorem
CN114584415B (en) * 2022-01-24 2023-11-28 杭州博联智能科技股份有限公司 Method, system, device and medium for realizing scene distribution of full house intelligence

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104954454A (en) * 2015-06-03 2015-09-30 维融集团有限公司 Intelligent control method and device
CN105141584A (en) * 2015-07-29 2015-12-09 宇龙计算机通信科技(深圳)有限公司 Smart home system equipment authentication methods, and devices
US20160091879A1 (en) * 2013-11-15 2016-03-31 Apple Inc. Aggregating automated-environment information across a neighborhood
CN106338923A (en) * 2016-09-14 2017-01-18 上海百芝龙网络科技有限公司 Intelligent household control system
CN107786337A (en) * 2016-08-26 2018-03-09 中兴通讯股份有限公司 The encryption and decryption control method of intelligent domestic system, device, home equipment
CN108173720A (en) * 2017-12-07 2018-06-15 无锡小天鹅股份有限公司 The control method and system of household electrical appliance, home appliance system
CN109981519A (en) * 2017-12-27 2019-07-05 西安比卓电子科技有限公司 A kind of smart home system

Family Cites Families (29)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1516388A (en) * 2003-08-26 2004-07-28 胡祥义 Network accreditation method based no symmetric cryptosystem
CN101141348A (en) * 2007-09-20 2008-03-12 成都方程式电子有限公司 Intelligent domestic system and safety implementing method
CN201750439U (en) * 2010-05-26 2011-02-16 魏星 Intelligent home remote-control system and intelligent home server
CN102263776A (en) * 2010-05-26 2011-11-30 魏星 Intelligent household remote control system and intelligent household server
CN103188080B (en) * 2011-12-31 2018-02-09 中兴通讯股份有限公司 A kind of machinery of consultation of key authentication end to end of identity-based mark and system
CN102682506B (en) * 2012-05-25 2015-07-08 北京华大信安科技有限公司 Intelligent Bluetooth door access control method and device based on symmetric cryptographic technique
CN104426725A (en) * 2013-09-08 2015-03-18 郑州朗鑫智能电子科技有限公司 Intelligent home furnishing system based on remote control mode
CN105024827A (en) * 2015-08-25 2015-11-04 苏州科贝尔实业有限公司 System and method for performing digital rights management for terminal equipment
CN106101260A (en) * 2016-07-06 2016-11-09 杨炳 Smart Home security access system
CN107171912A (en) * 2017-06-30 2017-09-15 广东欧珀移动通信有限公司 A kind of method of intelligent domestic system, terminal and Internet of Things connection
CN109922022A (en) * 2017-12-12 2019-06-21 中国电信股份有限公司 Internet of Things communication means, platform, terminal and system
CN110246239A (en) * 2018-03-09 2019-09-17 阳卓昆 A kind of wireless communications method of intelligent wireless door lock
CN109040261A (en) * 2018-08-10 2018-12-18 南京熊猫电子制造有限公司 A kind of the Internet of Things management platform and management method of intelligent refrigerator
CN109377593A (en) * 2018-09-18 2019-02-22 深圳壹账通智能科技有限公司 Gate-ban Monitoring System of Home House and control method
CN109587110A (en) * 2018-10-09 2019-04-05 阿里巴巴集团控股有限公司 A kind of weak passwurd detection method, device, computer equipment and service server
CN109257170A (en) * 2018-11-02 2019-01-22 美的集团股份有限公司 Cryptographic key negotiation method, equipment, terminal, storage medium and system
CN109218150A (en) * 2018-11-05 2019-01-15 珠海格力电器股份有限公司 Control method, the shared application method of household electrical appliance, computer readable storage medium and household electrical appliance of household electrical appliance
CN109618334B (en) * 2018-11-21 2022-03-22 北京华大智宝电子系统有限公司 Control method and related equipment
CN109936580A (en) * 2018-11-26 2019-06-25 西安得安信息技术有限公司 Password management services platform towards intelligent terminal and application system
CN109495250B (en) * 2018-12-03 2021-08-10 如般量子科技有限公司 Quantum-computation-resistant intelligent home communication method and system based on key fob
CN110061894B (en) * 2019-03-29 2023-09-19 国民技术股份有限公司 Household control method and system and household master control device
CN109981667B (en) * 2019-04-01 2020-07-03 北京纬百科技有限公司 User data transmission method and device
CN110191086A (en) * 2019-04-15 2019-08-30 平安科技(深圳)有限公司 Intelligentized Furniture remote security control method, device, computer equipment and storage medium
CN110061849A (en) * 2019-04-29 2019-07-26 中兴新能源汽车有限责任公司 Verification method, server, mobile unit and the storage medium of mobile unit
CN110336788B (en) * 2019-05-27 2021-11-30 北京折叠未来科技有限公司 Data security interaction method for Internet of things equipment and mobile terminal
CN110266652A (en) * 2019-05-28 2019-09-20 广东工业大学 A kind of smart home security system
CN110417804B (en) * 2019-08-07 2021-11-26 济南新吉纳远程测控股份有限公司 Bidirectional identity authentication encryption communication method and system suitable for single-chip microcomputer implementation
CN110535641B (en) * 2019-08-27 2022-06-10 中国神华能源股份有限公司神朔铁路分公司 Key management method and apparatus, computer device, and storage medium
CN110505066A (en) * 2019-08-30 2019-11-26 北京字节跳动网络技术有限公司 A kind of data transmission method, device, equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160091879A1 (en) * 2013-11-15 2016-03-31 Apple Inc. Aggregating automated-environment information across a neighborhood
CN104954454A (en) * 2015-06-03 2015-09-30 维融集团有限公司 Intelligent control method and device
CN105141584A (en) * 2015-07-29 2015-12-09 宇龙计算机通信科技(深圳)有限公司 Smart home system equipment authentication methods, and devices
CN107786337A (en) * 2016-08-26 2018-03-09 中兴通讯股份有限公司 The encryption and decryption control method of intelligent domestic system, device, home equipment
CN106338923A (en) * 2016-09-14 2017-01-18 上海百芝龙网络科技有限公司 Intelligent household control system
CN108173720A (en) * 2017-12-07 2018-06-15 无锡小天鹅股份有限公司 The control method and system of household electrical appliance, home appliance system
CN109981519A (en) * 2017-12-27 2019-07-05 西安比卓电子科技有限公司 A kind of smart home system

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113777935B (en) * 2021-08-16 2023-10-03 珠海格力电器股份有限公司 Control method and device of intelligent equipment and computer readable storage medium
CN113777935A (en) * 2021-08-16 2021-12-10 珠海格力电器股份有限公司 Control method and device of intelligent equipment and computer readable storage medium
WO2023050913A1 (en) * 2021-09-29 2023-04-06 达闼科技(北京)有限公司 Smart device cloud server access method and apparatus, medium, device and system
CN115021895A (en) * 2021-11-19 2022-09-06 荣耀终端有限公司 Data protection method and system and electronic equipment
CN114268502A (en) * 2021-12-24 2022-04-01 北京深思数盾科技股份有限公司 Intelligent device activation method, server, terminal device and intelligent device
CN114499964A (en) * 2021-12-24 2022-05-13 青岛海尔科技有限公司 Device control method and apparatus, storage medium, and electronic apparatus
CN114499964B (en) * 2021-12-24 2023-12-19 青岛海尔科技有限公司 Equipment control method and device, storage medium and electronic device
CN114285665A (en) * 2021-12-30 2022-04-05 北京天融信网络安全技术有限公司 Method and device for converting password encryption mode
CN114756011A (en) * 2022-05-27 2022-07-15 西安电子科技大学 Intelligent home abnormity detection method based on TV-PKEET
CN115766281A (en) * 2022-12-09 2023-03-07 北京深盾科技股份有限公司 Method, system, electronic device and storage medium for preventing replay attack
CN116170802B (en) * 2023-04-26 2023-07-07 浙江鹏信信息科技股份有限公司 Internet of things communication method, system and computer readable storage medium
CN116170802A (en) * 2023-04-26 2023-05-26 浙江鹏信信息科技股份有限公司 Internet of things communication method, system and computer readable storage medium
CN117135626A (en) * 2023-10-25 2023-11-28 北京数盾信息科技有限公司 Safe Internet of things control system based on high-speed encryption technology
CN117135626B (en) * 2023-10-25 2024-01-26 北京数盾信息科技有限公司 Safe Internet of things control system based on high-speed encryption technology

Also Published As

Publication number Publication date
CN112987581A (en) 2021-06-18
CN112987581B (en) 2022-11-11

Similar Documents

Publication Publication Date Title
WO2021121125A1 (en) Control method for smart home devices and medium and terminal thereof
US10785585B2 (en) Method of manufacturing a hearing device and hearing device with certificate
US9635014B2 (en) Method and apparatus for authenticating client credentials
US20210144488A1 (en) Hearing device and method of updating a hearing device
CN106330857B (en) Client device with credentials and related methods
WO2021135593A1 (en) Device sharing method and electronic device
WO2016201811A1 (en) Identity authentication method, apparatus and system
US11546699B2 (en) Hearing device with service mode and related method
JP2021007233A (en) Device and related method for secure hearing device communication
US20230100148A1 (en) Electronic device for performing edge computing service, and operating method of electronic device
WO2022111187A1 (en) Terminal authentication method and apparatus, computer device, and storage medium
CN114125832A (en) Network connection method and terminal, network device to be configured and storage medium
CN114245375B (en) Cross-device key distribution method and electronic device
CN110740109A (en) Network device, method for security, and computer-readable storage medium
WO2023141876A1 (en) Data transmission method, apparatus and system, electronic device, and readable medium
CN114143198B (en) Firmware upgrading method
WO2023071733A1 (en) Device control method and related device
US11102655B1 (en) Secure device action initiation using a remote device
WO2023169545A1 (en) Offline device control method and related apparatus
CN116782186A (en) Offline equipment control method and related device
DK201470778A1 (en) Hearing device with service mode and related method

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20903116

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20903116

Country of ref document: EP

Kind code of ref document: A1