WO2020098382A1 - Implementation method for smart device system, smart device control method and system - Google Patents

Implementation method for smart device system, smart device control method and system Download PDF

Info

Publication number
WO2020098382A1
WO2020098382A1 PCT/CN2019/106753 CN2019106753W WO2020098382A1 WO 2020098382 A1 WO2020098382 A1 WO 2020098382A1 CN 2019106753 W CN2019106753 W CN 2019106753W WO 2020098382 A1 WO2020098382 A1 WO 2020098382A1
Authority
WO
WIPO (PCT)
Prior art keywords
smart
user
smart device
contract
private chain
Prior art date
Application number
PCT/CN2019/106753
Other languages
French (fr)
Chinese (zh)
Inventor
姚雷
姚平
李蕊
Original Assignee
苏宁云计算有限公司
苏宁易购集团股份有限公司
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 苏宁云计算有限公司, 苏宁易购集团股份有限公司 filed Critical 苏宁云计算有限公司
Priority to CA3160728A priority Critical patent/CA3160728A1/en
Publication of WO2020098382A1 publication Critical patent/WO2020098382A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0876Network architectures or network communication protocols for network security for authentication of entities based on the identity of the terminal or configuration, e.g. MAC address, hardware or software configuration or device fingerprint
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0407Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the identity of one or more communicating identities is hidden
    • 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/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/3234Cryptographic 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 additional secure or trusted devices, e.g. TPM, smartcard, USB or software token
    • 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
    • H04L9/3239Cryptographic 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 involving non-keyed hash functions, e.g. modification detection codes [MDCs], MD5, SHA or RIPEMD
    • 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

Definitions

  • the present invention relates to the field of blockchain technology, and in particular, to an intelligent device system implementation method, intelligent device control method, and system.
  • Smart device refers to any kind of device, apparatus or machine with computing power.
  • smart devices With the development of science, more and more smart devices appear in people's daily life, such as smart door locks, smart speakers, smart air conditioners , Smart TV, smart routing, etc., these smart devices are connected to the network through the WiFi of the home router, and then controlled by the application of the smartphone.
  • the inventor found that many data of the existing smart devices are stored in the cloud of the manufacturer, and then controlled by the mobile phone, which is easy to cause leakage of personal information, and criminals also You can use vulnerabilities to tamper with data to achieve the purpose of controlling smart devices.
  • the purpose of the present invention is to provide a method for implementing a smart device system, a smart device control method and a system, storing user sensitive data in a smart device on a private chain through a smart contract, which can avoid the leakage of user sensitive data and fully guarantee the user The privacy and security of sensitive data.
  • a method for implementing a smart device system including:
  • Each of the smart devices obtains a smart contract with multiple functions issued by the user, and deploys the smart contract on the private chain network after confirmation by the user;
  • the smart device When the smart device receives the device initialization request of the user, the smart device obtains the user sensitive data in the device initialization request;
  • the method further includes:
  • the smart device When the smart device receives the user's device use request, the smart device obtains user input data in the device use request, and generates corresponding information to be queried for the user input data;
  • the smart device determines whether to allow the operation to be used according to the query result of the smart contract.
  • the user-sensitive data is initial fingerprint data input by the user, and the corresponding first initial information is generated for the user-sensitive data, and the additional function of the smart contract is invoked to transfer the first
  • An initial message is written into the private chain, including:
  • the user input data is fingerprint data of the user
  • the corresponding query information is generated for the user input data
  • the query function of the smart contract is invoked to store the query information in the private Query in the chain, including:
  • the smart device converts the fingerprint data into a hash value, and generates a composite key according to the hash value and the device ID of the smart device;
  • the query result is used to indicate whether the smart device is allowed to be used for operation.
  • the method further includes:
  • the client When the client receives the device initialization request of the user for the smart device, the client obtains the initial password set by the user, and generates a corresponding 2. Initial information;
  • Each smart device upgrades the smart contract according to the user's confirmation operation.
  • the method further includes:
  • the smart device When the smart device receives the user's device use request, the smart device obtains the user's input password;
  • the preset algorithm is a hash algorithm.
  • the method further includes:
  • the smart device When the smart device receives the user's request to modify the user's sensitive data, it calls the modification function of the smart contract to modify the user's sensitive data;
  • the smart device When the smart device receives the user's request to delete the user's sensitive data, it calls the delete function of the smart contract to delete the user's sensitive data.
  • a method for controlling a smart device is provided.
  • the method is applied to a smart device in a private chain network.
  • the private chain network is composed of the smart device and other smart devices, and the private chain network is deployed.
  • the method includes:
  • the smart device When the smart device receives the user's device use request, the smart device obtains the user input data in the device use request;
  • a method for controlling a smart device is provided.
  • the method is applied to a smart device in a private chain network.
  • the private chain network is composed of the smart device and other smart devices, and the private chain network is deployed with
  • the method includes:
  • the smart device When the smart device receives the user's device use request, the smart device obtains the user's input password;
  • the smart contract uses the preset algorithm to generate corresponding information on the input password, and compares and verifies the information with the initial information corresponding to the device ID of the smart device, Wherein, the initial information is generated based on the initial password set by the user;
  • an intelligent device system in a fourth aspect, includes a client and multiple smart devices connected to a local area network, and the multiple smart devices form a private chain network;
  • Each of the smart devices includes:
  • a contract acquisition module which is used to separately acquire smart contracts with multiple functions issued by the user through the client with other smart devices in the private chain network;
  • a contract deployment module for deploying the smart contract to the private chain network after confirmation by the user
  • a data acquisition module configured to acquire user sensitive data in the device initialization request when receiving the device initialization request of the user
  • a first generating module configured to generate corresponding first initial information for the user sensitive data
  • a contract invoking module for invoking the added function of the smart contract to write the first initial information into the private chain.
  • the data acquisition module is further configured to acquire user input data in the device use request when receiving the user device use request;
  • the first generating module is also used to generate corresponding information to be queried by the user input data
  • the contract calling module is also used to call the query function of the smart contract to query the information to be queried in the private chain;
  • Each of the smart devices further includes:
  • the operation control module is used to determine whether the smart device is allowed to be operated according to the query result of the smart contract.
  • the user sensitive data is initial fingerprint data input by the user
  • the first generation module is specifically configured to:
  • the contract calling module is specifically used for:
  • the user input data is fingerprint data of the user
  • the first generation module is specifically further used to:
  • the contract calling module is also specifically used for:
  • the query result is used to indicate whether the smart device is allowed to be used for operation.
  • system further includes a client, and the client includes:
  • a password obtaining module configured to obtain the initial password set by the user by the client when receiving the device initialization request of the user for the smart device;
  • a second generation module configured to generate corresponding second initial information for the initial password using a preset algorithm
  • An information writing module configured to write the device ID of the smart device, the second initial information corresponding to the preset algorithm into the verification function of the smart contract, so as to update the smart contract;
  • Each of the smart devices further includes:
  • a contract upgrade module is used to upgrade the smart contract according to the confirmation operation of the user.
  • the data acquisition module is also specifically used to:
  • the contract calling module is also specifically used for:
  • the preset algorithm is a hash algorithm.
  • contract calling module is also specifically used for:
  • the delete function of the smart contract is called to delete the sensitive data of the user.
  • the user sensitive data is stored in the private chain of the local area network, the leakage of the user sensitive data is avoided, which makes it difficult for criminals to obtain the user sensitive data, and the user sensitive data can only be operated and read by the user, thereby avoiding
  • FIG. 1 is a flowchart of a method for implementing an intelligent device system provided by the present invention
  • FIG. 2 is a flowchart of an implementation method of a smart device system provided by the present invention.
  • FIG. 3 is a flowchart of a method for implementing an intelligent device system provided by the present invention.
  • FIG. 4 is a flowchart of an implementation method of a smart device system provided by the present invention.
  • FIG. 5 is a schematic structural diagram of a smart device system provided by the present invention.
  • FIG. 6 is a schematic flowchart of the smart door lock password opening process provided by the present invention.
  • FIG. 7 is a system block diagram of an intelligent device system provided by the present invention.
  • the blockchain is a new application model that integrates computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm. According to the degree of centralization of the blockchain network, three different application scenarios of blockchains are differentiated:
  • the whole network is open, and the blockchain without user authorization mechanism is called public chain;
  • All the nodes in the network are in the hands of an institution, called a private chain.
  • FIG. 1 is a flowchart of a method for implementing an intelligent device system provided by the present invention. As shown in FIG. 1, the method may include the following steps:
  • a private chain network is formed for multiple smart devices connected to the local area network.
  • multiple smart devices include but are not limited to smart door locks, smart speakers, smart air conditioners, smart TVs, smart routers, etc.
  • Smart devices can use sensors to collect user fingerprint data, environmental data, and other information.
  • the sensors can be integrated on the smart device, or can be connected to the smart device through wired or wireless means.
  • Each smart device obtains a smart contract with multiple functions issued by the user, and deploys the smart contract to the private chain network after the user confirms it.
  • the smart contract has multiple functions, including: add function, delete function, query function, modify function and verification function;
  • the process may include:
  • Each smart device obtains a smart contract issued by the user in one of the following ways:
  • Smart devices with contract issuance function among multiple smart devices
  • the client may specifically be a terminal device such as a mobile terminal or a personal PC.
  • the smart contract is deployed on the private chain network.
  • the smart device When the smart device receives the user's device initialization request, the smart device obtains the user sensitive data in the device initialization request.
  • the user sensitive data may be user characteristic information such as user fingerprint data, iris data, or other sensitive data.
  • the user after deploying multiple smart devices to form a private chain network, the user needs to initialize the smart devices so that the smart devices can be used later.
  • the fingerprint input method can be used for initialization. Taking the smart door lock as an example, the user can input his fingerprint data into the smart door lock through the sensor to initialize the smart door lock.
  • the smart device converts the initial fingerprint data into an initial hash value, and generates an initial composite key based on the initial hash value and the device ID of the smart device; a value value is generated according to the startup method of the smart device and the entry time of the initial fingerprint data; Write the initial composite key and value to the private chain through the added function of the smart contract.
  • the smart device can use the hash algorithm to hash the initial fingerprint data to generate an initial hash value, where the hash algorithm can be any safe and reliable hash algorithm, such as SHA256, State Secret SM3 or State Secret SM4, etc. .
  • the initial information generated by the user's sensitive data is written into the private chain through a smart contract, and the content of the smart contract cannot be modified when a single smart device is broken, only all smart devices in the private chain network can be deployed New smart contracts can bypass the previously deployed smart contracts, which makes it difficult for criminals to obtain user sensitive data, and user sensitive data can only be operated and read by users, thereby making user sensitive data more secure; at the same time, due to the composition Multiple smart devices in the private chain network are connected to the local area network, making it impossible for criminals to conduct malicious attacks through the public network; in addition, compared with the existing technology, when user sensitive data is stored in the cloud, users must connect through the public network The server performs identity verification. Since the user sensitive data is stored in the private chain of the local area network in the embodiment of the present invention, the user can directly access the local area network for identity verification, and the identity verification is more efficient.
  • the method provided by the embodiment of the present invention may further include:
  • the smart contract's modification function is called to modify the user's sensitive data;
  • the smart contract's deletion function is called Delete sensitive user data.
  • the modification function or the deletion function of the smart contract facilitates the modification or deletion of the user's sensitive data.
  • the method provided by the embodiment of the present invention may further include:
  • the smart device records the operation of the user's sensitive data on the private chain for the user to trace and view.
  • the operation of the user's sensitive data is recorded on the private chain, which can prevent the user's sensitive data from being illegally queried and tampered, and thus can fully guarantee the privacy and security of the user's sensitive data.
  • the method for implementing a smart device system includes steps 201 to 204 in addition to the steps described in FIG. 1, For simplicity of description, the steps described in FIG. 1 are omitted.
  • the implementation method of the smart device system further includes:
  • the smart device When the smart device receives the user's device use request, the smart device obtains the user input data in the device use request.
  • the user can perform corresponding operations on the smart device.
  • the smart door lock can be opened by means of fingerprint input, that is, the fingerprint data is input into the smart door lock through the sensor.
  • the user input data is fingerprint data of the user.
  • the smart device converts the fingerprint data into a hash value, and generates a composite key according to the hash value and the device ID of the smart device as the information to be queried.
  • the smart device may use a hash algorithm to hash the user input data to generate a hash value, where the hash algorithm may be any safe and reliable hash algorithm, such as SHA256, State Secret SM3, or State Secret SM4.
  • the hash algorithm may be any safe and reliable hash algorithm, such as SHA256, State Secret SM3, or State Secret SM4.
  • the query function of the smart contract is called to query whether there is a value corresponding to the composite key in the private chain, and receive the query result returned by the smart contract; where the query result is used to indicate whether the smart device is allowed to be used for operation.
  • the smart device determines whether the operation to be used is allowed according to the query result of the smart contract.
  • the smart device when the query result indicates that the query is successful, the smart device is allowed to be used for operation, and when the query result indicates that the query fails, the smart device is not allowed to be used for operation.
  • the user's input data is obtained and the corresponding information to be queried is generated, and the corresponding query is performed by invoking the query function of the smart contract, so that the smart device determines whether to query the smart contract
  • the operation is allowed to be used, thereby preventing the smart device from being controlled by the criminals.
  • the method for implementing a smart device system includes steps 301 to 304 in addition to the steps described in FIG. 1, For simplicity of description, the steps described in FIG. 1 are omitted.
  • the implementation method of the smart device system further includes:
  • the client obtains the initial password set by the user.
  • the user after deploying multiple smart devices to form a private chain network, the user needs to initialize the smart devices so that the smart devices can be used later.
  • the password input mode can also be used to initialize the smart device.
  • the user can use the mobile phone client to set the door unlock password of the smart door lock to initialize the smart door lock.
  • the preset algorithm is a hash algorithm.
  • the client may use a hash algorithm to hash the initial password to generate an initial hash value
  • the hash algorithm may be any safe and reliable hash algorithm, such as SHA256, State Secret SM3, or State Secret SM4.
  • Each smart device upgrades the smart contract according to the user's confirmation operation.
  • the smart contract is upgraded.
  • the second initial information generated by the initial password set by the user is written into the private chain through a smart contract, when the user needs to change the initial password, it can be achieved by upgrading the contract.
  • the method for implementing a smart device system includes steps 401 to 403 in addition to the steps described in FIG. 3, For simplicity of description, the steps described in FIG. 3 are omitted.
  • the implementation method of the smart device system further includes:
  • the smart device When the smart device receives the user's device use request, the smart device obtains the user's input password.
  • the user can perform corresponding operations on the smart device.
  • the smart door lock can be opened by using a password input method, that is, the password is input into the smart door lock through the mobile client.
  • the smart device invokes the verification function of the smart contract, performs a hash operation on the input password through the smart contract, and compares the hash operation result with the hash operation result of the initial password written in the smart contract to generate a verification result; wherein ,
  • the verification result is used to indicate whether the smart device is allowed to be used for operation.
  • the verification result is used to indicate whether the smart device is allowed to be used for operation.
  • the smart device when the verification result indicates that the verification is passed, the smart device is allowed to be used for operation, and when the verification result indicates that the verification is not passed, the smart device is not allowed to be used for operation.
  • the user's input password is obtained, and the corresponding verification is performed by calling the verification function of the smart contract, so that the smart device determines whether the operation is permitted according to the verification result returned by the smart contract. This can prevent smart devices from being controlled by criminals.
  • An embodiment of the present invention provides a method for controlling a smart device.
  • the method is applied to a smart device in a private chain network.
  • the private chain network is composed of smart devices and other smart devices, and a smart contract issued by a user is deployed in the private chain network.
  • Methods include:
  • the smart device When the smart device receives the user's device use request, the smart device obtains the user input data in the device use request.
  • this step is the same as step 201, and will not be repeated here.
  • this step is the same as step 202, and will not be repeated here.
  • this step is the same as step 203 and will not be repeated here.
  • 504 Determine whether the operation to be used is allowed according to the query result of the smart contract.
  • this step is the same as step 204, and will not be repeated here.
  • the user's input data is obtained and corresponding information to be queried is generated, and the corresponding query is performed by calling a smart contract, so that the smart device determines whether it is allowed to be used according to the query result returned by the smart contract
  • the operation can thereby prevent the smart device from being controlled by criminals.
  • An embodiment of the present invention provides a method for controlling a smart device.
  • the method is applied to a smart device in a private chain network.
  • the private chain network is composed of smart devices and other smart devices, and a smart contract issued by a user is deployed in the private chain network.
  • the method includes:
  • the smart device When the smart device receives the user's device use request, the smart device obtains the user's input password;
  • this step is the same as step 401, and will not be repeated here.
  • the smart contract uses a preset algorithm to generate the corresponding information for the input password, and compares the information with the initial information corresponding to the device ID of the smart device, where the initial information is based on the user setting Generated by the initial password;
  • this step is the same as step 402, and will not be repeated here.
  • this step is the same as step 403 and will not be repeated here.
  • the user's input password is obtained, and the corresponding verification is performed by calling the smart contract, so that the smart device determines whether the operation is permitted according to the verification result returned by the smart contract, thereby avoiding Smart devices are controlled by criminals.
  • FIG. 6 is a schematic flowchart of the smart door lock password opening process provided by the present invention. The user enters the password and the smart door lock calls the verification function of the smart contract to perform the corresponding verification. When the verification is successful, the smart door lock allows the door opening operation.
  • FIG. 7 is a system block diagram of a smart device system provided by the present invention.
  • the system may include a client and multiple smart devices connected to a local area network.
  • the multiple smart devices form a private chain network, as shown in FIG. 7, for ease of description.
  • the following describes the blockchain-based smart device system with only the client 710 and the smart device 710 located in the private chain network, where the smart device 720 is configured as any one of multiple smart devices:
  • Client 710 includes:
  • the contract issuing module 711 is used to publish smart contracts with multiple functions to each smart device of the private chain network;
  • the smart device 720 includes:
  • the contract acquisition module 721 is used to separately acquire smart contracts issued by users with other smart devices in the private chain network;
  • the contract deployment module 722 is used to deploy the smart contract to the private chain network after confirmation by the user;
  • the data obtaining module 723 is used to obtain user sensitive data in the device initialization request when the user's device initialization request is received;
  • the first generating module 724 is configured to generate corresponding first initial information for user sensitive data
  • the contract calling module 725 is used to call the added function of the smart contract to write the first initial information into the private chain.
  • the data obtaining module 723 is also used to obtain user input data in the device use request when the user's device use request is received;
  • the first generating module 724 is also used for user input data to generate corresponding information to be queried;
  • the contract calling module 725 is also used to call the query function of the smart contract to query the information to be queried in the private chain;
  • the smart device 720 also includes:
  • the operation control module 726 is used to determine whether the smart device is allowed to be operated according to the query result of the smart contract.
  • the user sensitive data is the initial fingerprint data input by the user
  • the first generation module 724 is specifically used to:
  • the value value is generated according to the startup mode of the smart device and the entry time of the initial fingerprint data
  • the contract calling module is specifically used for:
  • the user input data is the user's fingerprint data
  • the first generation module 724 is specifically used to:
  • the contract calling module 725 is also specifically used for:
  • the query result is used to indicate whether the smart device is allowed to be used for operation.
  • client 710 further includes:
  • the password obtaining module 712 is configured to obtain an initial password set by the user by the client when receiving a device initialization request from the user for the smart device;
  • the second generation module 713 is used to generate corresponding second initial information for the initial password using a preset algorithm
  • the information writing module 714 is used to write the device ID and the second initial information of the smart device into the verification function of the smart contract corresponding to the preset algorithm to update the smart contract;
  • Smart devices also include:
  • the contract upgrade module 727 is used to upgrade the smart contract according to the user's confirmation operation.
  • the data acquisition module 723 is also specifically used to:
  • the contract calling module 725 is also specifically used for:
  • the preset algorithm is a hash algorithm.
  • contract calling module 725 is also specifically used for:
  • the delete function of the smart contract is called to delete the user's sensitive data.
  • a person of ordinary skill in the art may understand that all or part of the steps for implementing the above embodiments may be completed by hardware, or may be completed by a program instructing associated hardware.
  • the program may be stored in a computer-readable storage medium
  • the storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk.

