CN115604390A - Offline control method and device for intelligent equipment - Google Patents

Offline control method and device for intelligent equipment Download PDF

Info

Publication number
CN115604390A
CN115604390A CN202110768849.3A CN202110768849A CN115604390A CN 115604390 A CN115604390 A CN 115604390A CN 202110768849 A CN202110768849 A CN 202110768849A CN 115604390 A CN115604390 A CN 115604390A
Authority
CN
China
Prior art keywords
terminal
offline control
control instruction
intelligent
instruction
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110768849.3A
Other languages
Chinese (zh)
Inventor
潘嘉明
陈栋梁
于海波
张东胜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yunding Network Technology Beijing Co Ltd
Original Assignee
Yunding Network Technology Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yunding Network Technology Beijing Co Ltd filed Critical Yunding Network Technology Beijing Co Ltd
Priority to CN202110768849.3A priority Critical patent/CN115604390A/en
Priority to PCT/CN2022/104420 priority patent/WO2023280277A1/en
Publication of CN115604390A publication Critical patent/CN115604390A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/72409User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories
    • H04M1/72415User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories for remote control of appliances
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
    • G07C9/00Individual registration on entry or exit
    • G07C9/00174Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys
    • G07C9/00309Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys operated with bidirectional data transmission between data carrier and locks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3297Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving time stamps, e.g. generation of time stamps
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/72409User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/72409User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories
    • H04M1/72412User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories using two-way short-range wireless interfaces
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/06Authentication
    • H04W12/068Authentication using credential vaults, e.g. password manager applications or one time password [OTP] applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup

Abstract

The embodiment of the application discloses an off-line control method and device for intelligent equipment. One embodiment of the method comprises: under the condition that data connection is established between the intelligent equipment and the terminal, the intelligent equipment receives an offline control instruction sent by the terminal, wherein the offline control instruction is obtained by processing the offline control instruction in the terminal by using at least equipment information of the intelligent equipment; the intelligent equipment verifies the received offline control instruction at least by using the equipment information of the intelligent equipment to obtain an instruction verification result; and under the condition that the instruction verification result represents that the offline control instruction meets the offline control condition, the intelligent equipment executes the offline control instruction.

Description

