Method of realizing intelligent device system, method of controlling intelligent device, and system
Patent Information
- Application Number
- CA3160728
- Authority / Receiving Office
- CA · CA
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2018-11-15
- Filing Date
- 2019-09-19
- Publication Date
- 2026-10-06
- Estimated Expiration
- 2039-09-19
Abstract
Description
METHOD OF REALIZING INTELLIGENT DEVICE SYSTEM, METHOD OF CONTROLLING INTELLIGENT DEVICE, AND SYSTEM BACKGROUND OF THE INVENTION Technical Field
[0001] The present invention relates to the field of blockchain technology, and more particularly to a method of realizing an intelligent device system, methods of controlling an intelligent device, and a corresponding system. Description of Related Art
[0002] The intelligent device is any of a device, apparatus or machine having computing and processing capabilities. With the increasing development of science, more and more intelligent devices appear in the everyday life of people, such as smart locks, smart speakers, intelligent air-conditioners, intelligent television sets, and intelligent routers, etc., these intelligent devices are accessed to the network via the WiFi of household routers, and are subsequently controlled by application programs of mobile phones.
[0003] As the inventor has found in the process of implementing the present invention, the data are currently available intelligent devices are mostly stored in the cloud servers of manufacturers, and then controlled via handset terminals, but this practice tends to cause leakage of personal information, and it is also made possible at the same time for illegal individuals to take advantage of loopholes to tamper with the data, so as to achieve the objective of controlling the intelligent devices. SUMMARY OF THE INVENTION
[0004] An objective of the present invention it is to provide a method of realizing an intelligent device system, methods of controlling an intelligent device, and a corresponding system, whereby user sensitive data in the intelligent device is stored on a private blockchain through a smart contract, and it is made possible to avoid leakage of the user sensitive data, and to fully guarantee privacy and safety of the user sensitive data.
[0005] Specific technical solutions provided by the embodiments of the present invention are as follows.
[0006] According to the first aspect, there is provided a method of realizing an intelligent device system, and the method comprises:
[0007] constituting a private blockchain network out of a plurality of intelligent devices accessed to a local area network;
[0008] obtaining, by each of the intelligent devices, a smart contract having a plurality of functions released by a user, and deploying the smart contract onto the private blockchain network after confirmation by the user;
[0009] obtaining, by the intelligent device, user sensitive data in an device initialization request, when the intelligent device receives the device initialization request from the user; and
[0010] generating corresponding first initial information for the user sensitive data, and invoking an addition function of the smart contract to write the first initial information in a private blockchain.
[0011] Further, after the step of invoking an addition function of the smart contract to write the information in a private blockchain, the method further comprises:
[0012] obtaining, by the intelligent device, user input data in an device use request, when the intelligent device receives the device use request from the user, and generating corresponding information to be enquired for the user input data;
[0013] invoking a query function of the smart contract to enquire the information to be enquired in the private blockchain; and
[0014] determining, by the intelligent device, whether a use operation is allowed according to a query result of the smart contract.
[0015] Further, the user sensitive data is initial fingerprint data input by the user, and the step of generating corresponding first initial information for the user sensitive data, and invoking an addition function of the smart contract to write the first initial information in a private blockchain includes:
[0016] converting, by the intelligent device, the initial fingerprint data to an initial hash value, and generating an initial composite key according to the initial hash value and a device ID of the intelligent device;
[0017] generating a value according to a start mode of the intelligent device and an entry time of the initial fingerprint data; and
[0018] correspondingly writing the initial composite key and the value in the private blockchain through the addition function of the smart contract.
[0019] Further, the user input data is fingerprint data of the user, and the step of generating corresponding information to be enquired for the user input data, and invoking a query function of the smart contract to enquire the information to be enquired in the private blockchain includes:
[0020] converting, by the intelligent device, the fingerprint data to a hash value, and generating a composite key according to the hash value and the device ID of the intelligent device; and
[0021] invoking the query function of the smart contract to enquire whether there is a value that corresponds to the composite key in the private blockchain, and receiving a query result returned by the smart contract; wherein
[0022] the query result is employed to indicate whether the intelligent device is allowed to be used and operated.
[0023] Moreover, the method further comprises:
[0024] obtaining, when a client end receives a device initialization request of the intelligent device of the user, by the client end, an initial password set by the user, and employing a preset algorithm to generate corresponding second initial information for the initial password;
[0025] correspondingly writing the device ID of the intelligent device, the second initial information and the preset algorithm in a verification function of the smart contract, to update the smart contract; and
[0026] upgrading, by the various intelligent devices, the smart contract according to a confirmation operation of the user.
[0027] Further, after the step of upgrading, by the various intelligent devices, the smart contract according to a confirmation operation of the user, the method further comprises:
[0028] obtaining, by the intelligent device, an input password of the user, when the intelligent device receives the device use request from the user;
[0029] invoking the verification function of the smart contract to employ the preset algorithm to generate corresponding information for the input password, and performing comparative verification of the information with the second initial information that corresponds to the device ID of the intelligent device; and
[0030] receiving a verification result returned by the smart contract, and determining whether a use operation is allowed according to the verification result.
[0031] Further, the preset algorithm is a hash algorithm.
[0032] Moreover, the method further comprises:
[0033] invoking, when the intelligent device receives a modification request of the user sensitive data from the user, a modification function of the smart contract to modify the user sensitive data; and
[0034] invoking, when the intelligent device receives a deletion request of the user sensitive data from the user, a deletion function of the smart contract to delete the user sensitive data.
[0035] According to the second aspect, there is provided a method of controlling an intelligent device, the method is applied to an intelligent device in a private blockchain network, the private blockchain network consists of the intelligent device and other intelligent devices, the private blockchain network is deployed with a smart contract released by a user, and the method comprises:
[0036] obtaining, by the intelligent device, user input data in a device use request, when the intelligent device receives the device use request from the user;
[0037] generating corresponding information to be enquired for the user input data, and invoking the smart contract to enquire the information to be enquired in a private blockchain, wherein initial information generated on the basis of user sensitive data is prestored in the private blockchain; and
[0038] determining whether a use operation is allowed according to a query result of the smart contract.
[0039] According to the third aspect, there is provided a method of controlling an intelligent device, the method is applied to an intelligent device in a private blockchain network, the private blockchain network consists of the intelligent device and other intelligent devices, the private blockchain network is deployed with a smart contract released by a user, and the method comprises:
[0040] obtaining, by the intelligent device, an input password of the user, when the intelligent device receives a device use request from the user;
[0041] invoking the smart contract to enable the smart contract to employ a preset algorithm to generate corresponding information for the input password, and performing comparative verification of the information with initial information that corresponds to a device ID of the intelligent device, wherein the initial information is generated on the basis of an initial password set by the user; and
[0042] receiving a verification result returned by the smart contract, and determining whether a use operation is allowed according to the verification result.
[0043] According to the fourth aspect, there is provided an intelligent device system, the system comprises a client end and a plurality of intelligent devices accessed to a local area network, the plural intelligent devices constitute a private blockchain network,
[0044] the various intelligent devices each include:
[0045] a contract obtaining module, for obtaining, respectively with other intelligent devices in the private blockchain network, a smart contract having a plurality of functions released by a user through the client end;
[0046] a contract deploying module, for deploying the smart contract onto the private blockchain network after confirmation by the user;
[0047] a data obtaining module, for obtaining user sensitive data in a device initialization request, when the device initialization request is received from the user;
[0048] a first generating module, for generating corresponding first initial information for the user sensitive data; and
[0049] a contract invoking module, for invoking an addition function of the smart contract to write the first initial information in a private blockchain.
[0050] Further, the data obtaining module is further employed for obtaining user input data in a device use request, when the device use request is received from the user;
[0051] the first generating module is further employed for generating corresponding information to be enquired for the user input data;
[0052] the contract invoking module is further employed for invoking a query function of the smart contract to enquire the information to be enquired in the private blockchain;
[0053] the various intelligent devices each further include:
[0054] an operation controlling module, for determining whether the intelligent device is allowed to be used and operated according to a query result of the smart contract.
[0055] Further, the user sensitive data is initial fingerprint data input by the user, and the first generating module is specifically employed for:
[0056] converting the initial fingerprint data to an initial hash value, and generating an initial composite key according to the initial hash value and a device ID of the intelligent device; and
[0057] generating a value according to a start mode of the intelligent device and an entry time of the initial fingerprint data;
[0058] the contract invoking module is specifically employed for:
[0059] correspondingly writing the initial composite key and the value in the private blockchain through the addition function of the smart contract.
[0060] Further, the user input data is fingerprint data of the user, and the first generating module is specifically further employed for:
[0061] converting the fingerprint data to a hash value, and generating a composite key according to the hash value and the device ID of the intelligent device;
[0062] the contract invoking module is specifically further employed for:
[0063] invoking the query function of the smart contract to enquire whether there is a value that corresponds to the composite key in the private blockchain, and receiving a query result returned by the smart contract; wherein
[0064] the query result is employed to indicate whether the intelligent device is allowed to be used and operated.
[0065] Moreover, the system further comprises a client end, and the client end includes:
[0066] a password obtaining module, for obtaining, when a device initialization request of the intelligent device is received from the user, by the client end, an initial password set by the user;
[0067] a second generating module, for employing a preset algorithm to generate corresponding second initial information for the initial password; and
[0068] an information writing module, for correspondingly writing the device ID of the intelligent device, the second initial information and the preset algorithm in a verification function of the smart contract, to update the smart contract;
[0069] the various intelligent devices each further include:
[0070] a contract upgrading module, for upgrading the smart contract according to a confirmation operation of the user.
[0071] Further, the data obtaining module is specifically further employed for:
[0072] obtaining an input password of the user, when the device use request is received from the user;
[0073] the contract invoking module is specifically further employed for:
[0074] invoking the verification function of the smart contract to enable the smart contract to employ the preset algorithm to generate corresponding information for the input password, and performing comparative verification of the information with the second initial information that corresponds to the device ID of the intelligent device; and
[0075] receiving a verification result returned by the smart contract, and determining whether a use operation is allowed according to the verification result.
[0076] Further, the preset algorithm is a hash algorithm.
[0077] Moreover, the contract invoking module is specifically further employed for:
[0078] invoking, when a modification request of the user sensitive data is received from the user, a modification function of the smart contract to modify the user sensitive data; and
[0079] invoking, when a deletion request of the user sensitive data is received from the user, a deletion function of the smart contract to delete the user sensitive data.
[0080] The technical solutions provided by the embodiments of the present invention bring about the following advantageous effects.
[0081] 1. Since the initial information generated by the user sensitive data is written in the private blockchain through the smart contract, and the content of the smart contract cannot be modified when a single intelligent device is broken through, the originally deployed smart contract can be evaded only by breaking through the entire intelligent devices in the private blockchain network to deploy a new smart contract, so it is difficult for illegal individuals to obtain the user sensitive data, and the user sensitive data is rendered more secure.
[0082] 2. Since the user sensitive data according to the embodiments of the present invention is stored in an LAN private blockchain, the user sensitive data is prevented from being leaked, and it is made difficult for illegal individuals to obtain the user sensitive data; at the same time, the user sensitive data can only be operated and read by the user, the prior- art problem concerning security in which the user sensitive data is stored in the cloud server or locally is therefore avoided.
[0083] 3. Since the plural intelligent devices constituting the private blockchain network are accessed to the local area network, malicious attack by illegal individuals through the public network is made impossible.
[0084] 4. Compared with prior-art technology in which the user must pass through the public network to access to the server for identification verification when the user sensitive data is stored in a cloud server, since the user sensitive data is stored in an LAN private blockchain according to the embodiments of the present invention, the user can directly access to the LAN for identification verification, so the ID verification is made more highly effective. BRIEF DESCRIPTION OF THE DRAWINGS
[0085] In order to describe the technical solutions in the embodiments of the present invention more clearly, accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Apparently, the accompanying drawings introduced below are merely directed to partial embodiments of the present invention, and it is possible for persons ordinarily skilled in the art to acquire other drawings based on these drawings without spending any creative effort in the process.
[0086] Fig. 1 is a flowchart illustrating a method of realizing an intelligent device system provided by the present invention;
[0087] Fig. 2 is a flowchart illustrating a method of realizing an intelligent device system provided by the present invention;
[0088] Fig. 3 is a flowchart illustrating a method of realizing an intelligent device system provided by the present invention;
[0089] Fig. 4 is a flowchart illustrating a method of realizing an intelligent device system provided by the present invention;
[0090] Fig. 5 is a flowchart illustrating a method of controlling an intelligent device system provided by the present invention;
[0091] Fig. 6 is a flowchart illustrating a method of controlling an intelligent device system provided by the present invention;
[0092] Fig. 7 is a system block diagram illustrating an intelligent device system provided by the present invention;
[0093] Fig. 8 is a view schematically illustrating the framework of an intelligent device system provided by the present invention; and
[0094] Fig. 9 is a flowchart schematically illustrating password door-opening of a smart lock provided by the present invention. DETAILED DESCRIPTION OF THE INVENTION
[0095] In order to make more lucid and clear the objectives, technical solutions, and advantages of the present invention, the technical solutions in the embodiments of the present invention will be clearly and comprehensively described below with reference to accompanying drawings in the embodiments of the present invention. Apparently, the embodiments as described are merely partial, rather than the entire, embodiments of the present invention. All other embodiments obtainable by persons ordinarily skilled in the art based on the embodiments in the present invention shall all be covered by the protection scope of the present invention.
[0096] As should be understood, such terms as "first" and "second" as used in the description of the present application are merely meant for descriptive purposes, and shall not be understood to indicate or imply relative importance. In addition, unless otherwise specified, such terms as "plural" and "plurality of" as used in the description of the present application mean "two or more".
[0097] Before the method of realizing an intelligent device system provided by the present invention is described, technical terms involved in the various embodiments of the present invention are firstly introduced as follows.
[0098] As regards "blockchain", it is a novel application pattern that merges together such computer techniques as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm. In accordance with different degrees of centralization of the blockchain network, three types of blockchains are differentiated under different application scenarios:
[0099] 1. a blockchain that is public over the entire network, without any user authorization mechanism, is referred to as a public blockchain;
[0100] 2. a blockchain that allows access of authorized nodes to the networks, in which information can be viewed according to permission, and which is usually used among institutions, is referred to as an alliance chain;
[0101] 3. a blockchain in whose entire networks the nodes are all under control by one institution is referred to as a private blockchain.
[0102] Embodiment 1
[0103] Fig. 1 is a flowchart illustrating a method of realizing an intelligent device system provided by the present invention, as shown in Fig. 1, the method can comprise the following steps.
[0104] 101 - constituting a private blockchain network out of a plurality of intelligent devices accessed to a local area network.
[0105] The plural intelligent devices include, but are not limited to, smart locks, smart speakers, intelligent air-conditioners, intelligent television sets, and intelligent routers, etc. The intelligent device can utilize a sensor to collect such information as user fingerprint data and environmental data, etc., and the sensor can be either integrated on the intelligent device or connected with the intelligent device via a wired mode or a wireless mode.
[0106] 102 - obtaining, by each of the intelligent devices, a smart contract having a plurality of functions released by a user, and deploying the smart contract onto the private blockchain network after confirmation by the user.
[0107] The smart contract possesses plural functions, including addition function, deletion function, query function, modification function, and verification function.
[0108] Specifically, the process can include the following:
[0109] The various intelligent devices respectively obtain the smart contract released by the user through one of the following modes:
[0110] a client end having a contract releasing function;
[0111] an intelligent device from the plural intelligent devices having a contract releasing function;
[0112] the client end can specifically be such a terminal device as a mobile terminal, a personal PC, etc.
[0113] After confirmation of the user by pressing a button, the various intelligent devices deploy the smart contract onto the private blockchain network.
[0114] 103 - obtaining, by the intelligent device, user sensitive data in a device initialization request, when the intelligent device receives the device initialization request from the user.
[0115] The user sensitive data can be such user characteristic information as fingerprint data and iris data of the user, and other sensitive data can be further included.
[0116] In this embodiment, after the user has deployed the plural intelligent devices to constitute the private blockchain network, it is required to initialize the intelligent devices to facilitate subsequent use of the intelligent devices. When it is required for the user to initialize an intelligent device, initialization can be performed by fingerprint input, taking a smart lock for example, the user can input his fingerprint data via a sensor in the smart lock, so as to initialize the smart lock.
[0117] 104 - generating corresponding first initial information for the user sensitive data, and invoking an addition function of the smart contract to write the first initial information in a private blockchain.
[0118] Specifically, the intelligent device converts the initial fingerprint data to an initial hash value, and generates an initial composite key according to the initial hash value and a device ID of the intelligent device; a value is generated according to a start mode of the intelligent device and an entry time of the initial fingerprint data; the initial composite key and the value are correspondingly written in a private blockchain through the addition function of the smart contract.
[0119] During the process of specific implementation, the intelligent device can employ a hash algorithm to perform hash computation on the initial fingerprint data, and to generate the initial hash value, and the hash algorithm can be any safe and reliable hash algorithm, such as SHA256, SM3 according to State Cryptography Administration or SM4 according to State Cryptography Administration, etc.
[0120] In this embodiment of the present invention, since the initial information generated by the user sensitive data is written in the private blockchain through the smart contract, and the content of the smart contract cannot be modified when a single intelligent device is broken through, the originally deployed smart contract can be evaded only by breaking through the entire intelligent devices in the private blockchain network to deploy a new smart contract, so it is difficult for illegal individuals to obtain the user sensitive data; moreover, the user sensitive data can only be operated and read by the user, so the user sensitive data is rendered more secure; at the same time, since the plural intelligent devices constituting the private blockchain network are accessed to the local area network, malicious attack by illegal individuals through the public network is made impossible; in addition, compared with prior-art technology in which the user must pass through the public network to access to the server for identification verification when the user sensitive data is stored in a cloud server, since the user sensitive data is stored in an LAN private blockchain according to the embodiments of the present invention, the user can directly access to the LAN for identification verification, so the ID verification is made more highly effective.
[0121] Moreover, the method provided by this embodiment of the present invention can further comprise:
[0122] invoking, when the intelligent device receives a modification request of the user sensitive data from the user, a modification function of the smart contract to modify the user sensitive data; and invoking, when the intelligent device receives a deletion request of the user sensitive data from the user, a deletion function of the smart contract to delete the user sensitive data.
[0123] In this embodiment of the present invention, through the modification function or the deletion function of the smart contract, it is facilitated to modify or delete the user sensitive data.
[0124] Moreover, the method provided by this embodiment of the present invention can further comprise:
[0125] recording, by the intelligent device, operations on the user sensitive data in the private blockchain for the user's review and check.
[0126] In this embodiment of the present invention, by recording operations on the user sensitive data in the private blockchain, it is made possible to prevent the user sensitive data from being illegally enquired and tampered with, and hence to fully guarantee the privacy and safety of the user sensitive data.
[0127] Embodiment 2
[0128] Fig. 2 is a flowchart illustrating a method of realizing an intelligent device system provided by the present invention, in this embodiment, in addition to comprising the steps described with reference to Fig. 1, the method of realizing an intelligent device system further comprises steps 201 to 204; for the sake of brevity, the steps described with reference to Fig. 1 are omitted. As shown in Fig. 2, the method of realizing an intelligent device system further comprises the following.
[0129] 201 - obtaining, by the intelligent device, user input data in a device use request, when the intelligent device receives the device use request from the user.
[0130] In this embodiment, after the user has completed initialization of the intelligent device, the intelligent device can be correspondingly operated. Taking a smart lock for example, when it is required for the user to open the smart lock, the smart lock can be opened through fingerprint input, i.e., fingerprint data is input via a sensor in the smart lock.
[0131] 202 - generating corresponding information to be enquired for the user input data.
[0132] The user input data is fingerprint data of the user.
[0133] Specifically, the intelligent device converts the fingerprint data to a hash value, and generates a composite key according to the hash value and the device ID of the intelligent device to serve as the information to be enquired.
[0134] During the process of specific implementation, the intelligent device can employ a hash algorithm to perform hash computation on the user input data, and to generate the hash value, and the hash algorithm can be any safe and reliable hash algorithm, such as SHA256, SM3 according to State Cryptography Administration or SM4 according to State Cryptography Administration, etc.
[0135] 203 - invoking a query function of the smart contract to enquire the information to be enquired in the private blockchain.
[0136] Specifically, the query function of the smart contract is invoked to enquire whether there is a value that corresponds to the composite key in the private blockchain, and a query result returned by the smart contract is received. The query result is employed to indicate whether the intelligent device can be used and operated.
[0137] 204 - determining, by the intelligent device, whether a use operation is allowed according to a query result of the smart contract.
[0138] When the query result expresses successful query, the intelligent device is allowed to be used and operated, when the query result expresses failed query, the intelligent device is not allowed to be used and operated.
[0139] In this embodiment of the present invention, when the user is using the intelligent device, input data of the user is obtained and corresponding information to be enquired is generated, and corresponding query is performed by invoking the query function of the smart contract, so as to determine whether the intelligent device is allowed to be used and operated according to the query result returned by the smart contract, whereby it is made possible to prevent the intelligent device from being controlled by illegal individuals.
[0140] Embodiment 3
[0141] Fig. 3 is a flowchart illustrating a method of realizing an intelligent device system provided by the present invention, in this embodiment, in addition to comprising the steps described with reference to Fig. 1, the method of realizing an intelligent device system further comprises steps 301 to 304; for the sake of brevity, the steps described with reference to Fig. 1 are omitted. As shown in Fig. 3, the method of realizing an intelligent device system further comprises the following.
[0142] 301 - obtaining, when a client end of the user receives a device initialization request of the intelligent device of the user, by the client end, an initial password set by the user.
[0143] In this embodiment, after the user has deployed the plural intelligent devices to constitute the private blockchain network, it is required to initialize the intelligent devices to facilitate subsequent use of the intelligent devices. When it is required for the user to initialize an intelligent device, initialization of the intelligent device can be further performed by password input in addition to fingerprint input. Taking a smart lock for example, the user can employ a handset client end to set the door-opening password of the smart lock, so as to initialize the smart lock.
[0144] 302 - employing a preset algorithm to generate corresponding second initial information for the initial password.
[0145] The preset algorithm is a hash algorithm.
[0146] Specifically, the client end can employ a hash algorithm to perform hash computation on the initial password, and to generate an initial hash value, and the hash algorithm can be any safe and reliable hash algorithm, such as SHA256, SM3 according to State Cryptography Administration or SM4 according to State Cryptography Administration, etc.
[0147] 303 - correspondingly writing the device ID of the intelligent device, the second initial information and the preset algorithm in a verification function of the smart contract, to update the smart contract.
[0148] 304 - upgrading, by the various intelligent devices, the smart contract according to a confirmation operation of the user.
[0149] Specifically, after confirmation of the user by pressing a button, each intelligent device upgrades the smart contract.
[0150] In this embodiment of the present invention, since the second initial information generated by the initial password set by the user is written in the private blockchain through the smart contract, when it is required for the user to change the initial password, this can be achieved by upgrading the contract.
[0151] Embodiment 4
[0152] Fig. 4 is a flowchart illustrating a method of realizing an intelligent device system provided by the present invention, in this embodiment, in addition to comprising the steps described with reference to Fig. 3, the method of realizing an intelligent device system further comprises steps 401 to 403; for the sake of brevity, the steps described with reference to Fig. 3 are omitted. As shown in Fig. 4, the method of realizing an intelligent device system further comprises the following.
[0153] 401 - obtaining, by the intelligent device, an input password of the user, when the intelligent device receives the device use request from the user.
[0154] In this embodiment, after the user has completed initialization of the intelligent device, the intelligent device can be correspondingly operated. Taking a smart lock for example, when it is required for the user to open the smart lock, the smart lock can be opened through password input, i.e., the password is input via a mobile client end in the smart lock.
[0155] 402 - invoking the verification function of the smart contract to enable the smart contract to employ the preset algorithm to generate corresponding information for the input password, and performing comparative verification of the information with the second initial information that corresponds to the device ID of the intelligent device.
[0156] Specifically, the intelligent device invokes the verification function of the smart contract to perform hash computation on the input password through the smart contract, performs a comparative verification of the hash computation result with the hash computation result of the initial password of the smart contract, and generates a verification result; the verification result is used to indicate whether the intelligent device is allowed to be used and operated.
[0157] 403 - receiving a verification result returned by the smart contract, and determining whether a use operation is allowed according to the verification result.
[0158] The verification result is used to indicate whether the intelligent device is allowed to be used and operated.
[0159] When the verification result expresses successful verification, the intelligent device is allowed to be used and operated, when the verification result expresses failed verification, the intelligent device is not allowed to be used and operated.
[0160] In this embodiment of the present invention, when the user is using the intelligent device, the input password of the user is obtained, and corresponding verification is made by invoking the verification function of the smart contract, so that it is determined according to the verification result returned by the smart contract as to whether the intelligent device is allowed to be used and operated, so as to prevent the intelligent device from being controlled by illegal individuals.
[0161] Embodiment 5
[0162] This embodiment of the present invention provides a method of controlling an intelligent device, the method is applied to an intelligent device in a private blockchain network, the private blockchain network consists of the intelligent device and other intelligent devices, the private blockchain network is deployed with a smart contract released by a user, and the method comprises the following steps.
[0163] 501 - obtaining, by the intelligent device, user input data in a device use request, when the intelligent device receives the device use request from the user.
[0164] Specifically, this step is identical with step 201, so it is not redundantly described in this context.
[0165] 502 - generating corresponding information to be enquired for the user input data.
[0166] Specifically, this step is identical with step 202, so it is not redundantly described in this context.
[0167] 503 - invoking the smart contract to enquire the information to be enquired in a private blockchain, wherein initial information generated on the basis of user sensitive data is prestored in the private blockchain.
[0168] Specifically, this step is identical with step 203, so it is not redundantly described in this context.
[0169] 504 - determining whether a use operation is allowed according to a query result of the smart contract.
[0170] Specifically, this step is identical with step 204, so it is not redundantly described in this context.
[0171] In this embodiment of the present invention, when the user is using the intelligent device, input data of the user is obtained and corresponding information to be enquired is generated, and corresponding query is performed by invoking the smart contract, so as to determine whether the intelligent device is allowed to be used and operated according to the query result returned by the smart contract, whereby it is made possible to prevent the intelligent device from being controlled by illegal individuals.
[0172] Embodiment 6
[0173] This embodiment of the present invention provides a method of controlling an intelligent device, the method is applied to an intelligent device in a private blockchain network, the private blockchain network consists of the intelligent device and other intelligent devices, the private blockchain network is deployed with a smart contract released by a user, and the method comprises the following steps.
[0174] 601 - obtaining, by the intelligent device, an input password of the user, when the intelligent device receives a device use request from the user.
[0175] Specifically, this step is identical with step 401, so it is not redundantly described in this context.
[0176] 602 - invoking the smart contract to enable the smart contract to employ a preset algorithm to generate corresponding information for the input password, and performing comparative verification of the information with initial information that corresponds to a device ID of the intelligent device, wherein the initial information is generated on the basis of an initial password set by the user.
[0177] Specifically, this step is identical with step 402, so it is not redundantly described in this context.
[0178] 603 - receiving a verification result returned by the smart contract, and determining whether a use operation is allowed according to the verification result.
[0179] Specifically, this step is identical with step 403, so it is not redundantly described in this context.
[0180] In this embodiment of the present invention, when the user is using the intelligent device, the input password of the user is obtained, and corresponding verification is made by invoking the smart contract, so that it is determined according to the verification result returned by the smart contract as to whether the intelligent device is allowed to be used and operated, so as to prevent the intelligent device from being controlled by illegal individuals.
[0181] The method provided by the embodiment of the present invention is exemplarily described below in conjunctions with Figs. 8 and 9. Suppose that the plural intelligent devices accessed to the local area network include a smart lock 82, a smart speaker 84, an intelligent television set 86, and an intelligent router 88, after the method according to the embodiment of the present invention has been executed on these plural intelligent devices, the framework of the resultant intelligent device system is as schematically shown with reference to Fig. 8. Suppose that the user uses a smart lock 82 to open the door, as shown in Fig. 9, which is a flowchart schematically illustrating password door- opening of a smart lock 82 provided by the present invention, the user inputs a password, the smart lock invokes the verification function of the smart contract to perform corresponding verification, and the smart lock allows the door-opening operation when the verification succeeds.
[0182] Embodiment 7
[0183] Fig. 7 is a system block diagram illustrating an intelligent device system provided by the present invention, the system can comprise a client end and a plurality of intelligent devices accessed to a local area network, and the plural intelligent devices constitute a private blockchain network, as shown in Fig. 7, to facilitate clear description, the intelligent device system that is based on blockchain is described below merely with a client end 710 and an intelligent device 720 that is located in the private blockchain network, of which the intelligent device 720 is configured as anyone of the plural intelligent devices:
[0184] the client end 710 includes:
[0185] a contract releasing module 711, for releasing a smart contract having plural functions to various intelligent devices of the private blockchain network;
[0186] the intelligent device 720 includes:
[0187] a contract obtaining module 721, for obtaining, respectively with other intelligent devices in the private blockchain network, a smart contract having a plurality of functions released by a user;
[0188] a contract deploying module 722, for deploying the smart contract onto the private blockchain network after confirmation by the user;
[0189] a data obtaining module 723, for obtaining user sensitive data in a device initialization request, when the device initialization request is received from the user;
[0190] a first generating module 724, for generating corresponding first initial information for the user sensitive data; and
[0191] a contract invoking module 725, for invoking an addition function of the smart contract to write the first initial information in a private blockchain.
[0192] Moreover, the data obtaining module 723 is further employed for obtaining user input data in a device use request, when the device use request is received from the user;
[0193] the first generating module 724 is further employed for generating corresponding information to be enquired for the user input data;
[0194] the contract invoking module 725 is further employed for invoking a query function of the smart contract to enquire the information to be enquired in the private blockchain;
[0195] the intelligent device 720 further includes:
[0196] an operation controlling module 726, for determining whether the intelligent device is allowed to be used and operated according to a query result of the smart contract.
[0197] Further, the user sensitive data is initial fingerprint data input by the user, and the first generating module 724 is specifically employed for:
[0198] converting the initial fingerprint data to an initial hash value, and generating an initial composite key according to the initial hash value and a device ID of the intelligent device; and
[0199] generating a value according to a start mode of the intelligent device and an entry time of the initial fingerprint data;
[0200] the contract invoking module is specifically employed for:
[0201] correspondingly writing the initial composite key and the value in the private blockchain through the addition function of the smart contract.
[0202] Further, the user input data is fingerprint data of the user, and the first generating module 724 is specifically further employed for:
[0203] converting the fingerprint data to a hash value, and generating a composite key according to the hash value and the device ID of the intelligent device;
[0204] the contract invoking module 725 is specifically further employed for:
[0205] invoking the query function of the smart contract to enquire whether there is a value that corresponds to the composite key in the private blockchain, and receiving a query result returned by the smart contract; wherein
[0206] the query result is employed to indicate whether the intelligent device is allowed to be used and operated.
[0207] Moreover, the client end 710 further includes:
[0208] a password obtaining module 712, for obtaining, when a device initialization request of the intelligent device is received from the user, by the client end, an initial password set by the user;
[0209] a second generating module 713, for employing a preset algorithm to generate corresponding second initial information for the initial password; and
[0210] an information writing module 714, for correspondingly writing the device ID of the intelligent device, the second initial information and the preset algorithm in a verification function of the smart contract, to update the smart contract;
[0211] the intelligent device further includes:
[0212] a contract upgrading module 727, for upgrading the smart contract according to a confirmation operation of the user.
[0213] Further, the data obtaining module 723 is specifically further employed for:
[0214] obtaining an input password of the user, when the device use request is received from the user;
[0215] the contract invoking module 725 is specifically further employed for:
[0216] invoking the verification function of the smart contract to enable the smart contract to employ the preset algorithm to generate corresponding information for the input password, and performing comparative verification of the information with the second initial information that corresponds to the device ID of the intelligent device; and
[0217] receiving a verification result returned by the smart contract, and determining whether a use operation is allowed according to the verification result.
[0218] Further, the preset algorithm is a hash algorithm.
[0219] Moreover, the contract invoking module 725 is specifically further employed for:
[0220] invoking, when a modification request of the user sensitive data is received from the user, a modification function of the smart contract to modify the user sensitive data; and
[0221] invoking, when a deletion request of the user sensitive data is received from the user, a deletion function of the smart contract to delete the user sensitive data.
[0222] As should be noted, the intelligent device system provided by the above embodiment is merely exemplarily described by being divided into the aforementioned various functional modules, whereas in practical application, it is possible to assign these functions to different functional modules to be completed there according to requirements, that is to say, the internal structure of the device can be divided into different functional modules to complete the entire or partial functions mentioned above. In addition, the intelligent device system pertains to the same conception as the method of realizing an intelligent device system and the methods of controlling an intelligent device – see the method embodiments for details of its specific implementation process, while no repetition is made in this context.
[0223] As can be understood by persons ordinarily skilled in the art, the entire or partial steps that realize the aforementioned embodiments can be completed via hardware, and can also be completed via a program that instructs relevant hardware, the program can be stored in a computer-readable storage medium, and the storage medium can be a read- only memory, a magnetic disk or an optical disk, etc.
[0224] What the above describes is merely directed to preferred embodiments of the present invention, and is not meant to restrict the present invention. Any modification, equivalent substitution, and improvement makeable within the spirit and principle of the present invention shall all be covered by the protection scope of the present invention.
Claims
1. An intelligent device system comprising: a client terminal including: a contract releasing module configured to release a smart contract having a plurality of functions to various intelligent devices in a private blockchain network; each of the various intelligent devices including: a contract obtaining module configured to obtain, respectively with other intelligent devices in the private blockchain network, the smart contract having the plurality of functions released by a user; a contract deploying module configured to deploy the smart contract onto the private blockchain network after the smart contract is confirmed by the user; a data obtaining module configured to obtain user sensitive data in a device initialization request, when the one of the intelligent devices receives the device initialization request from the user, wherein the user sensitive data is unique user characteristic information input by the user; a first generating module configured to generate first initial information corresponding to the user sensitive data; a contract invoking module configured to invoke an addition function of the smart contract to write the first initial information in a private blockchain, wherein the first initial information corresponds a combination of a device ID and the unique user characteristic information; and an operation controlling module configured to determine whether a use operation is allowed according to a query result of the smart contract, wherein the use operation at least includes controlling the intelligent device for physical use.
2. The intelligent device system of claim 1, wherein the data obtaining module is further configured to obtain user input data in a device use request, when the one of the intelligent devices receives the device use request from the user, wherein the user input data is fingerprint data of the user captured using a sensor at the time of the device use request.
3. The intelligent device system of any one of claims 1 to 2, wherein the first generating module is further configured to generate corresponding information to be enquired for the user input data.
4. The intelligent device system of any one of claims 1 to 3, wherein the contract invoking module is configured to invoke a query function of the smart contract to request, from the user, information that will be required in the private blockchain.
5. The intelligent device system of any one of claims 1 to 4, wherein the first generating module is further configured to: convert, by the intelligent device, the initial fingerprint data to an initial hash value, and generate an initial composite key according to the initial hash value and the device ID of the intelligent device; generate a value according to a start mode of the intelligent device and an entry time of the initial fingerprint data; and correspondingly write the initial composite key and the value in the private blockchain through the addition function of the smart contract.
6. The intelligent device system of any one of claims 1 to 5, wherein the client terminal further includes a password obtaining module configured to obtain, when a device initialization request of the intelligent device is received from the user, an initial password set by the user.
7. The intelligent device system of any one of claims 1 to 6, wherein the client terminal further includes a second generating module configured to employ a preset algorithm to generate corresponding second initial information for the initial password.
8. The intelligent device system of any one of claims 1 to 7, wherein the client terminal further includes an information writing module configured to, correspondingly write the device ID of the intelligent device, the second initial information and the preset algorithm in a verification function of the smart contract, to update the smart contract.
9. The intelligent device system of any one of claims 1 to 8, wherein the each of the various intelligent devices further includes a contract upgrading module configured to upgrade the smart contract according to a confirmation operation of the user.
10. The intelligent device system of any one of claims 1 to 9, wherein the data obtaining module is further configured to obtain an input password of the user, when a device use request is received from the user.
11. The intelligent device system of any one of claims 1 to 10, wherein the contract invoking module is further configured to: invoke the verification function of the smart contract to enable the smart contract to employ the preset algorithm to generate corresponding information for the input password, and perform comparative verification of the information with the second initial information that corresponds to the device ID of the intelligent device, wherein the preset algorithm is a hash algorithm; and receive a verification result returned by the smart contract, and determine whether a use operation is allowed according to the verification result.
12. The intelligent device system of any one of claims 1 to 11, wherein the contract invoking module is further configured to: invoke, when the intelligent device receives a modification request of the user sensitive data from the user, a modification function of the smart contract to modify the user sensitive data; and invoke, when the intelligent device receives a deletion request of the user sensitive data from the user, a deletion function of the smart contract to delete the user sensitive data.
13. An intelligent device system, comprising: a plurality of intelligent devices configured to constitute a private blockchain network for a plurality of intelligent devices, the plurality of intelligent devices being accessible via a local area network; each of the plurality of the intelligent devices including: a contract obtaining module configured to obtain, by each of the intelligent devices, a smart contract having a plurality of functions released by a user; a contract deploying module configured to deploy the smart contract onto the private blockchain network after the smart contract is confirmed by the user; a data obtaining module configured to obtain user sensitive data in a device initialization request, when receiving the device initialization request from the user, wherein the user sensitive data is unique user characteristic information input by the user; a first generating module configured to generate first initial information corresponding to the user sensitive data; and a contract invoking module configured to invoke an addition function of the smart contract to write the first initial information in a private blockchain; and an operation controlling module configured to determine whether a use operation is allowed according to a query result of the smart contract, wherein the use operation at least includes controlling the intelligent device for physical use.
14. The intelligent device system of claim 13, wherein the data obtaining module is further configured to obtain user input data in a device use request, when the one of the intelligent devices receives the device use request from the user, wherein the user input data is fingerprint data of the user captured using a sensor at the time of the device use request.
15. The intelligent device system of any one of claims 13 to 14, wherein the first generating module is further configured to generate information corresponding to the user input data.
16. The intelligent device system of any one of claims 13 to 15, wherein the contract invoking module is further configured to invoke a query function of the smart contract to request, from the user, information that will be required in the private blockchain.
17. A computer implemented method for implementing an intelligent device system, the computer implemented method includes: constituting a private blockchain network out of a plurality of intelligent devices accessed to a local area network; obtaining, by each of the intelligent devices, a smart contract having a plurality of functions released by a user, and deploying the smart contract onto the private blockchain network after the smart contract is confirmed by the user; obtaining, by one of the intelligent devices, user sensitive data in a device initialization request, when the one of the intelligent devices receives the device initialization request from the user, wherein the user sensitive data is unique user characteristic information input by the user; and generating first initial information corresponding to the user sensitive data, and invoking an addition function of the smart contract to write the first initial information in a private blockchain; and obtaining, by the one of the intelligent devices, user input data in a device use request, when the one of the intelligent devices receives the device use request from the user, wherein the user input data is fingerprint data of the user captured using a sensor at the time of the device use request; generating corresponding information to be enquired for the user input data, and invoking a query function of the smart contract to enquire the information to be enquired in the private blockchain; and determining, by the one of the intelligent devices, whether a use operation is allowed according to a query result of the smart contract, wherein the use operation at least includes controlling the intelligent device for physical use.
18. The computer implemented method of claim 17, further includes invoking, when the intelligent device receives a modification request of the user sensitive data from the user, a modification function of the smart contract to modify the user sensitive data.
19. The computer implemented method of any one of claims 17 to 18, further includes invoking, when the intelligent device receives a deletion request of the user sensitive data from the user, a deletion function of the smart contract to delete the user sensitive data.
20. The computer implemented method of any one of claims 17 to 19, further includes obtaining, when a device initialization request of the intelligent device is received from the user, an initial password set by the user.