Abstract

The present invention belongs to the technical field of block chain technology, and disclosed thereby are an an implementation method for a smart device system, a smart device control method and system. The method comprises: forming a private chain network for a plurality of smart devices connected to a local area network; each smart device respectively obtaining a smart contract having a plurality of functions which is issued by a user, and deploying the smart contract to the private chain network after being authenticated by users; when a smart device receives an initialization request of a user, the smart device obtaining user sensitive data in the device initialization request and generating corresponding first initial information for the user sensitive data; and calling an adding function of the smart contract to write the first initial information into the private chain. According to the embodiments of the present invention, the user sensitive data acquired by the smart device is stored on the private chain by means of the smart contract, which can avoid the leakage of user sensitive data and fully guarantee the privacy and security of the user sensitive data.

Description

一种智能设备系统的实现方法、智能设备控制方法及系统Method for realizing intelligent equipment system, intelligent equipment control method and system 技术领域Technical field
本发明涉及区块链技术领域,特别涉及一种智能设备系统的实现方法、智能设备控制方法及系统。The present invention relates to the field of blockchain technology, and in particular, to an intelligent device system implementation method, intelligent device control method, and system.
背景技术Background technique
智能设备是指任何一种具有计算处理能力的设备、器械或者机器,随着科学的日益发展,越来越多的智能设备出现在人们的日常生活中,例如智能门锁、智能音箱、智能空调、智能电视、智能路由等,这些智能设备通过家庭路由器的WiFi接入到网络中,然后由智能手机的应用程序来控制。Smart device refers to any kind of device, apparatus or machine with computing power. With the development of science, more and more smart devices appear in people's daily life, such as smart door locks, smart speakers, smart air conditioners , Smart TV, smart routing, etc., these smart devices are connected to the network through the WiFi of the home router, and then controlled by the application of the smartphone.
在实现本发明的过程中,发明人发现:现有的智能设备很多的数据都是放到生产厂商的云端进行存储,再通过手机端进行控制,这样容易造成个人信息的泄露,同时不法分子也可以利用漏洞篡改数据,达到控制智能设备的目的。In the process of implementing the present invention, the inventor found that many data of the existing smart devices are stored in the cloud of the manufacturer, and then controlled by the mobile phone, which is easy to cause leakage of personal information, and criminals also You can use vulnerabilities to tamper with data to achieve the purpose of controlling smart devices.
发明内容Summary of the invention
本发明目的在于提供一种智能设备系统的实现方法、智能设备控制方法及系统,将智能设备中的用户敏感数据通过智能合约存储在私有链上,能够避免用户敏感数据的泄露,充分保证了用户敏感数据的隐私性和安全性。The purpose of the present invention is to provide a method for implementing a smart device system, a smart device control method and a system, storing user sensitive data in a smart device on a private chain through a smart contract, which can avoid the leakage of user sensitive data and fully guarantee the user The privacy and security of sensitive data.
本发明实施例提供的具体技术方案如下:The specific technical solutions provided by the embodiments of the present invention are as follows:
第一方面,提供了一种智能设备系统的实现方法,包括:In the first aspect, a method for implementing a smart device system is provided, including:
对接入局域网的多个智能设备构成私有链网络;Form a private chain network for multiple smart devices connected to the LAN;
各个所述智能设备分别获取用户发布的具有多种功能的智能合约,并经所述用户确认后将所述智能合约部署到所述私有链网络上;Each of the smart devices obtains a smart contract with multiple functions issued by the user, and deploys the smart contract on the private chain network after confirmation by the user;
当所述智能设备接收到所述用户的设备初始化请求时,由所述智能设备获取所述设备初始化请求中的用户敏感数据;When the smart device receives the device initialization request of the user, the smart device obtains the user sensitive data in the device initialization request;
对所述用户敏感数据生成相应的第一初始信息,并调用所述智能合约的增加功能将 所述第一初始信息写入私有链中。Generate corresponding first initial information for the user sensitive data, and call the added function of the smart contract to write the first initial information into the private chain.
进一步地,所述调用所述智能合约的增加功能将所述信息写入私有链步骤之后,所述方法还包括:Further, after the step of calling the added function of the smart contract to write the information into the private chain, the method further includes:
当所述智能设备接收到所述用户的设备使用请求时,由所述智能设备获取所述设备使用请求中的用户输入数据,并对所述用户输入数据生成相应的待查询信息;以及When the smart device receives the user's device use request, the smart device obtains user input data in the device use request, and generates corresponding information to be queried for the user input data; and
调用所述智能合约的查询功能对所述待查询信息在所述私有链中进行查询;Calling the query function of the smart contract to query the information to be queried in the private chain;
所述智能设备根据所述智能合约的查询结果确定是否允许被使用操作。The smart device determines whether to allow the operation to be used according to the query result of the smart contract.
进一步地,所述用户敏感数据为所述用户输入的初始指纹数据,所述,所述对所述用户敏感数据生成相应的第一初始信息,并调用所述智能合约的增加功能将所述第一初始信息写入私有链中,包括:Further, the user-sensitive data is initial fingerprint data input by the user, and the corresponding first initial information is generated for the user-sensitive data, and the additional function of the smart contract is invoked to transfer the first An initial message is written into the private chain, including:
由所述智能设备将所述初始指纹数据转化为初始hash值,并根据所述初始hash值和所述智能设备的设备ID生成初始复合key;Converting the initial fingerprint data into an initial hash value by the smart device, and generating an initial composite key according to the initial hash value and the device ID of the smart device;
根据所述智能设备的启动方式和所述初始指纹数据的录入时间生成value值;Generating a value according to the startup mode of the smart device and the entry time of the initial fingerprint data;
将所述初始复合key、所述value值通过所述智能合约的增加功能对应地写入所述私有链中。Write the initial composite key and the value correspondingly to the private chain through the added function of the smart contract.
进一步地,所述用户输入数据为所述用户的指纹数据,所述对所述用户输入数据生成相应的待查询信息,并调用所述智能合约的查询功能对所述待查询信息在所述私有链中进行查询,包括:Further, the user input data is fingerprint data of the user, the corresponding query information is generated for the user input data, and the query function of the smart contract is invoked to store the query information in the private Query in the chain, including:
由所述智能设备将所述指纹数据转化为hash值,并根据所述hash值和所述智能设备的设备ID生成复合key;The smart device converts the fingerprint data into a hash value, and generates a composite key according to the hash value and the device ID of the smart device;
调用所述智能合约的查询功能以查询所述私有链中是否存在与所述复合key对应的value值,并接收所述智能合约返回的查询结果;Calling the query function of the smart contract to query whether the value corresponding to the composite key exists in the private chain, and receive the query result returned by the smart contract;
其中,所述查询结果用于指示所述智能设备是否允许被使用操作。Wherein, the query result is used to indicate whether the smart device is allowed to be used for operation.
进一步地,所述方法还包括:Further, the method further includes:
当所述客户端接收到所述用户对所述智能设备的设备初始化请求时,由所述客户端获取所述用户设定的初始密码,并使用预设算法对所述初始密码生成相应的第二初始信息;以及When the client receives the device initialization request of the user for the smart device, the client obtains the initial password set by the user, and generates a corresponding 2. Initial information; and
将所述智能设备的设备ID、所述第二初始信息与所述预设算法对应地写入所述智能 合约的验证功能中,以对所述智能合约进行更新;Write the device ID of the smart device and the second initial information into the verification function of the smart contract corresponding to the preset algorithm to update the smart contract;
由各个所述智能设备根据所述用户的确认操作对所述智能合约进行升级。Each smart device upgrades the smart contract according to the user's confirmation operation.
进一步地,所述由各个所述智能设备根据所述用户的确认操作对所述智能合约进行升级步骤之后,所述方法还包括:Further, after the step of upgrading the smart contract by each of the smart devices according to the confirmation operation of the user, the method further includes:
当所述智能设备接收到所述用户的设备使用请求时,由所述智能设备获取所述用户的输入密码;When the smart device receives the user's device use request, the smart device obtains the user's input password;
调用所述智能合约的验证功能使用所述预设算法对所述输入密码生成相应的信息,并将所述信息与所述智能设备的设备ID对应的所述第二初始信息进行比对验证;Calling the verification function of the smart contract to generate corresponding information on the input password using the preset algorithm, and comparing and verifying the information with the second initial information corresponding to the device ID of the smart device;
接收所述智能合约返回的验证结果,并根据所述验证结果确定是否允许被使用操作。Receiving the verification result returned by the smart contract, and determining whether the operation is allowed to be used according to the verification result.
进一步地,所述预设算法为hash算法。Further, the preset algorithm is a hash algorithm.
进一步地,所述方法还包括:Further, the method further includes:
当所述智能设备接收到所述用户对所述用户敏感数据的修改请求时,调用所述智能合约的修改功能对所述用户敏感数据进行修改;When the smart device receives the user's request to modify the user's sensitive data, it calls the modification function of the smart contract to modify the user's sensitive data;
当所述智能设备接收到所述用户对所述用户敏感数据的删除请求时,调用所述智能合约的删除功能对所述用户敏感数据进行删除。When the smart device receives the user's request to delete the user's sensitive data, it calls the delete function of the smart contract to delete the user's sensitive data.
第二方面,提供了一种智能设备控制方法,所述方法应用于私有链网络中的智能设备上,所述私有链网络由所述智能设备与其他智能设备构成,且所述私有链网络部署有用户发布的智能合约,所述方法包括:In a second aspect, a method for controlling a smart device is provided. The method is applied to a smart device in a private chain network. The private chain network is composed of the smart device and other smart devices, and the private chain network is deployed. For smart contracts issued by users, the method includes:
当所述智能设备接收到所述用户的设备使用请求时,由所述智能设备获取所述设备使用请求中的用户输入数据;When the smart device receives the user's device use request, the smart device obtains the user input data in the device use request;
对所述用户输入数据生成相应的待查询信息,并调用所述智能合约对所述待查询信息在私有链中进行查询,其中,所述私有链中预先存储有基于用户敏感数据生成的初始信息;Generate corresponding information to be queried for the user input data, and call the smart contract to query the information to be queried in a private chain, wherein the private chain pre-stores initial information generated based on user sensitive data ;
根据所述智能合约的查询结果确定是否允许被使用操作。According to the query result of the smart contract, it is determined whether the operation to be used is allowed.
第三方面,提供一种智能设备控制方法,所述方法应用于私有链网络中的智能设备上,所述私有链网络由所述智能设备与其他智能设备构成,且所述私有链网络部署有用户发布的智能合约,所述方法包括:In a third aspect, a method for controlling a smart device is provided. The method is applied to a smart device in a private chain network. The private chain network is composed of the smart device and other smart devices, and the private chain network is deployed with For smart contracts issued by users, the method includes:
当所述智能设备接收到所述用户的设备使用请求时,由所述智能设备获取所述用户 的输入密码;When the smart device receives the user's device use request, the smart device obtains the user's input password;
调用所述智能合约,以使所述智能合约使用所述预设算法对所述输入密码生成相应的信息,并将所述信息与所述智能设备的设备ID对应的初始信息进行比对验证,其中,所述初始信息是基于所述用户设定的初始密码生成的;Calling the smart contract, so that the smart contract uses the preset algorithm to generate corresponding information on the input password, and compares and verifies the information with the initial information corresponding to the device ID of the smart device, Wherein, the initial information is generated based on the initial password set by the user;
接收所述智能合约返回的验证结果,并根据所述验证结果确定是否允许被使用操作。Receiving the verification result returned by the smart contract, and determining whether the operation is allowed to be used according to the verification result.
第四方面,提供了一种智能设备系统,所述系统包括客户端和接入局域网的多个智能设备,多个所述智能设备构成私有链网络;In a fourth aspect, an intelligent device system is provided, the system includes a client and multiple smart devices connected to a local area network, and the multiple smart devices form a private chain network;
各个所述智能设备分别包括:Each of the smart devices includes:
合约获取模块,用于与所述私有链网络中的其他智能设备分别获取用户通过所述客户端发布的具有多种功能的智能合约;A contract acquisition module, which is used to separately acquire smart contracts with multiple functions issued by the user through the client with other smart devices in the private chain network;
合约部署模块,用于经所述用户确认后将所述智能合约部署到所述私有链网络上;A contract deployment module for deploying the smart contract to the private chain network after confirmation by the user;
数据获取模块,用于当接收到所述用户的设备初始化请求时,获取所述设备初始化请求中的用户敏感数据;A data acquisition module, configured to acquire user sensitive data in the device initialization request when receiving the device initialization request of the user;
第一生成模块,用于对所述用户敏感数据生成相应的第一初始信息;以及A first generating module, configured to generate corresponding first initial information for the user sensitive data; and
合约调用模块,用于调用所述智能合约的增加功能将所述第一初始信息写入私有链中。A contract invoking module for invoking the added function of the smart contract to write the first initial information into the private chain.
进一步地,所述数据获取模块,还用于当接收到所述用户的设备使用请求时,获取所述设备使用请求中的用户输入数据;Further, the data acquisition module is further configured to acquire user input data in the device use request when receiving the user device use request;
所述第一生成模块,还用于所述用户输入数据生成相应的待查询信息;The first generating module is also used to generate corresponding information to be queried by the user input data;
合约调用模块,还用于调用所述智能合约的查询功能对所述待查询信息在所述私有链中进行查询;The contract calling module is also used to call the query function of the smart contract to query the information to be queried in the private chain;
各个所述智能设备分别还包括:Each of the smart devices further includes:
操作控制模块,用于根据所述智能合约的查询结果确定所述智能设备是否允许被使用操作。The operation control module is used to determine whether the smart device is allowed to be operated according to the query result of the smart contract.
进一步地,所述用户敏感数据为所述用户输入的初始指纹数据,所述第一生成模块具体用于:Further, the user sensitive data is initial fingerprint data input by the user, and the first generation module is specifically configured to:
将所述初始指纹数据转化为初始hash值,并根据所述初始hash值和对所述智能设备的设备ID生成初始复合key;以及Converting the initial fingerprint data into an initial hash value, and generating an initial composite key based on the initial hash value and the device ID of the smart device; and
根据所述智能设备的启动方式和所述初始指纹数据的录入时间生成value值;Generating a value according to the startup mode of the smart device and the entry time of the initial fingerprint data;
所述合约调用模块具体用于:The contract calling module is specifically used for:
将所述初始复合key、所述value值通过所述智能合约的增加功能对应地写入所述私有链中。Write the initial composite key and the value correspondingly to the private chain through the added function of the smart contract.
进一步地,所述用户输入数据为所述用户的指纹数据,所述第一生成模块具体还用于:Further, the user input data is fingerprint data of the user, and the first generation module is specifically further used to:
将所述指纹数据转化为hash值,并根据所述hash值和所述智能设备的设备ID生成复合key;Convert the fingerprint data into a hash value, and generate a composite key according to the hash value and the device ID of the smart device;
所述合约调用模块具体还用于:The contract calling module is also specifically used for:
调用所述智能合约的查询功能以查询所述私有链中是否存在与所述复合key对应的value值,并接收所述智能合约返回的查询结果;Calling the query function of the smart contract to query whether the value corresponding to the composite key exists in the private chain, and receive the query result returned by the smart contract;
其中,所述查询结果用于指示所述智能设备是否允许被使用操作。Wherein, the query result is used to indicate whether the smart device is allowed to be used for operation.
进一步地,所述系统还包括客户端,所述客户端包括:Further, the system further includes a client, and the client includes:
密码获取模块,用于当接收到所述用户对所述智能设备的设备初始化请求时,由所述客户端获取所述用户设定的初始密码;A password obtaining module, configured to obtain the initial password set by the user by the client when receiving the device initialization request of the user for the smart device;
第二生成模块,用于使用预设算法对所述初始密码生成相应的第二初始信息;A second generation module, configured to generate corresponding second initial information for the initial password using a preset algorithm;
信息写入模块,用于将所述智能设备的设备ID、所述第二初始信息与所述预设算法对应地写入所述智能合约的验证功能中,以对所述智能合约进行更新;An information writing module, configured to write the device ID of the smart device, the second initial information corresponding to the preset algorithm into the verification function of the smart contract, so as to update the smart contract;
各个所述智能设备分别还包括:Each of the smart devices further includes:
合约升级模块,用于根据所述用户的确认操作对所述智能合约进行升级。A contract upgrade module is used to upgrade the smart contract according to the confirmation operation of the user.
进一步地,所述数据获取模块具体还用于:Further, the data acquisition module is also specifically used to:
当接收到所述用户的设备使用请求时,获取所述用户的输入密码;When receiving the user's device use request, obtain the user's input password;
所述合约调用模块具体还用于:The contract calling module is also specifically used for:
调用所述智能合约的验证功能,以使所述智能合约使用所述预设算法对所述输入密码生成相应的信息,并将所述信息与所述智能设备的设备ID对应的所述第二初始信息进行比对验证;Invoke the verification function of the smart contract, so that the smart contract uses the preset algorithm to generate corresponding information for the input password, and the information corresponds to the second device ID of the smart device Compare and verify the initial information;
接收所述智能合约返回的验证结果,并根据所述验证结果确定是否允许被使用操作。Receiving the verification result returned by the smart contract, and determining whether the operation is allowed to be used according to the verification result.
进一步地,所述预设算法为hash算法。Further, the preset algorithm is a hash algorithm.
进一步地,所述合约调用模块具体还用于:Further, the contract calling module is also specifically used for:
当接收到所述用户对所述用户敏感数据的修改请求时,调用所述智能合约的修改功能对所述用户敏感数据进行修改;When receiving the user's request to modify the user's sensitive data, invoke the modification function of the smart contract to modify the user's sensitive data;
当接收到所述用户对所述用户敏感数据的删除请求时,调用所述智能合约的删除功能对所述用户敏感数据进行删除。When receiving the user's request to delete the sensitive data of the user, the delete function of the smart contract is called to delete the sensitive data of the user.
本发明实施例提供的技术方案带来的有益效果是:The beneficial effects brought by the technical solutions provided by the embodiments of the present invention are:
1、由于用户敏感数据生成的初始信息通过智能合约写入私有链中,且单个智能设备被攻破时无法修改智能合约内容,只有攻破私有链网络中的所有的智能设备才能通过部署新的智能合约才能绕过原先部署的智能合约,如此使得不法分子难以获取用户敏感数据,由此使得用户敏感数据更加安全;1. Because the initial information generated by the user's sensitive data is written into the private chain through a smart contract, and the content of the smart contract cannot be modified when a single smart device is broken, only by breaking all the smart devices in the private chain network can the deployment of new smart contracts In order to bypass the originally deployed smart contract, this makes it difficult for criminals to obtain user sensitive data, thereby making user sensitive data more secure;
2、本发明实施例由于用户敏感数据存储在局域网私有链中,避免用户敏感数据的泄露,使得不法分子难以获取用户敏感数据,同时用户敏感数据只能由用户进行操作和读取,由此避免了现有技术中用户敏感数据存储在云端或存储在本地的安全性问题;2. In the embodiment of the present invention, since the user sensitive data is stored in the private chain of the local area network, the leakage of the user sensitive data is avoided, which makes it difficult for criminals to obtain the user sensitive data, and the user sensitive data can only be operated and read by the user, thereby avoiding In the prior art, the security problem of user sensitive data stored in the cloud or stored locally;
3、由于构成私有链网络的多个智能设备是接入局域网中的,使得不法分子无法通过公网进行恶意攻击;3. Because multiple smart devices forming the private chain network are connected to the local area network, criminals cannot conduct malicious attacks through the public network;
4、相比较现有技术中用户敏感数据存储在云端时,用户须通过公网连入服务器进行身份验证,本发明实施例由于用户敏感数据存储在局域网私有链中,用户可以直接接入局域网进行身份验证,身份验证更加高效。4. Compared with the prior art, when the user sensitive data is stored in the cloud, the user must connect to the server through the public network for identity verification. In the embodiment of the present invention, because the user sensitive data is stored in the private chain of the LAN, the user can directly access the LAN Identity verification, identity verification is more efficient.
附图说明BRIEF DESCRIPTION
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly explain the technical solutions in the embodiments of the present invention, the drawings required in the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without paying any creative work, other drawings can be obtained based on these drawings.
图1为本发明提供的一种智能设备系统的实现方法的流程图;1 is a flowchart of a method for implementing an intelligent device system provided by the present invention;
图2为本发明提供的一种智能设备系统的实现方法的流程图;2 is a flowchart of an implementation method of a smart device system provided by the present invention;
图3为本发明提供的一种智能设备系统的实现方法的流程图;3 is a flowchart of a method for implementing an intelligent device system provided by the present invention;
图4为本发明提供的一种智能设备系统的实现方法的流程图;4 is a flowchart of an implementation method of a smart device system provided by the present invention;
图5为本发明提供的智能设备系统的架构示意图;5 is a schematic structural diagram of a smart device system provided by the present invention;
图6为本发明提供的智能门锁密码开门的流程示意图;FIG. 6 is a schematic flowchart of the smart door lock password opening process provided by the present invention;
图7为本发明提供的一种智能设备系统的系统框图。7 is a system block diagram of an intelligent device system provided by the present invention.
具体实施方式detailed description
为使本发明的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。To make the objectives, technical solutions, and advantages of the present invention clearer, the technical solutions in the embodiments of the present invention will be described clearly and completely in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are merely Some embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by a person of ordinary skill in the art without making creative efforts fall within the protection scope of the present invention.
在本申请的描述中,需要理解的是,术语“第一”、“第二”等仅用于描述目的,而不能理解为指示或暗示相对重要性。此外,在本申请的描述中,除非另有说明,“多个”的含义是两个或两个以上。In the description of the present application, it should be understood that the terms "first", "second", etc. are for descriptive purposes only, and cannot be understood as indicating or implying relative importance. In addition, in the description of the present application, unless otherwise stated, the meaning of "plurality" is two or more.
在对本发明提供的智能设备系统的实现方法进行说明之前,先对本发明各个实施例所涉及的术语进行介绍。Before describing the implementation method of the smart device system provided by the present invention, the terms involved in the embodiments of the present invention will be introduced first.
关于区块链,区块链是一种将分布式数据存储、点对点传输、共识机制、加密算法等计算机技术融合起来的新型应用模式。根据区块链网络中心化程度的不同,分化出3种不同应用场景下的区块链:Regarding the blockchain, the blockchain is a new application model that integrates computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm. According to the degree of centralization of the blockchain network, three different application scenarios of blockchains are differentiated:
1、全网公开,无用户授权机制的区块链,称为公有链;1. The whole network is open, and the blockchain without user authorization mechanism is called public chain;
2、允许授权的节点加入网络,可根据权限查看信息,往往被用于机构间的区块链,称为联盟链;2. Allow authorized nodes to join the network and view information according to permissions. It is often used in inter-institutional blockchains, called alliance chains;
3、所有网络中的节点都掌握在一家机构手中,称为私有链。3. All the nodes in the network are in the hands of an institution, called a private chain.
实施例一Example one
图1为本发明提供的一种智能设备系统的实现方法的流程图,如图1所示,该方法可以包括以下步骤:FIG. 1 is a flowchart of a method for implementing an intelligent device system provided by the present invention. As shown in FIG. 1, the method may include the following steps:
101、对接入局域网的多个智能设备构成私有链网络。101. A private chain network is formed for multiple smart devices connected to the local area network.
其中,多个智能设备包括但不限于智能门锁、智能音箱、智能空调、智能电视、智能路由等。智能设备可以利用传感器采集到用户指纹数据、环境数据等信息,其中,传感器可以集成在智能设备上,也可以通过有线或无线方式与智能设备进行连接。Among them, multiple smart devices include but are not limited to smart door locks, smart speakers, smart air conditioners, smart TVs, smart routers, etc. Smart devices can use sensors to collect user fingerprint data, environmental data, and other information. Among them, the sensors can be integrated on the smart device, or can be connected to the smart device through wired or wireless means.
102、各个智能设备分别获取用户发布的具有多种功能的智能合约,并经用户确认后将智能合约部署到私有链网络上。102. Each smart device obtains a smart contract with multiple functions issued by the user, and deploys the smart contract to the private chain network after the user confirms it.
其中,智能合约具有多种功能,包括:增加功能、删除功能、查询功能、修改功能和验证功能;Among them, the smart contract has multiple functions, including: add function, delete function, query function, modify function and verification function;
具体的,该过程可以包括:Specifically, the process may include:
各个智能设备分别获取用户通过如下方式之一发布的智能合约:Each smart device obtains a smart contract issued by the user in one of the following ways:
具有合约发布功能的客户端;Client with contract release function;
多个智能设备中的具有合约发布功能的智能设备;Smart devices with contract issuance function among multiple smart devices;
其中,客户端具体可以是移动终端、个人PC等终端设备。The client may specifically be a terminal device such as a mobile terminal or a personal PC.
各个智能设备由用户通过按钮进行确认后,将智能合约部署到私有链网络上。After each smart device is confirmed by the user through the button, the smart contract is deployed on the private chain network.
103、当智能设备接收到用户的设备初始化请求时,由智能设备获取设备初始化请求中的用户敏感数据。103. When the smart device receives the user's device initialization request, the smart device obtains the user sensitive data in the device initialization request.
其中,用户敏感数据可以是用户指纹数据、虹膜数据等用户特征信息,还可以是其他敏感数据。Among them, the user sensitive data may be user characteristic information such as user fingerprint data, iris data, or other sensitive data.
本实施例中,用户在对多个智能设备进行部署构成私有链网络后,需要进行初始化智能设备,以便后续可以使用该智能设备。当用户需要进行对智能设备进行初始化时,可以采用指纹输入方式进行初始化,以智能门锁为例,用户可以通过传感器将自己的指纹数据输入到智能门锁中,进行初始化智能门锁。In this embodiment, after deploying multiple smart devices to form a private chain network, the user needs to initialize the smart devices so that the smart devices can be used later. When the user needs to initialize the smart device, the fingerprint input method can be used for initialization. Taking the smart door lock as an example, the user can input his fingerprint data into the smart door lock through the sensor to initialize the smart door lock.
104、对用户敏感数据生成相应的第一初始信息,并调用智能合约的增加功能将第一初始信息写入私有链中。104. Generate corresponding first initial information for the user's sensitive data, and call the added function of the smart contract to write the first initial information into the private chain.
具体的,由智能设备将初始指纹数据转化为初始hash值,并根据初始hash值和该智能设备的设备ID生成初始复合key;根据智能设备的启动方式和初始指纹数据的录入时间生成value值;将初始复合key、value值通过智能合约的增加功能对应地写入私有链中。Specifically, the smart device converts the initial fingerprint data into an initial hash value, and generates an initial composite key based on the initial hash value and the device ID of the smart device; a value value is generated according to the startup method of the smart device and the entry time of the initial fingerprint data; Write the initial composite key and value to the private chain through the added function of the smart contract.
在具体实施过程中,智能设备可以使用hash算法对初始指纹数据进行hash运算,生成初始hash值,其中,该hash算法可以是任意安全可靠哈希算法,例如SHA256、国密SM3或国密SM4等。In the specific implementation process, the smart device can use the hash algorithm to hash the initial fingerprint data to generate an initial hash value, where the hash algorithm can be any safe and reliable hash algorithm, such as SHA256, State Secret SM3 or State Secret SM4, etc. .
本发明实施例中,由于用户敏感数据生成的初始信息通过智能合约写入私有链中, 且单个智能设备被攻破时无法修改智能合约内容,只有攻破私有链网络中的所有的智能设备才能通过部署新的智能合约才能绕过原先部署的智能合约,如此使得不法分子难以获取用户敏感数据,同时用户敏感数据只能由用户进行操作和读取,由此使得用户敏感数据更加安全;同时,由于构成私有链网络的多个智能设备是接入局域网中的,使得不法分子无法通过公网进行恶意攻击;另外,相比较现有技术中,用户敏感数据存储在云端时,用户须通过公网连入服务器进行身份验证,本发明实施例由于用户敏感数据存储在局域网私有链中,用户可以直接接入局域网进行身份验证,身份验证更加高效。In the embodiment of the present invention, since the initial information generated by the user's sensitive data is written into the private chain through a smart contract, and the content of the smart contract cannot be modified when a single smart device is broken, only all smart devices in the private chain network can be deployed New smart contracts can bypass the previously deployed smart contracts, which makes it difficult for criminals to obtain user sensitive data, and user sensitive data can only be operated and read by users, thereby making user sensitive data more secure; at the same time, due to the composition Multiple smart devices in the private chain network are connected to the local area network, making it impossible for criminals to conduct malicious attacks through the public network; in addition, compared with the existing technology, when user sensitive data is stored in the cloud, users must connect through the public network The server performs identity verification. Since the user sensitive data is stored in the private chain of the local area network in the embodiment of the present invention, the user can directly access the local area network for identity verification, and the identity verification is more efficient.
进一步地,本发明实施例提供的方法还可以包括:Further, the method provided by the embodiment of the present invention may further include:
当智能设备接收到用户对用户敏感数据的修改请求时,调用智能合约的修改功能对用户敏感数据进行修改;当智能设备接收到用户对用户敏感数据的删除请求时,调用智能合约的删除功能对用户敏感数据进行删除。When the smart device receives the user's request to modify the user's sensitive data, the smart contract's modification function is called to modify the user's sensitive data; when the smart device receives the user's user's sensitive data deletion request, the smart contract's deletion function is called Delete sensitive user data.
本发明实施例中,通过智能合约的修改功能或删除功能,便于对用户敏感数据进行修改或删除。In the embodiment of the present invention, the modification function or the deletion function of the smart contract facilitates the modification or deletion of the user's sensitive data.
进一步地,本发明实施例提供的方法还可以包括:Further, the method provided by the embodiment of the present invention may further include:
由智能设备将对用户敏感数据的操作记录于私有链上,以供用户进行追溯和查看。The smart device records the operation of the user's sensitive data on the private chain for the user to trace and view.
本发明实施例中,通过对用户敏感数据的操作记录于私有链上,可以防止用户敏感数据被非法查询、篡改,进而能够充分保证用户敏感数据的隐私性和安全性。In the embodiment of the present invention, the operation of the user's sensitive data is recorded on the private chain, which can prevent the user's sensitive data from being illegally queried and tampered, and thus can fully guarantee the privacy and security of the user's sensitive data.
实施例二Example 2
图2为本发明提供的一种智能设备系统的实现方法的流程图,在该实施例中,该智能设备系统的实现方法除了包括图1中描述的步骤之外,还包括步骤201~204,为了描述简洁起见,省略了图1中描述的步骤。如图2所示,该智能设备系统的实现方法还包括:2 is a flowchart of a method for implementing a smart device system provided by the present invention. In this embodiment, the method for implementing a smart device system includes steps 201 to 204 in addition to the steps described in FIG. 1, For simplicity of description, the steps described in FIG. 1 are omitted. As shown in FIG. 2, the implementation method of the smart device system further includes:
201、当智能设备接收到用户的设备使用请求时,由智能设备获取设备使用请求中的用户输入数据。201. When the smart device receives the user's device use request, the smart device obtains the user input data in the device use request.
本实施例中,用户在完成初始化智能设备后,可以对智能设备进行相应的操作。以智能门锁为例,当用户需要开启智能门锁时,可以采用指纹输入的方式进行开启智能门锁,即通过传感器将指纹数据输入到智能门锁中。In this embodiment, after completing the initialization of the smart device, the user can perform corresponding operations on the smart device. Taking the smart door lock as an example, when the user needs to open the smart door lock, the smart door lock can be opened by means of fingerprint input, that is, the fingerprint data is input into the smart door lock through the sensor.
202、对用户输入数据生成相应的待查询信息。202. Generate corresponding information to be queried for user input data.
其中,该用户输入数据为用户的指纹数据。Wherein, the user input data is fingerprint data of the user.
具体的,由智能设备将指纹数据转化为hash值,并根据hash值和该智能设备的设备ID生成复合key,以作为待查询信息。Specifically, the smart device converts the fingerprint data into a hash value, and generates a composite key according to the hash value and the device ID of the smart device as the information to be queried.
在具体实施过程中,智能设备可以使用hash算法对用户输入数据进行hash运算,生成hash值,其中,该hash算法可以是任意安全可靠哈希算法,例如SHA256、国密SM3或国密SM4等。In the specific implementation process, the smart device may use a hash algorithm to hash the user input data to generate a hash value, where the hash algorithm may be any safe and reliable hash algorithm, such as SHA256, State Secret SM3, or State Secret SM4.
203、调用智能合约的查询功能对待查询信息在私有链中进行查询。203. Call the query function of the smart contract to query the query information in the private chain.
具体的,调用智能合约的查询功能以查询私有链中是否存在与复合key对应的value值,并接收智能合约返回的查询结果;其中,查询结果用于指示智能设备是否允许被使用操作。Specifically, the query function of the smart contract is called to query whether there is a value corresponding to the composite key in the private chain, and receive the query result returned by the smart contract; where the query result is used to indicate whether the smart device is allowed to be used for operation.
204、智能设备根据智能合约的查询结果确定是否允许被使用操作。204. The smart device determines whether the operation to be used is allowed according to the query result of the smart contract.
其中,当查询结果表示查询成功时,则智能设备允许被使用操作,当查询结果表示查询失败时,则智能设备不允许被使用操作。Among them, when the query result indicates that the query is successful, the smart device is allowed to be used for operation, and when the query result indicates that the query fails, the smart device is not allowed to be used for operation.
本发明实施例中,在用户使用智能设备时,获取用户的输入数据并生成相应的待查询信息,通过调用智能合约的查询功能进行相应的查询,使得智能设备根据智能合约返回的查询结果确定是否允许被使用操作,由此能够避免智能设备被不法分子控制。In the embodiment of the present invention, when a user uses a smart device, the user's input data is obtained and the corresponding information to be queried is generated, and the corresponding query is performed by invoking the query function of the smart contract, so that the smart device determines whether to query the smart contract The operation is allowed to be used, thereby preventing the smart device from being controlled by the criminals.
实施例三Example Three
图3为本发明提供的一种智能设备系统的实现方法的流程图,在该实施例中,该智能设备系统的实现方法除了包括图1中描述的步骤之外,还包括步骤301~304,为了描述简洁起见,省略了图1中描述的步骤。如图3所示,该智能设备系统的实现方法还包括:3 is a flowchart of a method for implementing a smart device system provided by the present invention. In this embodiment, the method for implementing a smart device system includes steps 301 to 304 in addition to the steps described in FIG. 1, For simplicity of description, the steps described in FIG. 1 are omitted. As shown in FIG. 3, the implementation method of the smart device system further includes:
301、当用户的客户端接收到用户对智能设备的设备初始化请求时,由客户端获取用户设定的初始密码。301. When the user's client receives the user's device initialization request for the smart device, the client obtains the initial password set by the user.
本实施例中,用户在对多个智能设备进行部署构成私有链网络后,需要进行初始化智能设备,以便后续可以使用该智能设备。当用户需要进行对智能设备进行初始化时,除了可以采用指纹输入方式初始化智能设备之外,还可以采用密码输入方式初始化智能设备。以智能门锁为例,用户可以使用手机客户端设定智能门锁的开门密码,进行初始化智能门锁。In this embodiment, after deploying multiple smart devices to form a private chain network, the user needs to initialize the smart devices so that the smart devices can be used later. When the user needs to initialize the smart device, in addition to the fingerprint input mode to initialize the smart device, the password input mode can also be used to initialize the smart device. Taking the smart door lock as an example, the user can use the mobile phone client to set the door unlock password of the smart door lock to initialize the smart door lock.
302、使用预设算法对初始密码生成相应的第二初始信息。302. Use a preset algorithm to generate corresponding second initial information for the initial password.
其中,该预设算法为hash算法。Among them, the preset algorithm is a hash algorithm.
具体的,客户端可以使用hash算法对初始密码进行hash运算,生成初始hash值,其中,该hash算法可以是任意安全可靠哈希算法,例如SHA256、国密SM3或国密SM4等。Specifically, the client may use a hash algorithm to hash the initial password to generate an initial hash value, where the hash algorithm may be any safe and reliable hash algorithm, such as SHA256, State Secret SM3, or State Secret SM4.
303、将智能设备的设备ID、第二初始信息与预设算法对应地写入智能合约的验证功能中,以对智能合约进行更新。303. Write the device ID and the second initial information of the smart device into the verification function of the smart contract corresponding to the preset algorithm to update the smart contract.
304、由各个智能设备根据用户的确认操作对智能合约进行升级。304. Each smart device upgrades the smart contract according to the user's confirmation operation.
具体的,每个智能设备由用户通过按钮进行确认后,对智能合约进行升级。Specifically, after each smart device is confirmed by a user through a button, the smart contract is upgraded.
本发明实施例中,由于用户设定的初始密码生成的第二初始信息通过智能合约写入私有链中,当用户需要对初始密码进行变更时,可以通过合约的升级实现。In the embodiment of the present invention, since the second initial information generated by the initial password set by the user is written into the private chain through a smart contract, when the user needs to change the initial password, it can be achieved by upgrading the contract.
实施例四Example 4
图4为本发明提供的一种智能设备系统的实现方法的流程图,在该实施例中,该智能设备系统的实现方法除了包括图3中描述的步骤之外,还包括步骤401~403,为了描述简洁起见,省略了图3中描述的步骤。如图4所示,该智能设备系统的实现方法还包括:4 is a flowchart of a method for implementing a smart device system provided by the present invention. In this embodiment, the method for implementing a smart device system includes steps 401 to 403 in addition to the steps described in FIG. 3, For simplicity of description, the steps described in FIG. 3 are omitted. As shown in FIG. 4, the implementation method of the smart device system further includes:
401、当智能设备接收到用户的设备使用请求时,由智能设备获取用户的输入密码。401. When the smart device receives the user's device use request, the smart device obtains the user's input password.
本实施例中,用户在完成初始化智能设备后,可以对智能设备进行相应的操作。以智能门锁为例,当用户需要开启智能门锁时,可以采用密码输入的方式进行开启智能门锁,即通过移动客户端将密码输入到智能门锁中。In this embodiment, after completing the initialization of the smart device, the user can perform corresponding operations on the smart device. Taking the smart door lock as an example, when the user needs to open the smart door lock, the smart door lock can be opened by using a password input method, that is, the password is input into the smart door lock through the mobile client.
402、调用智能合约的验证功能,以使智能合约使用预设算法对输入密码生成相应的信息,并将信息与智能设备的设备ID对应的第二初始信息进行比对验证。402. Call the verification function of the smart contract, so that the smart contract uses a preset algorithm to generate corresponding information for the input password, and compare and verify the information with the second initial information corresponding to the device ID of the smart device.
具体的,由智能设备调用智能合约的验证功能,通过智能合约对输入密码进行hash运算,将该hash运算结果与写入智能合约的初始密码的hash运算结果进行比对验证,生成验证结果;其中,验证结果用于指示智能设备是否允许被使用操作。Specifically, the smart device invokes the verification function of the smart contract, performs a hash operation on the input password through the smart contract, and compares the hash operation result with the hash operation result of the initial password written in the smart contract to generate a verification result; wherein , The verification result is used to indicate whether the smart device is allowed to be used for operation.
403、接收智能合约返回的验证结果,并根据验证结果确定是否允许被使用操作。403. Receive the verification result returned by the smart contract, and determine whether to allow the operation to be used according to the verification result.
其中,验证结果用于指示智能设备是否允许被使用操作。Among them, the verification result is used to indicate whether the smart device is allowed to be used for operation.
其中,当验证结果表示验证通过时,则智能设备允许被使用操作,当验证结果表示 验证不通过时,则智能设备不允许被使用操作。Among them, when the verification result indicates that the verification is passed, the smart device is allowed to be used for operation, and when the verification result indicates that the verification is not passed, the smart device is not allowed to be used for operation.
本发明实施例中,在用户使用智能设备时,获取用户的输入密码,并通过调用智能合约的验证功能进行相应的验证,使得智能设备根据智能合约返回的验证结果确定是否允许被使用操作,由此能够避免智能设备被不法分子控制。In the embodiment of the present invention, when the user uses the smart device, the user's input password is obtained, and the corresponding verification is performed by calling the verification function of the smart contract, so that the smart device determines whether the operation is permitted according to the verification result returned by the smart contract. This can prevent smart devices from being controlled by criminals.
实施例五Example 5
本发明实施例提供了一种智能设备控制方法,所述方法应用于私有链网络中的智能设备,私有链网络由智能设备与其他智能设备构成,且私有链网络部署有用户发布的智能合约,方法包括:An embodiment of the present invention provides a method for controlling a smart device. The method is applied to a smart device in a private chain network. The private chain network is composed of smart devices and other smart devices, and a smart contract issued by a user is deployed in the private chain network. Methods include:
501、当智能设备接收到用户的设备使用请求时,由智能设备获取设备使用请求中的用户输入数据。501. When the smart device receives the user's device use request, the smart device obtains the user input data in the device use request.
具体的,该步骤与步骤201相同,此处不再加以赘述。Specifically, this step is the same as step 201, and will not be repeated here.
502、对用户输入数据生成相应的待查询信息。502. Generate corresponding information to be queried for user input data.
具体的,该步骤与步骤202相同,此处不再加以赘述。Specifically, this step is the same as step 202, and will not be repeated here.
503、调用智能合约对待查询信息在私有链中进行查询,其中,私有链中预先存储有基于用户敏感数据生成的初始信息。503. Call the smart contract to query the information to be queried in the private chain, where the private chain pre-stores the initial information generated based on the user's sensitive data.
具体的,该步骤与步骤203相同,此处不再加以赘述。Specifically, this step is the same as step 203 and will not be repeated here.
504、根据智能合约的查询结果确定是否允许被使用操作。504: Determine whether the operation to be used is allowed according to the query result of the smart contract.
具体的,该步骤与步骤204相同,此处不再加以赘述。Specifically, this step is the same as step 204, and will not be repeated here.
本发明实施例中,在用户使用智能设备时,获取用户的输入数据并生成相应的待查询信息,通过调用智能合约进行相应的查询,使得智能设备根据智能合约返回的查询结果确定是否允许被使用操作,由此能够避免智能设备被不法分子控制。In the embodiment of the present invention, when a user uses a smart device, the user's input data is obtained and corresponding information to be queried is generated, and the corresponding query is performed by calling a smart contract, so that the smart device determines whether it is allowed to be used according to the query result returned by the smart contract The operation can thereby prevent the smart device from being controlled by criminals.
实施例六Example Six
本发明实施例提供一种智能设备控制方法,方法应用于私有链网络中的智能设备,私有链网络由智能设备与其他智能设备构成,且私有链网络部署有用户发布的智能合约,方法包括:An embodiment of the present invention provides a method for controlling a smart device. The method is applied to a smart device in a private chain network. The private chain network is composed of smart devices and other smart devices, and a smart contract issued by a user is deployed in the private chain network. The method includes:
601、当智能设备接收到用户的设备使用请求时,由智能设备获取用户的输入密码;601. When the smart device receives the user's device use request, the smart device obtains the user's input password;
具体的,该步骤与步骤401相同,此处不再加以赘述。Specifically, this step is the same as step 401, and will not be repeated here.
602、调用智能合约,以使智能合约使用预设算法对输入密码生成相应的信息,并 将信息与智能设备的设备ID对应的初始信息进行比对验证,其中,初始信息是基于用户设定的初始密码生成的;602. Call the smart contract, so that the smart contract uses a preset algorithm to generate the corresponding information for the input password, and compares the information with the initial information corresponding to the device ID of the smart device, where the initial information is based on the user setting Generated by the initial password;
具体的,该步骤与步骤402相同,此处不再加以赘述。Specifically, this step is the same as step 402, and will not be repeated here.
603、接收智能合约返回的验证结果,并根据验证结果确定是否允许被使用操作。603. Receive the verification result returned by the smart contract, and determine whether to allow the operation to be used according to the verification result.
具体的,该步骤与步骤403相同,此处不再加以赘述。Specifically, this step is the same as step 403 and will not be repeated here.
本发明实施例中,在用户使用智能设备时,获取用户的输入密码,并通过调用智能合约进行相应的验证,使得智能设备根据智能合约返回的验证结果确定是否允许被使用操作,由此能够避免智能设备被不法分子控制。In the embodiment of the present invention, when the user uses the smart device, the user's input password is obtained, and the corresponding verification is performed by calling the smart contract, so that the smart device determines whether the operation is permitted according to the verification result returned by the smart contract, thereby avoiding Smart devices are controlled by criminals.
下面结合图5和图6对本发明实施例所提供的方法作示例性说明。假设接入局域网的多个智能设备包括智能门锁、智能音箱、智能电视和智能路由,对该多个智能设备执行本发明实施例的方法后,得到的智能设备系统的架构示意图可以参照图5所示。假如用户使用智能门锁进行开门,如图6所示,图6为本发明提供的智能门锁密码开门的流程示意图,用户输入密码,智能门锁调用智能合约的验证功能进行相应的验证,当验证成功时,智能门锁允许开门操作。The method provided by the embodiment of the present invention will be exemplarily described below with reference to FIGS. 5 and 6. Assuming that multiple smart devices connected to the local area network include smart door locks, smart speakers, smart TVs, and smart routers, after performing the method of the embodiments of the present invention on the multiple smart devices, the schematic diagram of the obtained smart device system architecture may refer to FIG. 5 As shown. If the user uses a smart door lock to open the door, as shown in FIG. 6, FIG. 6 is a schematic flowchart of the smart door lock password opening process provided by the present invention. The user enters the password and the smart door lock calls the verification function of the smart contract to perform the corresponding verification. When the verification is successful, the smart door lock allows the door opening operation.
实施例七Example 7
图7为本发明提供的一种智能设备系统的系统框图,该系统可以包括客户端和接入局域网的多个智能设备,多个智能设备构成私有链网络,如图7所示,为便于描述清楚,下面仅以客户端710和位于私有链网络的智能设备710对该基于区块链的智能设备系统进行说明,其中,智能设备720被配置为多个智能设备中的任意一个:FIG. 7 is a system block diagram of a smart device system provided by the present invention. The system may include a client and multiple smart devices connected to a local area network. The multiple smart devices form a private chain network, as shown in FIG. 7, for ease of description. Clearly, the following describes the blockchain-based smart device system with only the client 710 and the smart device 710 located in the private chain network, where the smart device 720 is configured as any one of multiple smart devices:
客户端710包括:Client 710 includes:
合约发布模块711,用于向私有链网络的各个智能设备发布具有多种功能的智能合约;The contract issuing module 711 is used to publish smart contracts with multiple functions to each smart device of the private chain network;
智能设备720包括:The smart device 720 includes:
合约获取模块721,用于与私有链网络中的其他智能设备分别获取用户发布的智能合约;The contract acquisition module 721 is used to separately acquire smart contracts issued by users with other smart devices in the private chain network;
合约部署模块722,用于经用户确认后将智能合约部署到私有链网络上;The contract deployment module 722 is used to deploy the smart contract to the private chain network after confirmation by the user;
数据获取模块723,用于当接收到用户的设备初始化请求时,获取设备初始化请求中的用户敏感数据;The data obtaining module 723 is used to obtain user sensitive data in the device initialization request when the user's device initialization request is received;
第一生成模块724,用于对用户敏感数据生成相应的第一初始信息;以及The first generating module 724 is configured to generate corresponding first initial information for user sensitive data; and
合约调用模块725,用于调用智能合约的增加功能将第一初始信息写入私有链中。The contract calling module 725 is used to call the added function of the smart contract to write the first initial information into the private chain.
进一步地,数据获取模块723,还用于当接收到用户的设备使用请求时,获取设备使用请求中的用户输入数据;Further, the data obtaining module 723 is also used to obtain user input data in the device use request when the user's device use request is received;
第一生成模块724,还用于用户输入数据生成相应的待查询信息;The first generating module 724 is also used for user input data to generate corresponding information to be queried;
合约调用模块725,还用于调用智能合约的查询功能对待查询信息在私有链中进行查询;The contract calling module 725 is also used to call the query function of the smart contract to query the information to be queried in the private chain;
智能设备720还包括:The smart device 720 also includes:
操作控制模块726,用于根据智能合约的查询结果确定智能设备是否允许被使用操作。The operation control module 726 is used to determine whether the smart device is allowed to be operated according to the query result of the smart contract.
进一步地,用户敏感数据为用户输入的初始指纹数据,第一生成模块724具体用于:Further, the user sensitive data is the initial fingerprint data input by the user, and the first generation module 724 is specifically used to:
将初始指纹数据转化为初始hash值,并根据初始hash值和智能设备的设备ID生成初始复合key;以及Convert the initial fingerprint data into an initial hash value, and generate an initial composite key based on the initial hash value and the device ID of the smart device; and
根据智能设备的启动方式和初始指纹数据的录入时间生成value值;The value value is generated according to the startup mode of the smart device and the entry time of the initial fingerprint data;
合约调用模块具体用于:The contract calling module is specifically used for:
将初始复合key、value值通过智能合约的增加功能对应地写入私有链中。Write the initial composite key and value to the private chain through the added function of the smart contract.
进一步地,用户输入数据为用户的指纹数据,第一生成模块724具体还用于:Further, the user input data is the user's fingerprint data, and the first generation module 724 is specifically used to:
将指纹数据转化为hash值,并根据hash值和对智能设备的设备ID生成复合key;Convert the fingerprint data into a hash value, and generate a composite key based on the hash value and the device ID of the smart device;
合约调用模块725具体还用于:The contract calling module 725 is also specifically used for:
调用智能合约的查询功能以查询私有链中是否存在与复合key对应的value值,并接收智能合约返回的查询结果;Call the query function of the smart contract to query whether there is a value corresponding to the composite key in the private chain, and receive the query result returned by the smart contract;
其中,查询结果用于指示智能设备是否允许被使用操作。Among them, the query result is used to indicate whether the smart device is allowed to be used for operation.
进一步地,客户端710还包括:Further, the client 710 further includes:
密码获取模块712,用于当接收到用户对智能设备的设备初始化请求时,由客户端获取用户设定的初始密码;The password obtaining module 712 is configured to obtain an initial password set by the user by the client when receiving a device initialization request from the user for the smart device;
第二生成模块713,用于使用预设算法对初始密码生成相应的第二初始信息;The second generation module 713 is used to generate corresponding second initial information for the initial password using a preset algorithm;
信息写入模块714,用于将智能设备的设备ID、第二初始信息与预设算法对应地写入智能合约的验证功能中,以对智能合约进行更新;The information writing module 714 is used to write the device ID and the second initial information of the smart device into the verification function of the smart contract corresponding to the preset algorithm to update the smart contract;
智能设备还包括:Smart devices also include:
合约升级模块727,用于根据用户的确认操作对智能合约进行升级。The contract upgrade module 727 is used to upgrade the smart contract according to the user's confirmation operation.
进一步地,数据获取模块723具体还用于:Further, the data acquisition module 723 is also specifically used to:
当接收到用户的设备使用请求时,获取用户的输入密码;When receiving the user's device use request, obtain the user's input password;
合约调用模块725具体还用于:The contract calling module 725 is also specifically used for:
调用智能合约的验证功能,以使智能合约使用预设算法对输入密码生成相应的信息,并将信息与智能设备的设备ID对应的第二初始信息进行比对验证;Invoke the verification function of the smart contract, so that the smart contract uses a preset algorithm to generate corresponding information for the input password, and compares the information with the second initial information corresponding to the device ID of the smart device;
接收智能合约返回的验证结果,并根据验证结果确定是否允许被使用操作。Receive the verification result returned by the smart contract, and determine whether to allow the operation to be used according to the verification result.
进一步地,预设算法为hash算法。Further, the preset algorithm is a hash algorithm.
进一步地,合约调用模块725具体还用于:Further, the contract calling module 725 is also specifically used for:
当接收到用户对用户敏感数据的修改请求时,调用智能合约的修改功能对用户敏感数据进行修改;When receiving the user's request to modify the user's sensitive data, call the smart contract modification function to modify the user's sensitive data;
当接收到用户对用户敏感数据的删除请求时,调用智能合约的删除功能对用户敏感数据进行删除。When the user deletes the user's sensitive data request, the delete function of the smart contract is called to delete the user's sensitive data.
需要说明的是:上述实施例提供的智能设备系统中,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述智能设备系统与智能设备系统的实现方法以及智能设备控制方法实施例属于同一构思,其具体实现过程和有益效果详见方法实施例,这里不再赘述。It should be noted that in the smart device system provided in the above embodiment, only the division of the above functional modules is used as an example for illustration. In actual applications, the above functions can be allocated by different functional modules according to needs, that is, the internal of the device The structure is divided into different functional modules to complete all or part of the functions described above. In addition, the foregoing smart device system and the smart device system implementation method and the smart device control method embodiment belong to the same concept. For the specific implementation process and beneficial effects, refer to the method embodiment for details, and details are not described here.
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关联的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。A person of ordinary skill in the art may understand that all or part of the steps for implementing the above embodiments may be completed by hardware, or may be completed by a program instructing associated hardware. The program may be stored in a computer-readable storage medium The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk.
以上所述仅为本发明的较佳实施例,并不用以限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modification, equivalent replacement, improvement, etc. within the spirit and principle of the present invention should be included in the protection of the present invention Within range.

