CN112437071B - Method, system, device and storage medium for controlling device - Google Patents

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

Info

Publication number
CN112437071B
CN112437071B CN202011284751.2A CN202011284751A CN112437071B CN 112437071 B CN112437071 B CN 112437071B CN 202011284751 A CN202011284751 A CN 202011284751A CN 112437071 B CN112437071 B CN 112437071B
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.)
Active
Application number
CN202011284751.2A
Other languages
Chinese (zh)
Other versions
CN112437071A (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]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Business, Economics & Management (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Accounting & Taxation (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Finance (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Development Economics (AREA)
  • Software Systems (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Power Engineering (AREA)
  • Telephonic Communication Services (AREA)
  • Stored Programmes (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)
  • Power Sources (AREA)

Abstract

The application relates to a method, a system, a device and a storage medium for controlling a device. 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 offline verification data, and performing control on the equipment after the verification is passed, such as controlling the equipment to be self-started. By adopting the scheme, even if the user terminal cannot be connected with the network, the user terminal can request to start the equipment based on the offline service request.

Description

Method, system, device and storage medium for controlling device
Technical Field
The present disclosure 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, rental devices are increasingly used in collective environments such as schools, classrooms and the like, when a user wants to use the rental device, 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 device. However, when the user terminal cannot be networked, the user terminal will not be able to request the server control to turn on the rental device.
Disclosure of Invention
The application provides a method, a system, equipment and a storage medium for equipment control, which are used for solving the problem that a user terminal cannot request a server to control starting of leasing equipment when the user terminal cannot be connected with the network.
In a first aspect, a method for controlling a device is provided, which is applied to the device and includes:
acquiring 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 offline verification data, and executing control on the equipment after the user terminal passes the verification.
Optionally, the offline verification data includes a timestamp, a first verification code generated using the first offline code and the timestamp, and a terminal identification of the user terminal.
Optionally, verifying the user terminal by using the offline verification data, and after the verification is passed, performing control on the device, including:
when a first identifier which is the same as the terminal identifier exists, acquiring the 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 larger than a preset time threshold, verifying the first verification code, and executing the control of the equipment after verification is passed.
Optionally, when the time difference is not greater than a preset time threshold, verifying the first verification code, and when verification is passed, executing the control on the device, including:
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 time stamp, wherein the second offline code is an offline code corresponding to the first identifier stored in the equipment;
and when the second verification code is determined to be the same as the first verification code, executing the control on the equipment.
Optionally, verifying the user terminal by using the offline verification data, and after the verification is passed, performing control on the device, including:
acquiring an equipment identifier of the equipment;
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;
and when the third verification code is the same as the first verification code, executing the control on the equipment.
Optionally, acquiring the offline service request from the user terminal includes:
detecting and obtaining a lamplight flickering signal sent by the user terminal, and extracting and obtaining the offline service request from the lamplight flickering signal;
or alternatively
Receiving Bluetooth data transmitted by the user terminal through Bluetooth communication, and extracting and obtaining the offline service request from the Bluetooth data;
or alternatively
And detecting and obtaining an infrared signal sent by the user terminal, and extracting and obtaining the offline service request from the infrared signal.
Optionally, performing control of the device includes:
executing a start service;
after executing the start-up service, further comprising:
sending a verification request to a server, wherein the verification request comprises the terminal identifier, and the verification request is used for requesting to verify whether the use limit of the user terminal is lower than a preset limit;
and receiving a shutdown instruction sent by the server, and executing shutdown service according to the shutdown instruction, wherein the shutdown instruction is sent by the server after verifying 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 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 identifier and the first offline code.
In a second aspect, a method for controlling a device is provided, and 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 a device 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 identifier, and sending a shutdown instruction to the equipment corresponding to the equipment identifier 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 server stores historical offline codes corresponding to the terminal identifier and the equipment identifier, acquiring the survival time of the historical offline codes; and determining that the survival time length is longer than a preset survival time length.
Optionally, after generating the first offline code corresponding to the terminal identifier and the device identifier, the method further includes:
acquiring the storage time length of the first offline code;
and when the storage time length is longer than the preset storage time length, 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 a device identifier of the device;
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 adopting 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, there is provided a system for device control, comprising:
the user terminal is used for generating an offline service request and sending the offline service request to the 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 the offline service request is generated, an online service request is generated, the online service request is sent to a server, and the online service request carries a terminal identifier of the user terminal and a device identifier of the device; receiving the first offline code sent by the server;
the device is configured to obtain the offline service request; verifying the user terminal by using the offline verification data, and executing control on the equipment after the user terminal passes the verification;
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, there is provided an electronic device comprising: the device 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 is used for storing a computer program;
the processor is configured to execute a program stored in the memory, to implement the method according to any one of the first aspect, or the method according to any one of the second aspect, or the method according to 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 performs 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 after the user terminal is verified by the offline service request, the device is controlled, such as the self-starting of the control device. Thus, 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 invention or the technical solutions of the prior art, the drawings which are used in the description of the embodiments or the prior art will be briefly described, and it will be obvious to a person skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a schematic diagram of a system for controlling a device according to an embodiment of the present application;
FIG. 2 is a schematic flow chart of a method of controlling a device according to an embodiment of the present application;
FIG. 3 is a flow chart of another method of device control according to an embodiment of the present application;
FIG. 4 is a flow chart of another method of device control according to an embodiment of the present application;
FIG. 5 is a flow chart of another method of device control according to an embodiment of the present application;
FIG. 6 is a flow chart of another method of device control according to an embodiment of the present application;
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 another device control apparatus according to an embodiment of the present application;
FIG. 9 is a schematic structural diagram of another device control apparatus according to an 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
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions of 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 apparent that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present application based on the embodiments herein.
Referring to fig. 1, a schematic system architecture of a system for device control is shown in an embodiment of the present application.
The system for controlling the equipment comprises: 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 the control 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; the first offline code transmitted by the server 103 is received.
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 request; a first offline code corresponding to the terminal identification and the device identification is generated and transmitted to the user terminal 101.
Based on the system for device control shown in fig. 1, the following describes a method for device control from the device side, the server side, and the user terminal side, respectively:
first, a method of controlling a device from a device side will be described, and as shown in fig. 2, the method may be applied to the device 102 shown in fig. 1, and the method may include the steps of:
step 201, obtaining an offline service request from a user terminal.
Alternatively, in this embodiment, when obtaining an offline service request from a user terminal, the method may be implemented in any one of the following manners:
in a first implementation manner, a lamplight flicker signal sent by a user terminal is detected and obtained, and an offline service request is extracted and obtained from the lamplight flicker signal.
In this implementation, a photosensitive element is mounted on the device, and the photosensitive element can capture a light flicker signal emitted by the user terminal.
When the offline service request is extracted from the lamplight flickering signals, firstly, a lamplight flickering curve corresponding to the lamplight flickering signals can be generated, secondly, lamplight flickering rules are determined according to the lamplight flickering curve, and finally, the service request corresponding to the lamplight flickering rules is used as the offline service request.
In practical application, the user terminal and the device can pre-agree on the mapping relation between the lamplight flickering rule and the service request.
In a second implementation manner, bluetooth data transmitted by the user terminal through bluetooth communication is received, and an offline service request is extracted from the bluetooth data.
In this implementation, bluetooth communication with the user terminal needs to be established in advance before the device receives 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 a third implementation manner, an infrared signal sent by the user terminal is detected and obtained, and an offline service request is extracted from the infrared signal.
In this implementation manner, the device and the user terminal may agree in advance on a correspondence between the infrared signal and the service request, and after the device detects and obtains the infrared signal, obtain the offline service request from the infrared signal according to the agreed correspondence.
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, verifying the user terminal by using the offline verification data, and executing control on the device after the verification is passed.
In this embodiment, the offline verification data may include a timestamp, a first verification code generated using a first offline code and the timestamp, and a terminal identifier of the user terminal.
In practical applications, the timestamp may be used to generate the current time of the first verification code, i.e. 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 alternative implementation may take a hash algorithm with the timestamp and the offline code to obtain the verification code. Thus, when generating the first verification code, a hashing algorithm may be taken on the timestamp and the first offline code to generate the first verification code.
Alternatively, the hashing algorithm includes, but is not limited to, the md5 algorithm.
Based on the offline verification data, the present embodiment provides two implementation manners for verifying the user terminal:
the first implementation, as shown in fig. 3, may specifically 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 offline code and the timestamp, illegal control of the illegal user on the equipment can be avoided through 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 device caused by theft of the terminal identifier, after the first identifier identical to the terminal identifier exists in the verification device, the timestamp in the offline verification data is verified by continuously receiving the receiving time of the offline service request.
Step 303, determining a time difference between the time stamp 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.
The second offline code is an offline code corresponding to the first identifier stored in the device.
Step 306, determining whether the second verification code is the same as the first verification code, if yes, executing step 307.
In order to avoid that the terminal identification, the off-line code and the time stamp are stolen, the equipment is illegally controlled, and the first off-line code is also 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 larger than a 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 applications, the verification failure information may carry the reason of verification and identification, such as insufficient usage amount.
In this embodiment, the preset time threshold may be set according to an empirical value.
The embodiment realizes the process of verifying the offline service request of the user terminal when the first identifier and the second offline code are stored in the device.
A second implementation, as shown in fig. 4, may include the following steps:
step 401, obtaining a device identifier of a device.
Step 402, a third offline code corresponding to the terminal identifier and the device identifier is generated.
Alternatively, the third offline code may be generated by an offline code generation algorithm predetermined with the server.
In this embodiment, the offline code generation algorithm includes, but is not limited to, a random string generation algorithm, a hash algorithm, or the like.
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.
Step 404, when the third verification code is the same as the first verification code, performing control on the device.
The embodiment realizes the process of verifying the offline service request of the user terminal when the device and the server have an offline code generation algorithm in advance.
Optionally, performing control of the device may include performing a start-up service, i.e. after authentication of the user terminal with the offline authentication data is passed, the device performs the start-up service to complete the self-start.
In view of the fact that the device itself may not have a database and the processing power of the device itself is limited, the server may be further requested to re-verify the usage amount of the device after the device performs the start-up service.
Optionally, the device may send a verification request to the server for verifying whether the usage amount of the user terminal is lower than a preset amount, where the verification request includes a terminal identifier; and receiving a shutdown instruction sent by the server after verifying that the usage amount is lower than the preset amount, and executing shutdown service according to the shutdown instruction.
In practical applications, 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 on the device, such as control device self-starting, after the user terminal is verified by the offline service request. Thus, 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 of device control on the device side is thus completed.
Next, a method of controlling a device from a server side will be described, as shown in fig. 5, which may be applied to the server 103 shown in fig. 1, and may include the steps of:
step 501, an online service request from a user terminal is received.
The online service request carries the terminal identifier and the equipment identifier of the user terminal.
In practical application, the server may receive the online service request through communication modes such as 4G network, WIFI, etc.
Step 502, a first offline code corresponding to the terminal identifier and the device identifier is generated, and the first offline code is sent 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, a hash algorithm, or the like.
Alternatively, the online service request may also be used to request control (e.g., start) of the device corresponding to the device identification, 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 the usage amount corresponding to the terminal identifier, and determine that the usage amount is not less than the preset amount.
Optionally, the server may further 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 when the usage amount is lower than a preset amount, sends a shutdown instruction to the device, where the verification request includes the terminal identifier.
Alternatively, in order to reduce the risk of stolen use of the offline code, a measure may be to update the offline code stored in the server at regular intervals. 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 may be judged, if yes, the survival time of the historical offline code is obtained, and the first offline code is generated when the survival time is determined to be longer than the preset time.
Alternatively, in another measure, considering that the user terminal may not request updating of the first offline code for a long time, the server may forcedly delete the first offline code at a fixed time, specifically, after generating the first offline code, the server obtains a storage duration of the first offline code, and when the storage duration is longer 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 deletion of the terminal identifier and the first offline code.
Wherein the preset storage duration is not less than the preset survival duration.
In practical application, the preset storage duration and the preset generation duration can be preset by a user.
The description of the method of device control on the server side is thus completed.
Finally, the method for controlling the device from the user terminal side is described, as shown in fig. 6, and may be applied to the user terminal 101 shown in fig. 1, where the method may include the following steps:
step 601, an offline service request is generated.
Step 602, sending an offline service request 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 device.
Alternatively, the offline verification data may include a timestamp, a first verification 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, a time stamp and a first offline code are acquired, the first verification code is generated by adopting the time stamp and the first offline code, and the offline server request is further generated according to the time stamp, the first offline code and the first verification code.
Alternatively, the user terminal may request allocation of the first offline code to the server through the online service request before generating the offline service request. Specifically, the user terminal generates an online service request carrying a terminal identifier and a device 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 may send an online service request to the server through communication modes such as a 4G network, WIFI, and the like.
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 may request the control device through the online service request or the offline service request, the user may randomly select a request manner to request the control device.
Alternatively, in this embodiment, the sending of the offline service request to the device may be implemented in any of the following manners:
emitting a lamplight flicker signal;
transmitting bluetooth data through bluetooth communication established with the device;
an infrared signal is emitted.
The lamplight flashing signal, the Bluetooth data and the infrared signal comprise offline verification data.
The description of the method of device control on the device side is thus completed.
The following illustrates an offline code generation algorithm and an authentication code generation algorithm according to the embodiments of the present application:
a first implementation is exemplified by the way that the local authentication at the device side is fig. 3:
(1) The generation algorithm of the offline code is assumed to be:
offline code= [ server generates random character string with preset size by using terminal identifier and device identifier ]
The offline codes here include the first offline code and the second offline code referred to in the above embodiments.
(2) The verification code generation algorithm may be:
verification code = hash algorithm (timestamp + offline code)
The verification code here includes the first verification code and the second verification code referred to in the above embodiments.
A second implementation is exemplified by the way that the local authentication at the device side is fig. 4:
(1) The offline code generation algorithm may be:
offline code=hash algorithm (device identification+s string+terminal identification) +s string
S string = generation timestamp + random string
The offline codes here include the first offline code and the third offline code referred to in the above embodiments.
(2) The verification code generation algorithm may be:
verification code = hash algorithm (timestamp + offline code) +s 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, the embodiment of the present application further provides a device for controlling a device, which is applied to a device, as shown in fig. 7, and includes:
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;
and an authentication unit 702 for authenticating the user terminal using the offline authentication data and performing control of the device after the authentication is passed.
Based on the same inventive concept, the embodiment of the present application further provides an apparatus for device control, which is applied to a server, as shown in fig. 8, and 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 a device 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, the embodiment of the present application further provides a device control apparatus, which is applied to a user terminal, as shown in fig. 9, including:
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 the control device;
a sending unit 902, configured to send an offline service request to a device.
Based on the same concept, the embodiment of the application also provides an electronic device, as shown in fig. 10, where the electronic device mainly includes: processor 1001, communication interface 1002, memory 1003 and communication bus 1004, wherein processor 1001, communication interface 1002 and memory 1003 accomplish each other's communication through communication bus 1004. In which a program executable by the processor 1001 is stored in the memory 1003, the processor 1001 executes the program stored in the memory 1003, and the method of device control provided in any of the above method embodiments is implemented.
The communication bus 1004 mentioned in the above electronic device may be a peripheral component interconnect standard (Peripheral Component Interconnect, abbreviated to PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, abbreviated to 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 not only one bus or one type of bus.
The communication interface 1002 is used for communication between the above-described electronic device and other devices.
The memory 1003 may include a random access memory (Random Access Memory, simply RAM) or may include a non-volatile memory (non-volatile memory), such as at least one magnetic disk memory. Optionally, the memory may also be at least one memory device located remotely from the processor 1001.
The processor 1001 may be a general-purpose processor including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), a digital signal processor (Digital Signal Processing, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a Field programmable gate array (Field-Programmable Gate Array, FPGA), or other programmable logic device, discrete gate or transistor logic device, or discrete hardware components.
In a further 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 perform the method of device control described in the above embodiments.
In the above embodiments, it may be implemented in whole or in part 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 the computer instructions are loaded and executed on a computer, the processes or functions described in accordance with the embodiments of the present application are produced in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, by a wired (e.g., coaxial cable, optical fiber, digital Subscriber Line (DSL)), or wireless (e.g., infrared, microwave, etc.) means from one website, computer, server, or data center to another. The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape, etc.), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk), etc.
It should be noted that in this document, relational terms such as "first" and "second" and the like are 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. Moreover, 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 one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing is only a specific embodiment of the invention to enable those skilled in the art to understand or practice the 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 (18)

1. A method of device control, applied to a device, comprising:
acquiring 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;
verifying the user terminal by using the offline verification data, and executing control on the equipment after the user terminal passes the verification;
the offline verification data comprises a time stamp, a first verification code generated by adopting the first offline code and the time stamp, and a terminal identifier of the user terminal.
2. The method according to claim 1, 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 the 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 larger than a preset time threshold, verifying the first verification code, and executing the control of the equipment after verification is passed.
3. The method of claim 2, wherein validating the first validation code when the time difference is not greater than a preset time threshold and performing the control of the device when validated, 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 time stamp, wherein the second offline code is an offline code corresponding to the first identifier stored in the equipment;
and when the second verification code is determined to be the same as the first verification code, executing the control on the equipment.
4. The method according to claim 1, wherein authenticating the user terminal using the offline authentication data and performing control of the device after authentication is passed, comprises:
acquiring an equipment identifier of the equipment;
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;
and when the third verification code is the same as the first verification code, executing the control on the equipment.
5. The method of claim 1, wherein obtaining the offline service request from the user terminal comprises:
detecting and obtaining a lamplight flickering signal sent by the user terminal, and extracting and obtaining the offline service request from the lamplight flickering signal;
or alternatively
Receiving Bluetooth data transmitted by the user terminal through Bluetooth communication, and extracting and obtaining the offline service request from the Bluetooth data;
or alternatively
And detecting and obtaining an infrared signal sent by the user terminal, and extracting and obtaining the offline service request from the infrared signal.
6. The method of claim 1, wherein performing control of the device comprises:
executing a start service;
after executing the start-up service, further comprising:
sending a verification request to a server, wherein the verification request comprises the terminal identifier, and the verification request is used for requesting to verify whether the use limit of the user terminal is lower than a preset limit;
and receiving a shutdown instruction sent by the server, and executing shutdown service according to the shutdown instruction, wherein the shutdown instruction is sent by the server after verifying that the usage amount is lower than the preset amount.
7. A method according to claim 3, characterized in that 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 service request.
8. The method of claim 7, further comprising, after performing the control of the device:
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 identifier and the first offline code.
9. A method of device control, applied to a server, comprising:
receiving an online service request from a user terminal, wherein the online service request carries a terminal identifier and a device identifier of the user terminal;
generating a first offline code corresponding to the terminal identifier and the equipment identifier, and sending the first offline code to the user terminal so that the user terminal generates an offline service request, wherein the offline service request comprises offline verification data corresponding to the first offline code; the offline verification data comprises a time stamp, a first verification code generated by adopting the first offline code and the time stamp, and a terminal identifier of the user terminal.
10. The method of claim 9, further comprising, after transmitting the first offline code to the user terminal:
receiving a verification request, wherein the verification request comprises the terminal identification;
and verifying the use limit corresponding to the terminal identifier, and sending a shutdown instruction to the equipment corresponding to the equipment identifier when the use limit is lower than a preset limit.
11. The method of claim 9, further comprising, prior to generating the first offline code corresponding to the terminal identification and the device identification:
when the server stores historical offline codes corresponding to the terminal identifier and the equipment identifier, acquiring the survival time of the historical offline codes; and determining that the survival time length is longer than a preset survival time length.
12. The method of claim 10, further comprising, after generating a first offline code corresponding to the terminal identification and the device identification:
acquiring the storage time length of the first offline code;
and when the storage time length is longer than the preset storage time length, 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.
13. A method of device control, applied to a user terminal, comprising:
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;
sending the offline service request to a device;
the offline verification data comprises a time stamp, a first verification code generated by adopting the first offline code and the time stamp, and a terminal identifier of the user terminal.
14. The method of claim 13, further comprising, prior to generating the offline service request:
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 a device identifier of the device;
and receiving the first offline code sent by the server, wherein the first offline code corresponds to the terminal identifier and the equipment identifier.
15. The method of claim 13, wherein generating an offline service request comprises:
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 service request according to the timestamp, the first offline code and the first verification code.
16. A system for device control, comprising:
the user terminal is used for generating an offline service request and sending the offline service request to the 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 the offline service request is generated, an online service request is generated, the online service request is sent to a server, and the online service request carries a terminal identifier of the user terminal and a device identifier of the device; receiving the first offline code sent by the server;
the device is configured to obtain the offline service request; verifying the user terminal by using the offline verification data, and executing control on the equipment after the user terminal passes the verification;
the server is used for receiving the online service request; generating the first offline code corresponding to the terminal identifier and the equipment identifier, and sending the first offline code to the user terminal;
the offline verification data comprises a time stamp, a first verification code generated by adopting the first offline code and the time stamp, and a terminal identifier of the user terminal.
17. An electronic device, comprising: the device 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 is used for storing a computer program;
the processor being configured to execute a program stored in the memory to implement the method of any one of claims 1 to 8, or the method of any one of claims 9 to 12, or the method of any one of claims 13 to 15.
18. A computer readable storage medium storing a computer program, wherein the computer program when executed by a processor implements the method of any one of claims 1-8, or the method of any one of claims 9-12, or the method of any one of claims 13-15.
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 CN112437071A (en) 2021-03-02
CN112437071B true 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)

Families Citing this family (2)

* 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
CN115604390A (en) * 2021-07-07 2023-01-13 云丁网络技术(北京)有限公司(Cn) Offline control method and device for intelligent equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110071908A (en) * 2019-03-13 2019-07-30 浙江大华技术股份有限公司 Terminal binding method, device, computer equipment and storage medium
CN111030812A (en) * 2019-12-16 2020-04-17 Oppo广东移动通信有限公司 Token verification method, device, storage medium and server

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106506573B (en) * 2015-09-07 2019-05-31 韩岗 Intelligent home furnishing control method and system
CN105357262B (en) * 2015-09-29 2019-07-23 小米科技有限责任公司 Apparatus control method and device
US10165043B2 (en) * 2015-10-01 2018-12-25 Schneider Electric Systems Usa, Inc. Multi-core device with separate redundancy schemes in a process control system
EP3441945A1 (en) * 2017-08-07 2019-02-13 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 terminal for access rights for the area covered by the access control system
CN107508822B (en) * 2017-09-06 2020-06-12 迈普通信技术股份有限公司 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
CN110912911B (en) * 2019-11-29 2022-01-25 宁波奥克斯电气股份有限公司 Air conditioning equipment authority control method, user equipment and control system
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
CN112437071B (en) * 2020-11-17 2023-05-16 珠海格力电器股份有限公司 Method, system, device and storage medium for controlling device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110071908A (en) * 2019-03-13 2019-07-30 浙江大华技术股份有限公司 Terminal binding method, device, computer equipment and storage medium
CN111030812A (en) * 2019-12-16 2020-04-17 Oppo广东移动通信有限公司 Token verification method, device, storage medium and server

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Muhammed Mutlu Yapıcı,Adem Tekerek,Nurettin Topaloglu.Convolutional Neural Network Based Offline Signature Verification Application.《2018 International Congress on Big Data, Deep Learning and Fighting Cyber Terrorism (IBIGDELFT)》.2018,30-34. *

Also Published As

Publication number Publication date
CN112437071A (en) 2021-03-02
WO2022105365A1 (en) 2022-05-27

Similar Documents

Publication Publication Date Title
CN109862043B (en) Terminal authentication method and device
CN109246604B (en) Intelligent device safety binding method, server, intelligent device and user side device
CN107579966B (en) Control method, device and system for remotely accessing intranet and terminal equipment
CN112437071B (en) Method, system, device and storage medium for controlling device
US11509655B2 (en) Authentication system and authentication method
CN110365483B (en) Cloud platform authentication method, client, middleware and system
CN110222500A (en) Method for edition management, device, equipment and computer readable storage medium
KR20170037612A (en) Method and system for facilitating terminal identifiers
US10812592B2 (en) Method and apparatus for utilizing NFC to establish a secure connection
CN110944035A (en) Internet of things equipment control method and system and readable medium
CN108282453B (en) Internet of things reading device, safe access method and control center equipment
CN106656455B (en) Website access method and device
CN111194029A (en) Secure regulation in mobile devices
CN113848737A (en) Intelligent device control method, device and system, cloud server and storage medium
CN115695012A (en) Login request processing method and device, electronic equipment and storage medium
CN111651408A (en) Method, device, terminal and storage medium for acquiring data
KR101069744B1 (en) Method for Managementing of Application and System thereof
CN111294337A (en) Token-based authentication method and device
CN110517372B (en) Biological characteristic information processing method and device
CN110365492B (en) Authentication method, system, device and medium
KR101479903B1 (en) Access authentification for multiple devices and flatforms
CN114585055B (en) Vehicle-mounted WiFi access method, vehicle controller, cloud server and mobile terminal
CN113596030B (en) Equipment network distribution method and device, storage medium and electronic equipment
JP2017187963A (en) Electronic apparatus and system
CN111835504A (en) Identification code generation method and server

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