Offline control method and device for intelligent equipment
Technical Field
The embodiment of the application relates to the technical field of security equipment, in particular to an offline control method and device for intelligent equipment.
Background
When the security equipment is controlled by a terminal such as a mobile phone, a situation that the terminal cannot establish communication with the server may exist, for example, when a communication signal at the position of the terminal is weak or no signal exists, instruction transmission between the security equipment and the server cannot be realized at this time, so that control over the security equipment cannot be realized.
Disclosure of Invention
The embodiment of the application provides an off-line control method and device for intelligent equipment.
In a first aspect, an embodiment of the present application provides an offline control method for an intelligent device, which is applicable to the intelligent device, and the method includes:
under the condition that data connection is established between the intelligent equipment and the terminal, the intelligent equipment receives an offline control instruction sent by the terminal, wherein the offline control instruction is obtained by processing the offline control instruction in the terminal by using at least equipment information of the intelligent equipment;
the intelligent equipment verifies the received offline control instruction at least by using the equipment information of the intelligent equipment to obtain an instruction verification result;
and under the condition that the instruction verification result represents that the offline control instruction meets the offline control condition, the intelligent equipment executes the offline control instruction.
In some embodiments, the offline control instruction in the terminal is: and under the condition that data connection is established between the terminal and the server, the server encrypts an offline control instruction in the server by using the session key and the timestamp information of the intelligent equipment and the equipment information of the intelligent equipment and transmits the offline control instruction to the terminal.
In some embodiments, the smart device verifies the received offline control instruction at least using the device information of the smart device to obtain an instruction verification result, including at least:
the intelligent equipment at least uses the equipment information of the intelligent equipment to analyze a first character string contained in the offline control instruction;
the intelligent device judges whether the first character string is matched with a second character string stored in the intelligent device or not to obtain an instruction verification result;
under the condition that the first character string is matched with the second character string, the instruction verification result represents that the offline control instruction meets offline control conditions; and under the condition that the first character string is not matched with the second character string, the instruction verification result represents that the offline control instruction does not meet offline control conditions.
In some embodiments, before the smart device parses out the first character string included in the offline control instruction using at least device information of the smart device, the method further includes:
the intelligent equipment judges whether the survival time of the offline control instruction exceeds a preset first target time;
under the condition that the survival time of the offline control instruction exceeds the first target time, the intelligent equipment generates an instruction verification result representing that the offline control instruction does not meet the offline control condition;
under the condition that the survival time of the offline control instruction does not exceed the first target time, the intelligent device executes the following steps: and analyzing a first character string contained in the offline control instruction by using at least the equipment information of the intelligent equipment.
In some embodiments, before the smart device parses out the first character string included in the offline control instruction using at least device information of the smart device, the method further includes:
the intelligent equipment judges whether a Bluetooth key is stored in the intelligent equipment;
under the condition that no Bluetooth key is stored in the intelligent equipment or the survival time of the Bluetooth key stored in the intelligent equipment is greater than or equal to a preset second target time length, the intelligent equipment generates an instruction verification result representing that the offline control instruction does not meet the offline control condition;
under the condition that the survival time of the Bluetooth key stored in the intelligent equipment is less than the second target time, the intelligent equipment executes the following steps: analyzing a first character string contained in the offline control instruction by using at least equipment information of the intelligent equipment;
the method for analyzing the first character string contained in the offline control instruction by the intelligent device at least by using the device information of the intelligent device includes:
the intelligent device at least uses the device information of the intelligent device and the Bluetooth key in the intelligent device to analyze out a first character string contained in the offline control command.
In some embodiments, in a case that no bluetooth key is stored in the smart device or a lifetime of the bluetooth key stored in the smart device is greater than or equal to a preset second target duration, the method further includes:
the intelligent equipment receives a Bluetooth key sent by the terminal, and the Bluetooth key is obtained by encrypting the Bluetooth key by using at least equipment information of the intelligent equipment by a server and is sent to the terminal under the condition that data connection is established between the server and the terminal;
the intelligent equipment at least uses the equipment information of the intelligent equipment to decrypt the received Bluetooth key and stores the decrypted Bluetooth key;
and the intelligent equipment transmits a first notification message to the terminal to trigger the terminal to send an offline control instruction to the intelligent equipment again.
In some embodiments, when a bluetooth key in the terminal is a bluetooth key sent by the server to the terminal when a data connection is established between the terminal and the server, the bluetooth key sent by the server to the terminal is obtained by encrypting, by the server, at least a session key of the smart device, timestamp information, and device information of the smart device;
before the smart device stores the decrypted bluetooth key, the method further includes:
and the intelligent equipment at least uses the session key, the timestamp information and the equipment information of the intelligent equipment to decrypt the decrypted Bluetooth key so as to obtain the decrypted Bluetooth key.
In some embodiments, the offline control instruction received by the intelligent device is an instruction obtained by encrypting, by the terminal, at least device information of the offline control instruction in the terminal;
the device information at least comprises device address information of the intelligent device and/or device serial number information of the intelligent device.
In some embodiments, before the smart device verifies the received offline control instruction using at least the device information of the smart device to obtain an instruction verification result, the method further includes:
and the intelligent equipment at least decrypts the received offline control instruction by using the equipment information so as to obtain the decrypted offline control instruction.
In some embodiments, the method further comprises:
and after receiving the electric quantity acquisition instruction sent by the terminal, the intelligent device transmits the current electric quantity parameter of the intelligent device to the terminal, wherein the current electric quantity parameter is used for executing a corresponding battery processing instruction.
In some embodiments, the method further comprises:
the intelligent device outputs online control prompt information, and the online control prompt information is used for prompting online control under the condition that data connection is established between the terminal and the server.
In a second aspect, an embodiment of the present application provides another offline control method for an intelligent device, which is applied to a terminal, and the method includes:
under the condition that data connection is established between a terminal and a server, the terminal receives an offline control instruction sent by the server;
under the condition that data connection is established between the intelligent equipment and the terminal, the terminal at least utilizes the equipment information of the intelligent equipment to process an offline control instruction in the terminal;
the terminal sends the processed offline control instruction to the intelligent equipment, so that the intelligent equipment verifies the received offline control instruction at least by using the equipment information of the intelligent equipment to obtain an instruction verification result, and the intelligent equipment executes the offline control instruction under the condition that the instruction verification result represents that the offline control instruction meets the offline control condition.
In a third aspect, an embodiment of the present application provides another offline control method for an intelligent device, which is applied to a server, and the method includes:
under the condition that data connection is established between a terminal and a server, the server receives an instruction acquisition request sent by the terminal;
the server at least utilizes the session key and the timestamp information of the intelligent device and the device information of the intelligent device to process an offline control instruction in the server and send the processed offline control instruction to the terminal, so that under the condition that data connection is established between the intelligent device and the terminal, the terminal at least utilizes the device information of the intelligent device to process the offline control instruction in the terminal and sends the processed offline control instruction to the intelligent device, the intelligent device at least verifies the received offline control instruction by using the device information of the intelligent device to obtain an instruction verification result, and under the condition that the instruction verification result represents that the offline control instruction meets an offline control condition, the intelligent device executes the offline control instruction.
In a fourth aspect, an embodiment of the present application provides an offline control apparatus for an intelligent device, where the apparatus is applied to the intelligent device, and the apparatus includes:
the first receiving unit is used for receiving an offline control instruction sent by a terminal under the condition that data connection is established between the intelligent equipment and the terminal, wherein the offline control instruction is obtained by processing the offline control instruction in the terminal by using at least equipment information of the intelligent equipment;
the instruction verification unit is used for verifying at least the equipment information of the intelligent equipment used by the received offline control instruction so as to obtain an instruction verification result;
and the instruction execution unit is used for executing the offline control instruction under the condition that the instruction verification result represents that the offline control instruction meets the offline control condition.
In a fifth aspect, an embodiment of the present application provides an intelligent device, including:
one or more processors;
a storage device having one or more programs stored thereon;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement any of the methods of offline control of a smart device as implemented by the smart device described above.
In a sixth aspect, an embodiment of the present application provides another offline control apparatus for an intelligent device, where the apparatus is applied to a terminal, and the apparatus includes:
the second receiving unit is used for receiving an offline control instruction sent by the server under the condition that data connection is established between the terminal and the server;
the first processing unit is used for processing the offline control instruction in the terminal by using at least the equipment information of the intelligent equipment under the condition that the data connection is disconnected between the terminal and the server and the data connection is established between the intelligent equipment and the terminal;
the first sending unit is configured to send the processed offline control instruction to the intelligent device, so that the intelligent device verifies the received offline control instruction at least by using device information of the intelligent device to obtain an instruction verification result, and the intelligent device executes the offline control instruction when the instruction verification result indicates that the offline control instruction meets an offline control condition.
In a seventh aspect, an embodiment of the present application provides a terminal, including:
one or more processors;
a memory having one or more programs stored thereon;
when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the offline control method for the intelligent device as implemented by the terminal described above.
In an eighth aspect, an embodiment of the present application provides another offline control apparatus for an intelligent device, where the apparatus is applied to a server, and the apparatus includes:
the device comprises a request receiving unit, a processing unit and a processing unit, wherein the request receiving unit is used for receiving an instruction acquisition request sent by a terminal under the condition that data connection is established between the terminal and a server;
the second processing unit is used for processing the offline control instruction in the server by using at least the session key, the timestamp information and the device information of the intelligent device;
and a second sending unit, configured to send the processed offline control instruction to the terminal, so that when the data connection is disconnected between the terminal and the server and a data connection is established between the intelligent device and the terminal, the terminal processes the offline control instruction in the terminal by using at least the device information of the intelligent device and sends the processed offline control instruction to the intelligent device, so that the intelligent device verifies the received offline control instruction by using at least the device information of the intelligent device to obtain an instruction verification result, and when the instruction verification result indicates that the offline control instruction meets an offline control condition, the intelligent device executes the offline control instruction.
In a ninth aspect, an embodiment of the present application provides a server, including:
one or more processors;
a storage device having one or more programs stored thereon;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement an offline control method for a smart device as implemented by the server described above.
In a tenth aspect, the present application provides a computer-readable medium, on which a computer program is stored, where the program, when executed by a processor, implements the method as described in any implementation manner of the first aspect.
In an eleventh aspect, the present application provides a processor, configured to execute a program, where the program executes to perform the method described in any implementation manner of the first aspect.
According to the method and the device for off-line control of the intelligent device, under the condition that data connection is established between the intelligent device and the terminal, the intelligent device receives an off-line control instruction which is sent by the terminal and is obtained by processing at least device information of the intelligent device, the received off-line control instruction is verified by the intelligent device by using at least the device information of the intelligent device, an instruction verification result is obtained, and the intelligent device executes the off-line control instruction under the condition that the instruction verification result represents that the off-line control instruction meets an off-line control condition. Therefore, the technical scheme in the embodiment of the application is not limited by communication connection between the terminal and the server, and even under the condition that communication between the terminal and the server is unavailable, the intelligent device can receive the offline control instruction sent by the terminal and use the device information of the intelligent device to perform instruction verification, so that the intelligent device can execute the offline control instruction under the condition that the offline control condition is met, and offline control over the intelligent device is achieved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below. It is obvious that the drawings in the following description are only some examples or embodiments of the present application, and that for a person skilled in the art, other drawings can be obtained from the provided drawings without inventive effort, and that the present application can also be applied to other similar scenarios from the provided drawings. Unless otherwise apparent from the context, or otherwise indicated, like reference numbers in the figures refer to the same structure or operation.
FIG. 1 is an exemplary system architecture diagram to which some embodiments of the present application may be applied;
FIG. 2a is a flowchart of an embodiment of a method for offline control of a smart device by a smart device according to the present application;
FIG. 2b is a flow chart of one embodiment of a method of an embodiment of the present application for offline control of a door lock;
FIG. 3 is a flowchart of one embodiment of a method for offline control of an intelligent device by a terminal according to the present application;
FIG. 4 is a flow chart of one embodiment of a method for server-to-smart device offline control according to the present application;
FIG. 5a is a flow chart of one embodiment of a method for offline control of a smart device of the present application;
fig. 5b is a flowchart of an implementation of an encryption algorithm for PaaS to encrypt an offline control instruction or a bluetooth key in the present application;
fig. 5c is a flowchart of an implementation of an encryption algorithm for encrypting the offline control command by the mobile phone in the present application;
FIG. 6a is a flowchart illustrating the verification of an offline control command by an intelligent device according to the present application;
FIG. 6b is a flowchart of an implementation of the encryption algorithm for the door lock to encrypt the token in the present application;
fig. 7 and fig. 8 are another flow charts of the present application for the smart device to verify the offline control command;
fig. 9 is a partial flowchart of the processing for bluetooth key expiration in the smart device of the present application;
FIG. 10 is another flow chart of an embodiment of a method for offline smart device control by a smart device according to the present application;
FIG. 11 is a flow chart of one embodiment of online control of a door lock;
fig. 12 is a schematic structural diagram of an embodiment of an offline control apparatus for an intelligent device, which is applied to the intelligent device in the embodiment of the present application;
fig. 13 is a schematic structural diagram of an embodiment of an offline control apparatus for an intelligent device, which is applied to a terminal in the embodiment of the present application;
fig. 14 is a schematic structural diagram of an embodiment of an offline control apparatus for an intelligent device, which is applied to a server in an embodiment of the present application;
fig. 15 is a schematic structural diagram of an embodiment of an intelligent device, a terminal, or a server provided in an embodiment of the present application.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. The described embodiments are only some embodiments of the present application and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings. The embodiments and features of the embodiments in the present application may be combined with each other without conflict.
It should be understood that "system", "apparatus", "unit" and/or "module" as used herein is a method for distinguishing different components, elements, parts or assemblies at different levels. However, other words may be substituted by other expressions if they accomplish the same purpose.
As used in this application and the appended claims, the terms "a," "an," "the," and/or "the" are not intended to be inclusive in the singular, but rather are intended to be inclusive in the plural unless the context clearly dictates otherwise. In general, the terms "comprises" and "comprising" merely indicate that steps and elements are included which are explicitly identified, that the steps and elements do not form an exclusive list, and that a method or apparatus may include other steps or elements. An element defined by the phrase "comprising a … …" does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.
In the description of the embodiments herein, "/" means "or" unless otherwise specified, for example, a/B may mean a or B; "and/or" herein is merely an association describing an associated object, and means that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of the present application, "a plurality" means two or more than two.
In the following, the terms "first", "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature.
Flow charts are used herein to illustrate operations performed by systems according to embodiments of the present application. It should be understood that the preceding or following operations are not necessarily performed in the exact order in which they are performed. Rather, the various steps may be processed in reverse order or simultaneously. Meanwhile, other operations may be added to the processes, or a certain step or several steps of operations may be removed from the processes.
The inventor of the application finds out through research that: in consideration of safety, security and protection equipment such as a door lock establishes data connection between a mobile phone connected with Bluetooth and a server and performs handshake in a challenge code mode, session keys are exchanged in the handshake process, encryption and decryption processing and analysis are performed by using the session keys, and the session keys are regenerated every time. However, in some special scenes such as rural areas in cities and towns and stairways of cheese buildings, the situation that the mobile phone signals are weak or even no signals exist may exist, in such a situation, the door lock is connected with the mobile phone through bluetooth and cannot be connected with the mobile phone in a network, and at the moment, instruction transmission between the door lock and the server cannot be realized, so that control over security equipment cannot be realized.
The inventor further researches and discovers that in order to ensure safety, the information of the door lock can be used for processing the offline control instruction at the mobile phone side, and then when the door lock cannot communicate with the server, the mobile phone issues the offline control instruction to the door lock, so that offline control over the door lock is realized.
Fig. 1 illustrates an exemplary system architecture 100 to which some embodiments of the offline control method for an intelligent device or the offline control apparatus for an intelligent device of the present application may be applied.
As shown in fig. 1, the system architecture 100 may include a terminal 101, a smart device 102, a server 103, and a network 104. Network 104 is the medium used to provide communication links between terminals 101 and server 103. Network 104 may include wireless communication links and the like. And the terminal 101 and the intelligent device 102 communicate with each other through bluetooth or WiFi.
A user may use the terminal 101 to interact with the server 103 via the network 104 to receive or transmit instructions or the like. Various client applications, such as a control application of the smart device 102, may be installed on the terminal 101.
The terminal 101 may be hardware or software. When the terminal 101 is hardware, it may be various electronic devices, including but not limited to electronic devices such as a smart phone, a tablet computer, and a wearable device. When the terminal 101 is software, it can be installed in the electronic devices listed above. It may be implemented as multiple pieces of software or software modules (e.g., to provide distributed services) or as a single piece of software or software module. The embodiment of the present application does not set any limit to the specific type of the electronic device.
The server 103 may be a server that provides various services, such as a backend server that provides support for the smart device 102. The background server may execute a corresponding function in response to receiving the related instruction of the intelligent device 102 forwarded by the terminal 101, or may send the related instruction to the intelligent device 102 through the terminal 101, where the intelligent device 102 executes the corresponding function.
The server may be hardware or software. When the server is hardware, it may be implemented as a distributed server cluster formed by multiple servers, or may be implemented as a single server. When the server is software, it may be implemented as multiple pieces of software or software modules (e.g., to provide distributed services), or as a single piece of software or software module. And is not particularly limited herein.
It should be noted that the offline control methods for the intelligent devices provided in the embodiments of the present application are respectively executed by the intelligent device 102, the terminal 101, and the server 103, and accordingly, the offline control methods for the intelligent devices are respectively set in the intelligent device 102, the terminal 101, and the server 103.
With continued reference to FIG. 2a, a flowchart of one embodiment of an offline control method for the smart device 102 provided herein is shown. The method in this embodiment may be applied to the intelligent device 102, and the method for controlling the intelligent device offline includes the following steps:
step 201: under the condition that data connection is established between the intelligent equipment and the terminal, the intelligent equipment receives an offline control instruction sent by the terminal.
The offline control instruction is obtained by processing the offline control instruction in the terminal by using at least the equipment information of the intelligent equipment. And further, the offline control instruction received by the intelligent equipment is obtained by encrypting the offline control instruction in the terminal by using at least equipment information.
Specifically, the data connection between the smart device and the terminal may be a wireless connection, such as a bluetooth connection. The data connection between the smart device and the terminal may be established with the operation of the offline control received on the terminal. For example, after a user clicks an offline unlocking button on a mobile phone, the mobile phone establishes a data connection with a door lock through bluetooth.
It should be noted that the device information of the smart device may be device address information and/or device serial number information of the smart device, such as Mac and/or sn of the door lock.
The intelligent device can receive an offline control instruction which is sent by the terminal and is obtained by processing at least the device information through wireless connection with the terminal.
Further, under the condition that data connection is established between the intelligent device and the terminal, the terminal applies for a challenge code request to the intelligent device, and then the intelligent device returns challenge code information to the terminal. The challenge code information is used for processing the offline control instruction in the terminal, that is, the terminal can process the offline control instruction in the terminal by using the device information of the intelligent device and the challenge code information returned by the intelligent device, so as to obtain the processed offline control instruction and transmit the processed offline control instruction to the intelligent device.
For example, as shown in fig. 2b, a bluetooth of a door lock is connected in a mobile phone and issues a request for acquiring challenge code to the door lock, and the door lock sends challenge code to the mobile phone, where challenge code is not encrypted in this process. And then, the mobile phone encrypts the data of the offline control instruction by using Mac, sn and challenge code of the door lock to obtain an encrypted offline control instruction and transmits the encrypted offline control instruction to the door lock.
Specifically, the offline control instruction in the terminal is an offline control instruction sent by the server to the terminal when a data connection is established between the terminal and the server. Specifically, the offline control instruction sent by the server may be an offline control instruction obtained by encrypting the offline control instruction in the server by using at least a session key of the smart device, timestamp information, and device information of the smart device.
The session key of the smart device may be a session key determined by a handshake protocol when a data connection is established between the smart device and the server through the terminal, such as pwspeed. The device information of the smart device may include device address information of the smart device, such as a Mac address of the door lock. Based on this, the server can encrypt the offline control instruction generated and stored in the server using the session key, the timestamp information, and the device information, and obtain the offline control instruction that can be sent to the terminal.
Step 202: the intelligent device verifies the received off-line control instruction at least by using the device information of the intelligent device to obtain an instruction verification result.
The device information of the intelligent device is known in the intelligent device, so that after the intelligent device receives the offline control instruction sent by the terminal, the received offline control instruction is verified at least by using the device information of the intelligent device, such as device address information and/or device serial number information, so as to obtain an instruction verification result representing whether the offline control instruction meets the offline control condition.
Before the intelligent device verifies the offline control instruction, the intelligent device firstly decrypts the received offline control instruction by using at least the device information to obtain the decrypted offline control instruction, and then verifies the decrypted offline control instruction.
It should be noted that, whether the offline control condition is satisfied is characterized by: and whether the offline control instruction sent by the terminal is a legal control instruction or not. For example, the offline control condition may be that characters or character strings corresponding to the offline control instruction are consistent in comparison, or the offline control condition may be that an instruction type of the offline control instruction is consistent with a preset type, or the offline control condition may be that an instruction structure of the offline control instruction is consistent with a preset structure, and so on.
Specifically, in this embodiment, the intelligent device may verify the received offline control instruction at least by using the device information of the intelligent device, for example, by comparing the decrypted character strings and instruction types or comparing the instruction structures with the equivalent verification manner, so as to obtain an instruction verification result.
Further, the intelligent device may verify the received offline control instruction together with the device information of the intelligent device and the challenge code information issued by the intelligent device to the terminal, so as to obtain an instruction verification result.
For example, the door lock decrypts an offline unlocking instruction issued by a mobile phone by using Mac, sn and challenge code of the door lock, and then verifies the decrypted offline unlocking instruction, thereby obtaining an instruction verification result.
Step 203: and under the condition that the instruction verification result represents that the offline control instruction meets the offline control condition, the intelligent equipment executes the offline control instruction.
The intelligent device executes the offline control instruction only when the offline control instruction is verified to meet the offline control condition, namely the offline control instruction sent by the terminal is determined to be legal.
Specifically, the offline control instruction may be an instruction for triggering the intelligent device to be turned on offline, an instruction for starting a corresponding function of the intelligent device offline, an instruction for acquiring corresponding data in the intelligent device offline, and the like, so that offline control over the intelligent device can be realized under the condition that the terminal cannot be connected to the server.
For example, after the door lock decrypts and verifies data of an offline unlocking instruction issued by a mobile phone by using Mac, sn and challenge codes of the door lock, if the offline unlocking instruction is verified to be a legal instruction, the door lock executes an unlocking function corresponding to the offline unlocking instruction, namely, opening the door, and if the offline unlocking instruction is verified not to be the legal instruction, the door lock does not execute the unlocking function.
Therefore, the offline control method for the intelligent device provided by the embodiment of the application is not limited by communication connection between the terminal and the server, and even under the condition that communication cannot be performed between the terminal and the server, the intelligent device can receive the offline control instruction sent by the terminal and perform instruction verification by using the device information of the intelligent device, so that the intelligent device can execute the offline control instruction under the condition that the offline control condition is met, and therefore offline control over the intelligent device is achieved.
With continued reference to FIG. 3, a flow diagram of one embodiment of a method for offline control of the smart device 102 in accordance with the present application is shown. The method in this embodiment may be applied to the terminal 101, and the offline control method for an intelligent device includes the following steps:
step 301: and under the condition that data connection is established between the terminal and the server, the terminal receives an offline control instruction sent by the server.
The data connection between the terminal and the server may be a wireless connection, such as a WiFi-based connection or a mobile communication network-based connection. Based on the control command, the terminal stores the received off-line control command.
Specifically, the offline control instruction sent by the server may be an offline control instruction obtained by encrypting the offline control instruction in the server by using at least a session key of the smart device, timestamp information, and device information of the smart device.
The session key of the smart device may be a session key determined by a handshake protocol when a data connection is established between the smart device and the server through the terminal, such as pwspeed. The device information of the smart device may include device address information of the smart device, such as a Mac address of the door lock. Based on this, the server can encrypt the offline control instruction generated and stored in the server using the session key, the timestamp information, and the device information, and obtain the offline control instruction that can be sent to the terminal.
Step 302: and under the condition that the data connection is established between the intelligent equipment and the terminal, the terminal processes the offline control instruction in the terminal by using at least the equipment information of the intelligent equipment.
Wherein, the data connection between the intelligent equipment and the terminal can be wireless connection, such as bluetooth connection and the like.
Further, under the condition that data connection is established between the intelligent device and the terminal, the terminal applies for challenge code information to the intelligent device, and then the intelligent device returns the challenge code information to the terminal. The challenge code information is used to process the offline control instruction in the terminal, that is, the terminal may use the device information of the intelligent device and the challenge code information returned by the intelligent device to process the offline control instruction in the terminal.
For example, a bluetooth of a door lock is connected in a mobile phone, a request for acquiring the challenge code is issued to the door lock, the door lock sends the challenge code to the mobile phone, and the challenge code is not encrypted in the process. And then, the mobile phone encrypts the data of the offline control command by using Mac, sn and challenge code of the door lock to obtain the encrypted offline control command.
Step 303: and the terminal sends the processed offline control instruction to the intelligent equipment, so that the intelligent equipment verifies the received offline control instruction at least by using the equipment information of the intelligent equipment to obtain an instruction verification result, and the intelligent equipment executes the offline control instruction under the condition that the instruction verification result represents that the offline control instruction meets the offline control condition.
Therefore, the offline control method for the intelligent device provided by the embodiment of the application is not limited by communication connection between the terminal and the server, and even if the terminal and the server cannot communicate with each other, the intelligent device can receive the offline control instruction sent by the terminal and verify the instruction by using the device information of the intelligent device, so that the intelligent device can execute the offline control instruction under the condition that the offline control condition is met, and the offline control of the intelligent device is realized.
With continued reference to FIG. 4, a flow diagram of one embodiment of a method for offline control of the smart device 102 is shown, in accordance with the present application. The method in this embodiment may be applied to the server 103, and the method for controlling the intelligent device offline includes the following steps:
step 401: and under the condition that data connection is established between the terminal and the server, the server receives an instruction acquisition request sent by the terminal.
The instruction obtaining request may include a request identifier indicating that the terminal needs to obtain the offline control instruction, for example, the instruction of the request includes a specific field or a specific character string to indicate that the terminal needs to obtain the offline control instruction.
Step 402: the server at least utilizes the session key, the timestamp information and the equipment information of the intelligent equipment to process the offline control instruction in the server and sends the processed offline control instruction to the terminal.
The session key of the smart device may be a session key determined by a handshake protocol when a data connection is established between the smart device and the server through the terminal, such as pwspeed. The device information of the smart device may include device address information of the smart device, such as a Mac address of the door lock. Based on this, the server can encrypt the offline control instruction generated and stored in the server using the session key, the timestamp information, and the device information, and obtain the offline control instruction that can be sent to the terminal.
After the offline control instruction sent by the server is stored in the terminal, under the condition that data connection is established between the intelligent device and the terminal, the terminal processes the offline control instruction in the terminal by using at least the device information of the intelligent device and sends the processed offline control instruction to the intelligent device, so that the intelligent device verifies the received offline control instruction by using at least the device information of the intelligent device to obtain an instruction verification result, and under the condition that the instruction verification result represents that the offline control instruction meets the offline control condition, the intelligent device executes the offline control instruction.
Therefore, the offline control method for the intelligent device provided by the embodiment of the application is not limited by communication connection between the terminal and the server, and even under the condition that communication cannot be performed between the terminal and the server, the intelligent device can receive the offline control instruction sent by the terminal and perform instruction verification by using the device information of the intelligent device, so that the intelligent device can execute the offline control instruction under the condition that the offline control condition is met, and therefore offline control over the intelligent device is achieved.
With continued reference to FIG. 5a, a flow diagram of one embodiment of a method of offline control of a smart device 102 in accordance with the present application is shown. The off-line control method for the intelligent equipment comprises the following steps:
step 501: under the condition that data connection is established between the terminal and the server, the server receives an instruction acquisition request sent by the terminal.
The instruction obtaining request may include a request identifier indicating that an offline control instruction needs to be obtained, where the instruction obtaining request may be generated when a user performs an instruction obtaining operation on an APP of the smart device, where the operation is set on the terminal.
For example, a user opens a door lock on a mobile phone and clicks a control for acquiring an offline control instruction, thereby generating an instruction acquisition request on the mobile phone, and the mobile phone sends the instruction acquisition request to PaaS (Platform as a Service).
Step 502: and the server processes the offline control instruction in the server.
Specifically, in this embodiment, the server may perform encryption processing on the offline control instruction in the server by using at least the session key of the smart device, the timestamp information, and the device information of the smart device.
The session key of the smart device may be a session key determined by a handshake protocol when a data connection is established between the smart device and the server through the terminal, such as pwspeed. The device information of the smart device may include device address information of the smart device, such as a Mac address of the door lock. Based on this, the server can perform encryption processing on the offline control instruction generated and stored in the server using the session key, the timestamp information, and the device information.
For example, paaS encrypts the offline control instruction by using pwviewed, a timestamp, and a Mac of a door lock after receiving an instruction acquisition request sent by a mobile phone.
Step 503: and the server transmits the processed off-line control instruction to the terminal.
The server can transmit the processed offline control instruction to the terminal through a wireless network between the server and the terminal. The processed offline control instruction is an instruction obtained by encrypting the session key, the timestamp information, and the device information.
For example, paaS sends off-line control commands to the mobile phone after encrypting the off-line control commands by using pwspeed, a timestamp and a Mac of the door lock.
The implementation flow of the encryption algorithm for the PaaS to encrypt the offline control instruction is shown in fig. 5 b:
first, converting the Mac address of the door lock into 6 bytes of data, for example, if the Mac address is "8D0002809F06", the conversion into 6 bytes of data is:
{0x8D,0x00,0x02,0x80,0x9F,0x06}。
then, the data is reshaped by using a time stamp (a time stamp in an offline unlocking instruction is used during offline unlocking) of KEY _ TIMESTAMP _ INT issued by PaaS, for example, if the date of issuing is 2018/10/18, the time stamp converted into the second-level is 1539792000, the character string is directly used as 10-byte data, and if the length of the character string is not 10, a '0' character is complemented later.
Then, the Mac and the 16 bytes of the timestamp are AES encrypted using the 16 bytes pwseed of the door lock (only the server and the door lock are stored locally) to obtain an exclusive or key of the 16 bytes, i.e., xor _ key.
And finally, encrypting a plaintext, namely the offline control instruction which is prepared to be issued by the PaaS by using the xor _ key to obtain a ciphertext, namely the offline control instruction encrypted by the PaaS.
Step 504: and under the condition that data connection is established between the terminal and the server, the server receives a Bluetooth acquisition request sent by the terminal.
The bluetooth acquisition request may be generated when the user performs the operation of the bluetooth key on the APP for the smart device set on the terminal.
For example, a user opens a door lock on a mobile phone and clicks a control for acquiring a bluetooth key, so that a bluetooth acquisition request is generated on the mobile phone, and the mobile phone sends the bluetooth acquisition request to PaaS.
Step 505: the server processes the Bluetooth key in the server.
Specifically, in this embodiment, the server may encrypt the bluetooth key in the server by using at least the session key of the smart device, the timestamp information, and the device information of the smart device.
For example, paaS encrypts a bluetooth key blekey in PaaS using pwsee, a timestamp, and Mac of a door lock after receiving a bluetooth acquisition request sent by a mobile phone. Reference may be made in particular to the encryption algorithm in fig. 5 b.
Step 506: and the server transmits the processed Bluetooth key to the terminal.
The server can transmit the processed Bluetooth key to the terminal through a wireless network between the server and the terminal. The processed bluetooth key is obtained by encrypting the session key, the timestamp information, and the device information.
For example, paaS is issued to the handset after encrypting the bluetooth key using pwspeed, a timestamp, and Mac of the door lock.
Step 507: under the condition that data connection is established between the intelligent equipment and the terminal, the terminal sends a challenge code request to the intelligent equipment.
The challenge code request includes a request identifier for representing that the terminal needs to acquire challenge code information. The challenge code request may be generated when the user performs an operation of offline control on the terminal for the application APP of the smart device.
For example, a user opens a door lock on a mobile phone and clicks an "unlock" control, thereby generating a challenge code request on the mobile phone, and the mobile phone sends the challenge code request to the door lock.
Step 508: and the intelligent equipment returns the challenge code information to the terminal.
The intelligent device generates challenge code information and sends the challenge code information to the terminal after receiving a challenge code request sent by the terminal, so that the terminal can process an offline control instruction in the terminal by using the device information of the intelligent device and the challenge code information returned by the intelligent device, and then the processed offline control instruction is obtained and transmitted to the intelligent device.
For example, the door lock sends challenge code to the cell phone, which is not encrypted. And the mobile phone encrypts the data of the off-line control command stored in the mobile phone by using Mac, sn and challenge code of the door lock to obtain an encrypted off-line control command and transmits the encrypted off-line control command to the door lock.
The implementation flow of the encryption algorithm for encrypting the data of the offline control instruction stored in the mobile phone by using Mac, sn and challenge code of the door lock by the mobile phone is shown in fig. 5 c:
first, converting the Mac address of the door lock into 6 bytes of data, for example, if the Mac address is "8D0002809F06", the conversion into 6 bytes of data is:
{0x8D,0x00,0x02,0x80,0x9F,0x06}。
the last 10 bits of Mac and sn are then grouped into a byte array of 16 bytes in length.
Then, using 16 bytes challenge code of the door lock to carry out AES encryption on 10 bits behind the Mac and the sn to obtain 16 bytes of XOR key, namely xor _ key.
And finally, encrypting a plaintext, namely the offline control instruction to be issued by the mobile phone, by using the xor _ key to obtain a ciphertext, namely the offline control instruction encrypted by the mobile phone.
Step 509: and the terminal sends the offline control instruction to the intelligent equipment.
The offline control instruction received by the intelligent device is the offline control instruction sent by the server to the terminal under the condition that data connection is established between the terminal and the server. Refer specifically to steps 501-503.
Step 510: the intelligent device verifies the received off-line control instruction at least by using the device information of the intelligent device to obtain an instruction verification result.
Specifically, the implementation manner in step 510 may refer to what is described in step 202.
For example, the door lock decrypts data of an offline control instruction issued by a mobile phone by using Mac, sn and challenge code of the door lock, and then performs verification processing, thereby obtaining an instruction verification result.
Step 511: and under the condition that the instruction verification result represents that the offline control instruction meets the offline control condition, the intelligent equipment executes the offline control instruction.
The intelligent device executes the offline control instruction only when the offline control instruction is verified to meet the offline control condition, namely the offline control instruction sent by the terminal is determined to be legal.
Specifically, the offline control instruction may be an instruction for triggering the intelligent device to be turned on offline, an instruction for starting a corresponding function of the intelligent device offline, an instruction for acquiring corresponding data in the intelligent device offline, and the like, so that offline control over the intelligent device can be realized under the condition that the terminal cannot be connected to the server.
For example, after the data of the offline control instruction issued by the mobile phone is decrypted and verified by using Mac, sn and challenge code of the door lock, if the offline control instruction is verified to be a legal instruction, the door lock executes an unlocking function corresponding to the offline control instruction, that is, opens the door, and if the offline control instruction is verified not to be a legal instruction, the door lock does not execute the unlocking function.
Therefore, the offline control method for the intelligent device provided by the embodiment of the application is not limited by communication connection between the terminal and the server, and even under the condition that communication cannot be performed between the terminal and the server, the intelligent device can receive the offline control instruction sent by the terminal and perform instruction verification by using the device information of the intelligent device, so that the intelligent device can execute the offline control instruction under the condition that the offline control condition is met, and therefore offline control over the intelligent device is achieved.
In a specific implementation, in step 202 shown in fig. 2a, when the smart device verifies the received offline control instruction, an instruction verification result may be obtained in the following manner, as shown in fig. 6 a:
step 601: the intelligent device analyzes a first character string contained in the offline control instruction by using at least device information of the intelligent device.
Specifically, in this embodiment, the device information and the timestamp information of the smart device and the bluetooth key in the smart device may be used to parse the first character string included in the offline control instruction. For example, the token in the offline unlocking command is encrypted by the Mac and the timestamp of the door lock used by the door lock and the blekey of the door lock, so that the door lock analyzes the token in the offline control command issued by the mobile phone by using the Mac and the timestamp of the door lock and the blekey of the door lock to obtain the first character string, such as the token, included in the offline control command.
The implementation flow of the encryption algorithm for the door lock to encrypt the token by using the Mac and the timestamp of the door lock and the blekey of the door lock is shown in fig. 6 b:
first, converting the MAC address of the door lock into 6 bytes of data, for example, if the MAC address is "8D0002809F06", the conversion into 6 bytes of data is:
{0x8D,0x00,0x02,0x80,0x9F,0x06}。
then, the data is reshaped by using the timestamp of KEY _ TIMESTAMP _ INT issued by PaaS (the timestamp in the offline unlocking instruction is used during offline unlocking), and converted into a character string, for example, if the current day of issuing is 2018/10/18, the timestamp converted into the second grade is 1539792000, the character string is directly used as 10-byte data, and if the length of the character string is not enough 10, the '0' character is complemented later.
Then, the Mac and the 16 bytes of the timestamp are AES encrypted using the 16 bytes blekey of the door lock (only the server and the door lock are locally stored), and an exclusive or key of the 16 bytes, that is, xor _ key, is obtained.
And finally, encrypting the plaintext, namely the token in the offline unlocking instruction by using the xor _ key to obtain the ciphertext, namely the encrypted token.
It should be noted that the bluetooth key in the intelligent device is sent to the intelligent device by the terminal after being issued to the terminal by the server.
After the smart device receives the bluetooth key, the bluetooth key is obtained by the server performing encryption processing using the session key, the timestamp information, and the device information of the smart device. Therefore, before the smart device uses the bluetooth key, the smart device first decrypts the session key of the smart device using the device information and the timestamp information of the smart device, and based on this, the smart device analyzes the offline control command using the device information and the timestamp information of the smart device and the decrypted bluetooth key, and analyzes the first character string included in the offline control command.
In addition, since the offline control instruction received by the smart device is obtained by performing primary encryption on the session key and the timestamp information of the smart device by the server and performing secondary encryption on the device information of the smart device by the terminal, the decrypted offline control instruction needs to be decrypted again by using the session key and the timestamp information of the smart device after the offline control instruction is decrypted for the first time by using at least the device information of the smart device, and the offline control instruction subjected to the secondary decryption can be analyzed by using the device information and the timestamp information of the smart device and the decrypted bluetooth key of the smart device by the smart device, so that the first character string contained in the offline control instruction can be analyzed.
For example, after the door lock decrypts the offline unlocking instruction issued by the mobile phone by using Mac, sn and the challenge code of the door lock, the pwread, the timestamp and Mac of the door lock are used to decrypt the decrypted offline unlocking instruction again, and at this time, the decrypted offline unlocking instruction is analyzed by using Mac and the timestamp of the door lock and blekey of the door lock by the door lock, so as to obtain a first character string, such as token, included in the offline control instruction.
Step 602: the intelligent device determines whether the first character string matches a second character string stored in the intelligent device, if the first character string matches the second character string, step 603 is executed, and if the first character string does not match the second character string, step 604 is executed.
Step 603: and the intelligent equipment generates an instruction verification result representing that the offline control instruction meets the offline control instruction.
Step 604: and the intelligent equipment generates an instruction verification result representing that the offline control instruction does not meet the offline control instruction.
That is to say, under the condition that the first character string is matched with the second character string, the obtained instruction verification result represents that the offline control instruction meets the offline control condition, and under the condition that the first character string is not matched with the second character string, the obtained instruction verification result represents that the offline control instruction does not meet the offline control condition.
In a specific implementation, the first character string is a token character string in the offline control instruction, and specifically may be a character string obtained by encrypting a preset fixed character string by using a bluetooth key; the second character string is a fixed character string stored in the intelligent device. Therefore, in this embodiment, the matching of the first character string and the second character string means: the character string obtained by encrypting the second character string by using the Bluetooth key is consistent with the first character string; or, the matching of the first character string and the second character string means: and the character string obtained by decrypting the first character string by using the Bluetooth key is consistent with the second character string. Therefore, under the condition that the instruction verification result represents that the offline control instruction meets the offline control condition, namely under the condition that the first character string is matched with the second character string, the intelligent device executes the offline control instruction.
For example, the door lock encrypts the fixed character string "123456" by using blekey, and compares the obtained character string with the analyzed token; or the door lock decrypts the analyzed token by using blekey, compares the obtained character string with the fixed character string '123456', and the comparison result represents whether the offline control instruction meets the offline control condition.
With reference to the scheme shown in fig. 6, before step 601, the method in this embodiment may further include the following steps, as shown in fig. 7:
step 605: whether the intelligent equipment checks that the off-line control is effective or not can be specifically as follows: the intelligent device judges whether the survival time of the offline control instruction exceeds a preset first target time length, executes step 604 under the condition that the survival time of the offline control instruction exceeds the first target time length, namely the survival time of the offline control instruction is effective, and executes step 601 under the condition that the survival time of the offline control instruction does not exceed the first target time length.
And timing is started after the offline control instruction is received by the intelligent equipment, and the time length obtained by timing is the survival time length of the offline control instruction.
That is to say, before analyzing the received offline control instruction, the intelligent device verifies whether the offline control instruction is expired or not, if not, the intelligent device continues to execute a subsequent verification process, and if so, the intelligent device can directly generate an instruction verification result that the offline control instruction does not satisfy the offline control condition.
For example, the door lock judges whether an offline unlocking instruction issued by the mobile phone is overdue or not, if so, the door lock does not execute the offline unlocking instruction, and if not, the door lock performs an instruction verification process aiming at the offline unlocking instruction.
Continuing with the flow shown in fig. 7, before step 601, the method in this embodiment may further include the following steps, as shown in fig. 8:
step 606: whether the intelligent equipment judges the stored Bluetooth key is effective or not can be specifically: the intelligent device judges whether the intelligent device stores a Bluetooth key or not, executes step 604 if the intelligent device does not store the Bluetooth key or the survival time of the Bluetooth key stored in the intelligent device is greater than or equal to a preset second target time, and executes step 601 if the survival time of the Bluetooth key stored in the intelligent device is less than the second target time. Of course, step 605 is performed before step 601 is performed.
Therefore, only under the condition that the survival time of the bluetooth key stored in the intelligent device does not exceed the second target time length, the intelligent device can use the device information of the intelligent device and the bluetooth key in the intelligent device, and further can analyze the first character string contained in the offline control command by combining the timestamp information.
And timing is started after the Bluetooth key is received by the intelligent equipment, and the duration obtained by timing is the survival duration of the Bluetooth key.
For example, the door lock determines whether the door lock stores blekey, if the blekey is stored, determines whether the blekey exceeds the validity period, if the blekey exceeds 24 hours, the validity period is a time obtained by extending the time when the blekey is stored by the door lock by the corresponding validity period, if the blekey exceeds the validity period, the door lock generates a result that the verification of the offline unlocking instruction fails, and if the blekey does not exceed the validity period, the door lock continues to perform instruction verification on the offline unlocking instruction according to the description in the foregoing text.
Continuing with the flow shown in fig. 8, in step 606, when it is determined that the bluetooth key is not stored in the smart device or the lifetime of the bluetooth key stored in the smart device is greater than or equal to the second target duration, the method in this embodiment may further include the following steps, as shown in fig. 9:
step 607: and the intelligent device sends a notice message of the expiration of the Bluetooth key to the terminal so that the terminal can read the Bluetooth key again in the storage area.
For example, the door lock sends a message to the cell phone that the blekey expires. The mobile phone reads the blekey again in the mobile phone memory.
Step 608: the intelligent device receives the Bluetooth key sent by the terminal.
The bluetooth key received by the intelligent device at this time is the bluetooth key which is read by the terminal from the bluetooth key stored in the terminal again and sent to the intelligent device. The bluetooth key read by the terminal again may be a fixed bluetooth key, that is, the server does not send the terminal again after sending the bluetooth key once. That is, the server encrypts the bluetooth key using the device information of the smart device, the timestamp information, and the session key of the smart device and transmits the encrypted bluetooth key to the terminal when a data connection is established between the server and the terminal. Or, the bluetooth key read again by the terminal may also be a bluetooth key updated regularly. That is, the server periodically encrypts the bluetooth key using the device information of the smart device, the timestamp information, and the session key of the smart device, and periodically transmits the encrypted bluetooth key to the terminal when a data connection is established between the server and the terminal.
At this time, the lifetime of the bluetooth key received by the smart device is less than the second target duration.
For example, the door lock receives the blekey re-issued by the terminal.
Step 609: the smart device decrypts the received bluetooth key using at least the device information of the smart device.
Specifically, the smart device may decrypt the bluetooth key sent from the terminal using the device information of the smart device, the timestamp information, and the session key of the smart device.
For example, the door lock decrypts the blekey sent from the mobile phone using the door lock's Mac, timestamp, and pwsee.
Step 610: and the intelligent equipment stores the decrypted Bluetooth key.
Specifically, the smart device records the lifetime of the bluetooth key while storing the decrypted bluetooth key.
For example, the door lock stores the decrypted blekey, and records the validity period of the blekey stored by the door lock, where the validity period is the time when the blekey is stored and is corresponding to the time when the second target duration is extended.
Step 611: the intelligent device transmits the first message to the terminal to trigger the terminal to send the off-line control instruction to the intelligent device again.
That is to say, after the smart device successfully adds the valid bluetooth key, the terminal is notified, the terminal processes the offline control instruction stored by the terminal again by using at least the device information of the smart device and transmits the offline control instruction to the smart device, so that the smart device determines whether to execute the offline control instruction after verifying the offline control instruction according to the instruction verification process in the foregoing.
For example, the door lock sends a message of "successful addition" to the mobile phone, and the mobile phone reuses Mac and sn of the door lock and challenge code information to encrypt an offline unlocking instruction sent by a server stored in the mobile phone and send the offline unlocking instruction to the door lock under the condition that the message represents that the bluetooth key is successfully added, so that the door lock verifies the offline unlocking instruction again.
With reference to the flow shown in fig. 2a, after the intelligent device executes the offline control instruction, the method in this embodiment may further include the following steps, as shown in fig. 10:
step 204: and the intelligent equipment receives an electric quantity acquisition instruction sent by the terminal.
The electric quantity obtaining instruction can be generated after the terminal user performs click operation of electric quantity obtaining on the input component of the terminal user, or can be automatically generated when the terminal needs to use the electric quantity parameter.
For example, when the user clicks a button "acquire remaining power" on the mobile phone, the mobile phone generates a power acquisition command and transmits the power acquisition command to the door lock.
Step 205: and the intelligent equipment transmits the current electric quantity parameter of the intelligent equipment to the terminal.
And the current electric quantity parameter is used for executing a corresponding battery processing instruction. For example, when the remaining electric quantity value in the current electric quantity parameter is lower than the threshold value, the terminal outputs prompt information of low electric quantity for the user, or the terminal generates an automatic charging instruction and sends the charging instruction to the intelligent device, and the intelligent device triggers an automatic charging process to realize automatic charging control.
For example, after receiving the residual electric quantity read by the door lock, the mobile phone judges whether the residual electric quantity is less than 4.8V, if so, a low light on the door lock is controlled to flash, or a specific area output on the mobile phone is controlled to change so as to prompt a user of a low electric quantity state, otherwise, the door lock reports a motor unlocking event after unlocking.
In specific implementation, the method in this embodiment not only can implement offline control on the intelligent device, but also can provide online control on the intelligent device for the user. Specifically, the intelligent device outputs online control prompt information under the condition that data connection is established between the terminal and the server, and the online control prompt information is used for prompting online control under the condition that data connection is established between the terminal and the server.
For example, when the door lock monitors that data connection is established between the mobile phone and the PaaS, the door lock outputs prompt information for a user to prompt the user to perform unlocking control and other control on the door lock in an online manner.
Taking the case that the mobile phone unlocks the door lock in an online manner, the control flow of issuing the online bluetooth key and opening the door online is briefly described as follows, as shown in fig. 11:
under the condition that the mobile phone AP can establish data connection with PaaS, after receiving an unlocking operation clicked by a user on the mobile phone, the mobile phone is connected with the Bluetooth of the door lock and issues a message for acquiring the challenge code, and the challenge code generated by the door lock is sent to the mobile phone without encryption;
the mobile phone requests PaaS to acquire a secret key sessionkey, paaS issues the sessionkey to the mobile phone, the mobile phone issues the sessionkey to the door lock, and the door lock decrypts the sessionkey by using challenge code and a session secret key pwseed of the door lock and replies an ack message to the mobile phone;
the method comprises the steps that a mobile phone requests a PaaS to acquire a Bluetooth key, the PaaS issues the Bluetooth key to the mobile phone, then the mobile phone issues an online door opening instruction, a door lock analyzes the online door opening instruction by using sessionkey and changechange code, when the Bluetooth key exists and is effective, a token in the online door opening instruction is analyzed by using blekey and changechange code, if the token represents that the online door opening instruction is verified successfully, the door lock executes a door opening action, and a message of door opening success and a door opening event occurrence is sent to the mobile phone; if the token represents that the online door opening instruction is failed to verify, the door lock sends a door opening failure message to the mobile phone, the mobile phone can also receive a message that the door opening is unsuccessful under the condition that the Bluetooth key does not exist, at the moment, the mobile phone issues the Bluetooth key to the door lock again, the door lock analyzes the Bluetooth key by using sessionkey and challenge code and stores the Bluetooth key, namely blekey, then the door lock sends an adding success message to the mobile phone, and after the mobile phone determines that the adding is successful, the online door opening instruction is issued to the door lock again, so that the door lock conducts online door opening verification again.
In addition, the bluetooth key may be modified or deleted.
With further reference to fig. 12, as an implementation of the methods shown in some of the above figures, in an embodiment of the offline control apparatus for an intelligent device 102 provided in this application, the apparatus in this embodiment may be configured on the intelligent device 102, and the embodiment of the apparatus corresponds to the embodiment of the method shown in fig. 2a, and the apparatus may be specifically applied to various intelligent devices.
As shown in fig. 12, the offline control apparatus for an intelligent device according to this embodiment includes: a first receiving unit 1201, an instruction verifying unit 1202, and an instruction executing unit 1203. Wherein the first receiving unit 1201 is configured to: under the condition that data connection is established between the intelligent equipment and the terminal, receiving an offline control instruction sent by the terminal, wherein the offline control instruction is obtained by processing the offline control instruction in the terminal by using at least equipment information of the intelligent equipment by the terminal;
an instruction verification unit 1202, configured to verify the received offline control instruction at least using the device information of the smart device to obtain an instruction verification result;
an instruction executing unit 1203, configured to execute the offline control instruction if the instruction verification result indicates that the offline control instruction meets an offline control condition.
In this embodiment, the detailed processing of the first receiving unit 1201, the instruction verifying unit 1202 and the instruction executing unit 1203 and the technical effects thereof may refer to the related descriptions of the embodiment corresponding to step 201, step 202 and step 203 in the embodiment of fig. 2a and the corresponding contents of the other embodiments in the foregoing, which are not repeated herein.
The embodiment of the present application further provides an intelligent device, such as a door lock, including one or more processors and a memory, where the first receiving unit 1201, the instruction verifying unit 1202, and the instruction executing unit 1203 and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to implement corresponding functions.
The processor may include a kernel, which calls the corresponding program unit from the memory. The kernel can be set to one or more, and the following is realized by adjusting kernel parameters: even under the condition that the terminal and the server cannot communicate with each other, the intelligent device can receive the offline control command sent by the terminal and verify the command by using the device information of the intelligent device. Therefore, under the condition that the off-line control condition is met, the intelligent device can execute the off-line control instruction, and therefore off-line control over the intelligent device is achieved.
The memory may include volatile memory in a computer readable medium, random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
In the offline control apparatus for an intelligent device provided in the above embodiment of the present application, when a data connection is established between the intelligent device and the terminal, the intelligent device receives an offline control instruction obtained by processing at least device information of the intelligent device, which is sent by the terminal, and then the intelligent device verifies that the received offline control instruction at least uses the device information of the intelligent device, so as to obtain an instruction verification result, and when the instruction verification result indicates that the offline control instruction satisfies an offline control condition, the intelligent device executes the offline control instruction. Therefore, the technical scheme in the application is not limited by communication connection between the terminal and the server, and even under the condition that communication between the terminal and the server is unavailable, the intelligent device can receive the offline control instruction sent by the terminal and use the device information of the intelligent device to carry out instruction verification, so that the intelligent device can execute the offline control instruction under the condition that the offline control condition is met, and the offline control of the intelligent device is realized.
With further reference to fig. 13, as an implementation of the methods shown in some of the above figures, in another embodiment of the offline control apparatus for an intelligent device 102 provided in the present application, the apparatus in this embodiment may be configured on a terminal 101, and the embodiment of the apparatus corresponds to the embodiment of the method shown in fig. 3, and the apparatus may be specifically applied to various terminals.
As shown in fig. 13, the offline control apparatus for an intelligent device of this embodiment includes: a second receiving unit 1301, a first processing unit 1302 and a first sending unit 1303. Wherein the second receiving unit 1301 is configured to: the system comprises a server and a terminal, wherein the server is used for receiving an offline control instruction sent by the server under the condition that data connection is established between the terminal and the server;
a first processing unit 1302, configured to, in a case that a data connection is disconnected between the terminal and the server and a data connection is established between the intelligent device and the terminal, process an offline control instruction in the terminal by using at least device information of the intelligent device;
a first sending unit 1303, configured to send the processed offline control instruction to the intelligent device, so that the intelligent device verifies that the received offline control instruction at least uses the device information of the intelligent device to obtain an instruction verification result, and if the instruction verification result indicates that the offline control instruction meets an offline control condition, the intelligent device executes the offline control instruction.
In this embodiment, the detailed processing of the second receiving unit 1301, the first processing unit 1302, and the first sending unit 1303 and the technical effects thereof may refer to the related descriptions of the embodiment of step 301, step 302, and step 303 in the corresponding embodiment of fig. 3 and the corresponding contents of the other embodiments in the foregoing, which are not repeated herein.
The embodiment of the present application further provides a terminal, such as a mobile phone, where the terminal includes one or more processors and a memory, the second receiving unit 1301, the first processing unit 1302, the first sending unit 1303, and the like are all stored in the memory as program units, and the processor executes the program units stored in the memory to implement corresponding functions.
The processor may include a kernel, which calls the corresponding program unit from the memory. The kernel can be set to one or more, and the following is realized by adjusting kernel parameters: even under the condition that the terminal and the server cannot communicate with each other, the intelligent device can receive the offline control command sent by the terminal and verify the command by using the device information of the intelligent device. Therefore, under the condition that the offline control condition is met, the intelligent device can execute the offline control instruction, and therefore offline control over the intelligent device is achieved.
The memory may include volatile memory in a computer readable medium, random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
In the offline control apparatus for an intelligent device provided in the above embodiment of the present application, when a data connection is established between the intelligent device and the terminal, the intelligent device receives an offline control instruction obtained by processing at least device information of the intelligent device, which is sent by the terminal, and then the intelligent device verifies that the received offline control instruction at least uses the device information of the intelligent device, so as to obtain an instruction verification result, and when the instruction verification result indicates that the offline control instruction satisfies an offline control condition, the intelligent device executes the offline control instruction. Therefore, the technical scheme in the application is not limited by communication connection between the terminal and the server, and even under the condition that communication between the terminal and the server is unavailable, the intelligent device can receive the offline control instruction sent by the terminal and use the device information of the intelligent device to carry out instruction verification, so that the intelligent device can execute the offline control instruction under the condition that the offline control condition is met, and the offline control of the intelligent device is realized.
With further reference to fig. 14, as an implementation of the methods shown in some of the above figures, in another embodiment of the offline control apparatus for an intelligent device 102 provided in the present application, the apparatus in this embodiment may be configured on a server 103, and the embodiment of the apparatus corresponds to the embodiment of the method shown in fig. 4, and the apparatus may be specifically applied to various servers.
As shown in fig. 14, the offline control apparatus for an intelligent device according to this embodiment includes: a request receiving unit 1401, a second processing unit 1402, and a second transmitting unit 1403. Wherein the request receiving unit 1401 is configured to: the method comprises the steps that under the condition that data connection is established between a terminal and a server, an instruction acquisition request sent by the terminal is received;
a second processing unit 1402 configured to process the offline control instruction in the server using at least the session key of the smart device, the timestamp information, and the device information of the smart device;
a second sending unit 1403, configured to send the processed offline control instruction to the terminal, so that when the data connection is disconnected between the terminal and the server and a data connection is established between the smart device and the terminal, the terminal processes the offline control instruction in the terminal by using at least the device information of the smart device and sends the processed offline control instruction to the smart device, so that the smart device verifies that the received offline control instruction at least uses the device information of the smart device to obtain an instruction verification result, and when the instruction verification result indicates that the offline control instruction meets an offline control condition, the smart device executes the offline control instruction.
In this embodiment, specific processing of the request receiving unit 1401, the second processing unit 1402 and the second sending unit 1403 and technical effects brought by the specific processing can refer to related descriptions of the embodiments of step 401 and step 402 in the corresponding embodiment of fig. 4 and corresponding contents of other embodiments in the foregoing, which are not described herein again.
The embodiment of the present application further provides a server, such as PaaS, where the smart device includes one or more processors and a memory, the request receiving unit 1401, the second processing unit 1402, and the second sending unit 1403 are all stored in the memory as program units, and the processor executes the program units stored in the memory to implement corresponding functions.
The processor may include a kernel, which calls the corresponding program unit from the memory. The kernel can be set to one or more, and the following is realized by adjusting kernel parameters: even under the condition that the terminal and the server cannot communicate with each other, the intelligent device can receive the offline control command sent by the terminal and verify the command by using the device information of the intelligent device. Therefore, under the condition that the offline control condition is met, the intelligent device can execute the offline control instruction, and therefore offline control over the intelligent device is achieved.
The memory may include volatile memory in a computer readable medium, random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM), including at least one memory chip.
According to the offline control device for the intelligent device, under the condition that data connection is established between the intelligent device and the terminal, the intelligent device receives the offline control instruction which is sent by the terminal and is at least processed by using the device information of the intelligent device, the received offline control instruction is at least verified by using the device information of the intelligent device through the intelligent device, and therefore the instruction verification result is obtained, and the intelligent device executes the offline control instruction under the condition that the instruction verification result represents that the offline control instruction meets the offline control condition. Therefore, the technical scheme in the application is not limited by communication connection between the terminal and the server, and even under the condition that communication between the terminal and the server is unavailable, the intelligent device can receive the offline control instruction sent by the terminal and use the device information of the intelligent device to carry out instruction verification, so that the intelligent device can execute the offline control instruction under the condition that the offline control condition is met, and the offline control of the intelligent device is realized.
It should be noted that, in addition to the processor and the memory, the above intelligent device, terminal or server may also include components such as a communication interface, an input unit, an output unit, and a communication bus, and the processor and the memory are connected to each other through the communication bus. The communication interface, the input unit and the output unit are also connected to a communication bus, as shown in fig. 15.
The communication interface may be an interface of a communication module, such as an interface of a GSM module. The communication interface may be used to implement data transmission with other devices, such as instruction transmission between the terminal and the intelligent device through the respective communication interface, and the like.
In the embodiment of the present application, the processor may be a Central Processing Unit (CPU), an application-specific integrated circuit (ASIC), a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device.
In one possible implementation, the memory may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function (such as instruction parameters, bluetooth key transmission), and the like; the storage data area may store data created during use of the computer, such as a session key, a bluetooth key, and the like.
Further, the memory may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device or other volatile solid state storage device.
The processor may call a program stored in the memory, and in particular, the processor may execute the program in the memory to implement: the method for controlling the intelligent device offline in the above embodiments.
The memory is used for storing one or more programs, and the program may include program codes, which include computer operation instructions, so that the processor executes the computer operation instructions to implement the offline control method for the intelligent device in the above embodiments.
The input unit may include at least one of a touch sensing unit sensing a touch event on the touch display panel, a keyboard, a mouse, a camera, a microphone, and the like.
The output unit may include: at least one of a display, a speaker, a vibration mechanism, a light, and the like. The display may comprise a display panel, such as a touch display panel or the like. In one possible case, the Display panel may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. The vibration mechanism can enable the equipment to generate displacement when in work, and in one possible implementation mode, the vibration mechanism comprises a motor and an eccentric vibrator, and the motor drives the eccentric vibrator to rotate so as to generate vibration. The brightness and/or color of the lamp can be adjusted, in a possible implementation manner, different information can be embodied through at least one of the on-off, brightness and color of the lamp, for example, the alarm information can be embodied through red light emitted by the lamp.
Of course, the structure shown in fig. 15 does not constitute a limitation to the smart device, the terminal or the server in the embodiment of the present application, and may include more or less components than those shown in fig. 15 or some components in combination in practical applications.
The present application provides a computer readable medium, on which a computer program is stored, where the program is executed by a processor to implement the offline control method for an intelligent device described in the above method embodiments.
The embodiment of the application provides a processor, and the processor is used for running a program, wherein when the program runs, the method for controlling the intelligent device offline described in the above method embodiments is implemented.
The present application further provides a computer program product, which when executed on a data processing device, causes the data processing device to implement the method for offline controlling an intelligent device described in the above method embodiments.
In addition, the electronic device, the processor, the computer-readable medium, or the computer program product provided in the foregoing embodiments of the present application may be all used for executing the corresponding method provided above, and therefore, the beneficial effects achieved by the electronic device, the processor, the computer-readable medium, or the computer program product may refer to the beneficial effects in the corresponding method provided above, and are not described herein again.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
Computer-readable media, which include both non-transitory and non-transitory, removable and non-removable media, may implement the information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above description is only for the purpose of illustrating the preferred embodiments of the present application and the technical principles applied, and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. The scope of the invention according to the present application is not limited to the specific combinations of the above-described features, and may also cover other embodiments in which the above-described features or their equivalents are arbitrarily combined without departing from the spirit of the invention. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (21)