Claims (12)

  1. 一种智能设备系统的实现方法,其特征在于,包括:An implementation method of a smart device system, which is characterized by comprising:
    对接入局域网的多个智能设备构成私有链网络;Form a private chain network for multiple smart devices connected to the LAN;
    各个所述智能设备分别获取用户发布的具有多种功能的智能合约,并经所述用户确认后将所述智能合约部署到所述私有链网络上;Each of the smart devices obtains a smart contract with multiple functions issued by the user, and deploys the smart contract on the private chain network after confirmation by the user;
    当所述智能设备接收到所述用户的设备初始化请求时,由所述智能设备获取所述设备初始化请求中的用户敏感数据;When the smart device receives the device initialization request of the user, the smart device obtains the user sensitive data in the device initialization request;
    对所述用户敏感数据生成相应的第一初始信息,并调用所述智能合约的增加功能将所述第一初始信息写入私有链中。Generate corresponding first initial information for the user sensitive data, and call the added function of the smart contract to write the first initial information into the private chain.
  2. 根据权利要求1所述的方法,其特征在于,所述调用所述智能合约的增加功能将所述信息写入私有链步骤之后,所述方法还包括:The method according to claim 1, wherein after the step of calling the added function of the smart contract to write the information into the private chain, the method further comprises:
    当所述智能设备接收到所述用户的设备使用请求时,由所述智能设备获取所述设备使用请求中的用户输入数据;When the smart device receives the user's device use request, the smart device obtains the user input data in the device use request;
    对所述用户输入数据生成相应的待查询信息,并调用所述智能合约的查询功能对所述待查询信息在所述私有链中进行查询;Generating corresponding information to be queried for the user input data, and calling the query function of the smart contract to query the information to be queried in the private chain;
    所述智能设备根据所述智能合约的查询结果确定是否允许被使用操作。The smart device determines whether to allow the operation to be used according to the query result of the smart contract.
  3. 根据权利要求1或2所述的方法,其特征在于,所述用户敏感数据为所述用户输入的初始指纹数据,所述对所述用户敏感数据生成相应的第一初始信息,并调用所述智能合约的增加功能将所述第一初始信息写入私有链中,包括:The method according to claim 1 or 2, wherein the user sensitive data is initial fingerprint data input by the user, the corresponding first initial information is generated for the user sensitive data, and the The added function of the smart contract writes the first initial information into the private chain, including:
    由所述智能设备将所述初始指纹数据转化为初始hash值,并根据所述初始hash值和对所述智能设备的设备ID生成初始复合key;Converting the initial fingerprint data into an initial hash value by the smart device, and generating an initial composite key according to the initial hash value and the device ID of the smart device;
    根据所述智能设备的启动方式和所述初始指纹数据的录入时间生成value值;Generating a value according to the startup mode of the smart device and the entry time of the initial fingerprint data;
    将所述初始复合key、所述value值通过所述智能合约的增加功能对应地写入所述私有链中。Write the initial composite key and the value correspondingly to the private chain through the added function of the smart contract.
  4. 根据权利要求3所述的方法,其特征在于,所述用户输入数据为所述用户的 指纹数据,所述对所述用户输入数据生成相应的待查询信息,并调用所述智能合约的查询功能对所述待查询信息在所述私有链中进行查询,包括:The method according to claim 3, wherein the user input data is fingerprint data of the user, the corresponding information to be queried is generated for the user input data, and a query function of the smart contract is invoked Querying the information to be queried in the private chain includes:
    由所述智能设备将所述指纹数据转化为hash值,并根据所述hash值和所述智能设备的设备ID生成复合key;The smart device converts the fingerprint data into a hash value, and generates a composite key according to the hash value and the device ID of the smart device;
    调用所述智能合约的查询功能以查询所述私有链中是否存在与所述复合key对应的value值,并接收所述智能合约返回的查询结果;Calling the query function of the smart contract to query whether the value corresponding to the composite key exists in the private chain, and receive the query result returned by the smart contract;
    其中,所述查询结果用于指示所述智能设备是否允许被使用操作。Wherein, the query result is used to indicate whether the smart device is allowed to be used for operation.
  5. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, wherein the method further comprises:
    当所述用户的客户端接收到所述用户对所述智能设备的设备初始化请求时,由所述客户端获取所述用户设定的初始密码;When the client of the user receives the device initialization request of the user for the smart device, the client obtains the initial password set by the user;
    使用预设算法对所述初始密码生成相应的第二初始信息;Use a preset algorithm to generate corresponding second initial information for the initial password;
    将所述智能设备的设备ID、所述第二初始信息与所述预设算法对应地写入所述智能合约的验证功能中,以对所述智能合约进行更新;Write the device ID of the smart device and the second initial information into the verification function of the smart contract corresponding to the preset algorithm to update the smart contract;
    由各个所述智能设备根据所述用户的确认操作对所述智能合约进行升级。Each smart device upgrades the smart contract according to the user's confirmation operation.
  6. 根据权利要求5所述的方法,其特征在于,所述由各个所述智能设备根据所述用户的确认操作对所述智能合约进行升级步骤之后,所述方法还包括:The method according to claim 5, wherein after the step of upgrading the smart contract by each of the smart devices according to the confirmation operation of the user, the method further comprises:
    当所述智能设备接收到所述用户的设备使用请求时,由所述智能设备获取所述用户的输入密码;When the smart device receives the user's device use request, the smart device obtains the user's input password;
    调用所述智能合约的验证功能,以使所述智能合约使用所述预设算法对所述输入密码生成相应的信息,并将所述信息与所述智能设备的设备ID对应的所述第二初始信息进行比对验证;Invoke the verification function of the smart contract, so that the smart contract uses the preset algorithm to generate corresponding information for the input password, and the information corresponds to the second device ID of the smart device Compare and verify the initial information;
    接收所述智能合约返回的验证结果,并根据所述验证结果确定是否允许被使用操作。Receiving the verification result returned by the smart contract, and determining whether the operation is allowed to be used according to the verification result.
  7. 根据权利要求5或6所述的方法,其特征在于,所述预设算法为hash算法。The method according to claim 5 or 6, wherein the preset algorithm is a hash algorithm.
  8. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, wherein the method further comprises:
    当所述智能设备接收到所述用户对所述用户敏感数据的修改请求时,调用所述智 能合约的修改功能对所述用户敏感数据进行修改;When the smart device receives the user's request to modify the user's sensitive data, it calls the modification function of the smart contract to modify the user's sensitive data;
    当所述智能设备接收到所述用户对所述用户敏感数据的删除请求时,调用所述智能合约的删除功能对所述用户敏感数据进行删除。When the smart device receives the user's request to delete the user's sensitive data, it calls the delete function of the smart contract to delete the user's sensitive data.
  9. 一种智能设备控制方法,其特征在于,所述方法应用于私有链网络中的智能设备上,所述私有链网络由所述智能设备与其他智能设备构成,且所述私有链网络部署有用户发布的智能合约,所述方法包括:A method for controlling a smart device, characterized in that the method is applied to a smart device in a private chain network, the private chain network is composed of the smart device and other smart devices, and the private chain network is deployed with users For published smart contracts, the method includes:
    当所述智能设备接收到所述用户的设备使用请求时,由所述智能设备获取所述设备使用请求中的用户输入数据;When the smart device receives the user's device use request, the smart device obtains the user input data in the device use request;
    对所述用户输入数据生成相应的待查询信息,并调用所述智能合约对所述待查询信息在私有链中进行查询,其中,所述私有链中预先存储有基于用户敏感数据生成的初始信息;Generate corresponding information to be queried for the user input data, and call the smart contract to query the information to be queried in a private chain, wherein the private chain pre-stores initial information generated based on user sensitive data ;
    根据所述智能合约的查询结果确定是否允许被使用操作。According to the query result of the smart contract, it is determined whether the operation to be used is allowed.
  10. 一种智能设备控制方法,其特征在于,所述方法应用于私有链网络中的智能设备上,所述私有链网络由所述智能设备与其他智能设备构成,且所述私有链网络部署有用户发布的智能合约,所述方法包括:A method for controlling a smart device, characterized in that the method is applied to a smart device in a private chain network, the private chain network is composed of the smart device and other smart devices, and the private chain network is deployed with users For published smart contracts, the method includes:
    当所述智能设备接收到所述用户的设备使用请求时,由所述智能设备获取所述用户的输入密码;When the smart device receives the user's device use request, the smart device obtains the user's input password;
    调用所述智能合约,以使所述智能合约使用所述预设算法对所述输入密码生成相应的信息,并将所述信息与所述智能设备的设备ID对应的初始信息进行比对验证,其中,所述初始信息是基于所述用户设定的初始密码生成的;Calling the smart contract, so that the smart contract uses the preset algorithm to generate corresponding information on the input password, and compares and verifies the information with the initial information corresponding to the device ID of the smart device, Wherein, the initial information is generated based on the initial password set by the user;
    接收所述智能合约返回的验证结果,并根据所述验证结果确定是否允许被使用操作。Receiving the verification result returned by the smart contract, and determining whether the operation is allowed to be used according to the verification result.
  11. 一种智能设备系统,其特征在于,所述系统包括接入局域网的多个智能设备,多个所述智能设备构成私有链网络;An intelligent device system, characterized in that the system includes a plurality of intelligent devices connected to a local area network, and the plurality of intelligent devices form a private chain network;
    各个所述智能设备分别包括:Each of the smart devices includes:
    合约获取模块,用于与所述私有链网络中的其他智能设备分别获取用户发布的具 有多种功能的智能合约;The contract acquisition module is used to acquire smart contracts with multiple functions issued by users separately from other smart devices in the private chain network;
    合约部署模块,用于经所述用户确认后将所述智能合约部署到所述私有链网络上;A contract deployment module for deploying the smart contract to the private chain network after confirmation by the user;
    数据获取模块,用于当接收到所述用户的设备初始化请求时,获取所述设备初始化请求中的用户敏感数据;A data acquisition module, configured to acquire user sensitive data in the device initialization request when receiving the device initialization request of the user;
    第一生成模块,用于对所述用户敏感数据生成相应的第一初始信息;以及A first generating module, configured to generate corresponding first initial information for the user sensitive data; and
    合约调用模块,用于调用所述智能合约的增加功能将所述初始信息写入私有链中。The contract calling module is used to call the added function of the smart contract to write the initial information into the private chain.
  12. 根据权利要求11所述的系统,其特征在于,The system of claim 11, wherein:
    所述数据获取模块,还用于当接收到所述用户的设备使用请求时,获取所述设备使用请求中的用户输入数据;The data acquisition module is also used to acquire user input data in the device use request when the user's device use request is received;
    所述第一生成模块,还用于所述用户输入数据生成相应的待查询信息;The first generating module is also used to generate corresponding information to be queried by the user input data;
    合约调用模块,还用于调用所述智能合约的查询功能对所述待查询信息在所述私有链中进行查询;The contract calling module is also used to call the query function of the smart contract to query the information to be queried in the private chain;
    各个所述智能设备分别还包括:Each of the smart devices further includes:
    操作控制模块,用于根据所述智能合约的查询结果确定所述智能设备是否允许被使用操作。The operation control module is used to determine whether the smart device is allowed to be operated according to the query result of the smart contract.
