CN112437071A - Method, system, device and storage medium for device control - Google Patents

Method, system, device and storage medium for device control Download PDF

Info

Publication number
CN112437071A
CN112437071A CN202011284751.2A CN202011284751A CN112437071A CN 112437071 A CN112437071 A CN 112437071A CN 202011284751 A CN202011284751 A CN 202011284751A CN 112437071 A CN112437071 A CN 112437071A
Authority
CN
China
Prior art keywords
offline
code
service request
user terminal
identifier
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.)
Granted
Application number
CN202011284751.2A
Other languages
Chinese (zh)
Other versions
CN112437071B (en
Inventor
张铭
宋德超
王沅召
周晓泽
葛春光
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Gree Electric Appliances Inc of Zhuhai
Zhuhai Lianyun Technology Co Ltd
Original Assignee
Gree Electric Appliances Inc of Zhuhai
Zhuhai Lianyun Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Gree Electric Appliances Inc of Zhuhai, Zhuhai Lianyun Technology Co Ltd filed Critical Gree Electric Appliances Inc of Zhuhai
Priority to CN202011284751.2A priority Critical patent/CN112437071B/en
Publication of CN112437071A publication Critical patent/CN112437071A/en
Priority to PCT/CN2021/116150 priority patent/WO2022105365A1/en
Application granted granted Critical
Publication of CN112437071B publication Critical patent/CN112437071B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0876Network architectures or network communication protocols for network security for authentication of entities based on the identity of the terminal or configuration, e.g. MAC address, hardware or software configuration or device fingerprint
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/45Structures or tools for the administration of authentication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0645Rental transactions; Leasing transactions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • H04L67/025Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2133Verifying human interaction, e.g., Captcha
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Abstract

The application relates to a method, a system, a device and a storage medium for device control. The method comprises the steps of obtaining an offline service request from a user terminal, wherein the offline service request comprises offline verification data corresponding to a first offline code, and the first offline code is associated with equipment and the user terminal; and verifying the user terminal by using the off-line verification data, and after the verification is passed, executing the control of the equipment, such as self-starting of the control equipment. By adopting the scheme of the application, even if the user terminal cannot be networked, the user terminal can request to start the equipment based on the offline service request.

Description

Method, system, device and storage medium for device control
Technical Field
The present application relates to the field of computers, and in particular, to a method, a system, a device, and a storage medium for controlling a device.
Background
Currently, more and more rental devices are used in collective environments such as schools, classrooms and the like, when a user wants to use the rental devices, the user sends an online service request to a server through a user terminal, and the server responds to the service request to control the opening of the rental devices. However, when the user terminal cannot be networked, the user terminal cannot request the server to control the rental device to be turned on.
Disclosure of Invention
The application provides a method, a system, equipment and a storage medium for controlling equipment, which are used for solving the problem that a user terminal cannot request a server to control and open rental equipment when the user terminal cannot be networked.
In a first aspect, a method for controlling a device is provided, and applied to the device, the method includes:
obtaining an offline service request from a user terminal, wherein the offline service request comprises offline verification data corresponding to a first offline code, and the first offline code is associated with the device and the user terminal;
and verifying the user terminal by using the off-line verification data, and executing the control of the equipment after the verification is passed.
Optionally, the offline verification data includes a timestamp, a first verification code generated by using the first offline code and the timestamp, and a terminal identifier of the user terminal.
Optionally, the verifying the user terminal by using the offline verification data, and after the verification is passed, performing control over the device includes:
when a first identifier which is the same as the terminal identifier exists, acquiring receiving time for receiving the offline service request, wherein the first identifier is the terminal identifier stored in the equipment;
determining a time difference between the timestamp and the receive time;
and when the time difference is not greater than a preset time threshold, verifying the first verification code, and after the verification is passed, executing the control on the equipment.
Optionally, when the time difference is not greater than a preset time threshold, verifying the first verification code, and after the verification is passed, performing the control on the device includes:
when the time difference is not greater than a preset time threshold, generating a second verification code corresponding to a second offline code and the timestamp, wherein the second offline code is the offline code stored in the device and corresponding to the first identifier;
determining that the second verification code is the same as the first verification code, performing the controlling of the device.
Optionally, the verifying the user terminal by using the offline verification data, and after the verification is passed, performing control over the device includes:
acquiring a device identifier of the device;
generating a third offline code corresponding to the terminal identifier and the equipment identifier;
generating a third verification code corresponding to the third offline code and the timestamp;
performing the controlling of the device when the third verification code is the same as the first verification code.
Optionally, the obtaining an offline service request from a user terminal includes:
detecting and obtaining a light flicker signal sent by the user terminal, and extracting and obtaining the off-line service request from the light flicker signal;
or
Receiving Bluetooth data transmitted by the user terminal through Bluetooth communication, and extracting and acquiring the offline service request from the Bluetooth data;
or
And detecting and acquiring an infrared signal sent by the user terminal, and extracting and acquiring the offline service request from the infrared signal.
Optionally, the controlling of the device is performed, comprising:
executing the start service;
after the starting service is executed, the method further comprises the following steps:
sending a verification request to a server, wherein the verification request comprises the terminal identification and is used for requesting to verify whether the usage amount of the user terminal is lower than a preset amount;
and receiving a shutdown instruction sent by the server, and executing shutdown service according to the shutdown instruction, wherein the shutdown instruction is sent after the server verifies that the usage amount is lower than the preset amount.
Optionally, before acquiring the offline service request from the user terminal, the method further includes:
receiving the first identifier and the second offline code sent by a server;
the second offline code is allocated to the first user terminal when the server obtains an online service request of the first user terminal corresponding to the first identifier and controls the device according to the online server request.
Optionally, after the controlling the device is executed, the method further includes:
receiving a deleting instruction sent by the server, wherein the deleting instruction is used for indicating to delete the terminal identifier and the first offline code;
and deleting the terminal identification and the first offline code.
In a second aspect, a method for controlling a device is provided, which is applied to a server, and includes:
receiving an online service request from a user terminal, wherein the online service request carries a terminal identifier and an equipment identifier of the user terminal;
and generating a first offline code corresponding to the terminal identifier and the equipment identifier, and sending the first offline code to the user terminal.
Optionally, after sending the first offline code to the user terminal, the method further includes:
receiving a verification request, wherein the verification request comprises the terminal identification;
and verifying the use limit corresponding to the terminal identification, and sending a shutdown instruction to the equipment corresponding to the equipment identification when the use limit is lower than a preset limit.
Optionally, before generating the first offline code corresponding to the terminal identifier and the device identifier, the method further includes:
when the historical offline code corresponding to the terminal identifier and the equipment identifier is stored in the server, acquiring the survival time of the historical offline code; and determining that the lifetime is longer than a preset lifetime.
Optionally, after generating the first offline code corresponding to the terminal identifier and the device identifier, the method further includes:
acquiring the storage duration of the first offline code;
and when the storage duration is longer than a preset storage duration, sending a deleting instruction to the equipment, and deleting the first offline code, wherein the deleting instruction is used for indicating to delete the terminal identifier and the first offline code.
In a third aspect, a method for controlling a device is provided, which is applied to a user terminal, and includes:
generating an offline service request, wherein the offline service request comprises offline verification data corresponding to a first offline code, and the offline service request is used for requesting to control the equipment;
and sending the offline service request to the equipment.
Optionally, before generating the offline service request, the method further includes:
generating an online service request, and sending the online service request to a server, wherein the online service request carries a terminal identifier of the user terminal and an equipment identifier of the equipment;
and receiving the first offline code sent by the server, wherein the first offline code corresponds to the terminal identifier and the equipment identifier.
Optionally, the offline verification data includes a timestamp, a first verification code generated by using the first offline code and the timestamp, and a terminal identifier of the user terminal;
generating an offline service request, comprising:
acquiring the timestamp and the first offline code, and generating the first verification code by adopting the timestamp and the first offline code;
and generating the offline server request according to the timestamp, the first offline code and the first verification code.
In a fourth aspect, a system for device control is provided, including:
the user terminal is used for generating an offline service request and sending the offline service request to equipment, wherein the offline service request comprises offline verification data corresponding to a first offline code, and the offline service request is used for requesting to control the equipment; before generating the off-line service request, generating an on-line service request, and sending the on-line service request to a server, wherein the on-line service request carries a terminal identifier of the user terminal and an equipment identifier of the equipment; receiving the first offline code sent by the server;
the device is used for acquiring the offline service request; verifying the user terminal by using the off-line verification data, and executing control on the equipment after the verification is passed;
the server is used for receiving the online service request; and generating the first offline code corresponding to the terminal identifier and the equipment identifier, and sending the first offline code to the user terminal.
In a fifth aspect, an electronic device is provided, including: the system comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
the memory for storing a computer program;
the processor is configured to execute a program stored in the memory to implement the method of any one of the first aspect, the method of any one of the second aspect, or the method of any one of the third aspect.
A sixth aspect provides a computer readable storage medium storing a computer program which, when executed by a processor, implements the method of any one of the first aspect, or the method of any one of the second aspect, or the method of any one of the third aspect.
Compared with the prior art, the technical scheme provided by the embodiment of the application has the following advantages: according to the technical scheme provided by the embodiment, the device can receive the offline service request of the user terminal, and execute control on the device, such as self-starting of the control device, after the user terminal is verified by using the offline service request. Therefore, even if the user terminal cannot be networked, the user terminal can request to turn on the device based on the offline service request.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
In order to more clearly illustrate the embodiments of the present invention 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, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
FIG. 1 is a schematic structural diagram of a system for controlling a device according to an embodiment of the present application;
FIG. 2 is a schematic flow chart illustrating a method for controlling a device according to an embodiment of the present disclosure;
FIG. 3 is a schematic flow chart of another method for controlling a device according to an embodiment of the present disclosure;
FIG. 4 is a schematic flow chart of another method for controlling a device according to an embodiment of the present disclosure;
FIG. 5 is a schematic flow chart of another method for controlling a device according to an embodiment of the present disclosure;
FIG. 6 is a schematic flow chart of another method for controlling a device according to an embodiment of the present disclosure;
FIG. 7 is a schematic structural diagram of an apparatus for controlling a device according to an embodiment of the present application;
FIG. 8 is a schematic structural diagram of an apparatus controlled by another apparatus in the embodiment of the present application;
FIG. 9 is a schematic structural diagram of an apparatus controlled by another apparatus in the embodiment of the present application;
fig. 10 is a schematic structural diagram of an electronic device in an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but 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.
Referring to fig. 1, a system architecture diagram of a system for controlling a device according to an embodiment of the present application is shown.
The system for device control includes: user terminal 101, device 102, and server 103.
Wherein:
the user terminal 101 is configured to generate an offline service request and send the offline service request to the device 102, where the offline service request includes offline verification data corresponding to the first offline code, and the offline service request is used to request to control the device 102; before generating an offline service request, generating an online service request, and sending the online service request to the server 103, wherein the online service request carries a terminal identifier of the user terminal 101 and a device identifier of the device 102; and receiving the first offline code sent by the server 103.
A device 102, configured to obtain an offline service request; the user terminal 101 is authenticated using the offline authentication data, and after the authentication is passed, control of the device 102 is performed.
A server 103 for online service requests; a first offline code corresponding to the terminal identity and the device identity is generated and sent to the user terminal 101.
Based on the system of device control shown in fig. 1, the following description is made of a method of device control from the device side, the server side, and the user terminal side, respectively:
first, a method for controlling a device is described from a device side, as shown in fig. 2, the method may be applied to the device 102 shown in fig. 1, and the method may include the following steps:
step 201, obtaining an offline service request from a user terminal.
Optionally, in this embodiment, when obtaining the offline service request from the user terminal, the offline service request may be implemented by any one of the following manners:
in a first implementation manner, a light flicker signal sent by a user terminal is detected and obtained, and an offline service request is extracted and obtained from the light flicker signal.
In this implementation, the device is provided with a photosensitive element, and the photosensitive element can capture a light flicker signal sent by the user terminal.
When the offline service request is extracted from the light flicker signal, firstly a light flicker curve corresponding to the light flicker signal can be generated, secondly a light flicker rule is determined according to the light flicker curve, and finally the service request corresponding to the light flicker rule is used as the offline service request.
In practical application, the user terminal and the device may agree in advance on a mapping relationship between a light flicker rule and a service request.
In a second implementation manner, bluetooth data transmitted by a user terminal through bluetooth communication is received, and an offline service request is extracted from the bluetooth data.
In this implementation, the device needs to establish bluetooth communication with the user terminal in advance before receiving the offline service request sent by the user terminal. Specifically, the device establishes a bluetooth communication connection with the user terminal according to a bluetooth request of the user terminal, and receives an offline service request sent by the user through the established bluetooth communication.
In the third implementation mode, the infrared signal sent by the user terminal is detected and obtained, and the off-line service request is extracted and obtained from the infrared signal.
In this implementation, the device and the user terminal may agree in advance a correspondence between the infrared signal and the service request, and after the device detects and obtains the infrared signal, the offline service request is obtained from the infrared signal according to the agreed correspondence in advance.
In this embodiment, the offline service request includes offline verification data corresponding to a first offline code, where the first offline code is associated with the device and the user terminal.
Step 202, using the offline verification data to verify the user terminal, and after the verification is passed, executing the control of the device.
In this embodiment, the offline verification data may include a timestamp, a first verification code generated by using the first offline code and the timestamp, and a terminal identifier of the user terminal.
In practical applications, the timestamp may be a current time of generating the first verification code, that is, the first verification code is generated by using the current time and the first offline code.
In this embodiment, when generating the verification code, an optional implementation manner may be to take a hash algorithm for the timestamp and the offline code to obtain the verification code. Thus, in generating the first verification code, the timestamp and the first offline code may be hashed to generate the first verification code.
Optionally, the hashing algorithm includes, but is not limited to, the md5 algorithm.
Based on the above offline verification data, the present embodiment provides the following two implementation manners for verifying the user terminal:
a first implementation, specifically as shown in fig. 3, may include the following steps:
step 301, judging whether a first identifier identical to the terminal identifier exists, if so, executing step 302.
The first identifier is a terminal identifier stored in the device.
When the illegal user only steals the terminal identification and fails to steal the first off-line code and the timestamp, the illegal control of the illegal user on the equipment can be avoided through the matching of the terminal identification and the first identification.
Step 302, obtaining a receiving time for receiving the offline service request.
In order to avoid illegal control of the equipment due to the fact that the terminal identification is stolen, after the first identification which is the same as the terminal identification exists in the verification equipment, the time stamp in the offline verification data is verified continuously through receiving the receiving time of the offline service request.
Step 303, determine the time difference between the timestamp and the receiving time.
Step 304, determining whether the time difference is not greater than a preset time threshold, if so, executing step 305.
Step 305, generating a second verification code corresponding to the second offline code and the timestamp.
And the second offline code is the offline code which is stored in the equipment and corresponds to the first identifier.
Step 306, determine whether the second verification code is the same as the first verification code, if yes, execute step 307.
In order to avoid that the terminal identification, the off-line code and the time stamp are all stolen, and the equipment is controlled illegally, the first off-line code is verified after the terminal identification and the time stamp are verified.
Step 307, control of the device is performed.
And when the first identifier which is the same as the terminal identifier does not exist, or the time difference is greater than the preset time threshold, or the second verification code is different from the first verification code, sending verification failure information to the user terminal.
In practical application, the verification failure information may carry the reason for verification and identification, such as insufficient usage amount.
In this embodiment, the preset time threshold may be set according to an empirical value.
This embodiment realizes a process of verifying an offline service request of a user terminal when a first identifier and a second offline code are stored in a device.
The second implementation, as shown in fig. 4, may include the following steps:
step 401, obtaining a device identifier of a device.
And 402, generating a third offline code corresponding to the terminal identifier and the equipment identifier.
Alternatively, the third offline code may be generated by an offline code generation algorithm predetermined in advance with the server.
In this embodiment, the offline code generation algorithm includes, but is not limited to, a random string generation algorithm, or a hash algorithm.
In practice, the hashing algorithm includes, but is not limited to, the md5 algorithm.
Step 403, generating a third verification code corresponding to the third offline code and the timestamp.
Optionally, the algorithm for generating the third verification code is the same as the algorithm for generating the first verification code.
And step 404, when the third verification code is the same as the first verification code, controlling the equipment.
The embodiment implements a process of verifying the offline service request of the user terminal when the device and the server agree in advance with an offline code generation algorithm.
Optionally, the controlling the device may include executing a start service, that is, after the user terminal is authenticated by using the offline authentication data, the device executes the start service to complete self-starting.
Considering that the device itself may not have a database and the processing capability of the device itself is limited, after the device performs the start-up service, the server may be further requested to verify the usage amount of the device again.
Optionally, the device may send a verification request for verifying whether the usage amount of the user terminal is lower than a preset amount to the server, where the verification request includes the terminal identifier; and receiving a shutdown instruction sent by the server after the use limit is verified to be lower than the preset limit, and executing shutdown service according to the shutdown instruction.
In practical application, the usage amount may be a balance of an account corresponding to the terminal identifier.
In this embodiment, the device may further delete the terminal identifier and the first offline code according to a deletion instruction sent by the server.
According to the technical scheme provided by the embodiment, the device can receive the offline service request of the user terminal, and execute control over the device, such as self-starting of the control device, after the user terminal is verified by using the offline service request. Therefore, even if the user terminal cannot be networked, the user terminal can request to turn on the device based on the offline service request.
The description of the method for device control on the device side is completed so far.
Next, a method for controlling a device from a server side is described, as shown in fig. 5, which can be applied to the server 103 shown in fig. 1, and the method can include the following steps:
step 501, receiving an online service request from a user terminal.
The online service request carries the terminal identifier and the device identifier of the user terminal.
In practical application, the server can receive the online service request through communication modes such as a 4G network and WIFI.
Step 502, generating a first offline code corresponding to the terminal identifier and the device identifier, and sending the first offline code to the user terminal.
In this embodiment, the first offline code may be generated based on an offline code generation algorithm.
In this embodiment, the offline code generation algorithm includes, but is not limited to, a random string generation algorithm, or a hash algorithm.
Optionally, the online service request may also be used to request control (e.g., start) of a device corresponding to the device identifier, and thus, after receiving the online service request from the user terminal, a control (e.g., start) instruction may also be sent to the device to control (e.g., start) the device.
Optionally, before the server sends the start instruction to the device based on the online service request, the server may further verify a usage amount corresponding to the terminal identifier, and determine that the usage amount is not lower than a preset amount.
Optionally, the server may also verify the usage amount of the user terminal based on the verification request alone, specifically, the server receives the verification request to verify the usage amount corresponding to the terminal identifier, and sends a shutdown instruction to the device when the usage amount is lower than a preset amount, where the verification request includes the terminal identifier.
Optionally, in order to reduce the risk of stealing offline codes, one measure may be to update the offline codes stored in the server periodically. Specifically, before the first offline code is generated, whether a historical offline code corresponding to the terminal identifier and the device identifier is stored or not is judged, if yes, the lifetime of the historical offline code is obtained, and the first offline code is generated only when it is determined that the lifetime is longer than the preset lifetime.
Optionally, in another measure, in consideration of the possibility that the user terminal does not request to update the first offline code for a long time, the server may forcibly delete the first offline code at regular time, specifically, after the first offline code is generated, the server obtains a storage duration of the first offline code, and when the storage duration is greater than a preset storage duration, sends a deletion instruction to the device, and deletes the first offline code, where the deletion instruction is used to instruct to delete the terminal identifier and the first offline code.
And the preset storage time length is not less than the preset survival time length.
In practical application, both the preset storage duration and the preset generation duration can be preset by a user.
The description of the method for controlling the device on the server side is completed up to this point.
Finally, a method for controlling a device from a user terminal side is described, as shown in fig. 6, which can be applied to the user terminal 101 shown in fig. 1, and the method can include the following steps:
step 601, generating an offline service request.
Step 602, an offline service request is sent to a device.
The offline service request comprises offline verification data corresponding to the first offline code, and the offline service request is used for requesting the control equipment.
Optionally, the offline validation data may include a timestamp, a first validation code generated using the first offline code and the timestamp, and a terminal identification of the user terminal.
Correspondingly, when the service request is generated, the timestamp and the first offline code are obtained, the first verification code is generated by adopting the timestamp and the first offline code, and the offline server request is further generated according to the timestamp, the first offline code and the first verification code.
Optionally, before generating the offline service request, the user terminal may request the server to be assigned the first offline code through the online service request. Specifically, the user terminal generates an online service request carrying a terminal identifier and an equipment identifier, sends the online service request to the server, and receives a first offline code sent by the server.
In practical application, the user terminal can send an online service request to the server through communication modes such as a 4G network and WIFI.
It should be noted that, in this embodiment, the online service request and the offline service request do not conflict with each other, that is, when the user terminal can request the control device through the online service request or the offline service request, the user can randomly select a request mode to request the control device.
Optionally, in this embodiment, sending the offline service request to the device may be implemented by any one of the following manners:
sending out a light flashing signal;
transmitting bluetooth data through bluetooth communication established with the device;
an infrared signal is emitted.
The lamplight flicker signal, the Bluetooth data and the infrared signal comprise offline verification data.
The description of the method for device control on the device side is completed so far.
The following illustrates an off-line code generation algorithm and a verification code generation algorithm involved in the embodiments of the present application:
a first implementation manner is exemplified by taking local authentication on the device side as a manner of fig. 3:
(1) the off-line code generation algorithm may be assumed to be:
an offline code (server generates a random string of a preset size by using a terminal identifier and a device identifier)
The offline code here includes the first offline code and the second offline code referred to in the above embodiments.
(2) The verification code generation algorithm may be:
hash algorithm (time stamp + off-line code) is taken to the identifying code ═
The verification code here includes the first verification code and the second verification code referred to in the above embodiments.
A second implementation manner is exemplified by taking local authentication on the device side as a manner of fig. 4:
(1) the offline code generation algorithm may be:
taking hash algorithm (equipment identifier + S character string + terminal identifier) + S character string
Generating a timestamp + random string
The offline codes herein include the first offline code and the third offline code referred to in the above embodiments.
(2) The verification code generation algorithm may be:
taking hash algorithm (timestamp + off-line code) + S character string
The verification code here includes the first verification code and the third verification code referred to in the above embodiments.
Based on the same inventive concept, an apparatus for controlling a device is further provided in the embodiments of the present application, as shown in fig. 7, including:
an obtaining unit 701, configured to obtain an offline service request from a user terminal, where the offline service request includes offline verification data corresponding to a first offline code, and the first offline code is associated with a device and the user terminal;
the authentication unit 702 is configured to authenticate the user terminal by using the offline authentication data, and perform control of the device after the authentication is passed.
Based on the same inventive concept, an apparatus for controlling a device is further provided in the embodiments of the present application, and as shown in fig. 8, the apparatus includes:
a receiving unit 801, configured to receive an online service request from a user terminal, where the online service request carries a terminal identifier and an equipment identifier of the user terminal;
the first generating unit 802 is configured to generate a first offline code corresponding to the terminal identifier and the device identifier, and send the first offline code to the user terminal.
Based on the same inventive concept, an apparatus for controlling a device is further provided in the embodiments of the present application, and as shown in fig. 9, the apparatus includes:
a second generating unit 901, configured to generate an offline service request, where the offline service request includes offline verification data corresponding to the first offline code, and the offline service request is used to request a control device;
a sending unit 902, configured to send an offline service request to a device.
Based on the same concept, an embodiment of the present application further provides an electronic device, as shown in fig. 10, the electronic device mainly includes: a processor 1001, a communication interface 1002, a memory 1003 and a communication bus 1004, wherein the processor 1001, the communication interface 1002 and the memory 1003 communicate with each other via the communication bus 1004. Wherein, the memory 1003 stores therein a program executable by the processor 1001, and the processor 1001 executes the program stored in the memory 1003, implementing the method of device control provided in any of the above method embodiments.
The communication bus 1004 mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus 1004 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in FIG. 10, but this is not intended to represent only one bus or type of bus.
The communication interface 1002 is used for communication between the electronic apparatus and other apparatuses.
The Memory 1003 may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Alternatively, the memory may be at least one storage device located remotely from the aforementioned processor 1001.
The Processor 1001 may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc., and may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic devices, discrete gates or transistor logic devices, and discrete hardware components.
In still another embodiment of the present application, there is also provided a computer-readable storage medium having stored therein a computer program which, when run on a computer, causes the computer to execute the method of device control described in the above-described embodiment.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored on a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wire (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wirelessly (e.g., infrared, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that includes one or more of the available media. The available media may be magnetic media (e.g., floppy disks, hard disks, tapes, etc.), optical media (e.g., DVDs), or semiconductor media (e.g., solid state drives), among others.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The foregoing are merely exemplary embodiments of the present invention, which enable those skilled in the art to understand or practice the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (19)

1. A method for controlling equipment is characterized by being applied to the equipment and comprising the following steps:
obtaining an offline service request from a user terminal, wherein the offline service request comprises offline verification data corresponding to a first offline code, and the first offline code is associated with the device and the user terminal;
and verifying the user terminal by using the off-line verification data, and executing the control of the equipment after the verification is passed.
2. The method of claim 1, wherein the offline validation data comprises a timestamp, a first validation code generated using the first offline code and the timestamp, and a terminal identification of the user terminal.
3. The method of claim 2, wherein authenticating the user terminal using the offline authentication data, and performing control of the device after authentication is passed comprises:
when a first identifier which is the same as the terminal identifier exists, acquiring receiving time for receiving the offline service request, wherein the first identifier is the terminal identifier stored in the equipment;
determining a time difference between the timestamp and the receive time;
and when the time difference is not greater than a preset time threshold, verifying the first verification code, and after the verification is passed, executing the control on the equipment.
4. The method of claim 3, wherein verifying the first verification code when the time difference is not greater than a preset time threshold, and performing the control of the device after the verification is passed comprises:
when the time difference is not greater than a preset time threshold, generating a second verification code corresponding to a second offline code and the timestamp, wherein the second offline code is the offline code stored in the device and corresponding to the first identifier;
determining that the second verification code is the same as the first verification code, performing the controlling of the device.
5. The method of claim 2, wherein authenticating the user terminal using the offline authentication data, and performing control of the device after authentication is passed comprises:
acquiring a device identifier of the device;
generating a third offline code corresponding to the terminal identifier and the equipment identifier;
generating a third verification code corresponding to the third offline code and the timestamp;
performing the controlling of the device when the third verification code is the same as the first verification code.
6. The method of claim 1, wherein obtaining the offline service request from the user terminal comprises:
detecting and obtaining a light flicker signal sent by the user terminal, and extracting and obtaining the off-line service request from the light flicker signal;
or
Receiving Bluetooth data transmitted by the user terminal through Bluetooth communication, and extracting and acquiring the offline service request from the Bluetooth data;
or
And detecting and acquiring an infrared signal sent by the user terminal, and extracting and acquiring the offline service request from the infrared signal.
7. The method of claim 2, wherein performing control of the device comprises:
executing the start service;
after the starting service is executed, the method further comprises the following steps:
sending a verification request to a server, wherein the verification request comprises the terminal identification and is used for requesting to verify whether the usage amount of the user terminal is lower than a preset amount;
and receiving a shutdown instruction sent by the server, and executing shutdown service according to the shutdown instruction, wherein the shutdown instruction is sent after the server verifies that the usage amount is lower than the preset amount.
8. The method of claim 4, wherein before obtaining the offline service request from the user terminal, further comprising:
receiving the first identifier and the second offline code sent by a server;
the second offline code is allocated to the first user terminal when the server obtains an online service request of the first user terminal corresponding to the first identifier and controls the device according to the online server request.
9. The method of claim 8, wherein after performing the control of the device, further comprising:
receiving a deleting instruction sent by the server, wherein the deleting instruction is used for indicating to delete the terminal identifier and the first offline code;
and deleting the terminal identification and the first offline code.
10. A method for controlling equipment is applied to a server and comprises the following steps:
receiving an online service request from a user terminal, wherein the online service request carries a terminal identifier and an equipment identifier of the user terminal;
and generating a first offline code corresponding to the terminal identifier and the equipment identifier, and sending the first offline code to the user terminal.
11. The method of claim 10, wherein after sending the first offline code to the user terminal, further comprising:
receiving a verification request, wherein the verification request comprises the terminal identification;
and verifying the use limit corresponding to the terminal identification, and sending a shutdown instruction to the equipment corresponding to the equipment identification when the use limit is lower than a preset limit.
12. The method of claim 10, wherein before generating the first offline code corresponding to the terminal identifier and the device identifier, the method further comprises:
when the historical offline code corresponding to the terminal identifier and the equipment identifier is stored in the server, acquiring the survival time of the historical offline code; and determining that the lifetime is longer than a preset lifetime.
13. The method of claim 11, wherein after generating the first offline code corresponding to the terminal identifier and the device identifier, the method further comprises:
acquiring the storage duration of the first offline code;
and when the storage duration is longer than a preset storage duration, sending a deleting instruction to the equipment, and deleting the first offline code, wherein the deleting instruction is used for indicating to delete the terminal identifier and the first offline code.
14. A method for controlling equipment is applied to a user terminal and comprises the following steps:
generating an offline service request, wherein the offline service request comprises offline verification data corresponding to a first offline code, and the offline service request is used for requesting to control the equipment;
and sending the offline service request to the equipment.
15. The method of claim 14, wherein prior to generating the offline service request, further comprising:
generating an online service request, and sending the online service request to a server, wherein the online service request carries a terminal identifier of the user terminal and an equipment identifier of the equipment;
and receiving the first offline code sent by the server, wherein the first offline code corresponds to the terminal identifier and the equipment identifier.
16. The method of claim 14, wherein the offline validation data comprises a timestamp, a first validation code generated using the first offline code and the timestamp, and a terminal identification of the user terminal;
generating an offline service request, comprising:
acquiring the timestamp and the first offline code, and generating the first verification code by adopting the timestamp and the first offline code;
and generating the offline server request according to the timestamp, the first offline code and the first verification code.
17. A system for device control, comprising:
the user terminal is used for generating an offline service request and sending the offline service request to equipment, wherein the offline service request comprises offline verification data corresponding to a first offline code, and the offline service request is used for requesting to control the equipment; before generating the off-line service request, generating an on-line service request, and sending the on-line service request to a server, wherein the on-line service request carries a terminal identifier of the user terminal and an equipment identifier of the equipment; receiving the first offline code sent by the server;
the device is used for acquiring the offline service request; verifying the user terminal by using the off-line verification data, and executing control on the equipment after the verification is passed;
the server is used for receiving the online service request; and generating the first offline code corresponding to the terminal identifier and the equipment identifier, and sending the first offline code to the user terminal.
18. An electronic device, comprising: the system comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
the memory for storing a computer program;
the processor, configured to execute a program stored in the memory, to implement the method of any one of claims 1-9, or the method of any one of claims 10-13, or the method of any one of claims 14-16.
19. A computer-readable storage medium, storing a computer program, characterized in that the computer program, when being executed by a processor, implements the method of any of claims 1-9, or the method of any of claims 10-13, or the method of any of claims 14-16.
CN202011284751.2A 2020-11-17 2020-11-17 Method, system, device and storage medium for controlling device Active CN112437071B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202011284751.2A CN112437071B (en) 2020-11-17 2020-11-17 Method, system, device and storage medium for controlling device
PCT/CN2021/116150 WO2022105365A1 (en) 2020-11-17 2021-09-02 Device control method and system, electronic device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011284751.2A CN112437071B (en) 2020-11-17 2020-11-17 Method, system, device and storage medium for controlling device

Publications (2)

Publication Number Publication Date
CN112437071A true CN112437071A (en) 2021-03-02
CN112437071B CN112437071B (en) 2023-05-16

Family

ID=74700294

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011284751.2A Active CN112437071B (en) 2020-11-17 2020-11-17 Method, system, device and storage medium for controlling device

Country Status (2)

Country Link
CN (1) CN112437071B (en)
WO (1) WO2022105365A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022105365A1 (en) * 2020-11-17 2022-05-27 珠海格力电器股份有限公司 Device control method and system, electronic device, and storage medium
CN115604390A (en) * 2021-07-07 2023-01-13 云丁网络技术(北京)有限公司(Cn) Offline control method and device for intelligent equipment

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105357262A (en) * 2015-09-29 2016-02-24 小米科技有限责任公司 Device control method and device control apparatus
CN106506573A (en) * 2015-09-07 2017-03-15 韩岗 Intelligent home furnishing control method and system
US20170097617A1 (en) * 2015-10-01 2017-04-06 Invensys Systems, Inc. Multi-core device with separate redundancy schemes in a process control system
CN107508822A (en) * 2017-09-06 2017-12-22 迈普通信技术股份有限公司 Access control method and device
CN108053527A (en) * 2017-12-11 2018-05-18 上海众人网络安全技术有限公司 A kind of control method of intelligent door lock, apparatus and system
US20190042775A1 (en) * 2017-08-07 2019-02-07 Skidata Ag Method for operating an access control system comprising a server, at least one access control device and at least one point of sale device for access permissions for the area covered by the access control system
CN110071908A (en) * 2019-03-13 2019-07-30 浙江大华技术股份有限公司 Terminal binding method, device, computer equipment and storage medium
CN110912911A (en) * 2019-11-29 2020-03-24 宁波奥克斯电气股份有限公司 Air conditioning equipment authority control method, user equipment and control system
CN111030812A (en) * 2019-12-16 2020-04-17 Oppo广东移动通信有限公司 Token verification method, device, storage medium and server
CN111506632A (en) * 2020-04-23 2020-08-07 腾讯科技(深圳)有限公司 Data processing method and device
CN111800456A (en) * 2020-05-14 2020-10-20 深圳海翼智新科技有限公司 Method, device and system for remotely controlling offline equipment and computer storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112437071B (en) * 2020-11-17 2023-05-16 珠海格力电器股份有限公司 Method, system, device and storage medium for controlling device

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106506573A (en) * 2015-09-07 2017-03-15 韩岗 Intelligent home furnishing control method and system
CN105357262A (en) * 2015-09-29 2016-02-24 小米科技有限责任公司 Device control method and device control apparatus
US20170097617A1 (en) * 2015-10-01 2017-04-06 Invensys Systems, Inc. Multi-core device with separate redundancy schemes in a process control system
US20190042775A1 (en) * 2017-08-07 2019-02-07 Skidata Ag Method for operating an access control system comprising a server, at least one access control device and at least one point of sale device for access permissions for the area covered by the access control system
CN107508822A (en) * 2017-09-06 2017-12-22 迈普通信技术股份有限公司 Access control method and device
CN108053527A (en) * 2017-12-11 2018-05-18 上海众人网络安全技术有限公司 A kind of control method of intelligent door lock, apparatus and system
CN110071908A (en) * 2019-03-13 2019-07-30 浙江大华技术股份有限公司 Terminal binding method, device, computer equipment and storage medium
CN110912911A (en) * 2019-11-29 2020-03-24 宁波奥克斯电气股份有限公司 Air conditioning equipment authority control method, user equipment and control system
CN111030812A (en) * 2019-12-16 2020-04-17 Oppo广东移动通信有限公司 Token verification method, device, storage medium and server
CN111506632A (en) * 2020-04-23 2020-08-07 腾讯科技(深圳)有限公司 Data processing method and device
CN111800456A (en) * 2020-05-14 2020-10-20 深圳海翼智新科技有限公司 Method, device and system for remotely controlling offline equipment and computer storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
MUHAMMED MUTLU YAPICI,ADEM TEKEREK,NURETTIN TOPALOGLU: "Convolutional Neural Network Based Offline Signature Verification Application" *
陶发展,卫延波: "基于离线语音的智能家居控制系统设计", 《电子质量》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022105365A1 (en) * 2020-11-17 2022-05-27 珠海格力电器股份有限公司 Device control method and system, electronic device, and storage medium
CN115604390A (en) * 2021-07-07 2023-01-13 云丁网络技术(北京)有限公司(Cn) Offline control method and device for intelligent equipment

Also Published As

Publication number Publication date
CN112437071B (en) 2023-05-16
WO2022105365A1 (en) 2022-05-27

Similar Documents

Publication Publication Date Title
US10387134B2 (en) Method and device for downloading profile of operator
US11258792B2 (en) Method, device, system for authenticating an accessing terminal by server, server and computer readable storage medium
WO2017177383A1 (en) Remote management method and device
CN111182521B (en) Internet of things terminal machine card binding, network access authentication and service authentication method and device
CN107579966B (en) Control method, device and system for remotely accessing intranet and terminal equipment
US11509655B2 (en) Authentication system and authentication method
CN110944035A (en) Internet of things equipment control method and system and readable medium
CN112437071B (en) Method, system, device and storage medium for controlling device
CN106656455B (en) Website access method and device
CN108777691B (en) Network security protection method and device
KR20230110613A (en) Virtual key sharing system and method
CN115695012A (en) Login request processing method and device, electronic equipment and storage medium
CN115412269A (en) Service processing method, device, server and storage medium
CN111966422A (en) Localized plug-in service method and device, electronic equipment and storage medium
CN115129332A (en) Firmware burning method, computer equipment and readable storage medium
CN111294337A (en) Token-based authentication method and device
US20150052544A1 (en) Information processing device, information processing method, information processing system, and computer program product
JP2017187963A (en) Electronic apparatus and system
CN108574658B (en) Application login method and device
CN113596030B (en) Equipment network distribution method and device, storage medium and electronic equipment
CN110048864B (en) Method and apparatus for authenticating an administrator of a device-specific message group
CN113849802A (en) Equipment authentication method and device, electronic equipment and storage medium
CN109241728B (en) Method and device for acquiring password information, computer equipment and storage medium
CN112532423A (en) Equipment access method, device and system
KR20120044048A (en) Method and apparatus for application program authentication

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
GR01 Patent grant
GR01 Patent grant