Device node initialization method, device, electronic device and storage medium
By generating unique blockchain node identification codes and initializing them, the conflict problem caused by innate identification codes in traditional blockchain node deployment is solved, and the stability and security of blockchain are improved.
Patent Information
- Application Number
- CN202110428270.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-21
- Publication Date
- 2025-08-15
- Estimated Expiration
- 2041-04-21
AI Technical Summary
In the deployment method of traditional blockchain nodes, since the identification code is not unique, the device nodes conflict during initialization, affecting the stability of the blockchain.
The controlled device node generates a unique blockchain node identification code based on the attribute information and random code sent by the control device node, and completes initialization through the distribution network information accessed to the intelligent gateway to ensure the uniqueness of the identification code.
It avoids initialization conflicts caused by duplication of identification codes, and improves the stability and security of blockchain nodes.
Smart Images

Figure CN115225275B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to computer technology, and in particular to a device node initialization method, apparatus, electronic device, and storage medium. Background Art
[0002] With the rapid development of internet technology, smart homes, as a key component of the intelligent internet, have gradually entered millions of households. Smart homes use homes as a platform to build efficient management systems for residential facilities and family schedules, enhancing home safety, convenience, comfort, and artistry while creating an environmentally friendly and energy-efficient living environment.
[0003] As blockchain technology matures, it has become possible to build a comprehensive smart home ecosystem. However, the deployment of blockchain nodes, consisting of control terminals and controlled devices, requires a certain level of stability. Traditional blockchain node deployment methods, however, lack unique node identification codes. This can lead to conflicts in node identification codes during initialization of device nodes, impacting blockchain stability. Summary of the Invention
[0004] Embodiments of the present invention provide a device node initialization method, apparatus, electronic device, and storage medium to generate a unique identification code for a controlled-end device node, initialize the controlled-end device node using the identification code, and improve the stability and security of blockchain nodes.
[0005] The technical solution of this application is as follows:
[0006] In a first aspect, a device node initialization method is provided, which is applied to a blockchain device node. The blockchain device node includes: a control end device node and a controlled end device node. The device node initialization method includes:
[0007] The controlled device node generates a blockchain node identification code based on the attribute information and random code sent by the controlling device node;
[0008] The controlled device node sends the blockchain node identification code to the controlling device node;
[0009] The control-end device node sends the network configuration information to the controlled-end device node according to the received blockchain node identification code, where the network configuration information is the identity authentication information of the controlled-end device node;
[0010] The controlled device node is connected to the intelligent gateway through the network configuration information to complete the initialization of the controlled device node.
[0011] In some embodiments, the attribute information includes at least one of a serial code of the control terminal device, a geographic information code, and a time information code.
[0012] In some embodiments, after generating a blockchain node identification code based on the attribute information and random code sent by the control terminal device node, the process further includes:
[0013] The controlled-end device node stores the blockchain node identification code in the identification storage area of the controlling-end device node.
[0014] In some embodiments, before the controlled-end device node generates a blockchain node identification code based on the attribute information and random code sent by the control-end device node, the process further includes:
[0015] The controlled-end device node verifies the first signature file sent by the control-end device node; the control-end device node verifies the second signature file sent by the controlled-end device node; when the first signature file and the second signature file are verified successfully, the controlled-end device node receives the attribute information.
[0016] In some embodiments, the controlled-end device node verifies the first signature file sent by the control-end device node, including:
[0017] The controlled-end device node decrypts the first signature file sent by the control-end device node to obtain a first decrypted file, where the first signature file is encrypted using the private key of the control-end device node;
[0018] The controlled-end device node determines whether the content of the first decrypted file is consistent with the content in the preset control-end device node signature file. If so, the first signature file verification is successful.
[0019] In some embodiments, the control-end device node verifies the second signature file sent by the controlled-end device node, including:
[0020] The control-end device node decrypts the second signature file sent by the controlled-end device node to obtain a second decrypted file, where the second signature file is encrypted using the private key of the control-end device node;
[0021] The control-end device node determines whether the content of the second decrypted file is consistent with the content in the preset controlled-end device node signature file. If so, the second signature file verification is successful.
[0022] In some embodiments, after the controlled-end device node accesses the intelligent gateway through the network configuration information and completes the initialization of the controlled-end device node, the following steps are further included:
[0023] The controlled device nodes synchronize the block data of all blockchain nodes through the intelligent gateway network.
[0024] In a second aspect, a device node initialization apparatus is provided, which is applied to a blockchain device, wherein the blockchain device includes: a control-end device node and a controlled-end device node, and the apparatus includes:
[0025] An identification code generation module, configured for the controlled-end device node to generate a blockchain node identification code based on the attribute information sent by the control-end device;
[0026] An identification code sending module, configured for the controlled terminal device node to send the blockchain node identification code to the controlled terminal device node;
[0027] A network configuration information sending module, configured for the control-end device node to send the network configuration information to the controlled-end device node according to the received blockchain node identification code;
[0028] The network access module is used for the controlled terminal device node to access the intelligent gateway through the network configuration information to complete the initialization of the controlled terminal device.
[0029] In a third aspect, an embodiment of the present application provides an electronic device comprising a processor, a memory, and a program or instruction stored on the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the device node initialization method as described in the first aspect.
[0030] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the device node initialization method as described in the first aspect are implemented.
[0031] The technical solutions provided by the embodiments of this application bring at least the following beneficial effects:
[0032] The device initialization method provided in the embodiments of the present application is applied to blockchain device nodes, which include: a control-end device node and a controlled-end device node. The controlled-end device node can access the intelligent gateway based on the network configuration information from the control-end device node to complete the initialization of the controlled-end device node. In addition, the blockchain node identification code is generated based on the attribute information and random code sent by the control-end device node. Since the random code is randomly generated, the blockchain node identification code is a unique identification code for the control-end device node, ensuring that the controlled-end device node generates a unique identification code each time it is initialized. Initializing the controlled-end device node using the unique identification code avoids conflicts during initialization due to repeated identification codes, which affects the stability of the blockchain.
[0033] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present application, and together with the specification are used to explain the principles of the present application, and do not constitute an improper limitation on the present application.
[0035] Figure 1 This is a schematic diagram of a device node initialization method provided in an embodiment of the present application. Figure 1 ;
[0036] Figure 2 This is a schematic diagram of the micro-blockchain system structure provided by the embodiment of the present application;
[0037] Figure 3 This is a schematic diagram of the node module structure of the micro blockchain provided in an embodiment of the present application;
[0038] Figure 4 This is a schematic diagram of the blockchain node identification code structure provided by an embodiment of the present application;
[0039] Figure 5 This is a schematic diagram of a device node initialization method provided in an embodiment of the present application. Figure 2 ;
[0040] Figure 6 This is a schematic diagram of a device node initialization method provided in an embodiment of the present application. Figure 3 ;
[0041] Figure 7 This is a schematic diagram of the structure of a device node initialization apparatus provided in an embodiment of the present application;
[0042] Figure 8 This is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0043] In order to make those of ordinary skill in the art better understand the technical solutions of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is merely to provide a better understanding of the present application by illustrating the examples of the present application.
[0044] It should be noted that the terms "first," "second," and the like in the specification and claims of this application and the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate so that the embodiments of the application described herein can be implemented in an order other than those illustrated or described herein. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples consistent with certain aspects of the present application as detailed in the appended claims.
[0045] As we've seen from previous research, blockchain is essentially a shared database. The data or information stored within it is unforgeable, traceable, transparent, and collectively maintained. These characteristics establish a solid foundation of trust, create a reliable mechanism for collaboration, and offer broad application prospects.
[0046] Bitcoin, the earliest example of blockchain's application in the financial industry, is a prime example of virtual currency. For a long time, Bitcoin has played a significant role in driving the development of blockchain technology. In fact, blockchain technology isn't limited to the financial industry. As a decentralized, distributed database, its technical characteristics are well-suited for the intelligent Internet of Things, particularly in the smart home sector.
[0047] The micro-blockchain construction scheme is particularly suitable for applications in the Internet of Things, especially smart home fields. A micro-blockchain means that the node range of the blockchain is limited to smart home appliances, smart gateways, smart phones and other devices in one or more houses. These devices are connected together through integrated blockchain nodes to form a micro-blockchain application system.
[0048] In traditional blockchain node deployment, block information is bound to alias information and address information to complete blockchain address registration and include the address data in the blockchain. This application primarily manages blockchain node addresses through aliases, but it provides no insights into the binding and identity management of smart home devices and nodes. Therefore, in traditional blockchain node deployment, the identification codes of controlled device nodes are not unique. This leads to conflicts during initialization due to duplicate identification codes, thus affecting the stability of the blockchain.
[0049] Furthermore, the inventors discovered through research that when a blockchain, particularly a micro-blockchain node, is deployed on a smart device, in order to control the status and functions of a smart home, the blockchain management module of each device in the blockchain must generate a unique blockchain node identification code upon initialization. This blockchain node identification code must be unique not only within the micro-blockchain domain but also when multiple micro-blockchain domains are connected. Because smart devices are generally not universal devices, and devices of different manufacturers and models have different functions and status, the records generated when a micro-blockchain node is generated can only be used for that specific device. Therefore, the identification and recognition of the micro-blockchain and the device becomes particularly important.
[0050] Based on this, the embodiments of the present application provide a device node initialization method, apparatus, electronic device and storage medium. The controlled-end device node accesses the intelligent gateway through the network configuration information sent by the controlling-end device node according to the blockchain node identification code to complete the initialization of the controlled-end device node. The blockchain node identification code is generated by the controlled-end device node based on the attribute information and random code sent by the controlling-end node. Since the blockchain node identification code contains a random code, it can prevent conflicts caused by duplication of the node identifier code, thereby affecting the stability of the blockchain.
[0051] The device node initialization method provided in the embodiment of the present application is described in detail below with reference to the accompanying drawings.
[0052] Figure 1 The flowchart of a device node initialization method provided by the embodiment of the present application is shown. The method can be applied to blockchain device nodes. Blockchain device nodes include: control end device nodes and controlled end device nodes. The embodiment of the present invention is based on the blockchain device node as the execution subject to perform the steps of the device node initialization method provided by the embodiment of the present invention. Figure 1 As shown, the method may include steps S110 to S140.
[0053] In step S110, the controlled-end device node generates a blockchain node identification code based on the attribute information and random code sent by the controlling-end device node.
[0054] In step S120, the controlled-end device node sends the blockchain node identification code to the controlling-end device node.
[0055] In step S130, the control-end device node sends the network configuration information to the controlled-end device node according to the received blockchain node identification code. The network configuration information is the identity authentication information of the controlled-end device node.
[0056] In step S140 , the controlled-end device node accesses the intelligent gateway through the network configuration information to complete the initialization of the controlled-end device node.
[0057] The specific implementation of each of the above steps will be described in detail below.
[0058] The device initialization method provided in the embodiments of the present application is applied to blockchain device nodes, which include: a control-end device node and a controlled-end device node. The controlled-end device node can access the intelligent gateway based on the network configuration information from the control-end device node to complete the initialization of the controlled-end device node. In addition, the blockchain node identification code is generated based on the attribute information and random code sent by the control-end device node. Since the random code is randomly generated, the blockchain node identification code is a unique identification code for the control-end device node, ensuring that the controlled-end device node generates a unique identification code each time it is initialized. Initializing the controlled-end device node using the unique identification code avoids conflicts during initialization due to repeated identification codes, which affects the stability of the blockchain.
[0059] The specific implementation methods of the above steps are introduced below.
[0060] First, step S110 is introduced. The controlled-end device node generates a blockchain node identification code based on the attribute information and random code sent by the controlling-end device node.
[0061] In order to improve the security and convenience of smart home use and achieve an environmentally friendly and energy-saving living environment, a micro-blockchain system can be built for smart home to achieve safer and more convenient control of smart home. Figure 2 The following is a schematic diagram of the micro-blockchain system structure, which consists of controlled device nodes, control device nodes, and an intelligent gateway. When the controlled device node is connected to the intelligent gateway, the controlled device node can be initialized.
[0062] Typically, controlled device nodes are smart devices that have blockchain node modules integrated into them at the factory, and can include washing machines, air conditioners, refrigerators, and other devices. The blockchain node module is pre-installed with the public key of the blockchain node application (APP), which can be authenticated with the blockchain node application via the NFC module during the initialization process.
[0063] The control-end device nodes can include: smart terminals such as smartphones, computers, and tablets. After the smart terminal installs the blockchain node APP, it can become the control-end device in the micro blockchain system. The blockchain node APP pre-sets the public key of the smart device provided by the smart device (controlled end) manufacturer, and forms a random code based on a true random number and binds it to the user account as the node's identification. This identification is used for authentication and initialization of blockchain smart devices.
[0064] An intelligent gateway is generally a device such as an intelligent router, and is also a controlled terminal device used for wireless network connection of other intelligent devices. During the initialization process, except for the need to manually configure the network with intelligent terminals such as smartphones, the other configuration processes are the same as the initialization process of the controlled terminal device node.
[0065] Specifically, the attribute information includes at least one of the control device's serial code, geographic information code, and time information code. The control device's serial code is the International Mobile Equipment Identity (IMEI) code, equivalent to the control device's ID number, used to identify the control device. The geographic information code is the current coordinate data obtained by the control device through location services. The time information code is the current time information. The random code is a true random number generated by the control device based on environmental noise.
[0066] This step can specifically be: Figure 3 As shown, the blockchain node includes an identification management module, which is responsible for generating a unique identification code for the controlled device. The control device node sends its own attribute information and a random code generated from environmental noise to the controlled device node. The control device node uses the microphone or camera of the smart terminal to obtain environmental noise or image noise and generates a true random number based on information entropy. A true random number is also a random code. The controlled device node generates a random code based on the attribute information of the control device node, its own device serial code, and the random code. This blockchain node identification code is bound to the user account registered on the control device.
[0067] The blockchain node identification code is the unique identification of the controlled device node. The controlled device node generates a unique identification code each time it is initialized. The controlled device node is initialized using the unique identification code, which avoids conflicts caused by repeated identification codes during initialization and affects the stability of the blockchain. Figure 4 The following is a diagram showing the structure of the blockchain node identification code. Figure 4 The blockchain node identification code structure in is only one implementation form, and the order of the identification codes in the blockchain node identification code can be adjusted as needed.
[0068] In one example, after generating a blockchain node identification code based on the attribute information and random code sent by the control end device node, the process may further include: step S111.
[0069] In step S111, the controlled-end device node stores the blockchain node identification code in the identification storage area of the controlling-end device node.
[0070] Specifically, this step can be: the controlled-end device node stores the blockchain node identification code in the identification storage area through the identification management module, and encrypts and hides or completely clears the old identification according to the preset rules during the next initialization, and writes the new blockchain node identification code. At this time, the old blockchain node identification code has been disconnected from the controlled-end device, and the block record associated with the old blockchain node identification code can no longer be associated with the original controlled-end device, thereby ensuring the user's privacy and block data desensitization.
[0071] The above is a specific implementation of step S110 and step S111. The following describes a specific implementation of step S120.
[0072] In step S120, the controlled-end device node sends the blockchain node identification code to the controlling-end device node.
[0073] This step can specifically be: Figure 3 As shown, blockchain nodes include a Near Field Communication (NFC) reader / writer module. Both the controlled and controlling device nodes include NFC reader / writer modules. The NFC reader / writer module is responsible for exchanging data with the controlling blockchain node, such as data signatures and network configuration information. The controlled device node transmits the blockchain node identification code to the controlling device node via the NFC reader / writer module.
[0074] The above is a specific implementation of step S120. The following describes a specific implementation of step S130.
[0075] In step S130, the control-end device node sends the network configuration information to the controlled-end device node according to the received blockchain node identification code. The network configuration information is the identity authentication information of the controlled-end device node.
[0076] This step can specifically be: the control-end device node sends the network configuration information to the controlled-end device node through the NFC reader / writer module based on the received blockchain node identification code. Generally, the network configuration information may include: Service Set Identifier (SSID), network connection protocol or network access password.
[0077] The above is a specific implementation of step S130 . The following describes a specific implementation of step S140 .
[0078] In step S140 , the controlled-end device node accesses the intelligent gateway through the network configuration information to complete the initialization of the controlled-end device node.
[0079] This step can specifically be: Figure 3As shown, the blockchain node also includes a device control module. In this solution, the device control module mainly controls the network management module and the native functions of the device. The controlled device node obtains the network configuration information from the block management module through the device control module. The device control module controls the network management module to automatically complete the wireless network configuration according to the network configuration information and connect to the network of the smart router, thereby completing the execution of the network configuration and route change configuration, and then completing the initialization of the controlled device node.
[0080] In an example, after the controlled-end device node accesses the intelligent gateway through the network configuration information and the initialization of the controlled-end device node is completed, the following may be included: step S150.
[0081] In step S150, the controlled device node synchronizes the block data of all blockchain nodes through the intelligent gateway network.
[0082] This step can be specifically as follows: after the controlled device node is connected to the intelligent gateway, the data of all blocks in the blockchain can be synchronized through the intelligent gateway network, so that the controlled device node connected to the intelligent gateway can obtain real, reliable, tamper-proof and verifiable data, thereby enhancing the overall control effect of the blockchain.
[0083] The blockchain node also includes a block management module. In this embodiment, the block management module mainly manages blockchain block data. When a new transaction record is generated between a control-end device node and a controlled-end device node, the transaction record, such as route change information, operation relationship change information, permission change information, or instruction operation relationship, is written into the data storage area, and the required record data is read for the application layer.
[0084] In order to ensure the compatibility of the micro-blockchain and prevent the possible mixing of malicious nodes, this application also provides another implementation method for device node initialization, see the following examples for details. Figure 5 Another implementation method of device node initialization provided by this application includes the following steps:
[0085] Step S210: The controlled-end device node verifies the second signature file sent by the controlling-end device node.
[0086] The signature file is a digitally signed file. Digital signatures are an essential technology in encryption. The first signature file is the signature file of the control-end device node. The control-end device node sends the first signature file to the controlled device node via the NFC reader / writer module, so that the controlled device node can verify the first signature file.
[0087] In an example, the controlled-end device node verifies the second signature file sent by the controlling-end device node, which may include: steps S2101 and S2102.
[0088] In step S2101, the controlled-end device node decrypts the first signature file sent by the controlling-end device node to obtain a first decrypted file, where the first signature file is encrypted by the private key of the controlling-end device node.
[0089] Specifically, this step may include: the control-end device node encrypting the signature file using a preset private key to obtain a second signature file. The control-end device node sends the first signature file to the controlled device node via an NFC reader / writer module. The controlled device node decrypts the first signature file using the preset public key of the control-end device node to obtain a first decrypted file.
[0090] In step S2102, the controlled-end device node determines whether the content of the first decrypted file is consistent with the content of the preset control-end device node signature file. If so, the first signature file verification is successful.
[0091] Specifically, this step may include: the controlled-end device node verifies the signature of the first decrypted file using the pre-configured public key of the control-end device node. The signature verification involves comparing the content of the first decrypted file with the content of a preset signature file of the control-end device node. If the two contents are consistent, the first signature file verification succeeds; if the two contents are inconsistent, the first signature file verification fails. If the verification fails, the initialization process of the controlled-end device node is stopped and an initialization failure message is fed back to the user.
[0092] Step S220: The control-end device node verifies the second signature file sent by the controlled-end device node.
[0093] The second signature file is a signature file of the controlled-end device node. The controlled-end device node sends the second signature file to the control-end device node through the NFC read / write module, so that the control-end device node verifies the second signature file.
[0094] In an example, the control-end device node verifies the second signature file sent by the controlled-end device node, which may include: Step S2201 - Step S2202.
[0095] Step S2201: The control-end device node decrypts the second signature file sent by the controlled-end device node to obtain a second decrypted file, where the second signature file is encrypted by the private key of the control-end device node.
[0096] Specifically, this step may include: the controlled-end device node encrypting the signature file using a preset private key to obtain a second signature file. The controlled-end device node sends the second signature file to the control-end device node via the NFC reader / writer module. The control-end device node decrypts the second signature file using the preset public key of the controlled-end device node to obtain a second decrypted file.
[0097] In step S2202, the control-end device node determines whether the content of the second decrypted file is consistent with the content in the preset controlled-end device node signature file. If so, the first signature file verification is successful.
[0098] Specifically, this step may include: the control-end device node verifies the signature of the second decrypted file using the pre-configured public key of the controlled-end device node, i.e., comparing the content of the second decrypted file with the content of the preset signature file of the controlled-end device node to see if they are consistent. If the two contents are consistent, the second signature file verification succeeds; if the two contents are inconsistent, the second signature file verification fails. If the verification fails, the initialization process of the controlled-end device node is stopped and an initialization failure message is fed back to the user.
[0099] It should be noted that the above verification order of the first signature file and the second signature is only an example. The second signature can be verified first, and then the first signature file, or the first signature file and the second signature can be verified simultaneously. The verification order of the first signature file and the second signature is not specifically limited.
[0100] Step S230: When the first signature file and the second signature file are successfully verified, the controlled device node receives the attribute information.
[0101] In step S240, the controlled-end device node generates a blockchain node identification code based on the attribute information and random code sent by the controlling-end device node.
[0102] In step S250, the controlled-end device node sends the blockchain node identification code to the controlling-end device node.
[0103] In step S260, the control-end device node sends the network configuration information to the controlled-end device node according to the received blockchain node identification code. The network configuration information is the identity authentication information of the controlled-end device node.
[0104] In step S270 , the controlled-end device node accesses the intelligent gateway through the network configuration information to complete the initialization of the controlled-end device node.
[0105] Steps S240 to S270 are the same as steps S110 to S140 in the above embodiment, and for the sake of brevity, they are not described in detail here.
[0106] The device node initialization method provided in this embodiment verifies signature files between the controlled and controlling device nodes. When verification succeeds, the controlled device node receives attribute information, ensuring the compatibility of the micro-blockchain and preventing the infiltration of potentially malicious nodes, making the initialization of blockchain device nodes more secure and reliable. If verification fails, the initialization process of the controlled device node is stopped and an initialization failure message is provided to the user, allowing the user to promptly check and troubleshoot each blockchain node.
[0107] Specifically, in order to facilitate understanding of the device node initialization method provided by the embodiment of the present invention, a specific example is used below to introduce it.
[0108] like Figure 6 As shown, when the controlled device is a washing machine and the controlling device is a smart phone, the user uses a smart phone that has installed a micro blockchain node APP, and the APP has activated the NFC reading and writing module of the mobile phone and brought it close to the NFC reading and writing module of the washing machine integrated with the micro blockchain node, and the micro blockchain node of the washing machine is already in the waiting for initialization state.
[0109] The micro-blockchain node APP of the smartphone sends a preset signature file encrypted with a private key to the micro-blockchain node of the washing machine through the NFC reader / writer module; in turn, the micro-blockchain node of the washing machine sends a signature file encrypted with a private key preset at the factory to the WeChat blockchain node APP of the smartphone through the NFC reader / writer module.
[0110] After the signature files are exchanged, the smartphone's micro-blockchain node app and the washing machine's micro-blockchain node decrypt the signature file using their respective preset public keys. They then verify the signatures using their respective preset public keys, comparing the decrypted signature file with the preset signature file. If the verification fails, meaning the decrypted signature file is inconsistent with the preset signature file, the control-end device node initialization process is halted and a failure message is sent to the user. This interrupts the washing machine node's initialization process, and the failure message is sent to the user via the smartphone's blockchain app.
[0111] If verification is successful, the smartphone micro-blockchain node app collects the phone's IMEI code, location information, current time data, and a true random number generated by collecting ambient noise, and sends them to the smart washing machine's micro-blockchain node via the NFC module. The washing machine's micro-blockchain node adds the IMEI code, location information, current time data, and true random number generated by collecting ambient noise from the smartphone's micro-blockchain app to the washing machine's factory device serial number. The identification management module generates a unique identification code for the washing machine's micro-blockchain node and writes it into the identification storage area.
[0112] The washing machine's micro-blockchain node transmits the generated unique identification code to the smartphone's micro-blockchain app via the NFC reader / writer module. The smartphone then sends network configuration information, such as the SSID, network connection protocol, or network password, to the washing machine's micro-blockchain node via the NFC reader / writer module.
[0113] The washing machine's micro-blockchain node uses the network management module to configure wireless network connections based on the network configuration information. It then connects to the smart gateway's network, synchronizes routing information, and binds to the smart gateway's blockchain node, completing the initialization of the washing machine node. The washing machine's micro-blockchain node then synchronizes the block data of all blockchain nodes, establishing network connectivity with all blockchain nodes in the micro-blockchain. The washing machine's micro-blockchain node completes its own blockchain node initialization and connects to the micro-blockchain.
[0114] Based on the same inventive concept, an embodiment of the present application also provides a device node initialization apparatus.
[0115] Figure 7 The present invention provides a device node initialization device, which is applied to a blockchain device. The blockchain device includes: a control end device node and a controlled end device node, such as Figure 7 As shown, the device node initialization device may include:
[0116] The identification code generation module 410 is used for the controlled end device node to generate a blockchain node identification code based on the attribute information sent by the control end device;
[0117] The identification code sending module 420 is used for the controlled end device node to send the blockchain node identification code to the controlled end device node;
[0118] The network configuration information sending module 430 is used for the control end device node to send the network configuration information to the controlled end device node according to the received blockchain node identification code;
[0119] The network access module 440 is used for the controlled terminal device node to access the intelligent gateway through the network configuration information to complete the initialization of the controlled terminal device.
[0120] In some embodiments, the attribute information may include: at least one of a serial code, a geographic information code, and a time information code of the controlled terminal device;
[0121] In some embodiments, the device node initialization apparatus may further include:
[0122] The identification code storage module is used for the controlled-end device node to store the blockchain node identification code in the identification storage area of the control-end device node.
[0123] In some embodiments, the device node initialization apparatus may further include:
[0124] A first signature file verification module, configured for the controlled-end device node to verify the first signature file sent by the control-end device node;
[0125] A second signature file verification module is used for the control-end device node to verify the second signature file sent by the controlled-end device node;
[0126] The attribute information receiving module is configured to enable the controlled device node to receive attribute information when the first signature file and the second signature file are successfully verified.
[0127] In some embodiments, the first signature file verification module may include:
[0128] A first signature file decryption unit is configured to decrypt, by the controlled-end device node, a first signature file sent by the control-end device node to obtain a first decrypted file, wherein the first signature file is encrypted by the private key of the control-end device node;
[0129] The first signature file verification unit is used for the controlled-end device node to determine whether the content of the first decrypted file is consistent with the content of the preset control-end device node signature file. If so, the first signature file verification is successful.
[0130] In some embodiments, the second signature file verification module may include:
[0131] A second signature file decryption unit is configured to decrypt, by the control-end device node, a second signature file sent by the controlled-end device node to obtain a second decrypted file, wherein the second signature file is encrypted by the private key of the control-end device node;
[0132] The second signature file verification unit is used for the control end device node to determine whether the content of the second decrypted file is consistent with the content in the preset controlled end device node signature file. If so, the second signature file verification is successful.
[0133] In some embodiments, the device node initialization apparatus may further include:
[0134] The block data synchronization module is used by the controlled device nodes to synchronize the block data of all blockchain nodes through the intelligent gateway network.
[0135] The device initialization device provided in the embodiment of the present application is applied to a blockchain device node, which includes a control-end device node and a controlled-end device node. The controlled-end device node can access the intelligent gateway based on the network configuration information from the control-end device node to complete the initialization of the controlled-end device node. In addition, the blockchain node identification code is generated based on the attribute information and random code sent by the control-end device node. Since the random code is randomly generated, the blockchain node identification code is a unique identification code for the control-end device node, ensuring that the controlled-end device node generates a unique identification code each time it is initialized. Initialization of the controlled-end device node using the unique identification code avoids conflicts during initialization due to repeated identification codes, which affects the stability of the blockchain.
[0136] Based on the same inventive concept, an embodiment of the present application also provides an electronic device.
[0137] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 8 As shown, the electronic device may include a processor 601 and a memory 602 storing computer programs or instructions.
[0138] Specifically, the processor 601 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiment of the present invention.
[0139] The memory 602 may include a large-capacity memory for data or instructions. By way of example and not limitation, the memory 602 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 602 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 602 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 602 is a non-volatile solid-state memory. In a specific embodiment, the memory 602 includes a read-only memory (ROM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically rewritable ROM (EAROM), or a flash memory, or a combination of two or more of these.
[0140] The processor 601 reads and executes computer program instructions stored in the memory 602 to implement any one of the base station fault detection methods in the above embodiments.
[0141] In one example, the electronic device may further include a communication interface 603 and a bus 610. Figure 8 As shown, the processor 601, the memory 602, and the communication interface 603 are connected via a bus 610 and communicate with each other.
[0142] The communication interface 603 is mainly used to implement communication between various modules, devices, units and / or devices in the embodiment of the present invention.
[0143] Bus 610 comprises hardware, software or both, couples the parts of electronic equipment to each other.For example, and not limitation, bus can comprise accelerated graphics port (AGP) or other graphics bus, enhanced industry standard architecture (EISA) bus, front side bus (FSB), hypertransport (HT) interconnection, industry standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations.In suitable cases, bus 610 can comprise one or more buses.Although the embodiment of the present invention describes and shows specific bus, the present invention considers any suitable bus or interconnection.
[0144] The electronic device can execute the video bit rate control method in the embodiment of the present invention, thereby achieving Figure 1 、 Figure 5 or Figure 6 Describes the device node initialization method.
[0145] In addition, in conjunction with the device node initialization method in the above embodiments, embodiments of the present invention may provide a readable storage medium for implementation. The readable storage medium stores program instructions; when the program instructions are executed by a processor, any of the device node initialization methods in the above embodiments is implemented.
[0146] It should be understood that the present invention is not limited to the specific configurations and processes described above and illustrated in the figures. For the sake of brevity, a detailed description of known methods is omitted. In the above embodiments, several specific steps are described and illustrated as examples. However, the method of the present invention is not limited to the specific steps described and illustrated. Those skilled in the art may make various changes, modifications, and additions, or change the order of the steps after understanding the spirit of the present invention.
[0147] The functional blocks shown in the above-described block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in unit, a function card or the like. When implemented in software, the elements of the present invention are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROMs, flash memories, erasable ROMs (EROMs), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0148] It should also be noted that the exemplary embodiments described herein describe methods or systems based on a series of steps or devices. However, the present invention is not limited to the order of the steps described above. In other words, the steps may be performed in the order described in the embodiments, or in a different order, or several steps may be performed simultaneously.
[0149] The above description is only a specific embodiment of the present invention. Those skilled in the art will clearly understand that for the convenience and brevity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present invention is not limited to this. Any person skilled in the art can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention.
Claims
1. A device node initialization method, characterized in that: Applied to a blockchain device node, the blockchain device node includes: a control end device node and a controlled end device node, the method includes: The controlled-end device node generates a blockchain node identification code based on the device serial code of the controlled-end device node and the attribute information and random code sent by the control-end device node, wherein the random code is a true random number generated by the control-end device node based on environmental noise, and the attribute information includes the serial code of the control-end device; The controlled-end device node sends the blockchain node identification code to the controlling-end device node; The control-end device node sends the network configuration information to the controlled-end device node according to the received blockchain node identification code, where the network configuration information is the identity authentication information of the controlled-end device node; The controlled-end device node accesses the intelligent gateway through the network configuration information to complete the initialization of the controlled-end device node.
2. The method according to claim 1, characterized in that The attribute information further includes: at least one of a geographic information code and a time information code of the control terminal device.
3. The method according to claim 1, characterized in that After generating the blockchain node identification code according to the device serial code of the controlled-end device node and the attribute information and random code sent by the control-end device node, the method further includes: The controlled-end device node stores the blockchain node identification code in the identification storage area of the control-end device node.
4. The method according to claim 1, wherein Before the controlled-end device node generates a blockchain node identifier according to the device serial code of the controlled-end device node and the attribute information and random code sent by the control-end device node, the method further includes: The controlled-end device node verifies the first signature file sent by the control-end device node; The control-end device node verifies the second signature file sent by the controlled-end device node; When the first signature file and the second signature file are verified successfully, the controlled-end device node receives the attribute information.
5. The method according to claim 4, characterized in that The controlled-end device node verifies the first signature file sent by the control-end device node, including: The controlled-end device node decrypts the first signature file sent by the control-end device node to obtain a first decrypted file, where the first signature file is encrypted by the private key of the control-end device node; The controlled-end device node determines whether the content of the first decrypted file is consistent with the content of the preset control-end device node signature file. If so, the first signature file verification is successful.
6. The method according to claim 4, characterized in that The control-end device node verifies the second signature file sent by the controlled-end device node, including: The control-end device node decrypts the second signature file sent by the controlled-end device node to obtain a second decrypted file, where the second signature file is encrypted by the private key of the controlled-end device node; The control-end device node determines whether the content of the second decrypted file is consistent with the content in the preset controlled-end device node signature file. If so, the second signature file verification is successful.
7. The method according to claim 1, characterized in that After the controlled-end device node accesses the intelligent gateway through the network configuration information and completes initialization of the controlled-end device node, the method further includes: The controlled end device node synchronizes the block data of all blockchain nodes through the intelligent gateway network.
8. A device node initialization device, characterized in that: Applied to a blockchain device, the blockchain device includes: a control end device node and a controlled end device node, the device includes: an identification code generation module, configured for the controlled-end device node to generate a blockchain node identification code based on the device serial code of the controlled-end device node, attribute information sent by the control-end device, and a random code, wherein the random code is a true random number generated by the control-end device node based on environmental noise, and the attribute information includes the serial code of the control-end device; An identification code sending module, configured for the controlled-end device node to send the blockchain node identification code to the control-end device node; A network configuration information sending module, configured for the control-end device node to send network configuration information to the controlled-end device node according to the received blockchain node identification code, wherein the network configuration information is the identity authentication information of the controlled-end device node; The network access module is used for the controlled terminal device node to access the intelligent gateway through the network configuration information to complete the initialization of the controlled terminal device.
9. An electronic device, characterized in that: The device comprises a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the device node initialization method according to any one of claims 1 to 7.
10. A computer storage medium, characterized in that The computer storage medium stores computer program instructions, which, when executed by a processor, implement the device node initialization method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Device identification code distribution method and device, and Internet-of-things equipment
CN110611563A
Internet of things equipment control method and device, Internet of things equipment and storage medium
CN111224925A
Method for guiding intelligent equipment to access network, medium, control terminal and system
CN111246545A