PCT/CN2019/106753 2018-11-15 2019-09-19 Implementation method for smart device system, smart device control method and system WO2020098382A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CA3160728A CA3160728A1 (en) 2018-11-15 2019-09-19 Method of realizing intelligent equipment system, method of controlling intelligent equipement, and system

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811359532.9A CN109660514B (en) 2018-11-15 2018-11-15 Implementation method of intelligent equipment system, intelligent equipment control method and system
CN201811359532.9 2018-11-15

Publications (1)

Publication Number Publication Date
WO2020098382A1 true WO2020098382A1 (en) 2020-05-22

Family

ID=66112020

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/106753 WO2020098382A1 (en) 2018-11-15 2019-09-19 Implementation method for smart device system, smart device control method and system

Country Status (3)

Country Link
CN (1) CN109660514B (en)
CA (1) CA3160728A1 (en)
WO (1) WO2020098382A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113347185A (en) * 2021-06-01 2021-09-03 永旗(北京)科技有限公司 Internet of things equipment management method based on block chain

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109660514B (en) * 2018-11-15 2020-06-09 苏宁易购集团股份有限公司 Implementation method of intelligent equipment system, intelligent equipment control method and system
CN110716745A (en) * 2019-10-21 2020-01-21 星矿科技(北京)有限公司 Method for constructing off-center community by using block chain and intelligent contract
CN111046078B (en) * 2019-11-11 2023-09-05 京东科技信息技术有限公司 Credit investigation method and device based on block chain and electronic equipment
CN112637274A (en) * 2020-12-04 2021-04-09 山西特信环宇信息技术有限公司 Cone block chain terminal and access method thereof

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106796685A (en) * 2016-12-30 2017-05-31 深圳前海达闼云端智能科技有限公司 Block chain authority control method and device and node equipment
US20170310653A1 (en) * 2016-04-22 2017-10-26 Sony Corporation Client, server, method and identity verification system
CN107820690A (en) * 2017-08-21 2018-03-20 达闼科技成都有限公司 Information choosing method, device, electronic equipment and computer-readable recording medium
CN108647966A (en) * 2018-05-09 2018-10-12 深圳市融讯科技有限公司 A kind of data interactive method and device based on block chain
CN109660514A (en) * 2018-11-15 2019-04-19 苏宁易购集团股份有限公司 A kind of implementation method of smart machine system, smart machine control method and system

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107341702B (en) * 2017-03-08 2020-06-23 创新先进技术有限公司 Service processing method and device
US20180315055A1 (en) * 2017-05-01 2018-11-01 International Business Machines Corporation Blockchain For Issue/Defect Tracking System
CN107622385A (en) * 2017-08-28 2018-01-23 南京邮电大学 A kind of copyright distributing method based on block chain intelligence contract
KR101881045B1 (en) * 2017-11-15 2018-07-23 주식회사 가온시스템 System and method for providing medical information based on block chain
CN108460290A (en) * 2017-12-27 2018-08-28 江苏省卫生统计信息中心 A kind of Electronic Health Record management system and method
CN108171430B (en) * 2017-12-29 2021-12-07 深圳市轱辘车联数据技术有限公司 Data processing method, vehicle-mounted equipment and UBI analysis center server
CN108364180A (en) * 2018-01-31 2018-08-03 复旦大学 A kind of shared electricity transaction method based on block chain
CN108494090B (en) * 2018-04-16 2020-10-02 华东师范大学 Energy networking intelligent device and system based on block chain
CN108717861B (en) * 2018-04-16 2020-07-14 上海交通大学 Medical data sharing method based on block chain

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170310653A1 (en) * 2016-04-22 2017-10-26 Sony Corporation Client, server, method and identity verification system
CN106796685A (en) * 2016-12-30 2017-05-31 深圳前海达闼云端智能科技有限公司 Block chain authority control method and device and node equipment
CN107820690A (en) * 2017-08-21 2018-03-20 达闼科技成都有限公司 Information choosing method, device, electronic equipment and computer-readable recording medium
CN108647966A (en) * 2018-05-09 2018-10-12 深圳市融讯科技有限公司 A kind of data interactive method and device based on block chain
CN109660514A (en) * 2018-11-15 2019-04-19 苏宁易购集团股份有限公司 A kind of implementation method of smart machine system, smart machine control method and system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113347185A (en) * 2021-06-01 2021-09-03 永旗(北京)科技有限公司 Internet of things equipment management method based on block chain