1. An off-line control method for an intelligent device, the method comprising:
under the condition that data connection is established between the intelligent equipment and the terminal, the intelligent equipment receives an offline control instruction sent by the terminal, wherein the offline control instruction is obtained by processing the offline control instruction in the terminal by using at least equipment information of the intelligent equipment;
the intelligent equipment verifies the received offline control instruction at least by using the equipment information of the intelligent equipment to obtain an instruction verification result;
and under the condition that the instruction verification result indicates that the offline control instruction meets offline control conditions, the intelligent equipment executes the offline control instruction.
2. The method according to claim 1, wherein the offline control command in the terminal is: and under the condition that data connection is established between the terminal and the server, the server encrypts an offline control instruction in the server by using the session key and the timestamp information of the intelligent equipment and the equipment information of the intelligent equipment and transmits the offline control instruction to the terminal.
3. The method according to claim 1 or 2, wherein the smart device verifies the received offline control command at least by using the device information of the smart device to obtain a command verification result, and the method comprises at least:
the intelligent equipment at least uses the equipment information of the intelligent equipment to analyze a first character string contained in the offline control instruction;
the intelligent equipment judges whether the first character string is matched with a second character string stored in the intelligent equipment or not to obtain an instruction verification result;
under the condition that the first character string is matched with the second character string, the instruction verification result represents that the offline control instruction meets an offline control condition; and under the condition that the first character string is not matched with the second character string, the instruction verification result represents that the offline control instruction does not meet offline control conditions.
4. The method of claim 3, wherein before the smart device parses out the first string included in the offline control instruction using at least device information of the smart device, the method further comprises:
the intelligent equipment judges whether the survival time of the off-line control instruction exceeds a preset first target time;
under the condition that the survival time of the offline control instruction exceeds the first target time, the intelligent equipment generates an instruction verification result representing that the offline control instruction does not meet the offline control condition;
under the condition that the survival time of the offline control instruction does not exceed the first target time length, the intelligent equipment executes the following steps: and analyzing a first character string contained in the offline control instruction by using at least the equipment information of the intelligent equipment.
5. The method of claim 3, wherein before the smart device parses out the first string included in the offline control instruction using at least device information of the smart device, the method further comprises:
the intelligent equipment judges whether a Bluetooth key is stored in the intelligent equipment or not;
under the condition that no Bluetooth key is stored in the intelligent equipment or the survival time of the Bluetooth key stored in the intelligent equipment is greater than or equal to a preset second target time length, the intelligent equipment generates an instruction verification result representing that the offline control instruction does not meet the offline control condition;
under the condition that the survival time of the Bluetooth key stored in the intelligent equipment is less than the second target time, the intelligent equipment executes: analyzing a first character string contained in the offline control instruction by using at least equipment information of the intelligent equipment;
the method for analyzing the first character string contained in the offline control instruction by the intelligent device at least by using the device information of the intelligent device includes:
and the intelligent equipment at least uses the equipment information of the intelligent equipment and a Bluetooth key in the intelligent equipment to analyze a first character string contained in the offline control instruction.
6. The method of claim 5, wherein in the case that no bluetooth key is stored in the smart device or the lifetime of the bluetooth key stored in the smart device is greater than or equal to a preset second target duration, the method further comprises:
the intelligent equipment receives a Bluetooth key sent by the terminal, and the Bluetooth key is obtained by encrypting the Bluetooth key by using at least equipment information of the intelligent equipment by a server and is sent to the terminal under the condition that data connection is established between the server and the terminal;
the intelligent equipment at least uses the equipment information of the intelligent equipment to decrypt the received Bluetooth key and stores the decrypted Bluetooth key;
and the intelligent equipment transmits a first notification message to the terminal to trigger the terminal to send an offline control instruction to the intelligent equipment again.
7. The method according to claim 6, wherein the bluetooth key in the terminal is the bluetooth key sent by the server to the terminal when a data connection is established between the terminal and the server, and the bluetooth key sent by the server to the terminal is obtained by encrypting by the server at least using the session key, the timestamp information and the device information of the smart device;
before the smart device stores the decrypted bluetooth key, the method further includes:
and the intelligent equipment at least uses the session key, the timestamp information and the equipment information of the intelligent equipment to decrypt the decrypted Bluetooth key so as to obtain the decrypted Bluetooth key.
8. The method according to claim 1, wherein the offline control instruction received by the intelligent device is an instruction obtained by encrypting, by the terminal, the offline control instruction in the terminal by using at least device information;
the device information at least comprises device address information of the intelligent device and/or device serial number information of the intelligent device.
9. The method of claim 8, wherein before the smart device verifies the received offline control command using at least the device information of the smart device to obtain a command verification result, the method further comprises:
and the intelligent equipment at least decrypts the received offline control instruction by using the equipment information so as to obtain the decrypted offline control instruction.
10. The method of claim 1, further comprising:
and after receiving the electric quantity acquisition instruction sent by the terminal, the intelligent device transmits the current electric quantity parameter of the intelligent device to the terminal, wherein the current electric quantity parameter is used for executing a corresponding battery processing instruction.
11. The method of claim 1, further comprising:
and the intelligent equipment outputs online control prompt information, and the online control prompt information is used for prompting online control under the condition that data connection is established between the terminal and the server.
12. An off-line control method for an intelligent device, the method comprising:
under the condition that data connection is established between a terminal and a server, the terminal receives an offline control instruction sent by the server;
under the condition that data connection is established between the intelligent equipment and the terminal, the terminal at least utilizes the equipment information of the intelligent equipment to process an offline control instruction in the terminal;
the terminal sends the processed offline control instruction to the intelligent equipment, so that the intelligent equipment verifies the received offline control instruction at least by using the equipment information of the intelligent equipment to obtain an instruction verification result, and the intelligent equipment executes the offline control instruction under the condition that the instruction verification result represents that the offline control instruction meets the offline control condition.
13. An off-line control method for an intelligent device, the method comprising:
under the condition that data connection is established between a terminal and a server, the server receives an instruction acquisition request sent by the terminal;
the server at least utilizes the session key and the timestamp information of the intelligent device and the device information of the intelligent device to process an offline control instruction in the server and send the processed offline control instruction to the terminal, so that under the condition that data connection is established between the intelligent device and the terminal, the terminal at least utilizes the device information of the intelligent device to process the offline control instruction in the terminal and sends the processed offline control instruction to the intelligent device, the intelligent device at least verifies the received offline control instruction by using the device information of the intelligent device to obtain an instruction verification result, and under the condition that the instruction verification result represents that the offline control instruction meets an offline control condition, the intelligent device executes the offline control instruction.
14. An off-line control apparatus for an intelligent device, applied to the intelligent device, the apparatus comprising:
the first receiving unit is used for receiving an offline control instruction sent by a terminal under the condition that data connection is established between the intelligent equipment and the terminal, wherein the offline control instruction is obtained by processing the offline control instruction in the terminal by using at least equipment information of the intelligent equipment;
the instruction verification unit is used for verifying at least the equipment information of the intelligent equipment used by the received offline control instruction so as to obtain an instruction verification result;
and the instruction execution unit is used for executing the offline control instruction under the condition that the instruction verification result represents that the offline control instruction meets offline control conditions.
15. A smart device, comprising:
one or more processors;
a storage device having one or more programs stored thereon;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of any of claims 1-11.
16. An off-line control device for intelligent equipment, which is applied to a terminal, the device comprises:
the second receiving unit is used for receiving an offline control instruction sent by the server under the condition that data connection is established between the terminal and the server;
the first processing unit is used for processing the offline control instruction in the terminal by using at least the equipment information of the intelligent equipment under the condition that the data connection is disconnected between the terminal and the server and the data connection is established between the intelligent equipment and the terminal;
the first sending unit is configured to send the processed offline control instruction to the intelligent device, so that the intelligent device verifies the received offline control instruction at least using device information of the intelligent device to obtain an instruction verification result, and the intelligent device executes the offline control instruction when the instruction verification result indicates that the offline control instruction meets an offline control condition.
17. A terminal, comprising:
one or more processors;
a memory having one or more programs stored thereon;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of claim 12.
18. An off-line control device for intelligent equipment, which is applied to a server, the device comprises:
the device comprises a request receiving unit, a processing unit and a processing unit, wherein the request receiving unit is used for receiving an instruction acquisition request sent by a terminal under the condition that data connection is established between the terminal and a server;
the second processing unit is used for processing the offline control instruction in the server by using at least the session key, the timestamp information and the device information of the intelligent device;
and a second sending unit, configured to send the processed offline control instruction to the terminal, so that when the data connection is disconnected between the terminal and the server and a data connection is established between the intelligent device and the terminal, the terminal processes the offline control instruction in the terminal by using at least the device information of the intelligent device and sends the processed offline control instruction to the intelligent device, so that the intelligent device verifies the received offline control instruction by using at least the device information of the intelligent device to obtain an instruction verification result, and when the instruction verification result indicates that the offline control instruction meets an offline control condition, the intelligent device executes the offline control instruction.
19. A server, comprising:
one or more processors;
a storage device having one or more programs stored thereon;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of claim 13.
20. A computer-readable medium, on which a computer program is stored, wherein the program, when executed by a processor, implements the method of any one of claims 1-13.
21. A processor for running a program, wherein the program when running implements the method of any one of claims 1-13.
CN202110768849.3A 2021-07-07 2021-07-07 Offline control method and device for intelligent equipment Pending CN115604390A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202110768849.3A CN115604390A (en) 2021-07-07 2021-07-07 Offline control method and device for intelligent equipment
PCT/CN2022/104420 WO2023280277A1 (en) 2021-07-07 2022-07-07 Control method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110768849.3A CN115604390A (en) 2021-07-07 2021-07-07 Offline control method and device for intelligent equipment

