Equipment control method and system, electronic equipment and storage medium
By generating and encrypting authorization credentials in the device control system, ensuring that only authorized devices can obtain control instructions, solving the security risk of devices being maliciously controlled and achieving higher device control security and reliability.
Patent Information
- Application Number
- CN202411810628.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-10
- Publication Date
- 2025-03-18
AI Technical Summary
When a third-party platform manipulates a device, it is easy to face cyber attacks or be maliciously controlled, resulting in the device being illegally operated, causing security risks and economic losses to users.
By generating the original authorization credentials corresponding to the control command and encrypting them, an encrypted authorization credentials are first sent to the target device for decryption before obtaining the control command, ensuring that only the device holding the correct key can obtain the control command.
It improves the security and reliability of device control, reduces the probability of control instructions being stolen or tampered with, ensures precise control of the device, and protects users' privacy and property security.
Smart Images

Figure CN119644866A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of smart home technology, and in particular to a device control method, system, electronic device and storage medium. Background Art
[0002] With the development of Internet of Things technology, more and more smart devices are entering people's daily lives, such as smart air conditioners, smart lighting, smart switches, etc. These smart devices can be controlled through third-party platforms such as mobile phone APP, which greatly facilitates users to operate smart devices.
[0003] However, when a third-party platform operates the device, it may face cyber attacks, or the control operation may be tampered with, causing the device to be maliciously controlled, posing security risks and economic losses to users. Summary of the invention
[0004] The purpose of the present invention is to at least provide a method, system, electronic device and storage medium for device control, which can at least improve the situation where the device is maliciously controlled and at least achieve safer and more reliable control of the device.
[0005] To solve the above technical problems, at least one embodiment of the present application provides a method for controlling a device, including:
[0006] In response to receiving a control instruction sent from a target control platform and an authorization request corresponding to the control instruction, generating an original authorization credential corresponding to the control instruction, wherein the control instruction is generated by the target control platform based on a control operation initiated by a user on the target control platform on a target device;
[0007] Encrypting the original authorization certificate to obtain an encrypted authorization certificate;
[0008] Sending the encrypted authorization certificate to the target control platform so that the target control platform forwards the encrypted authorization certificate to the target device;
[0009] In response to receiving an application request for obtaining the control instruction sent by the target device, the control instruction is sent to the target device, wherein there is a corresponding relationship between the application request and the original authorization certificate obtained by decrypting the encrypted authorization certificate via the target device.
[0010] In this embodiment, by generating an encrypted authorization certificate based on the control instruction, at least three insurance functions are provided. The first insurance: first send the encrypted authorization certificate to the target device. Different from the method of directly sending the encrypted control instruction (or control instruction) to the target device, the present embodiment first sends the encrypted authorization certificate, so that even in the event of a network attack, the unauthorized party can only obtain the information of the authorization certificate, but not the information of the control instruction, making it difficult to maliciously operate the target device. The second insurance: encrypt the original authorization certificate to obtain the encrypted authorization certificate. The encrypted authorization certificate can ensure that even if the data is intercepted during the transmission process, it cannot be directly interpreted by the unauthorized party, thereby preventing illegal access and malicious operations. The third insurance: instead of directly sending the control instruction to the target device, the target device is first allowed to decrypt the encrypted authorization certificate, and after the decryption is successful, the target device actively requests the control instruction. The decryption process of the target device is actually a verification of the identity of the target device, ensuring that only the device holding the correct key (capable of decrypting the encrypted authorization certificate) can obtain the control instruction, further enhancing security. Based on the above triple insurance, the probability of control instructions being stolen or tampered with is greatly reduced, and each target device can obtain the corresponding control instructions more accurately, greatly improving the accuracy and security of instruction issuance. Especially in the scenario where batch control of devices is required, the method of this embodiment can enable each device to be accurately controlled, and the device will not jump due to malicious control, which helps to maintain the privacy and property security of users.
[0011] In some optional embodiments, generating an original authorization certificate corresponding to the control instruction includes:
[0012] Detecting whether there is an abnormality in the operation authority information of the user corresponding to the control instruction;
[0013] When there is no abnormality in the operation authority information, a corresponding original authorization certificate is generated based on the control instruction.
[0014] In this embodiment, by verifying the user's operating authority information before generating the original authorization credential, only users with corresponding authority can generate and send valid control instructions, which can detect and prevent potential security threats at an early stage, help avoid possible security vulnerabilities and attacks, and prevent unauthorized users or malicious users from performing illegal operations, thereby protecting the security of the target device.
[0015] In some optional embodiments, generating a corresponding original authorization credential based on the control instruction includes:
[0016] Extract identification information from the control instruction, and generate the original authorization credential based on the identification information, wherein the identification information includes at least one of the physical address of the target device, the account information of the user on the target control platform, and the home coding information of the user on the target control platform.
[0017] In this embodiment, since the identification information is usually unique, the original authorization certificate generated based on the identification information is also highly unique. This helps prevent the certificate from being copied or used fraudulently, thereby improving the security of the entire control process. At the same time, by including the identification information in the original authorization certificate, it can be ensured that the authorization certificate is associated with a specific target device, which helps reduce the situation where the control instruction is sent to the wrong device and improves the accuracy of control.
[0018] In some optional embodiments, encrypting the original authorization certificate to obtain the encrypted authorization certificate includes:
[0019] The original authorization certificate is encrypted using an asymmetric encryption algorithm to obtain the encrypted authorization certificate.
[0020] In this embodiment, the asymmetric encryption algorithm uses a pair of keys (public key and private key) for encryption and decryption. The public key is used to encrypt data, while the private key is used to decrypt data. Since the private key is confidential, only the entity holding the private key can decrypt the data. Therefore, this encryption method provides higher security.
[0021] In some optional embodiments, after sending the control instruction to the target device, the method further includes:
[0022] Detecting whether a receipt message after executing the control instruction sent by the target device is received within a preset time;
[0023] If the receipt information is received within a preset time, or if the receipt information is not received within a preset time, the original authorization certificate and the encrypted authorization certificate are destroyed.
[0024] In this embodiment, destroying the original authorization certificate and the encrypted authorization certificate can prevent these certificates from being abused or misused in the future. Once the control instruction is executed and the target device sends a receipt message, or exceeds a preset time threshold but does not receive a receipt (which may mean that the instruction execution fails or the device cannot respond), destroying the certificate can ensure that these sensitive information will not exist in the system for a long time, reducing the risk of leakage.
[0025] At least one embodiment of the present application further provides a method for controlling a device, including:
[0026] Receive an encrypted authorization certificate sent by a target control platform, wherein the encrypted authorization certificate is generated by an authorization server and forwarded to the target control platform, and the generation process of the encrypted authorization certificate is as follows: the target control platform generates a control instruction and an authorization request corresponding to the control instruction in response to a user's control operation on a target device in an operation interface, and sends the authorization request and the control instruction to the authorization server, and the authorization server generates an original authorization certificate based on the control instruction and encrypts it to obtain the encrypted authorization certificate;
[0027] Decrypting the encrypted authorization certificate to obtain the original authorization certificate;
[0028] Based on the original authorization certificate, apply to the authorization server for the control instruction corresponding to the original authorization certificate.
[0029] In some optional embodiments, it also includes:
[0030] The receipt information after executing the control instruction is sent to the authorization server, so that the authorization server destroys the original authorization certificate and the encrypted authorization certificate after receiving the receipt information within a preset time, or when the receipt information is not received within the preset time.
[0031] In some optional embodiments, it also includes:
[0032] The operating status data of the target device is continuously reported to the authorization server at preset time intervals.
[0033] At least one embodiment of the present application further provides a method for controlling a device, including:
[0034] In response to a user's control operation on a target device in an operation interface, generating a control instruction and an authorization request corresponding to the control instruction;
[0035] Sending the control instruction and the authorization request to an authorization server, so that the authorization server generates an original authorization certificate based on the control instruction, and encrypts the original authorization certificate to obtain an encrypted authorization certificate;
[0036] The encrypted authorization certificate is received from the authorization server, and the encrypted authorization certificate is sent to the target device, so that the target device decrypts the encrypted authorization certificate, and applies to the authorization server for the control instruction based on the original authorization certificate obtained after decryption.
[0037] At least one embodiment of the present application further provides an authorization server, including:
[0038] an authorization credential generation module, configured to generate an original authorization credential corresponding to a control instruction in response to receiving a control instruction sent from a target control platform and an authorization request corresponding to the control instruction, wherein the control instruction is generated by the target control platform based on a control operation initiated by a user on the target control platform on a target device;
[0039] An authorization certificate encryption module is used to encrypt the original authorization certificate to obtain an encrypted authorization certificate;
[0040] An authorization credential forwarding module, used for sending the encrypted authorization credential to the target control platform, so that the target control platform forwards the encrypted authorization credential to the target device;
[0041] A control instruction sending module is used to send the control instruction to the target device in response to receiving an application request for obtaining the control instruction sent by the target device, wherein there is a corresponding relationship between the application request and the original authorization certificate obtained after decrypting the encrypted authorization certificate via the target device.
[0042] At least one embodiment of the present application further provides a target device, including:
[0043] The first authorization credential receiving module is used to receive the encrypted authorization credential sent by the target control platform, wherein the encrypted authorization credential is generated by the authorization server and forwarded to the target control platform, and the generation process of the encrypted authorization credential is as follows: the target control platform generates a control instruction and an authorization request corresponding to the control instruction in response to the user's control operation on the target device in the operation interface, and sends the authorization request and the control instruction to the authorization server, and the authorization server generates an original authorization credential based on the control instruction and encrypts it to obtain the encrypted authorization credential;
[0044] An authorization certificate decryption module, used to decrypt the encrypted authorization certificate to obtain the original authorization certificate;
[0045] A control instruction application module is used to apply to the authorization server for the control instruction corresponding to the original authorization certificate based on the original authorization certificate.
[0046] At least one embodiment of the present application further provides a target control platform, including:
[0047] An authorization request generation module, used to generate a control instruction and an authorization request corresponding to the control instruction in response to a user's control operation on a target device in an operation interface;
[0048] An authorization request sending module, used for sending the control instruction and the authorization request to an authorization server, so that the authorization server generates an original authorization certificate based on the control instruction, and encrypts the original authorization certificate to obtain an encrypted authorization certificate;
[0049] The second authorization certificate receiving module is used to receive the encrypted authorization certificate sent by the authorization server, send the encrypted authorization certificate to the target device, so that the target device decrypts the encrypted authorization certificate, and applies for the control instruction from the authorization server based on the original authorization certificate obtained after decryption.
[0050] At least one embodiment of the present application further provides a device control system, including: a target device, a target control platform and an authorization server,
[0051] The target control platform is used to generate a control instruction and an authorization request corresponding to the control instruction in response to a user's control operation on the target device in the operation interface, and send the control instruction and the authorization request to the authorization server;
[0052] The authorization server is configured to generate an original authorization certificate corresponding to the control instruction after receiving the control instruction and the authorization request, encrypt the original authorization certificate to obtain an encrypted authorization certificate, and send the encrypted authorization certificate to the target control platform so that the target control platform forwards the encrypted authorization certificate to the target device;
[0053] The target device is used to decrypt the encrypted authorization certificate to obtain the original authorization certificate, and based on the original authorization certificate, apply to the authorization server for the control instruction corresponding to the original authorization certificate.
[0054] At least one embodiment of the present application also provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned device control method.
[0055] At least one embodiment of the present application further provides a computer-readable storage medium storing a computer program, wherein the computer program implements the above-mentioned device control method when executed by a processor. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] One or more embodiments are exemplarily described by the pictures in the corresponding drawings, and these exemplary descriptions do not constitute limitations on the embodiments.
[0057] Figure 1 This is a flow chart of a device control method provided by an embodiment of the present application. Figure 1 ;
[0058] Figure 2 This is a process of a device control method provided by another embodiment of the present application Figure 2 ;
[0059] Figure 3 This is a process of a device control method provided by another embodiment of the present application Figure 3 ;
[0060] Figure 4 is a module block diagram of an authorization management server provided by another embodiment of the present application;
[0061] Figure 5 is a module block diagram of a target device provided by another embodiment of the present application;
[0062] Figure 6 is a module block diagram of a target control platform provided by another embodiment of the present application;
[0063] Figure 7 It is a schematic diagram of the interaction process of a device control system provided in another embodiment of the present application. DETAILED DESCRIPTION
[0064] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the embodiments of the present application will be described in detail below in conjunction with the accompanying drawings. However, it will be appreciated by those skilled in the art that in the present application, many technical details are proposed in order to enable the reader to better understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical scheme claimed in the present application can also be implemented. The division of the following embodiments is for the convenience of description, and the specific implementation of the present application should not be construed as any limitation, and the various embodiments can be combined and referenced with each other under the premise of no contradiction.
[0065] In order to solve the above-mentioned technical problem that when a device is controlled on a third-party platform, it may face network attacks, or the control operation may be tampered with, causing the device to be maliciously controlled, the present invention proposes a device control method. The implementation details of the device control method of this embodiment are specifically described below. The following content is only the implementation details provided for easy understanding and is not necessary for the implementation of this solution.
[0066] Embodiment 1:
[0067] The device control method of this embodiment can be applied to electronic devices with communication, computing and data storage capabilities. In this embodiment, the execution subject of the method is an authorization server, and its specific process can be as follows: Figure 1 As shown, including:
[0068] Step 110, in response to receiving a control instruction sent from a target control platform and an authorization request corresponding to the control instruction, generating an original authorization credential corresponding to the control instruction, wherein the control instruction is generated by the target control platform based on a control operation initiated by a user on the target control platform on a target device;
[0069] In this embodiment, the target device is a device that the user wants to control through the target control platform, such as smart home devices, smart wearable devices, etc. The target control platform can be a mobile phone app, or a control system on a PC, etc. The target control platform is provided with an interface that allows the user to control and manage the target device, so as to facilitate the user to make various settings for the target device, and generate control instructions according to the user's settings. The authorization server is a server responsible for generating, managing and verifying authorization credentials. The authorization credential is used to represent the license certificate that the target device must obtain before performing a specific operation. The original authorization credential is directly associated with the control instruction and can be in the form of a string, number, binary data, etc., which contains all the necessary information required to execute the control instruction, but has not yet been encrypted.
[0070] For example, a user initiates a switch operation on a smart light bulb through a target control platform (such as a smart home APP). The target control platform generates a corresponding control instruction based on the user's operation and sends the control instruction and authorization request to the authorization server. After receiving the control instruction and authorization request, the authorization server generates an original authorization certificate corresponding to the control instruction according to the preset algorithm and rules.
[0071] Step 120, encrypting the original authorization certificate to obtain an encrypted authorization certificate;
[0072] In this embodiment, the authorization server selects a preset encryption algorithm to encrypt the original authorization certificate. The selection of the encryption algorithm should be comprehensively considered based on factors such as security and efficiency. For example: choose to use the AES (Advanced Encryption Standard) algorithm to encrypt the original authorization certificate. Or use a key for encryption. When using a key for encryption, the authorization server generates or obtains a suitable encryption key. The encryption key can be preset, dynamically generated, or provided by the user, and is not specifically limited here.
[0073] Afterwards, the original authorization certificate is encrypted using the selected encryption algorithm and encryption key to obtain an encrypted authorization certificate. The encrypted authorization certificate can better protect information in the face of network attacks.
[0074] Step 130, sending the encrypted authorization certificate to the target control platform, so that the target control platform forwards the encrypted authorization certificate to the target device;
[0075] In this embodiment, the target control platform acts as a communication transfer station between the authorization server and the target device, and forwards the encrypted authorization certificate to the target device. After receiving the encrypted authorization certificate, the target device needs to decrypt it to determine whether the encrypted authorization certificate is sent correctly.
[0076] Step 140, in response to receiving an application request for obtaining the control instruction sent by the target device, sending the control instruction to the target device, wherein there is a corresponding relationship between the application request and the original authorization certificate obtained after decrypting the encrypted authorization certificate by the target device.
[0077] In this embodiment, after the target device is decrypted, the original authorization certificate is obtained, indicating that the target device is indeed the object to be controlled. After the original authorization certificate is decrypted, the target device does not know what operation to perform at this time, and needs to use the original authorization certificate obtained by decryption to generate an application request for obtaining control instructions, and send the application request to the authorization server.
[0078] There is a corresponding relationship between the application request and the original authorization certificate obtained after decrypting the encrypted authorization certificate via the target device. There may be a unique and verifiable corresponding relationship between one or more specific elements (such as an identifier, hash value, token, etc.) in the application request and the original authorization certificate.
[0079] When the authorization server receives the application request, it queries the specific elements in the application request and matches the corresponding original authorization certificate based on the specific elements. When the control instruction corresponding to the original authorization certificate is successfully matched, the authorization server sends the control instruction to the target device, so that the target device can execute the control instruction and complete the entire device control process.
[0080] In some optional embodiments, the application request has a corresponding relationship with the original authorization certificate obtained by decrypting the encrypted authorization certificate via the target device, and the information of the decrypted original authorization certificate can also be encapsulated in the application request. This method enables the authorization server to more quickly identify the control instructions desired by the target device.
[0081] Continuing with the example of controlling a smart light bulb, the user wants to turn on and off the smart light bulb (target device) at home through the smart home APP (target control platform). The complete control process is:
[0082] The smart home APP generates the corresponding control instructions and sends the control instructions and authorization request to the authorization server. After receiving the request, the authorization server generates the original authorization certificate and encrypts the original authorization certificate using a preset encryption algorithm to obtain an encrypted authorization certificate.
[0083] Then, the authorization server sends the encrypted authorization certificate to the smart home APP. The smart home APP forwards the encrypted authorization certificate to the smart bulb. The smart bulb decrypts the encrypted authorization certificate based on a preset decryption algorithm and obtains the information of the original authorization certificate. Then, based on the information of the original authorization certificate, the smart bulb sends an application request to the authorization server. The application request contains at least part of the information of the original authorization certificate obtained after decryption, and has a unique mapping relationship with the original authorization certificate.
[0084] The authorization server verifies at least part of the original authorization credential information in the application request, and after verification, sends the corresponding control instruction to the smart light bulb based on the unique mapping relationship. Finally, the smart light bulb performs the switch operation according to the received control instruction.
[0085] In summary, in this embodiment, by generating an encrypted authorization certificate based on the control instruction, at least three insurance functions are provided. The first insurance: first send the encrypted authorization certificate to the target device. Different from the method of directly sending the encrypted control instruction (or control instruction) to the target device, the present embodiment first sends the encrypted authorization certificate, so that even in the event of a network attack, the unauthorized party can only obtain the information of the authorization certificate, but not the information of the control instruction, making it difficult to maliciously operate the target device. The second insurance: obtain the encrypted authorization certificate by encrypting the original authorization certificate. The encrypted authorization certificate can ensure that even if the data is intercepted during the transmission process, it cannot be directly interpreted by the unauthorized party, thereby preventing illegal access and malicious operations. The third insurance: do not directly send the control instruction to the target device, but first let the target device decrypt the encrypted authorization certificate, and then the target device actively requests the control instruction after the decryption is successful. The decryption process of the target device is actually a verification of the identity of the target device, ensuring that only the device holding the correct key (capable of decrypting the encrypted authorization certificate) can obtain the control instruction, further enhancing security. Based on the above triple insurance, the probability of control instructions being stolen or tampered with is greatly reduced, and each target device can obtain the corresponding control instructions more accurately, greatly improving the accuracy and security of instruction issuance.
[0086] It is worth mentioning that in scenarios where batch control of devices is required, the method of this embodiment can enable each device to be accurately controlled, and will not cause device jumps due to malicious control, which helps to maintain the privacy and property security of users.
[0087] In some optional embodiments, the generating of the original authorization certificate corresponding to the control instruction includes: detecting whether there is any abnormality in the operation authority information of the user corresponding to the control instruction; when there is no abnormality in the operation authority information, generating the corresponding original authorization certificate based on the control instruction.
[0088] In this embodiment, the authorization server confirms the control instruction according to the user's operating authority, which can ensure that the device will not be controlled at will. In some situations, the device cannot be controlled at will, such as the central air conditioning in exhibitions and hotels cannot be controlled at will, and only people with corresponding authority can control it. In actual use, different users can be given corresponding authority levels in advance, and different authority levels limit the control operation scope of different devices. For example, the administrator has the control authority of all devices, the next first-level authority has the control authority of some devices, the next second-level authority has all control authority of a certain device, and the third-level authority has partial control authority of a certain device.
[0089] In this embodiment, user information and corresponding information of different authority levels can be stored in the database of the authorization server, so that the authorization server can quickly determine whether the user has bypassed the level control of the target device. When the user bypasses the level control, the authorization server will delete the control instructions that are not within the control authority.
[0090] By verifying the user's operating authority information before generating the original authorization credentials, only users with corresponding permissions can generate and send effective control instructions. This can detect and prevent potential security threats at an early stage, help avoid possible security vulnerabilities and attacks, and prevent unauthorized users or malicious users from performing illegal operations, thereby protecting the security of the target device.
[0091] In some optional embodiments, generating a corresponding original authorization credential based on the control instruction includes: extracting identification information in the control instruction, and generating the original authorization credential based on the identification information, wherein the identification information includes at least one of the physical address of the target device, the account information of the user on the target control platform, and the home coding information of the user on the target control platform.
[0092] For example, control instructions are stored according to user ID, family ID, room ID, and device MAC. When generating the original authorization certificate, the original authorization certificate is made to correspond to the user ID, family ID, room ID, and device MAC at the same time. This enables the corresponding control instructions to be accurately matched according to the original authorization certificate.
[0093] In this embodiment, since the identification information is usually unique, the original authorization certificate generated based on the identification information is also highly unique. This helps prevent the certificate from being copied or used fraudulently, thereby improving the security of the entire control process. At the same time, by including the identification information in the original authorization certificate, it can be ensured that the authorization certificate is associated with a specific target device, which helps reduce the situation where the control instruction is sent to the wrong device and improves the accuracy of control.
[0094] In some optional embodiments, encrypting the original authorization certificate to obtain the encrypted authorization certificate includes: encrypting the original authorization certificate using an asymmetric encryption algorithm to obtain the encrypted authorization certificate.
[0095] In this embodiment, the asymmetric encryption algorithm uses a pair of keys (public key and private key) for encryption and decryption. The public key is used to encrypt data, while the private key is used to decrypt data. Since the private key is confidential, only the entity holding the private key can decrypt the data. Therefore, this encryption method provides higher security.
[0096] In some optional embodiments, after sending the control instruction to the target device, it also includes: detecting whether a receipt information sent by the target device after executing the control instruction is received within a preset time; if the receipt information is received within the preset time, or the receipt information is not received within the preset time, destroying the original authorization certificate and the encrypted authorization certificate.
[0097] Specifically, after sending the control instruction, the authorization server will set a preset time window to wait for the receipt information sent by the target device after executing the control instruction. The receipt information usually contains the operation result, status code and possible other relevant data to confirm whether the control instruction has been successfully executed. If the receipt information is successfully received within the preset time, and the receipt information indicates that the control instruction has been successfully executed, the authorization server will proceed to the next step of destruction. If the receipt information is not received within the preset time, or the receipt information indicates that the control instruction has failed to execute, the authorization server will also perform the destruction operation.
[0098] Choose an appropriate destruction method based on the storage method and security requirements of the credentials. For example, for credentials stored in the database, you can delete them by executing SQL statements; for credentials stored in the file system, you can destroy them by using file deletion commands. The authorization server performs the destruction operation to ensure that both the original authorization credentials and the encrypted authorization credentials are physically deleted from the storage medium and that the data cannot be recovered in any way.
[0099] In this embodiment, destroying the original authorization certificate and the encrypted authorization certificate can prevent these certificates from being abused or misused in the future. Once the control instruction is executed and the target device sends a receipt message, or exceeds a preset time threshold but does not receive a receipt (which may mean that the instruction execution fails or the device cannot respond), destroying the certificate can ensure that these sensitive information will not exist in the system for a long time, reducing the risk of leakage.
[0100] Embodiment 2:
[0101] Based on the above embodiment, this embodiment also provides a method for controlling a device, and the execution subject of the method is a target device. The specific process can be as follows: Figure 2 As shown, including:
[0102] Step 210, receiving the encrypted authorization certificate sent by the target control platform, wherein the encrypted authorization certificate is generated by the authorization server and forwarded to the target control platform, and the generation process of the encrypted authorization certificate is: the target control platform generates a control instruction and an authorization request corresponding to the control instruction in response to the user's control operation on the target device in the operation interface, and sends the authorization request and the control instruction to the authorization server, and the authorization server generates an original authorization certificate based on the control instruction and encrypts it to obtain the encrypted authorization certificate;
[0103] In this embodiment, the process of generating and sending the encrypted authorization certificate is similar to that in the first embodiment, and will not be described in detail here to avoid repetition.
[0104] Step 220, decrypt the encrypted authorization certificate to obtain the original authorization certificate;
[0105] In this embodiment, the process of the target device decrypting the encrypted authorization is similar to that in the above-mentioned embodiment, and will not be described in detail here to avoid repetition.
[0106] Step 230: Based on the original authorization certificate, apply to the authorization server for the control instruction corresponding to the original authorization certificate.
[0107] In this embodiment, the specific implementation method of applying for the control instruction is similar to that in the above-mentioned embodiment. To avoid repetition, the specific details are not described here.
[0108] In some optional embodiments, it also includes: sending receipt information after executing the control instruction to the authorization server, so that the authorization server destroys the original authorization certificate and the encrypted authorization certificate after receiving the receipt information within a preset time, or when the receipt information is not received within the preset time.
[0109] In this embodiment, the specific implementation process of the target device sending the receipt information is basically the same as that in the above-mentioned embodiment, and will not be described here to avoid repetition.
[0110] In some optional embodiments, the method further includes: continuously reporting the operating status data of the target device to the authorization server at a preset time interval, so that the target device can be continuously monitored and maintained, and potential problems can be discovered in time.
[0111] Embodiment three:
[0112] Based on the above embodiment, this embodiment also provides a method for controlling a device. The method takes the target control platform as the execution subject. The specific flow chart is as follows: Figure 3 As shown, including:
[0113] Step 310, in response to the user's control operation on the target device in the operation interface, generating a control instruction and an authorization request corresponding to the control instruction;
[0114] Step 320, sending the control instruction and the authorization request to an authorization server, so that the authorization server generates an original authorization certificate based on the control instruction, and encrypts the original authorization certificate to obtain an encrypted authorization certificate;
[0115] Step 330, receiving the encrypted authorization certificate sent by the authorization server, sending the encrypted authorization certificate to the target device, so that the target device decrypts the encrypted authorization certificate, and applies to the authorization server for the control instruction based on the original authorization certificate obtained after decryption.
[0116] The specific implementation of each step in this embodiment is basically the same as that in the above embodiment, and will not be described in detail here to avoid repetition.
[0117] Embodiment 4:
[0118] Another embodiment of the present application relates to an authorization server. The implementation details of the authorization server of this embodiment are described in detail below. The following content is only for the convenience of understanding the implementation details provided, and is not necessary for the implementation of this solution. The schematic diagram of the authorization server of this embodiment can be as follows Figure 4 As shown, it includes an authorization credential generation module 410, an authorization credential encryption module 420, an authorization credential forwarding module 430 and a control instruction sending module 440.
[0119] The authorization credential generation module 410 is used to generate an original authorization credential corresponding to the control instruction in response to receiving a control instruction and an authorization request corresponding to the control instruction sent from the target control platform, wherein the control instruction is generated by the target control platform based on a control operation initiated by a user on the target control platform on the target device;
[0120] The authorization certificate encryption module 420 is used to encrypt the original authorization certificate to obtain an encrypted authorization certificate;
[0121] The authorization credential forwarding module 430 is used to send the encrypted authorization credential to the target control platform so that the target control platform forwards the encrypted authorization credential to the target device;
[0122] The control instruction sending module 440 is used to send the control instruction to the target device in response to receiving an application request for obtaining the control instruction sent by the target device, wherein there is a corresponding relationship between the application request and the original authorization certificate obtained after decrypting the encrypted authorization certificate via the target device.
[0123] It is worth mentioning that all modules involved in this embodiment are logic modules. In practical applications, a logic unit can be a physical unit, a part of a physical unit, or a combination of multiple physical units. In addition, in order to highlight the innovative part of this application, this embodiment does not introduce units that are not closely related to solving the technical problems proposed by this application, but this does not mean that there are no other units in this embodiment.
[0124] Embodiment five:
[0125] Another embodiment of the present application relates to a target device. The implementation details of the target device of this embodiment are specifically described below. The following content is only for the convenience of understanding the implementation details, and is not necessary for implementing this solution. The schematic diagram of the target device of this embodiment can be as follows Figure 5 As shown, it includes an authorization certificate receiving module 510, an authorization certificate decryption module 520, and a control instruction application module 530.
[0126] The first authorization credential receiving module 510 is used to receive the encrypted authorization credential sent by the target control platform, wherein the encrypted authorization credential is generated by the authorization server and forwarded to the target control platform, and the generation process of the encrypted authorization credential is as follows: the target control platform generates a control instruction and an authorization request corresponding to the control instruction in response to the user's control operation on the target device in the operation interface, and sends the authorization request and the control instruction to the authorization server, and the authorization server generates an original authorization credential based on the control instruction and encrypts it to obtain the encrypted authorization credential;
[0127] The authorization certificate decryption module 520 is used to decrypt the encrypted authorization certificate to obtain the original authorization certificate;
[0128] The control instruction application module 530 is used to apply to the authorization server for the control instruction corresponding to the original authorization certificate based on the original authorization certificate.
[0129] It is worth mentioning that all modules involved in this embodiment are logic modules. In practical applications, a logic unit can be a physical unit, a part of a physical unit, or a combination of multiple physical units. In addition, in order to highlight the innovative part of this application, this embodiment does not introduce units that are not closely related to solving the technical problems proposed by this application, but this does not mean that there are no other units in this embodiment.
[0130] Embodiment six:
[0131] Another embodiment of the present application relates to a target control platform. The implementation details of the target control platform of this embodiment are specifically described below. The following content is only for the convenience of understanding the implementation details provided, and is not necessary for the implementation of this solution. The schematic diagram of the target control platform of this embodiment can be as follows Figure 6 As shown, it includes an authorization request generating module 610, an authorization request sending module 620, and an authorization credential receiving module 2 630.
[0132] The authorization request generation module 610 is used to generate a control instruction and an authorization request corresponding to the control instruction in response to a user's control operation on the target device in the operation interface;
[0133] The authorization request sending module 620 is used to send the control instruction and the authorization request to the authorization server, so that the authorization server generates an original authorization certificate based on the control instruction, and encrypts the original authorization certificate to obtain an encrypted authorization certificate;
[0134] The authorization certificate receiving module 2 630 is used to receive the encrypted authorization certificate sent by the authorization server, send the encrypted authorization certificate to the target device, so that the target device decrypts the encrypted authorization certificate, and applies for the control instruction from the authorization server based on the original authorization certificate obtained after decryption.
[0135] It is worth mentioning that all modules involved in this embodiment are logic modules. In practical applications, a logic unit can be a physical unit, a part of a physical unit, or a combination of multiple physical units. In addition, in order to highlight the innovative part of this application, this embodiment does not introduce units that are not closely related to solving the technical problems proposed by this application, but this does not mean that there are no other units in this embodiment.
[0136] Embodiment 7
[0137] Based on the above embodiment, this embodiment also provides a system for controlling a device. The specific control interaction diagram is as follows: Figure 7 As shown, it includes: target device, target control platform and authorization server,
[0138] The target control platform is used to generate a control instruction and an authorization request corresponding to the control instruction in response to a user's control operation on the target device in the operation interface, and send the control instruction and the authorization request to the authorization server;
[0139] The authorization server is configured to generate an original authorization certificate corresponding to the control instruction after receiving the control instruction and the authorization request, encrypt the original authorization certificate to obtain an encrypted authorization certificate, and send the encrypted authorization certificate to the target control platform so that the target control platform forwards the encrypted authorization certificate to the target device;
[0140] The target device is used to decrypt the encrypted authorization certificate to obtain the original authorization certificate, and based on the original authorization certificate, apply to the authorization server for the control instruction corresponding to the original authorization certificate.
[0141] In some optional embodiments, the target device can also execute the steps of the method described in any one of the embodiments in the second embodiment.
[0142] In some optional embodiments, the authorization server can also execute the steps of the method described in any embodiment of embodiment one.
[0143] Embodiment eight:
[0144] Another embodiment of the present application relates to an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the device control method in the above-mentioned embodiments.
[0145] Among them, the memory and the processor are connected in a bus manner, and the bus may include any number of interconnected buses and bridges, and the bus connects various circuits of one or more processors and memories together. The bus can also connect various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface between the bus and the transceiver. The transceiver can be one element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on a transmission medium. The data processed by the processor is transmitted on a wireless medium via an antenna, and further, the antenna also receives data and transmits the data to the processor.
[0146] The processor is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. Memory can be used to store data used by the processor when performing operations.
[0147] Embodiment nine:
[0148] Another embodiment of the present application relates to a computer-readable storage medium storing a computer program, which implements the above method embodiment when executed by a processor.
[0149] That is, those skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program, and the program is stored in a storage medium, including a number of instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as: ROM), random access memory (Random Access Memory, referred to as: RAM), disk or optical disk and other media that can store program codes.
[0150] Those skilled in the art will appreciate that the above embodiments are specific embodiments for implementing the present application, and in actual applications, various changes may be made thereto in form and detail without departing from the spirit and scope of the present application.
Claims
1. A method for controlling a device, characterized in that: include: In response to receiving a control instruction sent from a target control platform and an authorization request corresponding to the control instruction, generating an original authorization credential corresponding to the control instruction, wherein the control instruction is generated by the target control platform based on a control operation initiated by a user on the target control platform on a target device; Encrypting the original authorization certificate to obtain an encrypted authorization certificate; Sending the encrypted authorization certificate to the target control platform so that the target control platform forwards the encrypted authorization certificate to the target device; In response to receiving an application request for obtaining the control instruction sent by the target device, the control instruction is sent to the target device, wherein there is a corresponding relationship between the application request and the original authorization certificate obtained by decrypting the encrypted authorization certificate via the target device.
2. The device control method according to claim 1, characterized in that: The generating an original authorization certificate corresponding to the control instruction includes: Detecting whether there is an abnormality in the operation authority information of the user corresponding to the control instruction; When there is no abnormality in the operation authority information, a corresponding original authorization certificate is generated based on the control instruction.
3. The device control method according to claim 2, characterized in that: The generating a corresponding original authorization certificate based on the control instruction includes: Extract identification information from the control instruction, and generate the original authorization credential based on the identification information, wherein the identification information includes at least one of the physical address of the target device, the account information of the user on the target control platform, and the home coding information of the user on the target control platform.
4. The device control method according to claim 1, characterized in that: The step of encrypting the original authorization certificate to obtain an encrypted authorization certificate includes: The original authorization certificate is encrypted using an asymmetric encryption algorithm to obtain the encrypted authorization certificate.
5. The device control method according to any one of claims 1 to 4, characterized in that: After sending the control instruction to the target device, the method further includes: Detecting whether a receipt message after executing the control instruction sent by the target device is received within a preset time; If the receipt information is received within a preset time, or if the receipt information is not received within a preset time, the original authorization certificate and the encrypted authorization certificate are destroyed.
6. A method for controlling a device, characterized in that: include: Receive an encrypted authorization certificate sent by a target control platform, wherein the encrypted authorization certificate is generated by an authorization server and forwarded to the target control platform, and the generation process of the encrypted authorization certificate is as follows: the target control platform generates a control instruction and an authorization request corresponding to the control instruction in response to a user's control operation on a target device in an operation interface, and sends the authorization request and the control instruction to the authorization server, and the authorization server generates an original authorization certificate based on the control instruction and encrypts it to obtain the encrypted authorization certificate; Decrypting the encrypted authorization certificate to obtain the original authorization certificate; Based on the original authorization certificate, apply to the authorization server for the control instruction corresponding to the original authorization certificate.
7. The device control method according to claim 6, characterized in that: Also includes: The receipt information after executing the control instruction is sent to the authorization server, so that the authorization server destroys the original authorization certificate and the encrypted authorization certificate after receiving the receipt information within a preset time, or when the receipt information is not received within the preset time.
8. The device control method according to claim 6 or 7, characterized in that: Also includes: The operating status data of the target device is continuously reported to the authorization server at preset time intervals.
9. A method for controlling a device, characterized in that: include: In response to a user's control operation on a target device in an operation interface, generating a control instruction and an authorization request corresponding to the control instruction; Sending the control instruction and the authorization request to an authorization server, so that the authorization server generates an original authorization certificate based on the control instruction, and encrypts the original authorization certificate to obtain an encrypted authorization certificate; The encrypted authorization certificate is received from the authorization server, and the encrypted authorization certificate is sent to the target device, so that the target device decrypts the encrypted authorization certificate, and applies to the authorization server for the control instruction based on the original authorization certificate obtained after decryption.
10. An authorization server, characterized in that: include: an authorization credential generation module, configured to generate an original authorization credential corresponding to a control instruction in response to receiving a control instruction sent from a target control platform and an authorization request corresponding to the control instruction, wherein the control instruction is generated by the target control platform based on a control operation initiated by a user on the target control platform on a target device; An authorization certificate encryption module is used to encrypt the original authorization certificate to obtain an encrypted authorization certificate; An authorization credential forwarding module, used for sending the encrypted authorization credential to the target control platform, so that the target control platform forwards the encrypted authorization credential to the target device; A control instruction sending module is used to send the control instruction to the target device in response to receiving an application request for obtaining the control instruction sent by the target device, wherein there is a corresponding relationship between the application request and the original authorization certificate obtained after decrypting the encrypted authorization certificate via the target device.
11. A target device, characterized in that: include: The first authorization credential receiving module is used to receive the encrypted authorization credential sent by the target control platform, wherein the encrypted authorization credential is generated by the authorization server and forwarded to the target control platform, and the generation process of the encrypted authorization credential is as follows: the target control platform generates a control instruction and an authorization request corresponding to the control instruction in response to the user's control operation on the target device in the operation interface, and sends the authorization request and the control instruction to the authorization server, and the authorization server generates an original authorization credential based on the control instruction and encrypts it to obtain the encrypted authorization credential; An authorization certificate decryption module, used to decrypt the encrypted authorization certificate to obtain the original authorization certificate; A control instruction application module is used to apply to the authorization server for the control instruction corresponding to the original authorization certificate based on the original authorization certificate.
12. A target control platform, characterized in that: include: An authorization request generation module, used to generate a control instruction and an authorization request corresponding to the control instruction in response to a user's control operation on a target device in an operation interface; An authorization request sending module, used for sending the control instruction and the authorization request to an authorization server, so that the authorization server generates an original authorization certificate based on the control instruction, and encrypts the original authorization certificate to obtain an encrypted authorization certificate; The second authorization certificate receiving module is used to receive the encrypted authorization certificate sent by the authorization server, send the encrypted authorization certificate to the target device, so that the target device decrypts the encrypted authorization certificate, and applies for the control instruction from the authorization server based on the original authorization certificate obtained after decryption.
13. A system for controlling equipment, characterized in that: include: Target device, target control platform and authorization server, The target control platform is used to generate a control instruction and an authorization request corresponding to the control instruction in response to a user's control operation on the target device in the operation interface, and send the control instruction and the authorization request to the authorization server; The authorization server is configured to generate an original authorization certificate corresponding to the control instruction after receiving the control instruction and the authorization request, encrypt the original authorization certificate to obtain an encrypted authorization certificate, and send the encrypted authorization certificate to the target control platform so that the target control platform forwards the encrypted authorization certificate to the target device; The target device is used to decrypt the encrypted authorization certificate to obtain the original authorization certificate, and based on the original authorization certificate, apply to the authorization server for the control instruction corresponding to the original authorization certificate.
14. An electronic device, characterized in that: include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the device control method described in any one of claims 1 to 5, or 6 to 8, or 9.
15. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the device control method according to any one of claims 1 to 5, 6 to 8, or 9 is implemented.