CN117335959A - Gateway equipment control method, equipment and medium for Internet of things - Google Patents

Gateway equipment control method, equipment and medium for Internet of things Download PDF

Info

Publication number
CN117335959A
CN117335959A CN202311433086.2A CN202311433086A CN117335959A CN 117335959 A CN117335959 A CN 117335959A CN 202311433086 A CN202311433086 A CN 202311433086A CN 117335959 A CN117335959 A CN 117335959A
Authority
CN
China
Prior art keywords
equipment
internet
things
gateway
control instruction
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311433086.2A
Other languages
Chinese (zh)
Inventor
蒙国林
肖雪
商广勇
马振
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inspur Yunzhou Industrial Internet Co Ltd
Original Assignee
Inspur Yunzhou Industrial Internet Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inspur Yunzhou Industrial Internet Co Ltd filed Critical Inspur Yunzhou Industrial Internet Co Ltd
Priority to CN202311433086.2A priority Critical patent/CN117335959A/en
Publication of CN117335959A publication Critical patent/CN117335959A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • H04L67/125Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks involving control of end-device applications over a network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0643Hash functions, e.g. MD5, SHA, HMAC or f9 MAC
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/30Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy
    • H04L9/3066Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy involving algebraic varieties, e.g. elliptic or hyper-elliptic curves
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3247Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures
    • H04L9/3252Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures using DSA or related signature schemes, e.g. elliptic based signatures, ElGamal or Schnorr schemes

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • Computing Systems (AREA)
  • Physics & Mathematics (AREA)
  • Medical Informatics (AREA)
  • General Health & Medical Sciences (AREA)
  • Algebra (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Mathematical Physics (AREA)
  • Pure & Applied Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Power Engineering (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application discloses a gateway equipment control method, equipment and medium for the Internet of things, wherein the method comprises the following steps: determining gateway equipment of a plurality of Internet of things equipment of a nanotube as a node of a blockchain, and deploying a preset intelligent contract to the blockchain; one gateway device corresponds to a preset intelligent contract, and a plurality of internet of things devices are located in the same industrial device; in a preset period, uploading the data of the Internet of things equipment to a blockchain through gateway equipment; in the block chain, when the data of the Internet of things equipment meet the condition of a preset intelligent contract, generating a target control instruction of gateway equipment; and feeding back the target control instruction to the gateway equipment so that the gateway equipment forwards the target control instruction to the corresponding execution equipment. The data of the Internet of things equipment are stored on the blockchain, so that the safety of the data of the Internet of things equipment is improved, and the target control instruction of the gateway equipment is automatically generated through the intelligent contract, so that the automatic and remote control of the Internet of things equipment and related execution equipment can be realized.

Description

Gateway equipment control method, equipment and medium for Internet of things
Technical Field
The application relates to the technical field of the internet of things, in particular to a gateway equipment control method, equipment and medium for the internet of things.
Background
The internet of things is to realize intelligent interaction between physical objects through unique identification and self-configuration capability of the physical objects, wherein hundreds of millions of internet of things devices are connected and exchange data through the internet. These internet of things devices are typically connected to the internet through internet of things gateway devices. The gateway device of the internet of things not only provides physical connection, but also processes, filters and forwards data collected from the gateway device of the internet of things.
However, as the number of devices of the internet of things increases sharply and the demand for real-time reaction increases, data management and device control in the internet of things system become more and more complex, and at present, data in the internet of things system is usually stored on a centralized server, and on one hand, once the server is attacked, the security of the data faces a serious threat. On the other hand, the control operation generated by the gateway device for the state of the internet of things device often needs to depend on a centralized server, which results in low control efficiency of the gateway device.
Disclosure of Invention
The embodiment of the application provides a gateway equipment control method, equipment and medium for the Internet of things, which are used for solving the problems of low data security and low gateway equipment control efficiency in an Internet of things system.
The embodiment of the application adopts the following technical scheme:
in one aspect, an embodiment of the present application provides a gateway device control method for the internet of things, where the method includes: determining gateway equipment of a plurality of Internet of things equipment of a nano tube as a node of a blockchain, and deploying a preset intelligent contract to the blockchain; one gateway device corresponds to a preset intelligent contract, and the plurality of internet of things devices are located in the same industrial device; uploading the data of the Internet of things equipment to the blockchain through the gateway equipment in a preset period; in the blockchain, when the data of the Internet of things equipment meets the condition of the preset intelligent contract, generating a target control instruction of the gateway equipment; and feeding back the target control instruction to the gateway equipment so that the gateway equipment forwards the target control instruction to the corresponding execution equipment.
In one example, the determining the gateway device of the plurality of nanotube internet of things devices as a node of the blockchain specifically includes: when the gateway equipment is in uplink, an asymmetric encrypted public-private key pair is generated through an elliptic curve digital signature algorithm; generating node registration request information aiming at the blockchain according to gateway equipment identification information and a public key; the gateway equipment identification information comprises a gateway equipment MAC address and an equipment model; transmitting the node registration request information to an existing gateway equipment node of a blockchain for consensus processing; judging whether the number of the existing gateway equipment nodes agreeing to register exceeds a preset number threshold value; if yes, registering the gateway equipment, and determining the gateway equipment as a node of the blockchain.
In one example, the uploading, by the gateway device, the data of the internet of things device to the blockchain specifically includes: the gateway equipment carries out hash calculation on the data of the Internet of things equipment to obtain a first hash value, and digital signature is carried out on the first hash value through the private key; carrying out hash calculation on the public key to obtain a second hash value, determining the second hash value as the identity information of the Internet of things equipment, and binding the second hash value with the Internet of things equipment data; the public key is used for verifying a first hash value of the digital signature; and uploading the first hash value of the digital signature and the identification information to the blockchain.
In an example, when the data of the internet of things device meets the condition of the preset smart contract, the generating the target control instruction of the gateway device specifically includes: generating a plurality of initial control instructions of the gateway equipment when the Internet of things equipment data meets the conditions of the preset intelligent contract; the preset intelligent contract comprises a control rule of each Internet of things device; monitoring the same part of industrial equipment and corresponding one control rule to the Internet of things equipment belonging to the same Internet of things equipment type; performing association analysis on each initial control instruction to generate an initial control instruction with an execution priority relation; and generating a target control instruction of the gateway equipment according to the initial control instruction without the priority relation and the initial control instruction with the highest execution priority in the priority relation.
In one example, when the data of the internet of things device meets the condition of the preset smart contract, generating a plurality of initial control instructions of the gateway device specifically includes: respectively inputting the equipment data of each Internet of things equipment into the corresponding control rule; if the equipment data of the corresponding Internet of things equipment accords with the corresponding control rule, outputting an initial control instruction of the corresponding control rule, and marking the corresponding Internet of things equipment as target Internet of things equipment; a plurality of initial control instructions for the gateway device are generated.
In one example, the performing the association analysis on each initial control instruction to generate an initial control instruction with a priority relationship specifically includes: taking all the Internet of things devices of the gateway device as nodes, and taking the association among all the Internet of things devices as edges to construct a knowledge graph of the gateway device; in the knowledge graph, searching each target internet of things device to obtain target internet of things devices with a dependency relationship; when the initial control instruction comprises a first initial control instruction, a second initial control instruction and a third control instruction, if the first initial control instruction is determined to be caused by the second control instruction according to the dependency relationship, determining that the first initial control instruction and the second initial control instruction have a priority relationship, and determining the execution priority of the first initial control instruction to be higher than the execution priority of the second initial control instruction.
In one example, after the feeding back the target control instruction to the gateway device, the method further includes: receiving newly-added Internet of things equipment data through the gateway equipment; when the newly-added Internet of things equipment data meets the requirement of immediately uploading a chain piece, immediately uploading the newly-added Internet of things equipment data to the blockchain; the immediate uplink chain piece is related to the severity of the failure of the internet of things device data presentation industrial device.
In one example, after the feeding back the target control instruction to the gateway device, the method further includes: synchronizing on-chain data from the blockchain within a preset time interval; acquiring local link data stored by the gateway equipment; comparing the local on-chain data with the on-chain data; and if the local link data are inconsistent, updating the local link data into the link data.
On the other hand, the embodiment of the application provides a gateway equipment control device for the internet of things, which comprises: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to: determining gateway equipment of a plurality of Internet of things equipment of a nano tube as a node of a blockchain, and deploying a preset intelligent contract to the blockchain; one gateway device corresponds to a preset intelligent contract, and the plurality of internet of things devices are located in the same industrial device; uploading the data of the Internet of things equipment to the blockchain through the gateway equipment in a preset period; in the blockchain, when the data of the Internet of things equipment meets the condition of the preset intelligent contract, generating a target control instruction of the gateway equipment; and feeding back the target control instruction to the gateway equipment so that the gateway equipment forwards the target control instruction to the corresponding execution equipment.
In another aspect, an embodiment of the present application provides a gateway device control non-volatile computer storage medium for the internet of things, storing computer executable instructions configured to: determining gateway equipment of a plurality of Internet of things equipment of a nano tube as a node of a blockchain, and deploying a preset intelligent contract to the blockchain; one gateway device corresponds to a preset intelligent contract, and the plurality of internet of things devices are located in the same industrial device; uploading the data of the Internet of things equipment to the blockchain through the gateway equipment in a preset period; in the blockchain, when the data of the Internet of things equipment meets the condition of the preset intelligent contract, generating a target control instruction of the gateway equipment; and feeding back the target control instruction to the gateway equipment so that the gateway equipment forwards the target control instruction to the corresponding execution equipment.
The above-mentioned at least one technical scheme that this application embodiment adopted can reach following beneficial effect:
the characteristics of decentralization, non-tampering and intelligent contracts of the blockchain are utilized, the gateway equipment can be determined to be the blockchain node, the data of the Internet of things equipment is uploaded to the blockchain through the gateway equipment, the data of the Internet of things equipment is stored on the blockchain, the safety of the data of the Internet of things equipment is greatly improved, the target control instruction of the gateway equipment is automatically generated through the intelligent contracts, and therefore automatic and remote control of the Internet of things equipment and related execution equipment can be realized, and the efficiency and the accuracy of the control of the gateway equipment are improved. In addition, the data and the control instructions of the Internet of things equipment are recorded on the blockchain, so that the transparency of the data and the operation is realized, and the auditing and the fault investigation of the gateway equipment control system are facilitated.
Drawings
In order to more clearly illustrate the technical solutions of the present application, some embodiments of the present application will be described in detail below with reference to the accompanying drawings, in which:
fig. 1 is a schematic flow chart of a gateway device control method for the internet of things according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of a gateway device control device for the internet of things according to an embodiment of the present application.
Detailed Description
For the purposes, technical solutions and advantages of the present application, the technical solutions of the present application will be clearly and completely described below with reference to specific embodiments and corresponding drawings. It will be apparent that the described embodiments are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
Some embodiments of the present application are described in detail below with reference to the accompanying drawings.
Fig. 1 is a schematic flow chart of a gateway device control method for the internet of things according to an embodiment of the present application. Some of the input parameters or intermediate results in the flow allow for manual intervention adjustments to help improve accuracy.
The implementation of the analysis method according to the embodiment of the present application may be a terminal device or a server, which is not particularly limited in this application. For ease of understanding and description, the following embodiments are described in detail with reference to a server.
It should be noted that the server may be a single device, or may be a system formed by a plurality of devices, that is, a distributed server, which is not specifically limited in this application.
The flow in fig. 1 includes the following steps:
s101: determining gateway equipment of a plurality of Internet of things equipment of a nano tube as a node of a blockchain, and deploying a preset intelligent contract to the blockchain; one gateway device corresponds to a preset intelligent contract, and the plurality of internet of things devices are located in the same industrial device.
In some embodiments of the present application, it is desirable to register the gateway device with data authentication so that it can act as a node of the blockchain.
Specifically, when the gateway equipment performs uplink, an asymmetric encrypted public-private key pair is generated through an elliptic curve digital signature algorithm. The elliptic curve digital signature algorithm may be an ECDSA algorithm, and the private key is stored in a secure hardware module (HSM) of the gateway device to prevent the private key from being acquired by an external attacker.
Then, node registration request information for the blockchain is generated from the gateway device identification information and the public key. The gateway equipment identification information comprises a gateway equipment MAC address and an equipment model.
And then, the node registration request information is sent to the existing gateway equipment node of the blockchain for consensus processing.
Then, it is determined whether the number of existing gateway device nodes agreeing to register exceeds a preset number threshold.
If yes, registering the gateway equipment, and determining the gateway equipment as a node of the blockchain. The node registration request information is packed into a new block.
If not, determining that the gateway equipment fails to register, and sending the registration failure information to the gateway equipment management user terminal equipment.
In addition, when the gateway device sends the data of the Internet of things device to the blockchain, the private key is utilized to sign the data of the Internet of things device, the data of the Internet of things device and the signature are sent to the blockchain together, and the node verifies the signature to ensure the integrity and the source of the data of the Internet of things device.
In some embodiments of the present application, the process of building a preset smart contract is as follows:
first, smart contracts are written using a resolution or other smart contract language to define conditions and rules for performing device operations. For example, when the temperature sensor reading exceeds a set threshold, the air conditioner is automatically turned on.
Then, the smart contract is compiled using Remix and a corresponding ABI (application binary interface) file is generated for deployment.
Then, after programming is completed, intelligent contracts are deployed to the blockchain, a Trufle framework or other deployment tool can be used, and each intelligent contract will have a unique address after deployment.
And finally, when the equipment data of the Internet of things meets the conditions defined by the intelligent contract, the corresponding gateway equipment node on the blockchain automatically calls the intelligent contract to generate a control instruction.
S102: and uploading the data of the Internet of things equipment to the blockchain through the gateway equipment in a preset period.
In some embodiments of the present application, when data of an internet of things device is uploaded to a blockchain, a hash algorithm is adopted, so that data security is improved. The internet of things equipment can collect environmental information such as temperature, humidity, illuminance and the like through the sensor.
Specifically, the gateway device performs hash calculation on the data of the internet of things device to obtain a first hash value, and performs digital signature on the first hash value through a private key.
It should be noted that, the gateway device may also perform preprocessing on the data of the internet of things device, such as data format conversion, data cleaning, and then perform hash calculation.
And then, carrying out hash calculation on the public key to obtain a second hash value, determining the second hash value as the identity information of the Internet of things equipment, and binding the second hash value with the Internet of things equipment data. Wherein the public key is used to verify the first hash value of the digital signature. Namely, a plurality of internet of things devices managed by the gateway device correspond to one piece of identity information.
The first hash value of the digital signature and the identification information are then uploaded to the blockchain.
The first hash value of the digital signature and the identification information are packaged into a transaction, and the transaction may include a timestamp, an internet of things device ID and other metadata besides the internet of things device data. Using the P2P network protocol, the transaction is broadcast into a blockchain network, where nodes verify the legitimacy of the transaction, such as the correctness of the signature.
After nodes in the blockchain network verify the validity of transaction data, the transaction is packed into a new block, the new block is added to the blockchain through a consensus mechanism, and the persistence of the data is ensured.
In addition, when historical device data needs to be retrieved, the gateway device may query the blockchain to quickly retrieve the required device data using a specific identifier (e.g., a timestamp or an internet of things device ID).
S103: and in the blockchain, when the data of the Internet of things equipment meets the condition of the preset intelligent contract, generating a target control instruction of the gateway equipment.
In some embodiments of the present application, due to the correlation between the operations of the components of the industrial equipment, the abnormality of the a component index may be caused by the B component index abnormality, or the abnormality of the a component a index is caused by the B component index abnormality of the a component, for example, the fan rotation speed is too high, resulting in the vibration of the bottom. Or the engine speed is too high, resulting in an excessive engine temperature. Based on the control instruction, under the condition that the abnormal data of the Internet of things equipment generate the control instruction, the industrial equipment does not need to execute all the control instructions, but executes the control instruction corresponding to the abnormal data of the equipment of one Internet of things equipment, so that the subsequent equipment data of the other Internet of things equipment can be recovered to be normal, the abnormal control efficiency of the industrial equipment is improved, and the workload of the gateway equipment is reduced.
Based on this, first, in a preset smart contract, a control rule of each of the internet of things devices is set, where a plurality of the internet of things devices may correspond to one control rule. Specifically, in order to monitor accuracy, since one component of an industrial device may place a plurality of internet of things devices of the same type, one control rule is corresponding to the internet of things device that monitors the same component of the industrial device and belongs to the same type of internet of things device.
And then, when the data of the Internet of things equipment meets the conditions of the preset intelligent contract, generating a plurality of initial control instructions of the gateway equipment.
Specifically, first, device data of each internet of things device is respectively input into a corresponding control rule. If the equipment data of the corresponding Internet of things equipment accords with the corresponding control rule, outputting an initial control instruction of the corresponding control rule, and marking the corresponding Internet of things equipment as target Internet of things equipment. Otherwise, if the device data of the corresponding internet of things device does not accord with the corresponding control rule, the initial control instruction of the corresponding control rule is not output.
So that a plurality of initial control instructions of the gateway device are generated after the initial control instructions corresponding to the control rules are output.
Then, each initial control instruction is subjected to association analysis, and initial control instructions with an execution priority relation are generated.
In some embodiments of the present application, the process of generating an initial control instruction with an execution priority relationship is as follows:
and taking all the Internet of things devices of the gateway device as nodes, and taking the association among all the Internet of things devices as edges to construct a knowledge graph of the gateway device.
And in the knowledge graph, searching each target Internet of things device to obtain the target Internet of things device with the dependency relationship. For example, the dependency may indicate that the abnormality of the a-part a index is caused by the b-index abnormality of the a-part, and that the control instruction corresponding to the abnormality of the a-part a index is caused by the b-index abnormality corresponding control instruction of the a-part.
When the initial control instruction comprises a first initial control instruction, a second initial control instruction and a third control instruction, if the first initial control instruction is determined to be caused by the second control instruction according to the dependency relationship, determining that the first initial control instruction has a priority relationship with the second initial control instruction, and determining that the execution priority of the first initial control instruction is higher than that of the second initial control instruction.
It should be noted that, a target internet of things device group with a dependency relationship may also be obtained. For example, d internet of things equipment has a dependency relationship with e internet of things equipment, and f internet of things equipment has a dependency relationship with g internet of things equipment.
And finally, generating a target control instruction of the gateway equipment according to the initial control instruction without the priority relation and the initial control instruction with the highest execution priority.
For example, the x control instruction does not have a priority relationship, the d internet of things equipment corresponds to the y control instruction, the e internet of things equipment corresponds to the z control instruction, the execution priority of the y control instruction is higher than that of the z control instruction, the f internet of things equipment corresponds to the w control instruction, the g internet of things equipment corresponds to the u control instruction, the execution priority of the w control instruction is higher than that of the u control instruction, and then the target control instruction is the x control instruction, the y control instruction and the w control instruction.
Wherein the target control instruction will also be recorded in the blockchain.
S104: and feeding back the target control instruction to the gateway equipment so that the gateway equipment forwards the target control instruction to the corresponding execution equipment.
In some embodiments of the present application, when serious anomalies occur in the data of the internet of things device, the gateway device immediately records the transaction and sends the transaction to the blockchain instead of uploading all the data of the internet of things device together in a waiting period.
Based on the data, the gateway equipment receives the newly-added Internet of things equipment data. When the newly-added Internet of things equipment data meets the requirement of immediately uploading the chain piece, immediately uploading the newly-added Internet of things equipment data to the blockchain. The immediate chain up piece is related to the severity of the failure of the internet of things device data presentation industrial device. When the data of the newly-added Internet of things equipment exceeds a preset serious threshold value of the type of the Internet of things equipment, the data of the newly-added Internet of things equipment is immediately uploaded to the blockchain.
In some embodiments of the present application, the running states of all connected internet of things devices are managed on a blockchain, so that consistency and instantaneity of data are ensured.
In addition, when the running state of the internet of things equipment changes, the gateway equipment records the change information as a transaction and sends the transaction to the blockchain.
In some embodiments of the present application, all gateway devices synchronize data from the blockchain periodically, ensuring that the local data is consistent with the data on the blockchain; when the data is inconsistent, the gateway device automatically updates the local data to ensure the synchronization with the data on the blockchain.
Based on this, first, on-chain data is synchronized from the blockchain within a preset time interval. And then, acquiring the local on-link data stored by the gateway equipment. The local on-chain data is then compared to the on-chain data.
If not, the local on-chain data is updated to on-chain data. If the data on the local chain are consistent, the data on the local chain are not updated any more.
It should be noted that, due to the distributed nature of the blockchain, the expansibility of the system is greatly improved, and the increase of the number of gateway equipment nodes can be easily dealt with.
It should be noted that, although the embodiment of the present application is described with reference to fig. 1 to sequentially describe steps S101 to S104, this does not represent that steps S101 to S S104 must be performed in strict order. The steps S101 to S104 are sequentially described according to the sequence shown in fig. 1 in the embodiment of the present application, so as to facilitate the understanding of the technical solution of the embodiment of the present application by those skilled in the art. In other words, in the embodiment of the present application, the sequence between the steps S101 to S104 may be appropriately adjusted according to the actual needs.
By the method of FIG. 1, the characteristics of decentralization, non-tampering and intelligent contracts of the blockchain are utilized, the gateway equipment can be determined to be a blockchain node, the data of the Internet of things equipment is uploaded to the blockchain through the gateway equipment, the data of the Internet of things equipment is stored on the blockchain, the safety of the data of the Internet of things equipment is greatly improved, and the target control instruction of the gateway equipment is automatically generated through the intelligent contracts, so that the automatic and remote control of the Internet of things equipment and related execution equipment can be realized, and the efficiency and the accuracy of the control of the gateway equipment are improved. In addition, the data and the control instructions of the Internet of things equipment are recorded on the blockchain, so that the transparency of the data and the operation is realized, and the auditing and the fault investigation of the gateway equipment control system are facilitated.
Based on the same thought, some embodiments of the present application further provide a device and a non-volatile computer storage medium corresponding to the above method.
Fig. 2 is a schematic structural diagram of a gateway device control device for the internet of things according to an embodiment of the present application, including:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
determining gateway equipment of a plurality of Internet of things equipment of a nano tube as a node of a blockchain, and deploying a preset intelligent contract to the blockchain; one gateway device corresponds to a preset intelligent contract, and the plurality of internet of things devices are located in the same industrial device;
uploading the data of the Internet of things equipment to the blockchain through the gateway equipment in a preset period;
in the blockchain, when the data of the Internet of things equipment meets the condition of the preset intelligent contract, generating a target control instruction of the gateway equipment;
and feeding back the target control instruction to the gateway equipment so that the gateway equipment forwards the target control instruction to the corresponding execution equipment.
Some embodiments of the present application provide a gateway device control non-volatile computer storage medium for the internet of things, storing computer executable instructions configured to:
determining gateway equipment of a plurality of Internet of things equipment of a nano tube as a node of a blockchain, and deploying a preset intelligent contract to the blockchain; one gateway device corresponds to a preset intelligent contract, and the plurality of internet of things devices are located in the same industrial device;
uploading the data of the Internet of things equipment to the blockchain through the gateway equipment in a preset period;
in the blockchain, when the data of the Internet of things equipment meets the condition of the preset intelligent contract, generating a target control instruction of the gateway equipment;
and feeding back the target control instruction to the gateway equipment so that the gateway equipment forwards the target control instruction to the corresponding execution equipment.
All embodiments in the application are described in a progressive manner, and identical and similar parts of all embodiments are mutually referred, so that each embodiment mainly describes differences from other embodiments. In particular, for the apparatus and medium embodiments, the description is relatively simple, as it is substantially similar to the method embodiments, with reference to the section of the method embodiments being relevant.
The devices and media provided in the embodiments of the present application are in one-to-one correspondence with the methods, so that the devices and media also have similar beneficial technical effects as the corresponding methods, and since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the devices and media are not described in detail herein.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and changes may be made to the present application by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the technical principles of the present application should fall within the protection scope of the present application.

Claims (10)

1. A gateway device control method for the internet of things, the method comprising:
determining gateway equipment of a plurality of Internet of things equipment of a nano tube as a node of a blockchain, and deploying a preset intelligent contract to the blockchain; one gateway device corresponds to a preset intelligent contract, and the plurality of internet of things devices are located in the same industrial device;
uploading the data of the Internet of things equipment to the blockchain through the gateway equipment in a preset period;
in the blockchain, when the data of the Internet of things equipment meets the condition of the preset intelligent contract, generating a target control instruction of the gateway equipment;
and feeding back the target control instruction to the gateway equipment so that the gateway equipment forwards the target control instruction to the corresponding execution equipment.
2. The method according to claim 1, wherein determining the gateway device of the plurality of nanotube internet of things devices as a node of a blockchain specifically comprises:
when the gateway equipment is in uplink, an asymmetric encrypted public-private key pair is generated through an elliptic curve digital signature algorithm;
generating node registration request information aiming at the blockchain according to gateway equipment identification information and a public key; the gateway equipment identification information comprises a gateway equipment MAC address and an equipment model;
transmitting the node registration request information to an existing gateway equipment node of a blockchain for consensus processing;
judging whether the number of the existing gateway equipment nodes agreeing to register exceeds a preset number threshold value;
if yes, registering the gateway equipment, and determining the gateway equipment as a node of the blockchain.
3. The method according to claim 2, wherein the uploading, by the gateway device, the data of the internet of things device to the blockchain specifically comprises:
the gateway equipment carries out hash calculation on the data of the Internet of things equipment to obtain a first hash value, and digital signature is carried out on the first hash value through the private key;
carrying out hash calculation on the public key to obtain a second hash value, determining the second hash value as the identity information of the Internet of things equipment, and binding the second hash value with the Internet of things equipment data; the public key is used for verifying a first hash value of the digital signature;
and uploading the first hash value of the digital signature and the identification information to the blockchain.
4. The method of claim 1, wherein the generating the target control instruction of the gateway device when the internet of things device data meets the condition of the preset smart contract specifically includes:
generating a plurality of initial control instructions of the gateway equipment when the Internet of things equipment data meets the conditions of the preset intelligent contract; the preset intelligent contract comprises a control rule of each Internet of things device; monitoring the same part of industrial equipment and corresponding one control rule to the Internet of things equipment belonging to the same Internet of things equipment type;
performing association analysis on each initial control instruction to generate an initial control instruction with an execution priority relation;
and generating a target control instruction of the gateway equipment according to the initial control instruction without the priority relation and the initial control instruction with the highest execution priority in the priority relation.
5. The method of claim 4, wherein generating the plurality of initial control instructions of the gateway device when the internet of things device data meets the condition of the preset smart contract specifically includes:
respectively inputting the equipment data of each Internet of things equipment into the corresponding control rule;
if the equipment data of the corresponding Internet of things equipment accords with the corresponding control rule, outputting an initial control instruction of the corresponding control rule, and marking the corresponding Internet of things equipment as target Internet of things equipment;
a plurality of initial control instructions for the gateway device are generated.
6. The method of claim 4, wherein the performing the association analysis on each initial control command generates an initial control command with a priority relationship, specifically comprises:
taking all the Internet of things devices of the gateway device as nodes, and taking the association among all the Internet of things devices as edges to construct a knowledge graph of the gateway device;
in the knowledge graph, searching each target internet of things device to obtain target internet of things devices with a dependency relationship;
when the initial control instruction comprises a first initial control instruction, a second initial control instruction and a third control instruction, if the first initial control instruction is determined to be caused by the second control instruction according to the dependency relationship, determining that the first initial control instruction and the second initial control instruction have a priority relationship, and determining the execution priority of the first initial control instruction to be higher than the execution priority of the second initial control instruction.
7. The method of claim 1, wherein after the feeding back the target control instruction to the gateway device, the method further comprises:
receiving newly-added Internet of things equipment data through the gateway equipment;
when the newly-added Internet of things equipment data meets the requirement of immediately uploading a chain piece, immediately uploading the newly-added Internet of things equipment data to the blockchain; the immediate uplink chain piece is related to the severity of the failure of the internet of things device data presentation industrial device.
8. The method of claim 1, wherein after the feeding back the target control instruction to the gateway device, the method further comprises:
synchronizing on-chain data from the blockchain within a preset time interval;
acquiring local link data stored by the gateway equipment;
comparing the local on-chain data with the on-chain data;
and if the local link data are inconsistent, updating the local link data into the link data.
9. Gateway equipment control equipment to thing networking, characterized by, include:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
determining gateway equipment of a plurality of Internet of things equipment of a nano tube as a node of a blockchain, and deploying a preset intelligent contract to the blockchain; one gateway device corresponds to a preset intelligent contract, and the plurality of internet of things devices are located in the same industrial device;
uploading the data of the Internet of things equipment to the blockchain through the gateway equipment in a preset period;
in the blockchain, when the data of the Internet of things equipment meets the condition of the preset intelligent contract, generating a target control instruction of the gateway equipment;
and feeding back the target control instruction to the gateway equipment so that the gateway equipment forwards the target control instruction to the corresponding execution equipment.
10. A gateway device control non-volatile computer storage medium for the internet of things, storing computer executable instructions, wherein the computer executable instructions are configured to:
determining gateway equipment of a plurality of Internet of things equipment of a nano tube as a node of a blockchain, and deploying a preset intelligent contract to the blockchain; one gateway device corresponds to a preset intelligent contract, and the plurality of internet of things devices are located in the same industrial device;
uploading the data of the Internet of things equipment to the blockchain through the gateway equipment in a preset period;
in the blockchain, when the data of the Internet of things equipment meets the condition of the preset intelligent contract, generating a target control instruction of the gateway equipment;
and feeding back the target control instruction to the gateway equipment so that the gateway equipment forwards the target control instruction to the corresponding execution equipment.
CN202311433086.2A 2023-10-31 2023-10-31 Gateway equipment control method, equipment and medium for Internet of things Pending CN117335959A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311433086.2A CN117335959A (en) 2023-10-31 2023-10-31 Gateway equipment control method, equipment and medium for Internet of things

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311433086.2A CN117335959A (en) 2023-10-31 2023-10-31 Gateway equipment control method, equipment and medium for Internet of things

Publications (1)

Publication Number Publication Date
CN117335959A true CN117335959A (en) 2024-01-02

Family

ID=89293165

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311433086.2A Pending CN117335959A (en) 2023-10-31 2023-10-31 Gateway equipment control method, equipment and medium for Internet of things

Country Status (1)

Country Link
CN (1) CN117335959A (en)

Similar Documents

Publication Publication Date Title
CN110825420A (en) Configuration parameter updating method, device, equipment and storage medium for distributed cluster
CN112000741B (en) Internal and external network data exchange system, method, device, computer equipment and medium
CN110597918B (en) Account management method, account management device and computer readable storage medium
CN111737104B (en) Block chain network service platform, test case sharing method thereof and storage medium
US11379469B2 (en) Time stamping of data in an offline node
CN110222535B (en) Processing device, method and storage medium for block chain configuration file
CN108228197B (en) Method and device for installing software in cluster
CN111899019A (en) Method and system for cross validation and sharing of blacklist and multiple parties
CN110445765B (en) Data sharing method based on block chain, terminal device and medium
CN111222089A (en) Data processing method, data processing device, computer equipment and storage medium
EP3751822B1 (en) Device update transmission using a bloom filter
CN112446046A (en) Data management method and device based on intelligent contract
CN109542920B (en) Data transmission method, device, medium and electronic equipment
CN107408184A (en) Patch monitors and analysis
CN116088913B (en) Integrated device, method and computer program product for whole vehicle upgrade software
CN117335959A (en) Gateway equipment control method, equipment and medium for Internet of things
CN114760077B (en) Abnormal data detection method and device based on block chain, storage medium and gateway
CN113157472A (en) Service information processing method, device, equipment and computer storage medium
CN117081976B (en) Method and device for configuring gateway route
CN114301709B (en) Message processing method and device, storage medium and computing equipment
CN112436967B (en) Safety processing method and device after industrial internet equipment abnormity
CN117493272A (en) Method and device for synchronizing resources among clusters, computer equipment and storage medium
WO2024004286A1 (en) Systems and methods for blockchain-based industrial automation
CN118509308A (en) Fault positioning method for distributed network, network equipment and storage medium
CN114625084A (en) Control system-based node information acquisition method and device

Legal Events

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