Also Published As

Publication number Publication date
CA3160728A1 (en) 2020-05-22
CN109660514B (en) 2020-06-09
CN109660514A (en) 2019-04-19

Similar Documents

Publication Publication Date Title
WO2020098382A1 (en) Implementation method for smart device system, smart device control method and system
US10454927B2 (en) Systems and methods for managing relationships among digital identities
EP3605475A1 (en) Secure communication method based on smart door lock system and smart door lock system thereof
CN112214745B (en) Authenticated external biometric reader and verification device
US11556617B2 (en) Authentication translation
KR102540090B1 (en) Electronic device and method for managing electronic key thereof
CN113168476A (en) Access control for personalized cryptography security in operating systems
KR102511778B1 (en) Electronic device and method for performing digital key provision
WO2006043904A1 (en) One time passcode system
WO2013075419A1 (en) Method for managing right to use of function, and mobile terminal
US20220245631A1 (en) Authentication method and apparatus of biometric payment device, computer device, and storage medium
WO2012089057A1 (en) Authentication method and electronic device
CN111209558A (en) Internet of things equipment identity authentication method and system based on block chain
KR102301742B1 (en) Method for registering and using non keypad smart door-lock key and access control system thereof
KR20080087917A (en) System for certify one-time password, system for issue a seed, and method for generating one-time password
EP3794485B1 (en) Method and network node for managing access to a blockchain
CN112653553A (en) Internet of things equipment identity management system
US20200218819A1 (en) Sfs access control method and system, sfs and terminal device
CN116192483A (en) Authentication method, device, equipment and medium
JP2020521341A (en) Cryptographic key management based on identification information
KR20220072657A (en) SECURITY CONSTRUCTION METHOD FOR IoT DEVICES PLATFORM AND SECURITY CONSTRUCTION SYSTEM FOR IoT DEVICES PLATFORM BASED ON DUAL BLOCKCHAIN COUPLED WITH VIRTUAL BLOCKCHAIN
WO2022100658A1 (en) Method and system for changing key in security module
KR102288445B1 (en) On-boarding method, apparatus and program of authentication module for organization
JP2004206258A (en) Multiple authentication system, computer program, and multiple authentication method
CN115580641A (en) Equipment control method based on Internet of things platform, electronic equipment and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19885383

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19885383

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 3160728

Country of ref document: CA

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 13.01.2022)

122 Ep: pct application non-entry in european phase

Ref document number: 19885383

Country of ref document: EP

Kind code of ref document: A1