Publications (1)

Publication Number Publication Date
CN115604390A true CN115604390A (en) 2023-01-13

Family

ID=84841033

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110768849.3A Pending CN115604390A (en) 2021-07-07 2021-07-07 Offline control method and device for intelligent equipment

Country Status (1)

Country Link
CN (1) CN115604390A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109218263A (en) * 2017-07-04 2019-01-15 阿里巴巴集团控股有限公司 A kind of control method and device
CN109523664A (en) * 2018-10-26 2019-03-26 厦门摩洛克科技有限公司 A kind of intelligent door lock control method
CN111325917A (en) * 2020-02-27 2020-06-23 上海钧正网络科技有限公司 Using method and device of sharing equipment, storage medium and equipment
CN112348997A (en) * 2019-08-08 2021-02-09 云丁网络技术(北京)有限公司 Intelligent door lock control method, device and system
CN112437071A (en) * 2020-11-17 2021-03-02 珠海格力电器股份有限公司 Method, system, device and storage medium for device control
CN112446985A (en) * 2019-08-14 2021-03-05 云丁网络技术(北京)有限公司 Intelligent door lock unlocking method and device
CN112822630A (en) * 2021-01-12 2021-05-18 上海钧正网络科技有限公司 Data processing method of device and computer-readable storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109218263A (en) * 2017-07-04 2019-01-15 阿里巴巴集团控股有限公司 A kind of control method and device
CN109523664A (en) * 2018-10-26 2019-03-26 厦门摩洛克科技有限公司 A kind of intelligent door lock control method
CN112348997A (en) * 2019-08-08 2021-02-09 云丁网络技术(北京)有限公司 Intelligent door lock control method, device and system
CN112446985A (en) * 2019-08-14 2021-03-05 云丁网络技术(北京)有限公司 Intelligent door lock unlocking method and device
CN111325917A (en) * 2020-02-27 2020-06-23 上海钧正网络科技有限公司 Using method and device of sharing equipment, storage medium and equipment
CN112437071A (en) * 2020-11-17 2021-03-02 珠海格力电器股份有限公司 Method, system, device and storage medium for device control
CN112822630A (en) * 2021-01-12 2021-05-18 上海钧正网络科技有限公司 Data processing method of device and computer-readable storage medium

