Control methods, devices and computer-readable storage media for intelligent devices
By establishing blockchain nodes between smart device platforms and application device platforms, the capabilities and identity information of smart devices can be shared, and information interaction can be carried out using a message bus. This solves the problem of low interoperability between smart device manufacturers and platforms, and improves the interoperability between device manufacturers and service providers.
Patent Information
- Application Number
- CN202111172944.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-08
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2041-10-08
AI Technical Summary
In existing technologies, the interoperability between smart device manufacturers and platforms is inefficient, requiring the creation of multiple sets of different versions of hardware devices, resulting in high interoperability costs and an inability to cover all devices. Users also need to install multiple sets of application software, making collaboration between smart devices difficult.
By using blockchain technology, the capability and identity information of smart devices are recorded on the chain, establishing device interoperability between smart device platforms and application device platforms. Information exchange is achieved through a message bus, improving the efficiency of interconnection.
It enables efficient interconnection between smart device platforms and application device platforms without requiring modifications to smart devices and application terminals, thereby improving the interconnection efficiency between equipment manufacturers and service providers and simplifying user operations.
Smart Images

Figure CN115967736B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a control method, apparatus, and computer-readable storage medium for an intelligent device. Background Technology
[0002] With the development of mobile communication and cloud computing, more and more service providers are joining the smart device industry. For example, smart homes, which are closely related to daily life, bring users a convenient and comfortable experience. However, there are huge differences between smart home brands and products, and there are problems with them not being able to connect with each other.
[0003] In existing technologies, communication between equipment manufacturers and platforms is usually point-to-point. This means that equipment manufacturers modify the equipment software according to the proprietary protocol of the platform provided by the service provider, and then the platform provides users with supporting application software (such as mobile APP) to enable users to configure, monitor and control the smart home devices connected to the platform.
[0004] However, using a point-to-point interoperability method requires the same equipment manufacturer to connect with multiple service providers. For different service providers' platforms, multiple different versions of the same hardware device need to be generated, which reduces the interoperability efficiency between equipment manufacturers and service providers. Summary of the Invention
[0005] This invention provides a method, apparatus, and computer-readable storage medium for controlling smart devices. By uploading the capability and identity information of smart devices to the blockchain, the smart device platform and the application device platform share data on the blockchain nodes. The smart device platform subscribes to access events of smart devices from the message bus, thereby establishing device interoperability with the application device platform. Information interaction is then achieved based on the shared data on the blockchain nodes to control the smart devices, thereby improving the interconnection efficiency between the equipment manufacturers corresponding to the smart device platform and the service providers corresponding to the application device platform.
[0006] The technical solution of this invention is implemented as follows:
[0007] In a first aspect, embodiments of the present invention provide a control method for a smart device, applied to a smart device platform. The method includes: upon initial startup, publishing preset smart device capability information to a blockchain node; upon detecting the smart device's first online presence, acquiring the smart device's identity information and publishing the identity information to the blockchain node; subscribing to access events of the smart device from an application device platform via a message bus to establish device interoperability with the application device platform; and, in the case of device interoperability, realizing information interaction between itself and the application device platform through the message bus based on the smart device capability information and the identity information, thereby achieving control of the smart device.
[0008] Secondly, embodiments of the present invention provide a control method for a smart device, applied to an application device platform. The method includes: upon initial startup, obtaining smart device capability information from a blockchain node for access to the application terminal corresponding to the smart device capability information; upon initial access of the application terminal, receiving a device binding request submitted by the application terminal; obtaining the smart device's identity information from the blockchain node; performing authentication on the device binding request based on the identity information; if authentication is successful, binding the smart device and subscribing to the initial state event reported by the smart device through the smart device platform via the message bus to establish device interoperability with the smart device platform; in the case of device interoperability, realizing information interaction between itself and the smart device platform through the message bus based on the smart device capability information and the identity information, thereby realizing control of the smart device.
[0009] Thirdly, embodiments of the present invention provide a control method for a smart device, applied to a blockchain node. The method includes: when the smart device platform is started for the first time, receiving smart device capability information published by the smart device platform and uploading the smart device capability information to the blockchain; when the smart device is online for the first time, receiving smart device identity information published by the smart device platform and uploading the identity information to the blockchain; receiving a message bus and a usage mapping relationship between the smart device platform and the smart device platform published by the smart device platform and uploading the usage mapping relationship to the blockchain; and receiving a smart device platform service quality evaluation result published by the application device platform and uploading the smart device platform service quality evaluation result to the blockchain.
[0010] Fourthly, embodiments of the present invention provide a smart device platform, the smart device platform comprising: a first sending module, configured to publish preset smart device capability information to a blockchain node upon initial startup; and to obtain the smart device's identity information and publish the identity information to the blockchain node upon detecting the smart device's first online presence; a first subscription module, further configured to subscribe to access events of the smart device from the application device platform via a message bus to establish device interoperability with the application device platform; and a first interoperability module, configured to, in the case of device interoperability, realize information interaction between itself and the application device platform through the message bus based on the smart device capability information and the identity information, thereby realizing control of the smart device.
[0011] Fifthly, embodiments of the present invention provide an application device platform, the application device platform comprising: an acquisition module, configured to acquire smart device capability information from a blockchain node upon initial startup, for use by an application terminal corresponding to the smart device capability information; a second receiving module, configured to receive a device binding request submitted by the application terminal upon initial access; the acquisition module is further configured to acquire the smart device's identity information from the blockchain node; a binding module, configured to compare and authenticate the device binding request based on the identity information, and bind the smart device if authentication is successful; a second subscription module, configured to subscribe to initial state events reported by the smart device through the smart device platform via a message bus, to establish device interoperability with the smart device platform; and a second interoperability module, configured to, in the case of device interoperability, realize information interaction between itself and the smart device platform through the message bus based on the smart device capability information and the identity information, thereby realizing control of the smart device.
[0012] Sixthly, embodiments of the present invention provide a blockchain node, the blockchain node comprising: a third receiving module, configured to receive smart device capability information published by the smart device platform when the smart device platform is first started; an uploading module, configured to upload the smart device capability information to the blockchain; the third receiving module is further configured to receive smart device identity information published by the smart device platform when the smart device is first online; the uploading module is further configured to upload the identity information to the blockchain; the third receiving module is further configured to receive a message bus and a usage mapping relationship between the smart device platform and the smart device platform published by the smart device platform; the uploading module is further configured to upload the usage mapping relationship to the blockchain; the third receiving module is further configured to receive a smart device platform service quality evaluation result published by the application device platform; the uploading module is further configured to upload the smart device platform service quality evaluation result to the blockchain.
[0013] In a seventh aspect, embodiments of the present invention provide an intelligent device platform, the intelligent device platform including a first memory and a first processor, the first memory storing a computer program that can run on the first processor, and the first processor executing the program implementing the control method of the intelligent device as described in the first aspect.
[0014] Eighthly, embodiments of the present invention provide an application device platform, the application device platform including a second memory and a second processor, the second memory storing a computer program that can run on the second processor, and the second processor executing the program implementing the control method of the intelligent device as described in the second aspect.
[0015] In a ninth aspect, embodiments of the present invention provide a blockchain node, the blockchain node including a third memory and a third processor, the third memory storing a computer program executable on the third processor, the third processor executing the program to implement the control method of the smart device as described in the third aspect.
[0016] In a tenth aspect, embodiments of the present invention provide a computer-readable storage medium having executable instructions stored thereon, which, when executed by a first processor, implement the control method of the intelligent device as described in the first aspect.
[0017] Eleventhly, embodiments of the present invention provide a computer-readable storage medium having executable instructions stored thereon, which, when executed by a second processor, implement the control method of the intelligent device as described in the second aspect.
[0018] In a twelfth aspect, embodiments of the present invention provide a computer-readable storage medium having executable instructions stored thereon for implementing the control method of the intelligent device as described in the third aspect when executed by a third processor.
[0019] This invention provides a control method, apparatus, and computer-readable storage medium for smart devices. The method, applied to a smart device platform, includes: when the smart device platform starts up for the first time, publishing preset smart device capability information to a blockchain node; when a smart device is detected to be online for the first time, obtaining the smart device's identity information and publishing the identity information to the blockchain node; subscribing to access events of the smart device from application device platforms via a message bus to establish device interoperability with the application device platform; uploading relevant data of smart devices supported by the device manufacturer to the blockchain via the smart device platform and sharing it with the application device platform through blockchain nodes, thereby enabling device interoperability between the smart device platform and multiple application device platforms on the blockchain with a single upload. In the case of device interoperability, information interaction between the smart device and the application device platform is achieved through the message bus based on the smart device's capability information and identity information, thereby realizing the control of the smart device. The solution provided by this invention improves upon both the smart device platform and the application device platform without requiring modifications to the smart device and application terminal, thus improving the interoperability efficiency between the device manufacturer corresponding to the smart device platform and the service provider corresponding to the application device platform. Attached Figure Description
[0020] Figure 1 An optional architecture diagram of a control system for an intelligent device is provided for an embodiment of the present invention;
[0021] Figure 2 This is an exemplary schematic diagram illustrating the storage of data in a blockchain node, provided as an embodiment of the present invention.
[0022] Figure 3 This is an exemplary schematic diagram illustrating the storage of data in a message node according to an embodiment of the present invention;
[0023] Figure 4 A flowchart of optional steps in a control method for an intelligent device provided by an embodiment of the present invention;
[0024] Figure 5 An optional schematic diagram illustrating the interaction process of a control system for an intelligent device provided in an embodiment of the present invention;
[0025] Figure 6 A flowchart of optional steps for another control method of a smart device provided in an embodiment of the present invention;
[0026] Figure 7 An optional schematic diagram of the interaction process of a control system for another intelligent device provided in an embodiment of the present invention;
[0027] Figure 8 An optional schematic diagram illustrating the interaction process of a control system for another intelligent device provided in an embodiment of the present invention;
[0028] Figure 9 A flowchart illustrating optional steps of another intelligent device control method provided in an embodiment of the present invention;
[0029] Figure 10 An optional schematic diagram of the interaction process of a control system for another intelligent device provided in an embodiment of the present invention;
[0030] Figure 11 This is an optional schematic diagram illustrating the preparation stage of a smart device and application terminal, as provided in an embodiment of the present invention.
[0031] Figure 12 This is an optional schematic diagram of a communication interaction stage between a smart device and an application terminal, provided as an embodiment of the present invention.
[0032] Figure 13 A schematic diagram of an optional structure of an intelligent device platform provided in an embodiment of the present invention;
[0033] Figure 14 A schematic diagram of an optional structure of an application device platform provided in an embodiment of the present invention;
[0034] Figure 15 A schematic diagram of an optional structure of a blockchain node provided in an embodiment of the present invention;
[0035] Figure 16 A schematic diagram of the composition structure of an intelligent device platform provided in an embodiment of the present invention;
[0036] Figure 17 A schematic diagram of the composition structure of an application device platform provided in an embodiment of the present invention;
[0037] Figure 18 This is a schematic diagram of the composition structure of a blockchain node provided in an embodiment of the present invention. Detailed Implementation
[0038] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. It should be understood that some embodiments described herein are merely illustrative of the technical solutions of the present invention and are not intended to limit the scope of the present invention.
[0039] To better understand the control method of the intelligent device provided in the embodiments of the present invention, the relevant technologies will be explained before introducing the technical solutions of the embodiments of the present invention.
[0040] In related technologies, a wireless-neutral Internet Protocol (IP) protocol is created. This IP protocol provides a predefined architecture for networked smart devices and defines a specific set of IP-based networking technologies for the authentication of smart devices. The development and implementation of this new unified connectivity protocol using an open-source approach simplifies and accelerates development for device manufacturers and improves compatibility and security between smart device products.
[0041] However, the methods described above address the issue of smart devices accessing the internet, enabling unified access to the IP network within the home for smart hardware using different link layer protocols, such as Wireless Fidelity (WiFi), Zigbee (a low-speed, short-range wireless network protocol), and Bluetooth. While these methods solve the problem of unified local access for smart devices, they require close cooperation among chip manufacturers, module manufacturers, and terminal manufacturers, resulting in a long implementation cycle. They do not address the interoperability issues of application layer protocols between smart devices and the platform, or between the platform and user terminals.
[0042] To address the interoperability issues between smart devices and application terminals, relevant technologies typically employ point-to-point interoperability between device manufacturers and platforms. This involves device manufacturers modifying their device software according to the platform's proprietary protocols, or platforms agreeing on protocols for compatibility and interoperability. Service providers connected to the platform then offer complementary application software, such as mobile apps, to consumers, enabling them to configure, monitor, and control smart devices connected to the platform.
[0043] However, the point-to-point integration methods described above, involving device manufacturers and platforms, platforms and platforms, and platforms and service providers, present several problems. A single device manufacturer needs to connect with multiple service providers, requiring the creation of multiple versions of the same hardware device for each service provider's platform. The same issue exists for inter-platform interoperability, resulting in very high overall integration costs and still not guaranteeing coverage of all smart devices. For home smart home devices, in practical use, users may still need to install multiple applications. For example, a user's preferred smart devices may come from different manufacturers, or the preferred application platform may only support specific smart devices, making collaboration difficult. Users are forced to choose between different application platforms or log into different accounts on different platforms to operate different smart devices.
[0044] In this invention, the blockchain can be understood as a secure and trustworthy shared database. The data or information stored within it possesses characteristics such as "unforgeable," "traceable," "transparent," and "collectively maintained." Based on these characteristics, blockchain technology lays a solid foundation of "trust" and creates a reliable "cooperation" mechanism. This invention provides a blockchain-based technical solution to address the interoperability problem between smart devices and application terminals. An interoperability alliance blockchain is constructed, comprising various smart device manufacturers and service providers offering services to smart devices. This transforms the siloed, point-to-point communication between smart device platforms of manufacturers and application device platforms of service providers into a mesh structure. A smart device platform of a manufacturer can achieve interoperability with multiple application device platforms of service providers on the chain with a single on-chain entry. Conversely, an application device platform of a service provider can achieve interoperability with all smart device platforms of manufacturers on the chain with a single on-chain entry. This mutual incentive between smart device platforms of manufacturers and application device platforms of service providers drives the completion of interoperability across the entire industry.
[0045] This invention utilizes blockchain technology to improve the interoperability of smart devices in two ways: firstly, it standardizes and constrains the identity and capability information of smart devices; secondly, it constructs an interoperability consortium blockchain in the cloud, jointly participated in by service providers of smart devices and application terminals, to securely and transparently share smart device management information (i.e., identity and capability information). Simultaneously, the application device platforms corresponding to service providers also upload access quality evaluation data of the smart device platforms corresponding to device manufacturers to the blockchain, thereby incentivizing service quality evaluation of the smart device platforms corresponding to device manufacturers. This invention can achieve interoperability with all relevant participants on the blockchain with a single upload, without modifying the device software, through adaptation improvements on the platform side (i.e., smart device platforms and application device platforms).
[0046] In this embodiment of the invention, the control device for the smart device can be a smart device platform, an application device platform, or a blockchain node, etc., and this embodiment of the invention does not impose any limitations.
[0047] Based on the above description, embodiments of the present invention provide a control system for a smart device, such as... Figure 1 As shown, Figure 1 An optional architecture diagram of a control system for a smart device is provided for an embodiment of the present invention. The control system of the smart device includes a blockchain node 100, a message node 101, a smart device platform 102, an application device platform 103, a smart device 104, and an application terminal 105. The control system of the smart device is described below.
[0048] (1) Blockchain node 100, which can be understood as a blockchain node for interconnecting smart devices, is used to manage and store data related to the control methods of smart devices. Blockchain node 100 can receive the smart device capability information and identity information of smart devices supported by device manufacturers, which are hosted by smart device platform 102, and upload the smart device capability information and identity information to the blockchain. Blockchain node 100 can also receive the usage mapping relationship between smart device platform 102 and the message node 103 to be used, which is published by smart device platform 102, and upload the usage mapping relationship to the blockchain. This usage mapping relationship can be queried and used by application device platform 103, so that users can achieve device interoperability between application device platform 102 and application device platform 102 through application device platform 103. Blockchain node 100 can also receive the service quality evaluation results of smart device platform 102 published by application device platform 103, and upload the service quality evaluation results to the blockchain. The service quality evaluation results can be understood as the access and usage quality data of application device platform 103 to smart device platform 102.
[0049] For example, the data stored in a blockchain node includes equipment manufacturer information, smart device capability information, and smart device identity information. Figure 2 As shown, Figure 2 This is an exemplary schematic diagram illustrating data storage in a blockchain node, provided as an embodiment of the present invention. Figure 2 In the `Hash` section, `Hash` represents a hash table; `Head` and `Body` represent hash objects; the creation timestamp can be automatically generated by blockchain nodes and is used to indicate the creation time of the block storing the data; `Data Packet 2` is used to indicate the storage of the next data item. The smart device capability information characterizes the functions possessed by the smart device, and can be understood as product capability information or device capability information for different device types. Figure 2 This is represented by data packet 1 (product). The smart device capability information includes the product type, manufacturer, product icon, product support status (e.g., the product supports reported parameter attribute definitions), and supported operations (e.g., the product supports issued parameter attribute definitions). This smart device capability information is shared with the application device platform 103 via blockchain node 100.
[0050] The identity information of smart devices Figure 2 The data packet 1 (device) represents the device. The smart device's identity information includes a device identifier (a unique identifier for each smart device), a device authentication code (an authentication information for each smart device), the manufacturer, product type, and network access date. This smart device identity information is used by the application device platform 103 to authenticate user binding requests and, in conjunction with the smart device's capability information, to display the device's capabilities to the user in the application software.
[0051] Equipment vendor information is used by the application equipment platform to conduct quality assessments of the equipment management services provided by the intelligent device platform 102. Figure 2 This is represented by data packet 1 (vendor). The vendor information includes vendor name, vendor category, current information node, number of successful accesses, number of failed accesses, and the vendor being accessed.
[0052] (2) Message node 101 can be understood as an interconnection message node for smart devices, used to run and process data related to the control methods of smart devices. Message node 101 serves as the message communication module between the smart device platform 102 and the application device platform 103, and can use general-purpose message middleware widely used in large-scale internet applications. In the interconnection scheme of smart devices, multiple message nodes provide a transparent and unified message bus service to the outside world in a distributed deployment manner. In this embodiment of the invention, a message bus represents multiple interconnected message nodes.
[0053] For example, the communication data in the message node includes current status events actively published by the smart device through the smart device platform, which are then converted into general uplink information by the smart device platform, and device control commands published by the application terminal through the application device platform (which are converted into standard downlink commands by the application device platform). The storage strategy for the above communication data can be set by the smart device platform and the application device platform themselves; the message bus system only performs temporary caching at certain time intervals. Figure 3 As shown, Figure 3 This is an exemplary schematic diagram of data storage in a message node, provided as an embodiment of the present invention. Figure 3 The product object in the middle represents a smart device, with status information corresponding to the current status event and operation information corresponding to the device control command.
[0054] The current status event actively sent by the smart device is received by the smart device platform and converted into general uplink information. Figure 3 The standard format for representing general uplink information in the Chinese-Israeli device uplink message format (JSON) includes the unique identifier information of the smart device. Figure 3 The session identifier for this communication is indicated by "deviceChainID":"****". Figure 3 The reported message type is indicated by "eventType":"s%". Figure 3 (shown as "sessionID":"d%") and the reported parameter attribute name value pair ( Figure 3 The example is shown as "eventObject":[{"paramName1":"value1"},{"paramName2":"value2"}], where the parameter names correspond to the state information supported in the on-chain product object definition. The smart device platform publishes this general uplink information to message nodes, which are then listened to and processed by the application device platform.
[0055] Device control commands issued by the application terminal are received by the application device platform and converted into standard downlink commands. Figure 3 The standard format for representing information corresponding to standard downlink commands in the Chinese and Israeli device downlink message format (JSON) includes the unique identifier information of the smart device. Figure 3 (shown as "deviceChainID":"****"), the session identifier for this request ( Figure 3 (shown as "commandType":"s%"), the type of instruction requested. Figure 3 (shown as "sessionID":"d%"), request parameter attribute name value pairs ( Figure 3The code is illustrated as "commandObject":[{"paramName1":"value1"},{"paramName2":"value2"}], where the parameter names correspond to the supported operation information in the on-chain product object definition. The application device platform publishes the information corresponding to this standard downlink command to the message node, which is then listened to and processed by the smart device platform.
[0056] (3) The smart device platform 102 can be understood as a smart device access platform, typically built by smart device vendors, which can be understood as manufacturers, equipment suppliers, or producers. Vendors are responsible for accessing and managing the smart devices they support. They share the management information of the smart devices they manage (i.e., the identity information and capability information of the smart devices) on the blockchain through blockchain node 100, and publish the reported data of the supported smart devices to the message bus through message node 101. Simultaneously, the smart device platform 102 subscribes to and listens for device control commands related to the smart devices hosted by the smart device platform 102, published by the corresponding application device platform 103 in message node 101. Upon receiving the device control commands, the smart device platform 102 forwards them to the corresponding smart devices to execute the commands, thereby achieving control over the smart devices.
[0057] (4) Application device platform 103 can be understood as a smart device application access platform or an IoT platform, built by a smart device service provider, which can be understood as an operator or application provider. The service provider is responsible for binding the relationship between the user application terminal and the smart device, and receiving the user's operation request for the smart device bound to the application terminal, generating device control instructions. Through the usage mapping relationship in blockchain node 101, the device control instructions are published to message node 101, thereby completing the device control instruction distribution. Among them, when generating device control instructions, it is necessary to query the smart device capability information of the smart device in blockchain node 100. And according to the identity information of the bound smart device, it subscribes to and listens to the smart device's reported data published by the corresponding smart device platform 102 in message node 101, and forwards it to the application terminal to complete user interaction, thereby completing the processing of smart device reported or response data. The application device platform also regularly compiles and reports, and conducts quality assessment of the device management service provided by smart device platform 102.
[0058] (5) Smart device 104, taking smart home as an example, includes smart switches, smart sockets, smart TVs, smart refrigerators, smart air conditioners, smart washing machines, smart fans, smart door locks, smart lighting, smart audio-visual equipment, and smart health devices, as well as other various electrical appliances. After initial installation and network access, it can automatically establish and maintain a connection with the smart device platform 102. In this embodiment of the invention, the identity information of the smart device is agreed upon. The identity information can represent the unique digital identity of the smart device to avoid conflicts with the identities of other terminal devices on the blockchain node. Other features of the smart device 104 can be the same as those of traditional smart devices.
[0059] For example, to ensure the coexistence and non-conflict of identity information for smart devices from all device manufacturers in this embodiment of the invention, a unique identity identifier needs to be assigned to smart device 104 across the entire network. For example, a device manufacturer identifier prefix can be added to the existing unique device identifier code under the device manufacturer, serving as the identifier information for smart device 104. Simultaneously, random authentication information is generated for the identifier information of smart device 104. The identifier information and authentication information can be pre-imported into smart device platform 102. The identifier information is printed on the outer packaging of smart device 104 for easy reading by the user, while the authentication information can be provided to the user through a hidden label or other difficult-to-obtain channels. The identity information and authentication information of smart device 104 in smart device platform 102 are shared with application device platform 103 for acquisition and device binding authentication upon the initial online release of smart device 104 to blockchain node 100. The authentication information of smart device 104 in smart device platform 102 can serve as the data encryption key and decryption key during message exchange between smart device platform and application device platform.
[0060] (6) Application terminal 105 can be understood as a smart device application terminal, such as mobile APP, smart speaker, computer webpage, and other screen applications. It can provide human-computer interaction methods to complete the binding and unbinding of users and smart devices, smart device status monitoring, device control command issuance, and maintenance of linkage rules between smart devices, such as batch issuance of device control commands. The application platform 103 can provide all the interface services and data involved in the functions of application terminal 105.
[0061] Based on the above Figure 1 The diagram shows the architecture of a control system for a smart device. This embodiment of the invention provides a control method for a smart device, applied to a smart device platform. Figure 4 As shown, Figure 4 The following is an optional flowchart of a control method for an intelligent device provided in an embodiment of the present invention. The control method for the intelligent device includes the following steps.
[0062] S401. Upon initial startup, the preset smart device capability information is published to the blockchain node.
[0063] The preset smart device capability information can be set by the equipment manufacturer based on the device functions of the smart devices they support, and this embodiment of the invention does not impose any restrictions on this. Upon initial startup of the smart device platform, the device capability information of the smart devices supported by the equipment manufacturer is published to the blockchain node.
[0064] S402. When a smart device is detected to be online for the first time, obtain the smart device's identity information and publish the identity information to the blockchain node.
[0065] The smart device platform can obtain the identity information of smart devices in the following ways: receiving and storing the identity information of smart devices uploaded by device manufacturers. When a user connects a smart device to the network for the first time through an application terminal (i.e., the smart device goes online for the first time), the smart device platform detects the first online connection and publishes the smart device's identity information to the blockchain nodes, enabling the blockchain nodes to share the identity information with the application device platform.
[0066] S403. Subscribe to the message bus for access events of the application device platform to the smart device in order to establish device communication with the application device platform.
[0067] The application device platform's access events to smart devices represent the operations performed by users on smart devices through user terminals on the user interface based on the smart device's state.
[0068] S404. In the case of device interoperability, information exchange between the device and the application device platform is realized through the message bus based on the intelligent device's capability information and identity information, thereby realizing the control of the intelligent device.
[0069] In this embodiment of the invention, when the smart device platform starts up for the first time, it publishes the preset smart device capability information to the blockchain node. When the first online connection of a smart device is detected, the identity information of the smart device is obtained and published to the blockchain node. It subscribes to the message bus for access events of the application device platform to the smart device to establish device interoperability with the application device platform. The smart device platform uploads relevant data of the smart devices supported by the device manufacturer to the blockchain and shares it with the application device platform through the blockchain node. This allows the smart device platform to achieve device interoperability with multiple application device platforms on the chain with just one upload. With device interoperability, information interaction between the smart device and the application device platform is achieved through the message bus based on the smart device capability information and identity information, thereby enabling control of the smart device. The solution provided by this embodiment of the invention improves upon both the smart device platform and the application device platform without requiring modifications to the smart device and application terminal, thus improving the interoperability efficiency between the device manufacturer corresponding to the smart device platform and the service provider corresponding to the application device platform.
[0070] In some embodiments, prior to S403 above, the control method for a smart device provided in this embodiment of the invention further includes the following steps: determining the usage mapping relationship between the message bus and the smart device platform, and uploading it to the blockchain node.
[0071] After the mapping relationship is put on the blockchain, S403 can achieve the following: send a first subscription request to the message bus. The first subscription request is used to subscribe to the access event of the application device platform to the smart device. The first subscription request carries the first platform identification information of the smart device platform; receive the first subscription success message sent by the application device platform through the message bus to complete the device communication with the application device platform; wherein, the first subscription success message is generated by the application device platform based on the first platform identification information and the mapping relationship used in the blockchain node.
[0072] Based on the usage mapping relationship between the message bus and the smart device platform, the smart device platform can send a first subscription request to the message bus that matches it. The application device platform corresponding to the first subscription request generates a first subscription success message based on the first platform identifier information of the smart device platform and the usage mapping relationship. This first subscription success message is sent to the smart device platform via the message bus, thereby establishing device interoperability between the smart device platform and the application device platform, enabling subsequent information exchange between them under the premise of device interoperability.
[0073] Based on the above Figure 1The diagram illustrates the architecture of the control system for the intelligent device, and the control method for the intelligent device described in any of the above embodiments. This invention provides an interaction process between the intelligent device, the intelligent device platform, the blockchain node, the message bus, the application device platform, and the application terminal. The interaction process is divided into three stages: a system preparation stage, a communication interaction stage between the application terminal and the intelligent device, and a service quality evaluation stage by the application device platform for the intelligent device platform. The system preparation stage includes: establishing device interoperability between the intelligent device platform and the application device platform from the perspective of the intelligent device platform, and establishing device interoperability between the application device platform and the intelligent device platform from the perspective of the application device platform.
[0074] For example, from the perspective of the smart device platform, establishing device interoperability between the smart device platform and the application device platform, and explaining the system preparation phase, such as... Figure 5 As shown, Figure 5 This is an optional schematic diagram illustrating the interaction process of a control system for an intelligent device, provided as an embodiment of the present invention. The interaction process of the control system for this intelligent device includes the following steps.
[0075] S501. When the smart device platform is first started, the smart device platform will publish the preset smart device capability information to the blockchain node.
[0076] S502, the first smart device to be launched.
[0077] S503. When a smart device is detected to be online for the first time, the smart device platform obtains the smart device's identity information and publishes the identity information to the blockchain node.
[0078] S504. The smart device platform determines the usage mapping relationship between the message bus and the smart device platform, and uploads it to the blockchain node.
[0079] S505: The application device platform obtains the message bus and the usage mapping relationship between the smart device platform from the blockchain nodes.
[0080] S506. The smart device platform sends a first subscription request to the message bus. The first subscription request is used to subscribe to the access events of the application device platform to the smart device. The first subscription request carries the first platform identification information of the smart device platform.
[0081] S507, the message bus sends the first subscription request to the corresponding application device platform.
[0082] S508, the application device platform generates the first subscription success message based on the first platform identification information and the mapping relationship used in the blockchain node.
[0083] S509. The intelligent device platform receives the first subscription success message sent by the application device platform through the message bus, completing the device communication between the intelligent device platform and the application device platform.
[0084] S509 may include S5091 and S5092.
[0085] S5091, The application device platform sends the first subscription success message to the message bus.
[0086] S5092, The message bus sends the first subscription success message to the smart device platform, completing the device communication between the smart device platform and the application device platform.
[0087] In this example, the smart device platform uploads its pre-defined smart device capabilities, smart device identity information, and the mapping relationship between the message bus and the smart device platform to the blockchain node for sharing with the application device platform. The smart device platform sends an initial subscription request to the message bus to establish device interoperability with the application device platform, enabling subsequent information exchange between the smart device platform and the application device platform, provided that device interoperability is achieved. By uploading to the blockchain once, the smart device platform of a device vendor can achieve device interoperability with application device platforms of multiple service providers on the chain, improving interconnection efficiency.
[0088] In some embodiments, S404 described above can be implemented in the following manner: When devices are interconnected, an initial state event reported by the smart device is received, and the initial state event is reported to the message bus based on the identity information; a device control command is received from the message bus, wherein the device control command is generated by the application terminal based on the state and capability information of the smart device corresponding to the initial state event, and the smart device capability information is shared to the application terminal from the blockchain node via the application device platform; a device control command is sent to the smart device, enabling the smart device to complete the control of the smart device according to the device control command, thereby obtaining the execution state of the smart device.
[0089] After the devices are interconnected, the smart device actively reports the initial state event to the smart device platform. The smart device platform shares the reported initial state event with the application device platform through the message bus so that the state corresponding to the initial state event can be displayed on the user interface of the application terminal. The state corresponding to the initial state event can serve as the basis for generating the next device control command.
[0090] Users operate the smart device through the application terminal on the user interface, based on the smart device's status and capability information corresponding to the initial state event. The application terminal generates device control commands according to the operation request. The smart device platform receives the device control commands issued by the application device platform through the message bus, sends the device control commands to the smart device, and enables the smart device to complete the control according to the device control commands, obtaining the execution status of the smart device. This execution status can be displayed on the user interface of the application terminal corresponding to the application device platform by reporting the current state event of the smart device in the next update.
[0091] According to the solution provided in the embodiments of the present invention, the intelligent device platform and the application device platform adopt a shared approach through a message bus to complete the reporting of initial state events by the intelligent device and the issuance of device control commands by the user through the application terminal, thereby realizing information interaction between the intelligent device platform and the application device platform. Improvements are made from the perspective of the intelligent device platform without requiring modifications to the intelligent device, thus improving the interconnection efficiency between the device vendor corresponding to the intelligent device platform and the service provider corresponding to the application device platform. In some embodiments, the identity information includes the identification information and authentication information of the intelligent device. After S404 above, the control method for the intelligent device provided in the embodiments of the present invention further includes the following steps: in the case of device interconnection, receiving the current state event reported by the intelligent device; wherein, the current state event includes at least one of the following: a change in the state of the intelligent device itself, the state of the intelligent device based on the user's physical operation, and the execution state of the intelligent device; encrypting the current state event through authentication information, and determining general uplink information by combining the identification information of the intelligent device corresponding to the current state event; publishing the general uplink information to the message bus, so that the application device platform receives the general uplink information and sends the current state event corresponding to the general uplink information to the application terminal.
[0092] The state of a smart device changes, for example, due to changes in the external environment such as temperature, humidity, energy, smoke, and light. The state of a smart device also changes based on the user's physical actions, such as manually turning on or off a smart switch or socket, manually adjusting the volume of a smart speaker, or manually unlocking a smart door lock. The execution state of a smart device is the state after the device has been controlled according to the device control instructions.
[0093] In the case of device interoperability, the smart device platform receives current status events reported by smart devices, encrypts these events using authentication information, and ensures that the message body is the current status event, thus improving message security. When determining general uplink information, the smart device platform also incorporates the identification information of the smart device corresponding to the current status event. This general uplink information can characterize the information identified and subscribed to by the application device platform, allowing the application device platform to subscribe to status events based on the identification information.
[0094] For example, the message topic published by the smart device platform to the message bus carries identification information (deviceChainID), and the message body corresponding to this message topic is the current state event. The application device platform subscribes to and monitors the message topic carrying the identification information, thereby enabling information interaction between the smart device platform and the application device platform.
[0095] It should be noted that, in this embodiment of the invention, when the intelligent device platform reports the initial state event to the message bus based on identity information, it can do so in the following way: The initial state event is encrypted using authentication information, and combined with the identification information of the intelligent device corresponding to the initial state event, the initial general uplink information is determined; the initial general uplink information is published to the message bus, enabling the application device platform to receive the initial general uplink information and send the initial state event corresponding to the initial general uplink information to the application terminal. That is, both the current state event and the initial state event represent the state events of the intelligent device. The encryption method used by the intelligent device platform when sending the initial state event is consistent with that used when sending the current state event, and will not be repeated here.
[0096] In some embodiments, after publishing general uplink information to the message bus as described above, the control method for a smart device provided in this embodiment of the invention further includes the following steps: subscribing to standard downlink instructions carrying identification information from the message bus according to identification information, and listening for standard downlink instructions published by the application device platform in the message bus, wherein the access events of the application device platform to the smart device include standard downlink instructions; decrypting the standard downlink instructions according to authentication information to obtain the current device control instruction; wherein the current device control instruction is generated by the application terminal based on the status and capability information of the smart device corresponding to the current status event, and the operation request of the smart device.
[0097] In the case of device interoperability, the application device platform determines the standard downlink command by combining the identification information of the smart device corresponding to the current device control command, and then publishes the standard downlink command to the message bus. The standard downlink command is essentially the application device platform's access event to the smart device. Therefore, the smart device platform can subscribe to the standard downlink command carrying the identification information from the message bus, and listen for the standard downlink command published by the application device platform in the message bus. This standard downlink command can represent the command identified and subscribed to by the smart device platform.
[0098] Since the standard downlink command is determined by the application device platform based on authentication information, encrypting the current device control command, and combining it with identification information and the corresponding smart device capability information, the security of the message body can be improved. This message body is the current device control command. Therefore, the smart device platform also needs to decrypt the standard downlink command based on the authentication information to obtain the current device control command, which is used to control the smart device.
[0099] For example, the message topic published by the application device platform to the message bus carries identification information (deviceChainID), and the message body corresponding to this message topic is the current device control command. The smart device platform subscribes to and monitors the message topics carrying the identification information, thereby enabling information interaction between the smart device platform and the application device platform.
[0100] It should be noted that, in this embodiment of the invention, when the intelligent device platform receives device control commands from the message bus, it can do so in the following way: Based on the identification information, it subscribes to the message bus for initial standard downlink commands carrying the identification information, and listens for initial standard downlink commands published by the application device platform on the message bus. Access events of the application device platform to the intelligent device include initial standard downlink commands. Based on the authentication information, it decrypts the initial standard downlink commands to obtain the device control commands. That is, the intelligent device platform uses the same decryption method as when receiving current device control commands, and will not be elaborated further here.
[0101] Based on the above Figure 1 The diagram shows the architecture of a control system for a smart device. This embodiment of the invention provides a control method for a smart device, applied to an application device platform. Figure 6 As shown, Figure 6 The following is an optional flowchart of another control method for a smart device provided in an embodiment of the present invention. The control method for the smart device includes the following steps.
[0102] S601. Upon initial startup, obtain smart device capability information from the blockchain node for use by the application terminal corresponding to the smart device capability information.
[0103] Upon initial launch of the application device platform, it acquires the capability information of the smart device and displays the device capabilities of the application software based on this information, so that the application terminals accessing the smart device capability information can access the corresponding smart device capability information.
[0104] S602. When the application terminal connects for the first time, receive the device binding request submitted by the application terminal.
[0105] The device binding request carries the smart device's identity information, which, for example, includes identification information and authentication information. The identification information can be attached to the smart device in the form of an identification code, for example, printed on the outer packaging of smart device 104 for easy reading by the user. To enhance the security of the identity information, the authentication information can be provided to the user through a hidden label or other difficult-to-obtain channels. The user uploads the smart device's identification information through the application terminal and simultaneously submits a device binding request to the application device platform based on the authentication information.
[0106] S603. Obtain the identity information of the smart device from the blockchain node.
[0107] S604. Authentication and verification of device binding requests based on identity information.
[0108] S605. If authentication is successful, the smart device will be bound.
[0109] S606. Subscribe to the message bus for initial status events reported by the smart device through the smart device platform to establish device communication with the smart device platform.
[0110] S607. In the case of device interoperability, information interaction between itself and the smart device platform is realized through the message bus based on the smart device's capability information and identity information, thereby realizing the control of the smart device.
[0111] In this embodiment of the invention, when the application device platform starts up for the first time, it obtains smart device capability information from the blockchain node for the application terminal corresponding to the smart device capability information to access. When the application terminal accesses for the first time, it receives a device binding request submitted by the application terminal; obtains the identity information of the smart device from the blockchain node; compares and authenticates the device binding request based on the identity information; if the authentication is successful, the smart device is bound. It subscribes to the initial state events reported by the smart device through the smart device platform via the message bus to establish device interoperability with the smart device platform; the application device platform shares smart device-related data uploaded by the smart device platform through the blockchain node, thereby achieving device interoperability with multiple smart device platforms on the chain by putting the application device platform on the chain once. With device interoperability, it achieves information interaction with the smart device platform based on the smart device capability information and identity information through the message bus, thereby realizing the control of the smart device. The solution provided by this embodiment of the invention improves upon the smart device platform and application device platform aspects without requiring modifications to the smart device and application terminal, thus improving the interoperability efficiency between the equipment vendors corresponding to the smart device platform and the service providers corresponding to the application device platform.
[0112] In some embodiments, prior to S606 above, the control method for a smart device provided in this embodiment of the invention further includes the following step: obtaining the usage mapping relationship between the message bus and the smart device platform from the blockchain node.
[0113] After obtaining the mapping relationship from the blockchain, S606 can achieve the following: send a second subscription request to the message bus. The second subscription request is used to subscribe to the initial state event reported by the smart device through the smart device platform. The second subscription request carries the second platform identification information of the application device platform. Receive the second subscription success message sent by the smart device platform through the message bus to complete device communication with the smart device platform. The second subscription success message is generated by the smart device platform based on the second platform identification information and the mapping relationship used in the blockchain node.
[0114] Based on the mapping relationship between the message bus and the smart device platform, the application device platform can send a second subscription request to its corresponding smart device platform via the message bus. The smart device platform generates a second subscription success message based on the second platform identifier information and the mapping relationship used in the blockchain node. This second subscription success message is then sent to the application device platform via the message bus, thereby establishing device interoperability between the application device platform and the smart device platform. This enables subsequent information exchange between the smart device platform and the application device platform, provided that device interoperability is maintained.
[0115] It should be noted that the "first" and "second" in the embodiments of the present invention are only for distinguishing names and do not represent a sequential relationship. They should not be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated, such as the first subscription request and the second subscription request, the first subscription success message and the second subscription success message.
[0116] For example, from the perspective of the application device platform, establishing device interoperability between the application device platform and the smart device platform, and explaining the system preparation phase, such as... Figure 7 As shown, Figure 7 This is an optional schematic diagram illustrating the interaction process of a control system for another intelligent device provided in an embodiment of the present invention. The interaction process of the control system for this intelligent device includes the following steps.
[0117] S701. When the application device platform is started for the first time, the application device platform obtains the intelligent device capability information from the blockchain node so that the application terminal corresponding to the intelligent device capability information can access it.
[0118] S702. When the application terminal connects for the first time, it submits a device binding request to the application device platform.
[0119] S703, the application device platform obtains the identity information of smart devices from blockchain nodes.
[0120] S704. The application device platform compares and authenticates the device binding request based on the identity information. If the authentication is successful, the smart device is bound.
[0121] S705, the application device platform obtains the usage mapping relationship between the message bus and the smart device platform from the blockchain node.
[0122] S706. The application device platform sends a second subscription request to the message bus. The second subscription request is used to subscribe to the initial status event reported by the smart device through the smart device platform. The second subscription request carries the second platform identification information of the application device platform.
[0123] S707, the message bus sends the second subscription request to the corresponding smart device platform.
[0124] S708, the smart device platform generates a second subscription success message based on the second platform identification information and the mapping relationship used in the blockchain node.
[0125] S709. The application device platform receives the second subscription success message sent by the smart device platform through the message bus, thus completing device communication with the smart device platform.
[0126] S709 includes S7091 and S7092.
[0127] S7091, The intelligent device platform sends a second subscription success message to the message bus.
[0128] S7092, the message bus sends a second subscription success message to the application device platform to complete device communication between the application device platform and the smart device platform.
[0129] In this example, the application device platform shares pre-defined smart device capabilities, smart device identity information, and the usage mapping relationship between the message bus and the smart device platform on the blockchain through blockchain nodes. The application device platform subscribes to the second message bus to complete device interoperability between smart device platforms, enabling subsequent information exchange between the smart device platform and the application device platform, provided that device interoperability is achieved. The service provider's application device platform can interoperate with the smart device platforms of all device vendors on the chain with a single on-chain entry, improving interconnection efficiency.
[0130] In some embodiments, S607 described above can be implemented in the following ways: When devices are interconnected, receive an initial state event reported by the smart device from the message bus; send the initial state event to the application terminal and display the state corresponding to the initial state event on the application terminal; receive a device control command sent by the application terminal, wherein the device control command is generated by the application terminal based on the state and capability information of the smart device corresponding to the initial state event, and requests operation of the smart device; and publish the device control command to the message bus.
[0131] After the devices are interconnected, the application device platform receives the initial status event reported by the smart device from the message bus, sends the initial status event to the application terminal, and displays the status corresponding to the initial status event on the application terminal. The status corresponding to the initial status event can be used as the basis for generating device control commands.
[0132] Users operate the smart device through the application terminal on the user interface, based on the smart device's status and capability information corresponding to the initial state event. The application terminal generates device control commands according to the operation request. The application device platform publishes the device control commands to the message bus, so that the smart device platform sends the received device control commands to the smart device, enabling the smart device to complete the control according to the device control commands and obtain the smart device's execution status. This execution status can be displayed on the user interface of the application terminal corresponding to the application device platform by reporting the smart device's current status event in the next update.
[0133] According to the solution provided in this embodiment of the invention, the intelligent device platform and the application device platform adopt a shared message bus to receive initial state events, display the corresponding state on the application terminal, and allow users to issue device control commands through the application terminal, thereby realizing information interaction between the application device platform and the intelligent device platform. This improvement from the application device platform perspective eliminates the need to modify the application terminal, improving the interconnection efficiency between the equipment vendors corresponding to the intelligent device platform and the service providers corresponding to the application device platform.
[0134] Based on the above Figure 1 The architecture diagram of the control system of the intelligent device shown, and the control method of the intelligent device described in any of the above embodiments, illustrate the communication and interaction stage between the application terminal and the intelligent device. Figure 8 As shown, Figure 8 This is an optional schematic diagram illustrating the interaction process of a control system for another intelligent device provided in an embodiment of the present invention. Figure 8 This illustrates the communication and interaction process between an application terminal and a smart device when devices are interconnected. The interaction process of the smart device's control system includes the following steps.
[0135] S801. When devices are interconnected, the smart device reports an initial state event to the smart device platform.
[0136] S802, the intelligent device platform reports initial state events to the message bus based on identity information.
[0137] S803: The application device platform receives the initial status event reported by the smart device from the message bus.
[0138] S804. The application device platform sends an initial state event to the application terminal, and displays the status of the smart device corresponding to the initial state event on the application terminal.
[0139] S805. Based on the state and capability information of the smart device corresponding to the initial state event, the application terminal generates device control instructions for the operation request of the smart device. The capability information of the smart device is obtained through the application device platform.
[0140] S806, The application device platform receives device control commands sent by the application terminal.
[0141] S807, the application device platform publishes device control commands to the message bus.
[0142] The S808 intelligent device platform receives device control commands from the message bus.
[0143] S809. The intelligent device platform sends device control commands to the intelligent device, enabling the intelligent device to complete the control of the intelligent device according to the device control commands and obtain the execution status of the intelligent device.
[0144] S809 includes S8091 and S8092.
[0145] S8091, The intelligent device platform sends device control commands to the intelligent device.
[0146] S8092. The intelligent device completes the control of the intelligent device according to the device control command and obtains the execution status of the intelligent device.
[0147] S810. The smart device reports a current state event to the smart device platform; wherein the current state event includes at least one of the following: a change in the smart device's own state, the state of the smart device based on the user's physical operation, and the execution state of the smart device.
[0148] Repeat steps S802-S810 above. This completes the control of the smart device and enables interconnection between the smart device associated with the smart device platform and the application terminal associated with the application device platform.
[0149] In this example, under the premise of device interoperability, information exchange between the smart device platform and the application device platform is achieved through initial state event reporting and the issuance of device control commands. No software modifications are required for the smart devices and application terminals, thus improving the interoperability efficiency between the device manufacturers corresponding to the smart device platform and the service providers corresponding to the application device platform.
[0150] In some embodiments, the identity information includes the identification information and authentication information of the smart device. After S607 above, the control method for the smart device provided in this embodiment of the invention further includes the following steps: when the devices are interconnected, receiving general uplink information from the message bus according to the identification information; decrypting the general uplink information according to the authentication information to obtain a current state event; wherein, the current state event includes at least one of the following: a change in the state of the smart device itself, the state of the smart device based on the user's physical operation, and the execution state of the smart device; sending the current state event to the application terminal, and displaying the state corresponding to the current state event on the application terminal.
[0151] In the case of device interoperability, the intelligent device platform determines the general uplink information by combining the identification information of the intelligent device corresponding to the current state event, and then publishes the general uplink information to the message bus. Therefore, the application device platform can subscribe to the general uplink information carrying the identification information from the message bus, and listen for the general uplink information published by the intelligent device platform in the message bus. This general uplink information can represent the information identified and subscribed to by the intelligent device platform.
[0152] Since the general uplink information is determined by the smart device platform by encrypting the current state event based on authentication information and combining it with identification information, the security of the message body can be improved. This message body is the current state event. Therefore, the application device platform also needs to decrypt the general uplink information based on authentication information to obtain the current state event. The current state event is used to display the state corresponding to the initial state event on the application terminal.
[0153] For example, the message topic published by the smart device platform to the message bus carries identification information (deviceChainID), and the message body corresponding to this message topic is the current state event. The application device platform subscribes to and monitors the message topic carrying the identification information, thereby enabling information interaction between the smart device platform and the application device platform.
[0154] It should be noted that, in this embodiment of the invention, when the application device platform receives the initial state event from the message bus, it can do so in the following way: receive initial general uplink information from the message bus according to the identification information; decrypt the initial general uplink information according to the authentication information to obtain the initial state event; send the initial state event to the application terminal, and display the state corresponding to the initial state event on the application terminal. That is, the decryption method used by the application device platform when receiving the initial state event is the same as that used when receiving the current state event, and will not be repeated here.
[0155] In some embodiments, after sending the current state event to the application terminal, the control method for the smart device provided in this embodiment of the invention further includes the following steps: querying the smart device capability information corresponding to the smart device on the blockchain node based on the identity information; encrypting the current device control command through authentication information, and determining the standard downlink command by combining the identification information of the smart device corresponding to the current device control command and the smart device capability information corresponding to the smart device; wherein, the current device control command is generated by the application terminal based on the state and smart device capability information of the smart device corresponding to the current state event, and making an operation request to the smart device; publishing the standard downlink command to the message bus, so that the smart device platform receives the standard downlink command and sends the current device control command corresponding to the standard downlink command to the smart device.
[0156] In the case of device interoperability, users operate smart devices through the application terminal on the user interface, based on the smart device's status and capability information corresponding to the current state event. The application terminal generates current device control commands based on the operation requests. The application device platform receives the current device control commands reported by the application terminal, encrypts them using authentication information, and the message body is the current device control command, thus improving message body security. When determining the standard downlink command, the application device platform also incorporates the smart device's identification information corresponding to the current device control command, allowing the smart device platform to subscribe to the current device control command based on the identification information. Since the generation of a standard downlink command also depends on whether the smart device possesses the corresponding function, the application device platform also incorporates smart device capability information when determining the standard downlink command. This standard downlink command represents the command recognized and subscribed to by the smart device platform.
[0157] For example, the message topic published by the application device platform to the message bus carries identification information (deviceChainID), and the message body corresponding to this message topic is the current device control command. The smart device platform subscribes to and monitors the message topics carrying the identification information, thereby enabling information interaction between the smart device platform and the application device platform.
[0158] It should be noted that, in this embodiment of the invention, when the application device platform reports device control commands to the message bus based on identity information, it can do so in the following way: Based on the identity information, it queries the smart device capability information corresponding to the smart device on the blockchain node; it encrypts the device control command through authentication information, and determines the initial standard downlink command by combining the identification information of the smart device corresponding to the device control command and the smart device capability information corresponding to the smart device; wherein, the device control command is generated by the application terminal based on the status and capability information of the smart device corresponding to the initial state event, requesting operation from the smart device; and it publishes the initial standard downlink command to the message bus, enabling the smart device platform to receive the initial standard downlink command and send the device control command corresponding to the initial standard downlink command to the smart device. That is, the encryption method used by the application device platform when sending the device control command is consistent with the encryption method used when sending the current device control command, and will not be repeated here.
[0159] In some embodiments, the control method for smart devices provided by the present invention further includes the following steps: evaluating the quality of the device control service provided by the smart device platform based on the number of times the application terminal accesses the smart device platform, and the number of successful responses and response times of the smart device platform to general uplink information and standard downlink commands, to obtain a service quality evaluation result of the smart device platform; and publishing the service quality evaluation result of the smart device platform to the blockchain node.
[0160] In this embodiment of the invention, the number of accesses includes successful accesses and failed accesses. The number of accesses, the number of successful responses, and the response time directly affect the user experience and reflect the service quality of the smart device platform. In this embodiment of the invention, the application device platform also evaluates the service quality of the smart device platform according to the aforementioned factors affecting user experience within a preset time period. The preset time period can be set by those skilled in the art according to specific circumstances, such as one month or one quarter.
[0161] The application device platform also publishes the service quality evaluation results of the smart device platform to the blockchain node, which can incentivize the smart device platform to perform timely updates and maintenance, thereby improving the completeness of the smart device platform.
[0162] Based on the above Figure 1 The diagram shows the architecture of a control system for a smart device. This embodiment of the invention provides a control method for a smart device applied to a blockchain node. Figure 9 As shown, Figure 9 The following is an optional flowchart of another control method for a smart device provided in an embodiment of the present invention. The control method for the smart device includes the following steps.
[0163] S901. When the smart device platform is started for the first time, it receives the smart device capability information released by the smart device platform and uploads the smart device capability information to the blockchain.
[0164] When the application device platform is launched for the first time, it can obtain the intelligent device capability information from the blockchain node, so that the application terminal corresponding to the intelligent device capability information can access the intelligent device. This enables the intelligent device platform to subscribe to the application device platform's access events for intelligent devices from the message bus, and establish device interoperability with the application device platform.
[0165] S902. When a smart device goes online for the first time, it receives the smart device's identity information published by the smart device platform and uploads the identity information to the blockchain.
[0166] The application device platform can obtain the identity information of smart devices from blockchain nodes to compare and authenticate the device binding requests of application terminals.
[0167] S903: Receive the message bus published by the smart device platform and the usage mapping relationship of the smart device platform, and put the usage mapping relationship on the chain.
[0168] The application device platform can obtain the usage mapping relationship from the blockchain node, enabling the application device platform to subscribe to the status events reported by smart devices through the smart device platform and establish device interoperability with the smart device platform.
[0169] S904. Receive the service quality assessment results of the smart device platform published by the application device platform, and upload the service quality assessment results of the smart device platform to the blockchain.
[0170] The service quality evaluation results of smart device platforms can incentivize them to perform timely updates and maintenance, thereby improving the overall quality of the smart device platforms.
[0171] This invention utilizes blockchain nodes to manage data on smart device capability information, smart device identity information, the mapping relationship between the message bus and the smart device platform, and the service quality evaluation results of the smart device platform. This provides unified and transparent shared data for both the smart device platform and the application device platform. Furthermore, it provides data support for establishing device interoperability with the application device platform and for enabling information exchange between the smart device platform and the application device platform.
[0172] Based on the above Figure 1 The diagram illustrates the architecture of the control system for the intelligent device, and the control method for the intelligent device described in any of the above embodiments. This invention also explains service quality assessment. Figure 10 As shown, Figure 10 This is an optional schematic diagram illustrating the interaction process of a control system for another intelligent device provided in an embodiment of the present invention. Figure 10 This demonstrates how an application device platform performs a quality of service (QoS) assessment on a smart device platform in the context of device interoperability. The interaction process of the smart device's control system includes the following steps.
[0173] S1001. The application device platform evaluates the quality of the device control services provided by the intelligent device platform based on the number of times the application terminal accesses the intelligent device platform, as well as the number of successful responses and response times of the intelligent device platform to general uplink information and standard downlink commands, and obtains the service quality evaluation result of the intelligent device platform.
[0174] S1002, The application device platform publishes the service quality assessment results of the smart device platform to the blockchain node.
[0175] In this example, the application device platform also conducts quality assessments of the device control services provided by the smart device platform and publishes the results on the blockchain. This can incentivize the smart device platform to perform timely updates and maintenance, thereby improving the platform's overall completeness.
[0176] The following will describe an exemplary application of the embodiments of the present invention in a practical application scenario.
[0177] To facilitate understanding of the entire interaction process, this embodiment of the invention describes the message interaction flow executed by the control system of the intelligent device from three aspects: (i) the system preparation stage for establishing device interoperability; (ii) the communication and interaction between the application terminal and the intelligent device under device interoperability; and (iii) the service quality assessment of the intelligent device platform by the application device platform. Figure 11 As shown, Figure 11 This is an optional schematic diagram of the preparation stage of a smart device and application terminal provided in an embodiment of the present invention.
[0178] The embodiments of the present invention provide a complete implementation scheme for device access, control, and data monitoring, including key data formats and message interaction processes, which is a complete and implementable intelligent device interconnection and interoperability scheme.
[0179] (a) The system preparation phase is achieved through the following steps S1101-S1105.
[0180] S1101, the smart device platform is launched for the first time, and the smart device capability information is published on the blockchain.
[0181] Among them, smart device capability information represents the functions possessed by smart devices, which can be understood as product capability information or device capability information for different device types. The smart device capability information supported by the equipment manufacturer is published to the blockchain node.
[0182] S1102, The application device platform is launched for the first time, and obtains the capability information of the smart devices of interest from the blockchain.
[0183] The application device platform obtains information on the smart device capabilities of the device manufacturers that the application terminal needs to support from blockchain nodes, which facilitates the subsequent support for application terminal access.
[0184] S1103. Users purchase and install smart devices and connect them to the network.
[0185] Users can connect smart devices to the network through screen configuration or button pairing.
[0186] Following S1103, the method also includes S11031 and S11032.
[0187] S11031. The smart device platform detects the first online launch of a smart device and publishes the smart device's identity information on the blockchain.
[0188] S11032, The smart device platform subscribes to all access requests for this smart device.
[0189] The smart device platform detects the smart device's first online session and publishes the device's identity information to the blockchain nodes. Simultaneously, the platform subscribes to the message bus for all access events that might be of interest to the smart device. The identity information includes identifiers, authentication information, and the smart device's manufacturer and product type. Potentially interesting access events include access events from application device platforms to the smart device.
[0190] S1104. Users scan a QR code and enter the identity information of the smart device through the application terminal to apply for binding.
[0191] Users can enter the identification information of smart devices by scanning QR codes or other means on the application terminal. At the same time, based on the smart device's hidden tag or other authentication information obtained from other channels, users can submit a smart device binding request to the application device platform.
[0192] Following S1104, the method includes S11041 and S11042.
[0193] S11041. The application device platform authenticates the binding request based on the identity information of the smart device on the chain.
[0194] S11042, Authentication passed, the application device platform subscribes to all reported events of the smart device.
[0195] The application device platform obtains the identity information of smart devices from blockchain nodes and performs authentication on the binding request. If authentication is successful, it subscribes to all event data reported by that smart device from the message bus. The event data reported by the smart device includes status events reported by the smart device through the smart device platform.
[0196] S1105. Users use application terminals to monitor the status of smart devices or issue device control commands to smart devices.
[0197] After completing the system preparation, the user can monitor the status of the smart device or issue device control commands through the application terminal bound to the smart device. In other words, the user can further control the smart device through the application terminal, which can be achieved, for example, through S1201-S1204 and S1211-S1214.
[0198] This invention, tailored to the characteristics of intelligent device control systems, divides the control method into on-chain and off-chain components. The on-chain component handles general and basic management capabilities for products, intelligent devices, and equipment manufacturers, while the off-chain component handles business processes and business data communication capabilities. A unified data model (including intelligent device capability information and intelligent device identity information) is defined for each component. Utilizing blockchain technology, the interoperability issue is decomposed into two main parts: an intelligent device platform and an application device platform. Furthermore, based on the different characteristics of management data and operational data, data storage and management are achieved through blockchain nodes, while message distribution and data processing are handled through a message bus. Since the management and operational data components are relatively independent, they can be implemented separately, facilitating implementation and further improving the interoperability efficiency between equipment manufacturers corresponding to the intelligent device platform and service providers corresponding to the application device platform.
[0199] (ii) The communication and interaction stage between the application terminal and the smart device may include S1201-S1204 and S1211-S1214. For example... Figure 12 As shown, Figure 12 This is an optional schematic diagram of the communication interaction stage between a smart device and an application terminal, provided as an embodiment of the present invention.
[0200] S1201-S1204 describes the communication and interaction process between the smart device and the application terminal, from the smart device reporting a status event to the application terminal displaying the status corresponding to the status event.
[0201] S1201, Smart device online and status event reporting.
[0202] The smart device reports its status events to the smart device platform. These status events include at least one of the following: changes in the smart device's own state, the smart device's state based on the user's physical actions, and the smart device's execution state.
[0203] In this context, the user's physical operation can be understood as the user manually operating the smart device locally, causing a change in the smart device's state. The execution state of the smart device represents the state of the smart device after it has completed control according to the device control instructions.
[0204] S1202, the intelligent device platform receives and publishes messages to the message bus.
[0205] The smart device platform converts status events into generic uplink messages. The standard format of generic uplink messages is as follows: Figure 3 The system defines the device uplink message format and publishes generic uplink messages to the message bus. The published message topic carries the identifier "deviceChainID," and the message body is encrypted using authentication information. The message body is the generic uplink message.
[0206] S1203, The application device platform subscribes to this status event.
[0207] Since the application device platform subscribes to message topics with the identification information "deviceChainID", the application device platform receives the status event corresponding to the message body through a pre-listened message queue.
[0208] S1204, The application device platform converts and pushes messages, and the application terminal receives and displays them.
[0209] The application device platform decrypts the received message body using authentication information. After decryption, it converts the general uplink message into a service provider's private message, i.e., a status event, that can be recognized by the application terminal. Upon receiving the status event, the application terminal displays the corresponding status on the user's screen.
[0210] S1211-S1214 describe the communication and interaction process between the application terminal and the smart device, from the user issuing device control commands to the smart device executing the device control commands.
[0211] S1211, Users issue various device control commands supported by smart devices.
[0212] Users can operate smart devices through the application terminal and select control commands at the bottom of the corresponding page of the smart device.
[0213] S1212, The application device platform receives and publishes messages to the message bus.
[0214] The application device platform converts the received device control commands into standard downlink commands. The standard format of the standard downlink commands is as follows: Figure 3 The system uses the device downlink message format defined in the documentation and publishes standard downlink commands to the message bus. The published message topic carries the identifier "deviceChainID," and the message body is encrypted using authentication information. The message body is the standard downlink command.
[0215] S1213, The smart device platform subscribes to the user's device control commands.
[0216] Because the smart device platform subscribes to message topics with the identification information "deviceChainID", the smart device platform receives the device control command corresponding to the message body through a pre-listened message queue.
[0217] S1214 The smart device platform converts and pushes messages, and the smart device receives and executes them.
[0218] The intelligent device platform decrypts the received message body using authentication information. After decryption, it converts the standard downlink command into a device control command recognizable by the device manufacturer's intelligent device and sends it to the intelligent device. The intelligent device receives and executes the command, obtaining the execution status of the intelligent device. If it is necessary to report the execution status of the intelligent device, it can be fed back to the application terminal according to the process triggered by S1201-S1204, thereby completing the complete device control action.
[0219] This invention provides a method for network-wide device identity and authentication with the participation of numerous device vendors. It requires no modification to existing smart devices and improves the security of data transmission and storage. Furthermore, compared to solutions that improve from the smart device side or application terminal side, this invention does not require modification to the device software. Improvements are made from the platform side (smart device platform and application device platform). Device vendors and smart device service providers can achieve interconnection with all other corresponding participants on the chain through a single platform adaptation, improving the interoperability efficiency of smart devices.
[0220] (III) Quality assessment stage of application device platform for intelligent device platform
[0221] The application device platform periodically submits service quality data of the smart device platform to the blockchain nodes based on the service quality of the smart device platform. This service quality data includes, but is not limited to, the number of times the application terminal accesses the smart device platform, the number of successful responses and response times of the smart device platform to general uplink information and standard downlink commands, etc. In this embodiment of the invention, quality assessment can be based on, for example... Figure 2 The equipment vendor information in data package 1 (vendor) is used by the application equipment platform to conduct quality assessment of the equipment management services provided by the smart device platform.
[0222] This invention employs a consortium blockchain structure built upon blockchain technology, involving multiple smart device manufacturers and service providers. This improves the efficiency of smart device interconnection, ensures transparent sharing of device management capabilities, and enhances data security and reliability. Leveraging the transparent data sharing characteristics of blockchain, this invention also provides a method for manufacturers to evaluate the management quality of smart device platforms. Associated service providers periodically upload statistics on the service quality of the smart device platform to the blockchain, which can encourage manufacturers to improve the management quality of their smart device platforms.
[0223] To implement the control method for the smart device in this embodiment of the invention, this embodiment also provides a control device for the smart device, which includes a smart device platform 13, an application device platform 14, and a blockchain node 15, which are described below.
[0224] like Figure 13 As shown, Figure 13This is a schematic diagram of an optional structure of a smart device platform provided in an embodiment of the present invention. The smart device platform 13 includes: a first sending module 1301, used to publish preset smart device capability information to a blockchain node when the platform is first started; when the first online status of the smart device is detected, the module obtains the identity information of the smart device and publishes the identity information to the blockchain node; a first subscription module 1302, further used to subscribe to access events of the smart device by the application device platform from the message bus to establish device interoperability with the application device platform; and a first interoperability module 1303, used to realize information interaction between itself and the application device platform through the message bus based on the smart device capability information and identity information when device interoperability is achieved, thereby realizing control of the smart device.
[0225] In some embodiments, the smart device platform 13 further includes a mapping module and a first receiving module. The mapping module is used to determine the usage mapping relationship between the message bus and the smart device platform. The first sending module 1301 is used to upload the usage mapping relationship to the blockchain node and send a first subscription request to the message bus. The first subscription request is used to subscribe to the access events of the application device platform to the smart device. The first subscription request carries the first platform identification information of the smart device platform. The first receiving module is used to receive the first subscription success message sent by the application device platform through the message bus to complete the device communication with the application device platform. The first subscription success message is generated by the application device platform based on the first platform identification information and the usage mapping relationship in the blockchain node.
[0226] In some embodiments, the first receiving module is further configured to receive an initial state event reported by the smart device when the devices are interconnected, and the first sending module 1301 is further configured to report the initial state event to the message bus based on the identity information; the first receiving module is further configured to receive a device control instruction from the message bus, the device control instruction being generated by the application terminal based on the state and capability information of the smart device corresponding to the initial state event, and the smart device capability information being shared with the application terminal from the blockchain node via the application device platform; the first sending module 1301 is further configured to send the device control instruction to the smart device, so that the smart device completes the control of the smart device according to the device control instruction and obtains the execution state of the smart device.
[0227] In some embodiments, the identity information includes the identification information and authentication information of the smart device; the first receiving module is further configured to receive the current status event reported by the smart device when the devices are interconnected; wherein, the current status event includes at least one of the following: a change in the state of the smart device itself, the state of the smart device based on the user's physical operation, and the execution state of the smart device; the first interconnection module 1303 is further configured to encrypt the current status event through the authentication information, and determine the general uplink information by combining the identification information of the smart device corresponding to the current status event; the first sending module 1301 is further configured to publish the general uplink information to the message bus, so that the application device platform receives the general uplink information and sends the current status event corresponding to the general uplink information to the application terminal.
[0228] In some embodiments, the first subscription module 1302 is further configured to subscribe to standard downlink instructions carrying identification information from the message bus according to the identification information, and the first interconnection module 1303 is further configured to listen for standard downlink instructions issued by the application device platform in the message bus, wherein the application device platform's access events to the smart device include standard downlink instructions; and to decrypt the standard downlink instructions according to the authentication information to obtain the current device control instruction; wherein the current device control instruction is generated by the application terminal based on the status and capability information of the smart device corresponding to the current status event, and the operation request of the smart device.
[0229] like Figure 14 As shown, Figure 14 This is a schematic diagram of an optional structure of an application device platform provided in an embodiment of the present invention. The application device platform 14 includes: an acquisition module 1401, used to acquire smart device capability information from a blockchain node when it is first started, for use by an application terminal corresponding to the smart device capability information; a second receiving module 1402, used to receive a device binding request submitted by an application terminal when the application terminal is first connected; the acquisition module 1401 is also used to acquire the identity information of the smart device from the blockchain node; a binding module 1403, used to compare and authenticate the device binding request based on the identity information, and bind the smart device if the authentication is successful; a second subscription module 1404, used to subscribe to the initial state events reported by the smart device through the smart device platform via the message bus, so as to establish device interoperability with the smart device platform; and a second interoperability module 1405, used to realize information interaction between itself and the smart device platform through the message bus based on the smart device capability information and identity information, thereby realizing control of the smart device, when device interoperability is achieved.
[0230] In some embodiments, the acquisition module 1401 is further configured to acquire the usage mapping relationship between the message bus and the smart device platform from the blockchain node; the second sending module is configured to send a second subscription request to the message bus, the second subscription request being used to subscribe to the initial state event reported by the smart device through the smart device platform, the second subscription request carrying the second platform identification information of the application device platform; the second receiving module 1402 is configured to receive the second subscription success message sent by the smart device platform through the message bus, completing device communication with the smart device platform; wherein, the second subscription success message is generated by the smart device platform based on the second platform identification information and the usage mapping relationship in the blockchain node.
[0231] In some embodiments, the second receiving module 1402 is further configured to receive an initial state event reported by a smart device from the message bus when the devices are interconnected; the second sending module is further configured to send the initial state event to the application terminal and display the state corresponding to the initial state event on the application terminal; the second receiving module 1402 is further configured to receive a device control instruction sent by the application terminal, the device control instruction being generated by the application terminal based on the state and capability information of the smart device corresponding to the initial state event, and the second sending module is further configured to publish the device control instruction to the message bus.
[0232] In some embodiments, the identity information includes the identification information and authentication information of the smart device; the second receiving module 1402 is further configured to receive general uplink information from the message bus according to the identification information when the devices are interconnected; the second interconnection module 1405 is further configured to decrypt the general uplink information according to the authentication information to obtain the current state event; wherein, the current state event includes at least one of the following: a change in the state of the smart device itself, the state of the smart device based on the user's physical operation, and the execution state of the smart device; the second sending module is further configured to send the current state event to the application terminal and display the state corresponding to the current state event on the application terminal.
[0233] In some embodiments, the second interconnection module 1405 is further configured to query the smart device capability information corresponding to the smart device on the blockchain node based on the identity information; encrypt the current device control command through authentication information, and determine the standard downlink command by combining the identification information of the smart device corresponding to the current device control command and the smart device capability information corresponding to the smart device; wherein, the current device control command is generated by the application terminal based on the status and smart device capability information of the smart device corresponding to the current status event, and the operation request to the smart device; the second sending module is further configured to publish the standard downlink command to the message bus, so that the smart device platform receives the standard downlink command and sends the current device control command corresponding to the standard downlink command to the smart device.
[0234] In some embodiments, the application device platform 14 further includes a quality assessment module, which is used to assess the quality of the device control service provided by the smart device platform based on the number of times the application terminal accesses the smart device platform and the number of successful responses and response times of the smart device platform to general uplink information and standard downlink instructions, and obtain the service quality assessment result of the smart device platform; the second sending module is also used to publish the service quality assessment result of the smart device platform to the blockchain node.
[0235] like Figure 15 As shown, Figure 15 This is a schematic diagram of an optional structure of a blockchain node provided in an embodiment of the present invention. The blockchain node 15 includes: a third receiving module 1501, used to receive smart device capability information published by the smart device platform when the smart device platform is first started; an uploading module 1502, used to upload the smart device capability information to the blockchain; the third receiving module 1501 is also used to receive the smart device identity information published by the smart device platform when the smart device is first online; the uploading module 1502 is also used to upload the identity information to the blockchain; the third receiving module 1501 is also used to receive the message bus and the usage mapping relationship of the smart device platform published by the smart device platform; the uploading module 1502 is also used to upload the usage mapping relationship to the blockchain; the third receiving module 1501 is also used to receive the smart device platform service quality evaluation result published by the application device platform; the uploading module 1502 is also used to upload the smart device platform service quality evaluation result to the blockchain.
[0236] It should be noted that the smart device platform, application device platform, and blockchain node provided in the above embodiments are only illustrative examples of the division of the above-described program modules when controlling smart devices. In practical applications, the above processing can be assigned to different program modules as needed, that is, the internal structure of the device can be divided into different program modules to complete all or part of the processing described above. Furthermore, the smart device platform, application device platform, and blockchain node provided in the above embodiments belong to the same concept as the corresponding smart device control method embodiments described above. Their specific implementation process and beneficial effects are detailed in the method embodiments and will not be repeated here. For technical details not disclosed in this device embodiment, please refer to the description of the method embodiments of this invention for understanding.
[0237] In an embodiment of the present invention, Figure 16 This is a schematic diagram of the composition structure of an intelligent device platform provided in an embodiment of the present invention, as shown below. Figure 16As shown. The intelligent device platform 16 provided in this embodiment of the invention includes a first processor 1601 and a first memory 1602 storing executable instructions of the first processor 1601. In some embodiments of the invention, the intelligent device platform 16 may also include a communication interface 1603 and a first bus 1604 for connecting the first processor 1601, the first memory 1602 and the first communication interface 1603.
[0238] In this embodiment of the invention, the first processor 1601 can be at least one of the following: Application-Specific Integrated Circuit (ASIC), Digital Signal Processor (DSP), Digital Signal Processing Device (DSPD), Programmable Logic Device (PLD), Field Programmable Gate Array (FPGA), Central Processing Unit (CPU), Controller, Microcontroller, and Microprocessor. It is understood that for different devices, the electronic device used to implement the above-mentioned processor function can also be other types, and this embodiment of the invention does not specifically limit the specific types.
[0239] In this embodiment of the invention, the first bus 1604 is used to connect the first communication interface 1603, the first processor 1601, and the first memory 1602, as well as the mutual communication between these devices.
[0240] In this embodiment of the invention, the first processor 1601 executes the control method of the smart device applied to the smart device platform as described in this embodiment of the invention.
[0241] In the intelligent device platform 16, the first memory 1602 can be connected to the first processor 1601. The first memory 1602 is used to store executable program instructions and data. The program code includes computer operation instructions. The first memory 1602 may include high-speed RAM memory and may also include non-volatile memory, such as at least two disk drives. In practical applications, the first memory 1602 can be volatile memory, such as random-access memory (RAM); or non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid-state drive (SSD); or a combination of the above types of memory, and provides instructions and data to the first processor 1601.
[0242] In an embodiment of the present invention, Figure 17 This is a schematic diagram of the composition structure of an application device platform provided in an embodiment of the present invention, as shown below. Figure 17 As shown. The application device platform 17 provided in this embodiment of the invention includes a second processor 1701 and a second memory 1702 storing executable instructions of the second processor 1701. In some embodiments of the invention, the application device platform 17 may also include a second communication interface 1703 and a second bus 1704 for connecting the second processor 1701, the second memory 1702 and the second communication interface 1703.
[0243] In this embodiment of the invention, the second processor 1701 executes the control method for a smart device applied to an application device platform as described in this embodiment of the invention.
[0244] In an embodiment of the present invention, Figure 18 This is a schematic diagram of the composition structure of a blockchain node provided in an embodiment of the present invention, as shown below. Figure 18 As shown. The blockchain node 18 provided in this embodiment of the invention includes a third processor 1801 and a third memory 1802 storing executable instructions of the third processor 1801. In some embodiments of the invention, the blockchain node 18 may also include a third communication interface 1803 and a third bus 1804 for connecting the third processor 1801, the third memory 1802 and the third communication interface 1803.
[0245] In this embodiment of the invention, the third processor 1801 executes the control method for a smart device applied to a blockchain node as described in this embodiment of the invention.
[0246] It should be noted that, Figure 18 The third processor 1801, third memory 1802, third communication interface 1803, and third bus 1804 in the middle are related to Figure 17 The second processor 1701, second memory 1702, second communication interface 1703, and second bus 1704 are connected to... Figure 16 The first processor 1601, first memory 1602, first communication interface 1603, and first bus 1604 in the program are only different in the steps of the method when the program is executed. Other structures can be the same, and will not be described in detail here.
[0247] This invention provides a computer-readable storage medium storing a program thereon, which, when executed by a first processor, implements the control method for the intelligent device as described in S401-S404 above.
[0248] This invention provides a computer-readable storage medium storing a program thereon, which, when executed by a second processor, implements the control method for the intelligent device as described in S601-S607 above.
[0249] This invention provides a computer-readable storage medium storing a program thereon, which, when executed by a third processor, implements the control method for the intelligent device as described in S901-S904 above.
[0250] For example, the program instructions corresponding to the control method of a smart device in this embodiment can be stored on storage media such as optical discs, hard disks, and USB flash drives. When the program instructions corresponding to the control method of a smart device in the storage media are read or executed by an electronic device, the control method of the smart device as described in any of the above embodiments can be implemented.
[0251] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of hardware embodiments, software embodiments, or embodiments combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.
[0252] This invention is described with reference to schematic and / or block diagrams illustrating the implementation of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the schematic and / or block diagrams can be implemented by computer program instructions, as well as combinations of blocks in the schematic and / or block diagrams. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the schematic and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0253] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in the implementation flow diagram. Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0254] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0255] The above are merely preferred embodiments of the present invention and are not intended to limit the scope of protection of the present invention.
Claims
1. A control method for an intelligent device, characterized in that, Applied to a smart device platform, the method includes: Upon initial startup, the pre-defined smart device capability information will be published to the blockchain node; When a smart device is detected to be online for the first time, its identity information is obtained and published to the blockchain node. Subscribe to the message bus for access events of smart devices from the application device platform to establish device communication with the application device platform; In the case of device interoperability, the system receives the initial state event reported by the smart device and reports the initial state event to the message bus based on the identity information. The application terminal receives device control instructions from the message bus. These instructions are generated by the application terminal based on the state of the smart device corresponding to the initial state event and the smart device's capability information, requesting the application terminal to operate the smart device. The smart device capability information is shared with the application terminal from the blockchain node via the application device platform. Send the device control command to the smart device, so that the smart device can complete the control of the smart device according to the device control command, and obtain the execution status of the smart device.
2. The method according to claim 1, characterized in that, Before subscribing to the message bus for access events of the application device platform to the smart device to establish device interoperability with the application device platform, the method further includes: Determine the usage mapping relationship between the message bus and the smart device platform, and upload it to the blockchain node; The step of subscribing to the message bus for access events of the application device platform to the smart device to establish device interoperability with the application device platform includes: Send a first subscription request to the message bus. The first subscription request is used to subscribe to the access events of the application device platform to the smart device. The first subscription request carries the first platform identification information of the smart device platform. The device receives a first subscription success message sent by the application device platform through the message bus, thus completing device communication with the application device platform; wherein, the first subscription success message is generated by the application device platform based on the first platform identification information and the mapping relationship used in the blockchain node.
3. The method according to claim 1, characterized in that, The identity information includes the identification information and authentication information of the smart device. After sending the device control command to the smart device, enabling the smart device to complete control of the smart device according to the device control command, and obtaining the execution status of the smart device, the method further includes: In the case of device interoperability, the system receives a current status event reported by the smart device; wherein the current status event includes at least one of the following: a change in the smart device's own state, the state of the smart device based on the user's physical operation, and the execution state of the smart device. The authentication information is used to encrypt the current state event, and the general uplink information is determined by combining the identification information of the smart device corresponding to the current state event. The general uplink information is published to the message bus, so that the application device platform receives the general uplink information and sends the current status event corresponding to the general uplink information to the application terminal.
4. The method according to claim 3, characterized in that After publishing the general uplink information to the message bus, the method further includes: Based on the identification information, subscribe to the message bus for standard downlink instructions carrying the identification information, and listen for standard downlink instructions issued by the application device platform in the message bus. The access events of the application device platform to the smart device include the standard downlink instructions. Based on the authentication information, the standard downlink instruction is decrypted to obtain the current device control instruction; wherein, the current device control instruction is generated by the application terminal based on the state of the smart device corresponding to the current state event and the capability information of the smart device, and the operation request of the smart device.
5. A control method for an intelligent device, characterized in that, Applied to an application device platform, the method includes: Upon initial startup, intelligent device capability information is obtained from blockchain nodes for use by application terminals that access the corresponding intelligent device capability information. When the application terminal connects for the first time, the device binding request submitted by the application terminal is received; Obtain the identity information of the smart device from the blockchain node; The device binding request is compared and authenticated based on the identity information; If authentication is successful, the smart device is bound and the message bus is subscribed to the initial status event reported by the smart device through the smart device platform to establish device communication with the smart device platform. In the case of device interoperability, the initial status event reported by the smart device is received from the message bus; Send the initial state event to the application terminal, and display the state corresponding to the initial state event on the application terminal; The application terminal receives a device control command sent by the application terminal. The device control command is generated by the application terminal based on the state of the smart device corresponding to the initial state event and the capability information of the smart device, as well as an operation request for the smart device. The device control commands are published to the message bus.
6. The method according to claim 5, characterized in that, Before subscribing to the initial status events reported by the smart device through the smart device platform to establish device interoperability with the smart device platform, the method further includes: Obtain the usage mapping relationship between the message bus and the smart device platform from the blockchain node; The step of subscribing to the initial status events reported by the smart device through the smart device platform to establish device interoperability with the smart device platform includes: Send a second subscription request to the message bus. The second subscription request is used to subscribe to the initial state event reported by the smart device through the smart device platform. The second subscription request carries the second platform identification information of the application device platform. The device receives a second subscription success message sent by the smart device platform through the message bus, thus completing device communication with the smart device platform; wherein, the second subscription success message is generated by the smart device platform based on the second platform identification information and the mapping relationship used in the blockchain node.
7. The method according to claim 5, characterized in that, The identity information includes the identification information and authentication information of the smart device. After publishing the device control command to the message bus, the method further includes: In the case of device interoperability, general uplink information is received from the message bus based on the identification information; The authentication information is used to decrypt the general uplink information to obtain the current state event; wherein, the current state event includes at least one of the following: a change in the state of the smart device itself, the state of the smart device based on the user's physical operation, and the execution state of the smart device; The current status event is sent to the application terminal, and the status corresponding to the current status event is displayed on the application terminal.
8. The method according to claim 7, characterized in that, After sending the current status event to the application terminal, the method further includes: Based on the identity information, query the smart device capability information corresponding to the smart device on the blockchain node; The authentication information is used to encrypt the current device control command. Combined with the identification information of the smart device corresponding to the current device control command and the smart device capability information corresponding to the smart device, a standard downlink command is determined. The current device control command is generated by the application terminal based on the status of the smart device corresponding to the current status event and the smart device capability information, as well as the operation request to the smart device. The standard downlink command is published to the message bus, enabling the smart device platform to receive the standard downlink command and send the current device control command corresponding to the standard downlink command to the smart device.
9. The method according to claim 5, characterized in that, The method further includes: Based on the number of times the application terminal accesses the smart device platform, and the number of successful responses and response time of the smart device platform to general uplink information and standard downlink commands, the quality of the device control service provided by the smart device platform is evaluated, and the service quality evaluation result of the smart device platform is obtained. The service quality assessment results of the smart device platform are published to the blockchain node.
10. A control method for an intelligent device, characterized in that, The method is applied to blockchain nodes, which are used to store and manage information of smart device platforms and application device platforms, and support interconnection between the smart device platforms and application device platforms via a message bus. The smart device platform is used to execute the method described in any one of claims 1-4, and the application device platform is used to execute the method described in any one of claims 5-9. The method includes: When the smart device platform is started for the first time, it receives the smart device capability information released by the smart device platform and uploads the smart device capability information to the blockchain; When a smart device goes online for the first time, it receives the smart device's identity information published by the smart device platform and uploads the identity information to the blockchain. Receive the message bus published by the smart device platform and the usage mapping relationship of the smart device platform, and put the usage mapping relationship on the blockchain; Receive the service quality assessment results of the smart device platform published by the application device platform, and upload the service quality assessment results of the smart device platform to the blockchain.
11. A smart device platform, characterized in that, The intelligent device platform includes: The first sending module is used to publish preset smart device capability information to the blockchain node when the device is first started; when the smart device is detected to be online for the first time, the module obtains the identity information of the smart device and publishes the identity information to the blockchain node. The first subscription module is also used to subscribe to the application device platform's access events to smart devices from the message bus in order to establish device interoperability with the application device platform. The first interoperability module is used to receive an initial state event reported by the smart device when the devices are interconnected, and report the initial state event to the message bus based on the identity information; receive device control instructions from the message bus, wherein the device control instructions are generated by the application terminal based on the state of the smart device corresponding to the initial state event and the capability information of the smart device, and the smart device capability information is shared to the application terminal from the blockchain node via the application device platform; and send the device control instructions to the smart device, so that the smart device completes the control of the smart device according to the device control instructions, and obtains the execution state of the smart device.
12. An application device platform, characterized in that, The application device platform includes: The acquisition module is used to acquire smart device capability information from the blockchain node when the system is first started, so that the application terminal corresponding to the smart device capability information can access it. The second receiving module is used to receive a device binding request submitted by the application terminal when the application terminal connects for the first time; the obtaining module is also used to obtain the identity information of the smart device from the blockchain node. The binding module is used to compare and authenticate the device binding request based on the identity information. If the authentication is successful, the smart device is bound. The second subscription module is used to subscribe to the initial status events reported by the smart device through the smart device platform to the message bus, so as to establish device communication with the smart device platform; The second interoperability module is configured to, in the case of device interoperability, receive an initial state event reported by the smart device from the message bus; send the initial state event to the application terminal and display the state corresponding to the initial state event on the application terminal; receive a device control command sent by the application terminal, wherein the device control command is generated by the application terminal based on the state of the smart device corresponding to the initial state event and the capability information of the smart device, and publish the device control command to the message bus.
13. A blockchain node, characterized in that, The blockchain node is used to store and manage information of the smart device platform and the application device platform, and supports interconnection between the smart device platform and the application device platform through a message bus. The smart device platform is used to execute the method according to any one of claims 1-4, and the application device platform is used to execute the method according to any one of claims 5-9. The blockchain node includes: The third receiving module is used to receive the intelligent device capability information released by the intelligent device platform when the intelligent device platform is started for the first time. The on-chain module is used to upload the capability information of the smart device to the blockchain; The third receiving module is also used to receive the identity information of the smart device published by the smart device platform when the smart device goes online for the first time; The on-chain module is also used to upload the identity information to the blockchain; The third receiving module is also used to receive the message bus published by the smart device platform and the usage mapping relationship of the smart device platform; The on-chain module is also used to put the mapping relationship on the chain; The third receiving module is also used to receive the service quality assessment results of the smart device platform published by the application device platform; The on-chain module is also used to upload the service quality evaluation results of the smart device platform to the blockchain.
14. A smart device platform, characterized in that, The intelligent device platform includes: A first memory and a first processor, the first memory storing a computer program that can run on the first processor, the first processor executing the program to implement the method according to any one of claims 1-4.
15. An application device platform, characterized in that, The application device platform includes: A second memory and a second processor, the second memory storing a computer program that can run on the second processor, the second processor executing the program to implement the method of any one of claims 5-9.
16. A blockchain node, characterized in that, The blockchain nodes include: A third memory and a third processor, the third memory storing a computer program executable on the third processor, the third processor executing the program to implement the method of claim 10.
17. A computer-readable storage medium, characterized in that, It stores executable instructions, which, when executed by the first processor, implement the method described in any one of claims 1-4; Alternatively, when executed by a second processor, it may implement the method described in any one of claims 5-9; Alternatively, when executed by a third processor, it can implement the method of claim 10.
Citation Information
Patent Citations
Method and system for realizing commodity purchasing, corresponding communication methods, device and system
CN109309704A
Internet of Things equipment control method and device, storage medium and electronic device
CN112689006A