Internet of Things device trusted control method, system, electronic device and storage medium
By building instruction blocks in IoT devices and verifying control instructions using the proof of work mechanism, the problem that IoT device control security depends on cloud services is solved, achieving higher security and reliability.
Patent Information
- Application Number
- CN202311841295.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-28
- Publication Date
- 2024-12-31
- Estimated Expiration
- 2043-12-28
AI Technical Summary
The control security of IoT devices depends on the security of upstream cloud services and is vulnerable to illegal attacks, resulting in the illegal control of IoT devices, making it difficult to ensure their security.
Obtain control instruction data through the cloud server, build instruction blocks, and store block information in the edge gateway, verify through the proof of work mechanism to ensure the legality and integrity of device control instructions, only after the verification is passed Execute the instructions.
It improves the control security and reliability of IoT devices, prevents illegal control, and enhances the security of checksum execution of device control instructions.
Smart Images

Figure CN117914558B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of Internet of Things, and in particular to a trusted control method, system, electronic device and storage medium for Internet of Things devices. Background Art
[0002] Among related technologies, the Internet of Things (IoT) is a technology that connects various physical devices through the network to enable them to collect and exchange data. With the advancement of science and technology, the application of the Internet of Things is becoming more and more extensive, and has had a profound impact on industries, residents' lives, medical care, urban planning and other fields. However, at present, the control security of most IoT devices depends on the security of upstream cloud services. The control security of IoT devices is vulnerable to illegal attacks, making IoT devices illegally controlled and the security of IoT devices difficult to guarantee.
[0003] In summary, the technical problems existing in the relevant technologies need to be improved. Summary of the invention
[0004] The main purpose of the embodiments of the present application is to propose a trusted control method, system, electronic device and storage medium for IoT devices, which can realize trusted control of IoT devices and effectively improve the control security and reliability of IoT devices.
[0005] To achieve the above purpose, an embodiment of the present application provides a trusted control method for an IoT device, the method comprising:
[0006] Obtain control command data through the cloud server;
[0007] constructing a first instruction block according to the control instruction data;
[0008] When it is determined that the first instruction block is constructed, a device control instruction is sent to the edge gateway through the cloud service end; wherein the edge gateway stores the first block information of the second instruction block, and the second instruction block includes the previous block of the first instruction block;
[0009] Perform verification according to the device control instruction and the first block information to obtain a verification result;
[0010] When it is determined that the verification result is passed, the device control instruction is executed through the edge gateway to control the Internet of Things device.
[0011] In some embodiments, constructing a first instruction block according to the control instruction data includes:
[0012] Performing verification calculations through a proof-of-work mechanism according to the control instruction data, the first block information and the block timestamp to obtain instruction block data; wherein the block timestamp includes timestamp data constructed by the first instruction block;
[0013] The first instruction block is constructed according to the instruction block data.
[0014] In some embodiments, performing verification calculations based on the control instruction data, the first block information and the block timestamp through a proof-of-work mechanism to obtain instruction block data includes:
[0015] Converting the control instruction data, the first block information and the block timestamp into a preset byte array to obtain a first input data sequence; wherein the first block information includes a first hash value of the second instruction block;
[0016] Connecting the first input data sequence with the block random number to obtain a second input data sequence;
[0017] Performing a hash calculation on the second input data sequence to obtain a second hash value;
[0018] When it is determined that the second hash value meets the preset target requirement, the instruction block data is obtained; wherein the instruction block data includes the second hash value and the block random number.
[0019] In some embodiments, the device control instruction includes instruction information, the block timestamp, and the block random number;
[0020] The verifying according to the device control instruction and the first block information to obtain a verification result includes:
[0021] Binary concatenation of the instruction information, the block timestamp, the block random number and the first block information to obtain concatenated data;
[0022] Performing hash calculation according to the connection data to obtain a third hash value;
[0023] The third Hash value is verified according to the preset target requirement to obtain the verification result; wherein the verification result includes whether the verification passes or fails.
[0024] In some embodiments, before executing the step of obtaining control instruction data through the cloud service end, the method further includes:
[0025] When it is determined that the cloud service end is connected to the edge gateway, a genesis block is constructed to initialize the blockchain corresponding to the edge gateway;
[0026] The third block information of the origin block is obtained by performing verification calculation through the proof-of-work mechanism.
[0027] In some embodiments, after performing the verification calculation through the proof-of-work mechanism to obtain the third block information of the origin block, the method further includes:
[0028] Importing the third block information into the edge gateway through a preset storage device;
[0029] Alternatively, the third block information is imported into the edge gateway through the cloud service end.
[0030] In some embodiments, after executing the step of, when determining that the verification result is a verification pass, executing the device control instruction through the edge gateway to control the Internet of Things device, the method further includes:
[0031] storing the second block information of the first instruction block in the edge gateway;
[0032] The first block information stored in the edge gateway is updated using the second block information.
[0033] To achieve the above purpose, another aspect of the embodiment of the present application provides a trusted control system for an Internet of Things device, the system comprising:
[0034] The first module is used to obtain control instruction data through the cloud server;
[0035] A second module, configured to construct a first instruction block according to the control instruction data;
[0036] A third module is used to send a device control instruction to an edge gateway through the cloud service end when it is determined that the first instruction block is constructed; wherein the edge gateway stores the first block information of the second instruction block, and the second instruction block includes the previous block of the first instruction block;
[0037] A fourth module is used to perform verification according to the device control instruction and the first block information to obtain a verification result;
[0038] The fifth module is used to execute the device control instruction through the edge gateway to control the Internet of Things device when it is determined that the verification result is passed.
[0039] To achieve the above objective, another aspect of an embodiment of the present application provides an electronic device, the electronic device comprising:
[0040] at least one processor;
[0041] at least one memory for storing at least one program;
[0042] When the at least one program is executed by the at least one processor, the at least one processor implements the above method.
[0043] To achieve the above objective, another aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program implements the above method when executed by a processor.
[0044] The embodiments of the present application include at least the following beneficial effects: The present application provides a trusted control method, system, electronic device and storage medium for an Internet of Things device. The scheme first obtains control instruction data through a cloud service end to construct a first instruction block according to the control instruction data. Then, when it is determined that the construction of the first instruction block is completed, the device control instruction is sent to the edge gateway through the cloud service end to verify according to the device control instruction and the first block information to obtain a verification result. Among them, in the embodiment of the present invention, the edge gateway stores the first block information of the second instruction block, and the second instruction block includes the previous block of the first instruction block. Finally, when it is determined that the verification result is passed, the device control instruction is executed by the edge gateway, and then the Internet of Things device is controlled, which can realize the trusted control of the Internet of Things device and effectively improve the control security and reliability of the Internet of Things device. It is easy to understand that the embodiment of the present invention can verify the integrity and legality of the relevant instructions by constructing an instruction block and verifying according to the device control instruction and the corresponding first block information, and then after the verification is passed, the device control instruction is executed by the edge gateway, thereby effectively improving the control security and reliability of the Internet of Things device. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 It is a schematic diagram of a model of a man-in-the-middle attack control device provided in an embodiment of the present application;
[0046] Figure 2 It is a schematic diagram of a model of a DNS pollution attack control device provided in an embodiment of the present application;
[0047] Figure 3 is a flow chart of a trusted control method for an Internet of Things device provided in an embodiment of the present application;
[0048] Figure 4 It is a schematic diagram of a model of trusted control of an Internet of Things device provided in an embodiment of the present application;
[0049] Figure 5 is a schematic diagram of the steps of constructing a first instruction block according to control instruction data provided in an embodiment of the present application;
[0050] Figure 6 It is a flowchart of the steps of obtaining instruction block data by performing verification calculation through a proof-of-work mechanism according to control instruction data, first block information and block timestamp provided by an embodiment of the present application;
[0051] Figure 7 It is a flowchart of steps for performing verification according to the device control instruction and the first block information to obtain the verification result provided by an embodiment of the present application;
[0052] Figure 8 This is a schematic diagram of the steps for initializing a blockchain provided in an embodiment of the present application;
[0053] Fig. 9 It is a schematic diagram of the steps of importing the third block information into the edge gateway provided by an embodiment of the present application;
[0054] Fig.10 It is a schematic diagram of the steps of updating the block information stored in the edge gateway provided in an embodiment of the present application;
[0055] Fig.11 It is a timing flow diagram of the trusted control method of the Internet of Things device provided in the embodiment of the present application;
[0056] Fig.12 It is a schematic flow chart of iterative operation steps for the cloud service provided in the embodiment of the present application to send device control instructions to the gateway;
[0057] Fig.13 It is a schematic diagram of the structure of a trusted control system for an Internet of Things device provided in an embodiment of the present application;
[0058] Fig.14 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION
[0059] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is further described in detail below in conjunction with the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the embodiments of the present application. They are only examples of devices and methods consistent with some aspects of the embodiments of the present application as detailed in the attached claims.
[0060] It is understood that the terms "first", "second", etc. used in this application can be used to describe various concepts in this article, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another concept. For example, without departing from the scope of the embodiment of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if" and "if" as used herein can be interpreted as "at the time of" or "when" or "in response to determination".
[0061] The terms "at least one", "multiple", "each", "any", etc. used in this application, at least one includes one, two or more, multiple includes two or more, each refers to each of the corresponding multiple, and any refers to any one of the multiple.
[0062] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0063] Before describing the embodiments of the present application in detail, some nouns and terms involved in the embodiments of the present application are first described. The nouns and terms involved in the embodiments of the present application are subject to the following explanations.
[0064] Blockchain: It is a new application model of computing technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. In simple terms, it is an open, decentralized, and tamper-proof digital ledger that records all transactions or digital events across multiple computers.
[0065] Edge Gateway: A hardware device or software application used to process network communications between traditional data centers and edge devices in an edge computing environment. Among them, edge gateways play an important role in connection, security, and management in the Internet of Things and edge computing.
[0066] Trustworthy Control: is a control method used to ensure that IoT devices have high security, efficiency and reliability during operation and control. It ensures the safe and reliable operation of IoT devices in various application scenarios by implementing evaluation, management and monitoring measures.
[0067] In the related technologies, the Internet of Things (IoT) is a technology that connects various physical devices through the network to enable them to collect and exchange data. With the advancement of science and technology, the application of the Internet of Things is becoming more and more extensive, and has had a profound impact on industries, residents' lives, medical care, urban planning and other fields. In the Internet of Things technology, various devices need to be remotely controlled or automatically controlled. Accordingly, its control method can be divided into: direct control by the cloud, the device is directly connected to the cloud service, the command is directly sent from the cloud service to the terminal device for execution, the cloud is controlled through the edge gateway, the device and the edge gateway form a local area network, the gateway is connected to the cloud service, the command is sent from the cloud service to the terminal device for execution, and another device sends a command to control, and the device sends a command to the target terminal device through the cloud or gateway for execution. However, many IoT devices, such as cameras, circuit switches, elevator controls, etc., require very high security guarantees, including the security of device data transmission and storage and the security of device control. Accordingly, the security guarantee of device control is particularly important. If some key devices are illegally controlled, very serious consequences will occur.
[0068] Currently, the security of most device controls relies on the security of upstream cloud services. For example, when using the MQTT protocol to transmit data, both producers and subscribers need to be verified before they can connect to the broker to operate on a topic. Alternatively, when using the HTTP protocol, the cloud service uses a private key to encrypt and sign the issued instructions, and the device or gateway uses a public key to decrypt to determine the identity of the control sender. In these methods, the control security of IoT devices is only vulnerable to illegal attacks, making it difficult to ensure the security of IoT devices. For example, refer to Figure 1 and Figure 2 , since the long-term MQTT authentication and asymmetric encryption keys remain unchanged, the middleman can intercept a large amount of message data for brute force cracking. At the same time, multiple edge sides are connected to the cloud service, so the middleman can intercept the ciphertext content that produces collisions, which greatly reduces the difficulty of brute force cracking. Correspondingly, when the middleman attack is completed, the illegal controller can already forge the content of the two-way message when the communication message passes, especially forging the control instructions sent from the cloud to the edge side, thereby gaining control of the device. In addition, when the edge side uses the domain name to access the cloud service, the illegal controller can guide the edge side to a forged cloud service by tampering with or damaging the resolution process of the domain name server, thereby gaining control of the device.
[0069] Based on this, an embodiment of the present invention provides a trusted control method, system, electronic device and storage medium for an Internet of Things device, which can realize trusted control of an Internet of Things device and effectively improve the control security and reliability of the Internet of Things device. The embodiment of the present invention obtains control instruction data through a cloud service end to construct a first instruction block according to the control instruction data, and after the first instruction block is constructed, sends a device control instruction to an edge gateway through a cloud service end to verify according to the device control instruction and the first block information to obtain a verification result. Correspondingly, in an embodiment of the present invention, the edge gateway stores the first block information of the second instruction block, and the second instruction block includes the previous block of the first instruction block and the previous block of the first instruction block. Finally, when it is determined that the verification result is passed, the embodiment of the present invention executes the device control instruction through the edge gateway to control the Internet of Things device, thereby realizing trusted control of the Internet of Things device, and can effectively improve the control security and reliability of the Internet of Things device.
[0070] The trusted control method of the Internet of Things device provided in the embodiment of the present application relates to the field of Internet of Things technology. The trusted control method of the Internet of Things device provided in the embodiment of the present application can be applied to a terminal, can also be applied to a server, and can also be software running in a terminal or a server. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, and a car terminal, etc., but is not limited to this; the server side can be configured as an independent physical server, or it can be configured as a server cluster or a distributed system composed of multiple physical servers, and can also be configured as a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The server can also be a node server in a blockchain network; the software can be an application that implements the trusted control method of the Internet of Things device, etc., but is not limited to the above forms.
[0071] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0072] It should be noted that in each specific implementation of the present application, when it comes to the need to perform relevant processing based on data related to user identity or characteristics such as user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first, and the collection, use, and processing of these data will comply with relevant laws, regulations, and standards. In addition, when the embodiment of the present application needs to obtain the user's sensitive personal information, the user's separate permission or consent will be obtained through a pop-up window or by jumping to a confirmation page. After clearly obtaining the user's separate permission or consent, the necessary user-related data for the normal operation of the embodiment of the present application will be obtained.
[0073] Figure 3 is an optional flowchart of the IoT device trusted control method provided in the embodiment of the present application. Figure 3 The method may include but is not limited to steps S110 to S150.
[0074] S110, obtaining control instruction data through the cloud server.
[0075] S120, constructing a first instruction block according to the control instruction data.
[0076] S130, when it is determined that the first instruction block is constructed, the device control instruction is sent to the edge gateway through the cloud service end. The edge gateway stores the first block information of the second instruction block, and the second instruction block includes the previous block of the first instruction block.
[0077] S140, performing verification according to the device control instruction and the first block information to obtain a verification result.
[0078] S150, when it is determined that the verification result is passed, the device control instruction is executed through the edge gateway to control the Internet of Things device.
[0079] During the working process of this specific embodiment, the embodiment of the present invention first obtains control instruction data through the cloud service end. Specifically, the control instruction data in the embodiment of the present invention refers to instructions for operating and controlling the Internet of Things devices under the edge gateway. Correspondingly, the cloud service end refers to a cloud service platform connected to the edge gateway, such as a corresponding Internet of Things platform. For example, the embodiment of the present invention obtains control instruction data through the corresponding Internet of Things platform (cloud service end). Then, the embodiment of the present invention constructs a first instruction block based on the acquired control instruction data. Specifically, the first instruction block in the embodiment of the present invention refers to a blockchain block. In the embodiment of the present invention, each edge gateway connected to the relevant Internet of Things device will correspond to an independent blockchain of the cloud service end. For example, referring to Figure 4 , Figure 4 The edge gateway A corresponds to the blockchain A in the cloud server, and the edge gateway B corresponds to the blockchain B in the cloud server. After acquiring the corresponding control instruction data, the embodiment of the present invention generates a new block, i.e., the first instruction block, on the blockchain corresponding to the corresponding edge gateway according to the control instruction data.
[0080] Further, when it is determined that the first instruction block is constructed, the embodiment of the present invention sends a device control instruction to the edge gateway through the cloud service end. Specifically, the edge gateway in the embodiment of the present invention stores the first block information of the second instruction block. Correspondingly, the second instruction block in the embodiment of the present invention includes the previous block of the first instruction block, that is, the last generated block of the first instruction block on the blockchain corresponding to the edge gateway in the cloud service end. Among them, the first block information in the embodiment of the present invention refers to the block data recorded on the blockchain, such as transaction time, timestamp, and block hash value. After the first instruction block is constructed, the cloud service end sends the device control instruction to the corresponding edge gateway to control the corresponding Internet of Things device through the edge gateway. Then, the embodiment of the present invention verifies the device control instruction and the first block information to obtain a verification result. Specifically, when the edge gateway receives the device control instruction issued by the cloud service end, the device control instruction is verified for legitimacy through the block information of the previous block of the first instruction block stored therein, that is, the first block information, to obtain a verification result. Accordingly, when the verification result is determined to be a passed verification, the embodiment of the present invention executes the device control instruction through the edge gateway to control the corresponding IoT device to perform related operations, thereby realizing the trusted control of the IoT device. It is easy to understand that the embodiment of the present invention can effectively improve the control security and reliability of IoT devices by verifying the legitimacy of the relevant device control instructions in combination with the block information of the blockchain.
[0081] Reference Figure 5 In some embodiments of the present invention, constructing a first instruction block according to control instruction data includes but is not limited to the following steps:
[0082] S210: Perform verification calculations through a proof-of-work mechanism based on the control instruction data, the first block information, and the block timestamp to obtain instruction block data, wherein the block timestamp includes timestamp data constructed by the first instruction block.
[0083] S220: Constructing a first instruction block according to the instruction block data.
[0084] In this specific embodiment, the embodiment of the present invention first performs verification calculations through the proof of work mechanism according to the control instruction data, the first block information and the block timestamp to obtain the instruction block data, and then constructs the first instruction block according to the instruction block data. Specifically, the block timestamp in the embodiment of the present invention includes the timestamp data constructed by the first instruction block, that is, the timestamp generated by this block. Accordingly, the proof of work mechanism (PoW) is a consensus mechanism used in blockchain technology, which can verify and confirm new transactions. The embodiment of the present invention uses the control instruction data, the first block information and the block timestamp as inputs of the proof of work to perform the corresponding proof of work mechanism verification calculation to obtain the instruction block data. Further, after the proof of work is completed, that is, after the corresponding instruction block data is calculated, the embodiment of the present invention generates the next instruction block according to the instruction block data, that is, the first instruction block. The embodiment of the present invention generates blocks through the proof of work mechanism, protects the security of the blockchain through computing power, and effectively improves the control security and reliability of the Internet of Things device.
[0085] Reference Figure 6 In some embodiments of the present invention, verification calculation is performed through a proof-of-work mechanism according to the control instruction data, the first block information and the block timestamp to obtain instruction block data, including but not limited to the following steps:
[0086] S310: Convert the control instruction data, the first block information and the block timestamp into a preset byte array to obtain a first input data sequence, wherein the first block information includes a first hash value of the second instruction block.
[0087] S320: Connect the first input data sequence with the block random number to obtain a second input data sequence.
[0088] S330: Perform hash calculation on the second input data sequence to obtain a second hash value.
[0089] S340: When it is determined that the second hash value meets the preset target requirement, the instruction block data is obtained, wherein the instruction block data includes the second hash value and the block random number.
[0090] In this specific embodiment, the embodiment of the present invention first converts the control instruction data, the first block information and the block timestamp into a preset byte array to obtain a first input data sequence. Specifically, the preset byte array in the embodiment of the present invention refers to converting the corresponding data into the form of a corresponding byte array, such as a binary byte array. In addition, the first block information in the embodiment of the present invention includes the first hash value of the second instruction block. Among them, the hash value in the embodiment of the present invention is a displacement identifier of a fixed length, which is obtained by performing a hash function calculation on the input data. For example, the embodiment of the present invention converts the input of the proof of work, including the hash value (first hash value) of the previous block, the instruction data (control instruction data) to be issued this time, and the timestamp (block timestamp) generated by this block into the form of a binary array to obtain a first input data sequence.
[0091] Next, the embodiment of the present invention connects the first input data sequence with the block random number to obtain the second input data sequence, and performs a hash calculation on the second input data sequence to obtain a second hash value. Specifically, the block random number in the embodiment of the present invention refers to a one-time random number or string, that is, a nonce value. The embodiment of the present invention connects the first input data sequence obtained by conversion in series with a tried nonce value, that is, a situation random number, to construct a second input data sequence, and performs a hash calculation on the second input data sequence to obtain a second hash value. Further, the embodiment of the present invention determines whether the second hash value meets the preset target requirements. Among them, the preset target requirements are determined by the corresponding real-time and security requirements, including the corresponding hash value length and target. For example, the preset target requirement in the embodiment of the present invention is that the 20 low bits of the child are all 0. Accordingly, when it is determined that the second hash value meets the preset target requirements, the embodiment of the present invention obtains instruction block data, including the corresponding second hash value and the block random number, that is, the nonce value. It is easy to understand that when the second hash value does not meet the preset target requirements, the embodiment of the present invention increments the nonce value and continuously attempts to connect the new nonce value with the first input data sequence to calculate the corresponding second hash value until a nonce value is found that enables the calculated second hash value to meet the preset target requirements, thereby completing the proof of work.
[0092] Reference Figure 7 In some embodiments of the present invention, the device control instruction includes instruction information, a block timestamp, and a block random number. Accordingly, in the embodiments of the present invention, verification is performed based on the device control instruction and the first block information to obtain a verification result, including but not limited to the following steps:
[0093] S410: Binary concatenate the instruction information, the block timestamp, the block random number and the first block information to obtain concatenated data.
[0094] S420: Perform hash calculation according to the connection data to obtain a third hash value.
[0095] S430: Verify the third Hash value according to the preset target requirement to obtain a verification result, wherein the verification result includes verification pass or verification fail.
[0096] In this specific embodiment, in the device control instruction issued by the cloud service end to the edge gateway, the instruction information refers to the original text of the instruction. Accordingly, the embodiment of the present invention performs binary connection of the instruction information, the block timestamp, the block random number and the first block information to obtain the connection data, and performs hash calculation according to the connection data to obtain the corresponding third hash value. Specifically, when the edge gateway receives the device control instruction issued by the cloud service end, the edge gateway performs binary connection of the block information of the previous block stored by it, that is, the first block information, with the received instruction information, block timestamp and block random number, so as to construct the connection data. Among them, when the first device control instruction is issued, the previous hash value is the hash value of block 0 (origin block). Then, the embodiment of the present invention performs hash calculation on the connection data by the same hash algorithm as above to obtain the third hash value. Further, the embodiment of the present invention verifies the third hash value according to the preset target requirements to determine the corresponding verification result, including verification pass or verification. Exemplarily, the preset target requirement in the embodiment of the present invention is that the lower 20 bits of the hash value are all zero. Accordingly, when it is determined that the third hash value meets the preset target requirement, such as the lower 20 bits of the third hash value are all zero, the verification result is a verification pass. On the contrary, when it is determined that the third hash value does not meet the preset target requirement, the verification result is a verification failure. The embodiment of the present invention has a high computing efficiency by performing a hash calculation on the corresponding connection data, and does not require excessive computing and memory resources, and can better adapt to an environment with limited edge resources.
[0097] It should be noted that the hash algorithms in the embodiments of the present invention include MD5, SHA1, SHA2, SHA3, Blake2, HMAC, etc. Since there are certain real-time requirements for controlling the device, such as issuing instructions through the cloud service end, the device needs to execute and complete within 3 seconds. Therefore, there are certain computing performance requirements for proof of work on the cloud service end, and the factors affecting the computing time of proof of work are mainly the length of the hash value and the binary representation target of the proof. Among them, the larger the hash value length and the stricter the target, the more time the calculation takes. For example, in some embodiments of the present invention, the SHA256 digest algorithm of SHA2 is used, and the hash value length is 256 bits, that is, 32 bytes. Accordingly, when a hash value length of 256 bits is used, 16 low binary all 0s are used as the proof of work target, and in most cases the proof of work can be completed in less than 100 milliseconds. The embodiment of the present invention selects the corresponding hash value length and target through specific application scenarios to balance the requirements of real-time and security.
[0098] Reference Figure 8 In some embodiments of the present invention, before obtaining control instruction data through the cloud service end, the IoT device trusted control method provided by the embodiment of the present invention further includes but is not limited to the following steps:
[0099] S510: When it is determined that the cloud service end is connected to the edge gateway, a genesis block is constructed to initialize the corresponding blockchain of the edge gateway.
[0100] S520: Verify and calculate through the proof-of-work mechanism to obtain the third block information of the origin block.
[0101] In this specific embodiment, the embodiment of the present invention first initializes the corresponding blockchain before obtaining the control instruction data through the cloud service end. Specifically, the embodiment of the present invention first determines whether there is an edge gateway connected to the cloud service end. When it is determined that the cloud service end is connected to the corresponding edge gateway, the embodiment of the present invention first constructs the gas source situation to initialize the blockchain corresponding to the edge gateway. For example, when the cloud service end is connected to the corresponding edge gateway, such as an edge gateway with key equipment, the cloud service end will generate a block 0 (Genesis Block), that is, the origin block. Among them, the instruction type of the origin block is initialization (Init), and there is no hash value of the previous block. Then, the embodiment of the present invention performs verification calculation through the proof of work mechanism to obtain the third block information of the origin block. Specifically, the third block information in the embodiment of the present invention includes the hash value and nonce value of the origin block. Among them, the embodiment of the present invention initializes the corresponding blockchain for the connected edge gateway on the cloud service end by constructing the origin block and performing verification calculation through the proof of work mechanism, so as to facilitate the subsequent trusted control of the Internet of Things device according to the corresponding block information.
[0102] Combination Figure 8 , refer to Fig. 9 In some embodiments of the present invention, after performing verification calculations through a proof-of-work mechanism to obtain the third block information of the origin block, the IoT device trusted control method provided by the embodiment of the present invention further includes but is not limited to the following steps:
[0103] S610: Importing the third block information to the edge gateway through a preset storage device.
[0104] S620: Import the third block information to the edge gateway through the cloud service end.
[0105] In this specific embodiment, after the blockchain of the cloud service end is initialized, the embodiment of the present invention imports the third block information of the origin block into the edge gateway, so that when the edge gateway issues the corresponding device control instruction on the cloud service end, it can perform a legality check on the device control instruction according to the stored block information. Specifically, in the embodiment of the present invention, the edge gateway can import the origin block into the gateway device in an offline or online manner. Among them, when the offline method is adopted, the embodiment of the present invention imports the third block information into the edge gateway through a preset storage device. In the embodiment of the present invention, the preset storage device can be a USB memory or other storage device, and the origin block is burned into the firmware or copied to the flash memory of the gateway device by using the preset storage device. Correspondingly, when the online method is adopted, the embodiment of the present invention imports the third block information into the edge gateway through the cloud service end. At the same time, when importing in an online manner, it is necessary to ensure that the cloud service end to which the edge gateway is connected when it is initialized is a credible and legal cloud service, and the legality of the source can also be confirmed by a secondary verification in the cloud application service, which will not be repeated here.
[0106] Reference Fig.10 In some embodiments of the present invention, after executing the step of determining that the verification result is passed and executing the device control instruction through the edge gateway to control the Internet of Things device, the Internet of Things device trusted control method provided by the embodiment of the present invention further includes but is not limited to the following steps:
[0107] S710: Store the second block information of the first instruction block to the edge gateway.
[0108] S720: Update the first block information stored in the edge gateway using the second block information.
[0109] In this specific embodiment, after the embodiment of the present invention passes the verification and controls the Internet of Things device to perform the corresponding operation, the block information in the edge gateway is also updated. Specifically, the embodiment of the present invention stores the second block information of the first instruction block in the edge gateway, and updates the first block information stored in the edge gateway with the passed second block information. It is easy to understand that the first block information in the embodiment of the present invention refers to the block information of the previous block of the first instruction block. The embodiment of the present invention updates the block information of the previous block stored in the edge gateway, that is, the first block information, by using the block information of the first instruction block that has passed the verification, that is, the second block information, so that when the next device control instruction is sent to the edge gateway, the device control instruction can be verified for legitimacy according to the block information of the previous block of the block corresponding to the control instruction, thereby realizing trusted control of the Internet of Things device.
[0110] It should be noted that in the embodiment of the present invention, the cloud server stores a complete blockchain, and all blocks are stored in a key-value storage database, such as levelDB or rocksDB. Among them, each complete blockchain record is a record of the control instructions issued by the cloud server to the corresponding edge side from the initialization to the current time. Correspondingly, based on the characteristics of the blockchain, these records cannot be tampered with or deleted. Therefore, the reliability of relevant data can be effectively improved. In addition, in the embodiment of the present invention, the edge gateway does not need to record the complete blockchain, but only needs to record the current block hash value. When an instruction is verified to be credible and legal, the calculated hash value can replace the originally stored hash value. By storing only one hash value, it can be better applied to resource-constrained edge computing environments.
[0111] Below, refer to Fig.11 and Fig.12 , taking a specific IoT switch device scenario as an example, the solution of the embodiment of the present invention is described in detail and explained:
[0112] In the embodiment of the present invention, the IoT switch device has two control instructions, including device on and device off. Accordingly, the JSON message corresponding to device on is as follows:
[0113]
[0114] First, the embodiment of the present invention initializes the blockchain of the cloud service end. The cloud service end generates a new blockchain, corresponding to the edge gateway device connected to the switch, and all subsequent control instructions issued to this edge gateway will be recorded in the blockchain ledger. Among them, the embodiment of the present invention creates block 0 (Genesis Block), that is, the origin block, and obtains the hash value of block 0 (hexadecimal), such as 00001FED22BF6E3046A07AFF478DC12E4C5CB42711AB7D8DDA3B831E24ED 302F. Among them, the lower 16 bits of the hash value in the embodiment of the present invention are all 0. Accordingly, the embodiment of the present invention imports the hash value into the edge gateway device to store the above hash value in the edge gateway.
[0115] Next, when at a certain time point, the cloud server sends the first switch control instruction to indicate that the switch is turned on, the embodiment of the present invention generates block 1, whose hash value is (hexadecimal): 000078EBCE119C7E8D89BD86FEFA113C9D28C2DCD4E595AAD2366FE0C27F943. Similarly, the lower 16 bits of the hash value are all 0. Then, the cloud server sends the control instruction, and the message is as follows:
[0116]
[0117] Furthermore, when the edge gateway receives the corresponding message, the embodiment of the present invention calculates the corresponding hash value (hexadecimal) by the same hash algorithm based on the hash value stored locally in the edge gateway, combined with the corresponding instruction information, block timestamp and nonce value (block random number): 000078EBCE119C7E8D89BD86FEFA113C9D28C2DCD4E595AAD2366FE0C27F943. Accordingly, since the lower 16 bits of the hash value are all 0, the verification passes, and the edge gateway sends an instruction to the Internet of Things switch device to control the Internet of Things switch device to execute the opening instruction. At the same time, the embodiment of the present invention replaces the hash value of block 0 with a new hash value for storage.
[0118] Similarly, when the cloud service sends a shutdown command to the IoT device again, the above control command issuance and legitimacy verification process is repeated to calculate the corresponding hash value (hexadecimal): 00006D315DD27CB9FB374E4863A7AE77164130B15CDF0B465CE92AB47531E8B9, and then send the following message to the edge gateway:
[0119]
[0120] When the edge gateway receives the control instruction, it verifies it in the same way. When it is determined that the verification passes, it executes the instruction and records the new hash value.
[0121] Accordingly, the operation information recorded in the blockchain according to the embodiment of the present invention is as follows:
[0122] ======Block#2======
[0123] timestamp:1698754202154
[0124] nonce:136906
[0125] command:{"deviceId":100235,"on":false}
[0126] prev.hash:
[0127] 000078EBCE119C7E8D89BD86FEFA113C9D28C2DCD4E595AAD2366FE0C27F943D
[0128] hash:
[0129] 00006D315DD27CB9FB374E4863A7AE77164130B15CDF0B465CE92AB47531E8B9
[0130] ======Block#1======
[0131] timestamp:1698753374361
[0132] nonce:171141
[0133] command:{"deviceId":100235,"on":true}
[0134] prev.hash:
[0135] 00001FED22BF6E3046A07AFF478DC12E4C5CB42711AB7D8DDA3B831E24ED 302F
[0136] hash:
[0137] 000078EBCE119C7E8D89BD86FEFA113C9D28C2DCD4E595AAD2366FE0C27F943D
[0138] ======Block#0======
[0139] timestamp:1698753374039
[0140] nonce:566074
[0141] prev.hash:
[0142] hash:
[0143] 00001FED22BF6E3046A07AFF478DC12E4C5CB42711AB7D8DDA3B831E24ED 302F
[0144] It should be noted that, in the embodiment of the present invention, except for block 0 (origin block), other blocks are records of control instructions, and the correctness of the records can be easily verified.
[0145] It is easy to understand that in the embodiment of the present invention, when the edge side can still quickly and accurately verify the credibility and legality of the instruction under the condition of limited resources, the edge side can fully trust the verification result, thereby ensuring that the executed device instruction is non-forged and cannot be tampered with. At the same time, the complete record of the device control operation is also retained in the cloud service end blockchain. These records are guaranteed to be authentic and reliable, and the authenticity can be verified by simple calculations. By applying blockchain technology, the embodiment of the present invention implements a distributed consensus security algorithm between the cloud service end and the edge gateway, thereby ensuring the integrity and legality of the instruction data sent from the cloud to the edge. Forged or tampered instruction messages will be quickly verified by the edge side gateway, thereby ensuring that key devices only execute legal control instructions from trusted sources. At the same time, the embodiment of the present invention uses the blockchain account book as a record of the storage device control instruction operation, and these records cannot be deleted or tampered with, thereby ensuring the complete authenticity of the records and the integrity and reliability of the operation log.
[0146] It is easy to understand that since the entire data transmission process involves two important factors, the hash value of the block and the algorithm (proof of work and target), any middleman attacker or forged service attacker cannot tamper with or assemble legitimate control instructions and send them to the edge side, see Fig.11 Even if the attacker uses other means to learn the algorithms and targets used by the cloud and edge, he cannot tamper with the forged instruction message because of the lack of the hash value of the previous block. In this case, the only thing the attacker can do is to brute force the hash value of the previous block. For example, taking SHA256 as an example, the attacker needs to complete the calculation of the following mathematical formula (1):
[0147]
[0148] Wherein, C represents the intercepted instruction original text, T represents the timestamp, N represents the one-time integer nonce value, X is the hash value of the previous block that the attacker needs to crack (here is a 256-bit binary), and the + sign represents connecting these binary arrays in series. For a hash value of 256 bits in length, this is an astronomical brute force enumeration, which cannot be completed within the effective time (before the next block is generated), and there is a very high probability of obtaining an incorrect hash value result. Therefore, when the hash value storage on the cloud service side and the edge side is secure, the Internet of Things device control method provided by the embodiment of the present invention is more difficult to crack and can achieve trusted control of Internet of Things devices. At the same time, the more hash value bits the algorithm generates, the stronger the security.
[0149] See also Fig.13The embodiment of the present application also provides a trusted control system for an Internet of Things device, which can implement the above-mentioned trusted control method for an Internet of Things device, and the system includes:
[0150] The first module 810 is used to obtain control instruction data through the cloud server.
[0151] The second module 820 is used to construct a first instruction block according to the control instruction data.
[0152] The third module 830 is used to send a device control instruction to the edge gateway through the cloud service end when it is determined that the first instruction block is completed. The edge gateway stores the first block information of the second instruction block, and the second instruction block includes the previous block of the first instruction block.
[0153] The fourth module 840 is used to perform verification according to the device control instruction and the first block information to obtain a verification result.
[0154] The fifth module 850 is used to execute the device control instruction through the edge gateway to control the Internet of Things device when the verification result is determined to be passed.
[0155] It can be understood that the contents of the above method embodiments are all applicable to the present system embodiments, the functions specifically implemented by the present system embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0156] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above-mentioned Internet of Things device trusted control method when executing the computer program. The electronic device can be any smart terminal including a tablet computer, a car computer, etc.
[0157] It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0158] See also Fig.14 , Fig.14 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:
[0159] The processor 910 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;
[0160] The memory 920 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 920 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 920, and the processor 910 calls and executes the trusted control method of the Internet of Things device in the embodiment of this application;
[0161] Input / output interface 930, used to implement information input and output;
[0162] Communication interface 940, used to realize communication interaction between the device and other devices, which can be realized through wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WIFI, Bluetooth, etc.);
[0163] bus 950 , which transmits information between the various components of the device (e.g., processor 910 , memory 920 , input / output interface 930 , and communication interface 940 );
[0164] The processor 910 , the memory 920 , the input / output interface 930 , and the communication interface 940 are connected to each other in communication within the device via a bus 950 .
[0165] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned Internet of Things device trusted control method is implemented.
[0166] It can be understood that the contents of the above method embodiments are all applicable to the present storage medium embodiments, the functions specifically implemented by the present storage medium embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0167] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0168] The trusted control method, system, electronic device and storage medium of the Internet of Things device provided by the embodiment of the present application obtain control instruction data through the cloud service end to construct a first instruction block according to the control instruction data. Then, after the first instruction block is constructed, the device control instruction is sent to the edge gateway through the cloud service end to verify the device control instruction according to the first block information to obtain the verification result. Correspondingly, the edge gateway in the embodiment of the present invention stores the first block information of the second instruction block, and the second instruction block includes the previous block of the first instruction block. Finally, it is determined whether the legitimacy check of the device control instruction is passed. When it is determined that the verification result is passed, the device control instruction is executed by the edge gateway, and then the Internet of Things device is controlled, which can realize the trusted control of the Internet of Things device and effectively improve the control security and reliability of the Internet of Things device. It is easy to understand that the embodiment of the present invention can verify the integrity and legitimacy of the relevant instructions by constructing the instruction block and verifying the device control instruction and the corresponding first block information, and then after the verification is passed, the device control instruction is executed by the edge gateway, thereby effectively improving the control security and reliability of the Internet of Things device.
[0169] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0170] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0171] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0172] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0173] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0174] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0175] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0176] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0177] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0178] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments 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 programs.
[0179] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.
Claims
1. A trusted control method for an Internet of Things device, characterized in that: The method comprises: Obtain control command data through the cloud server; constructing a first instruction block according to the control instruction data; When it is determined that the first instruction block is constructed, a device control instruction is sent to the edge gateway through the cloud service end; wherein the edge gateway stores the first block information of the second instruction block, and the second instruction block includes the previous block of the first instruction block; Perform verification according to the device control instruction and the first block information to obtain a verification result; When it is determined that the verification result is passed, the device control instruction is executed through the edge gateway to control the Internet of Things device.
2. The method according to claim 1, characterized in that The step of constructing a first instruction block according to the control instruction data comprises: Performing verification calculations through a proof-of-work mechanism according to the control instruction data, the first block information and the block timestamp to obtain instruction block data; wherein the block timestamp includes timestamp data constructed by the first instruction block; The first instruction block is constructed according to the instruction block data.
3. The method according to claim 2, characterized in that The verification calculation is performed according to the control instruction data, the first block information and the block timestamp through the proof of work mechanism to obtain the instruction block data, including: Converting the control instruction data, the first block information and the block timestamp into a preset byte array to obtain a first input data sequence; wherein the first block information includes a first hash value of the second instruction block; Connecting the first input data sequence with the block random number to obtain a second input data sequence; Performing a hash calculation on the second input data sequence to obtain a second hash value; When it is determined that the second hash value meets the preset target requirement, the instruction block data is obtained; wherein the instruction block data includes the second hash value and the block random number.
4. The method according to claim 3, characterized in that The device control instruction includes instruction information, the block timestamp and the block random number; The verifying according to the device control instruction and the first block information to obtain a verification result includes: Binary concatenation of the instruction information, the block timestamp, the block random number and the first block information to obtain concatenated data; Performing hash calculation according to the connection data to obtain a third hash value; The third Hash value is verified according to the preset target requirement to obtain the verification result; wherein the verification result includes whether the verification passes or fails.
5. The method according to claim 1, characterized in that Before executing the step of acquiring control instruction data through the cloud service end, the method further includes: When it is determined that the cloud service end is connected to the edge gateway, a genesis block is constructed to initialize the blockchain corresponding to the edge gateway; The third block information of the origin block is obtained by performing verification calculation through the proof-of-work mechanism.
6. The method according to claim 5, characterized in that After executing the step of performing verification calculation through the proof-of-work mechanism to obtain the third block information of the origin block, the method further includes: Importing the third block information into the edge gateway through a preset storage device; Alternatively, the third block information is imported into the edge gateway through the cloud service end.
7. The method according to any one of claims 1 to 6, characterized in that: After executing the step of, when determining that the verification result is a verification pass, executing the device control instruction through the edge gateway to control the Internet of Things device, the method further includes: storing the second block information of the first instruction block in the edge gateway; The first block information stored in the edge gateway is updated using the second block information.
8. A trusted control system for Internet of Things devices, characterized in that: The system comprises: The first module is used to obtain control instruction data through the cloud server; A second module, configured to construct a first instruction block according to the control instruction data; A third module is used to send a device control instruction to an edge gateway through the cloud service end when it is determined that the first instruction block is constructed; wherein the edge gateway stores the first block information of the second instruction block, and the second instruction block includes the previous block of the first instruction block; A fourth module is used to perform verification according to the device control instruction and the first block information to obtain a verification result; The fifth module is used to execute the device control instruction through the edge gateway to control the Internet of Things device when it is determined that the verification result is passed.
9. An electronic device, characterized in that: include: at least one processor; at least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements the method according to any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.