Similar Documents

Publication Publication Date Title
EP4216081A1 (en) Information verification method, related apparatus, device, and storage medium
CN112055952B (en) Vehicle-mounted equipment upgrading method and related equipment
US20220276855A1 (en) Method and apparatus for processing upgrade package of vehicle
CN111435913B (en) Identity authentication method and device for terminal of Internet of things and storage medium
CN111131416B (en) Service providing method and device, storage medium and electronic device
US10869198B2 (en) Wireless system access control method and device
US11303453B2 (en) Method for securing communication without management of states
EP3462747A1 (en) Security device for providing security function for image, camera device including the same, and system on chip for controlling the camera device
CN104836784B (en) A kind of information processing method, client and server
CN113765713A (en) Data interaction method based on Internet of things equipment acquisition
CN110381075B (en) Block chain-based equipment identity authentication method and device
CN115396121B (en) Security authentication method for security chip OTA data packet and security chip device
CN110740038B (en) Blockchain and communication method, gateway, communication system and storage medium thereof
CN112559993A (en) Identity authentication method, device and system and electronic equipment
CN110138805B (en) Equipment authentication method and device and computer readable storage medium
CN113794734A (en) Vehicle-mounted CAN bus encryption communication method, control device and readable storage medium
CN114584306B (en) Data processing method and related device
CN109815666B (en) Identity authentication method and device based on FIDO protocol, storage medium and electronic equipment
CN111654503A (en) Remote control method, device, equipment and storage medium
CN113259722B (en) Secure video Internet of things key management method, device and system
CN110635894B (en) Quantum key output method and system based on frame protocol format
CN110570197B (en) Data processing method and device based on block chain
CN110602133B (en) Intelligent contract processing method, block chain management device and storage medium
CN111444496A (en) Application control method, device, equipment and storage medium
CN116599719A (en) User login authentication method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination