Cross-platform equipment control method, cloud platform, equipment control system and storage medium
By receiving and analyzing the request for intelligent device control, using smart contracts and blockchain technology to convert the request into a device recognizable control instruction, solve the complexity and security issues of cross -platform equipment control, and achieve simple operation and high security operation. Device control method.
Patent Information
- Application Number
- CN202411504232.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-25
- Publication Date
- 2025-01-24
- Estimated Expiration
- Not applicable · inactive patent
Smart Images

Figure CN119363355A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of intelligent devices, and in particular to a cross-platform device control method, a cloud platform, a device control system and a computer-readable storage medium. Background Art
[0002] With the rapid development of the Internet of Things and smart device technology, the use of smart devices is becoming more and more widespread. However, smart devices of different brands and types usually use their own independent control protocols and interfaces, which requires users to use multiple applications to operate them, increasing complexity and inconvenience.
[0003] At the same time, traditional centralized control systems have security risks and data can be easily tampered with or leaked. Summary of the invention
[0004] The main purpose of this application is to provide a cross-platform device control method, a cloud platform, a device control system and a computer-readable storage medium, so as to at least solve the problem of the lack of a cross-platform control technology for smart devices that is simple to operate and highly secure.
[0005] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a cross-platform device control method is provided, including: receiving a general smart device control request; parsing the general smart device control request to obtain relevant information of the smart device to be controlled, the relevant information including the device type and device model; based on the relevant information, using a smart contract to convert the general smart device control request into a control instruction that complies with the control instruction specification of the smart device to be controlled, and issuing the control instruction to the smart device to be controlled through a blockchain network, so as to perform corresponding control on the smart device to be controlled.
[0006] Optionally, based on the relevant information, the smart contract is used to convert the general smart device control request into a control instruction that complies with the control instruction specification of the smart device to be controlled, including: using predefined rules configured in the smart contract to convert the general smart device control request into a control instruction that complies with the control instruction specification of the smart device to be controlled, wherein the predefined rules include: device type rules, device model rules, protocol conversion rules and operation logic rules, the device type rules represent a set of control instructions corresponding to the device type, the device model rules represent a set of control instructions corresponding to the device model, the protocol conversion rules represent the conversion of the protocol of the general smart device control request into the communication protocol used by a specific device, and the operation logic rules define the logical flow of a specific operation.
[0007] Optionally, receiving a general smart device control request includes: receiving the smart device control request sent by a user terminal through the blockchain network.
[0008] Optionally, before receiving the universal smart device control request, the method also includes: receiving an authentication and authorization request sent by the user terminal; and when the authentication and authorization request sent by the user terminal is deemed to be passed, determining that the user terminal has the authority to send the universal smart device control request to the cloud platform.
[0009] Optionally, the universal smart device control request is parsed to obtain relevant information of the smart device to be controlled, including: parsing the universal smart device control request to obtain device description information; based on the device description information, matching the device registration information on the blockchain to obtain relevant information of the smart device to be controlled.
[0010] Optionally, after converting the general smart device control request into a control instruction that complies with the control instruction specification of the smart device to be controlled using the smart contract based on the relevant information, the method further includes: using the smart contract to sign the control instruction that complies with the control instruction specification of the smart device to be controlled and storing it on the blockchain.
[0011] Optionally, the method further includes: receiving an instruction execution result, where the instruction execution result is an execution result generated after the smart device to be controlled executes the corresponding control instruction; and feeding back the instruction execution result to a user terminal.
[0012] According to another aspect of the present application, a cloud platform is provided, including: a first receiving unit, configured to receive a universal smart device control request; a parsing unit, configured to parse the universal smart device control request to obtain relevant information of the smart device to be controlled, wherein the relevant information includes the device type and the device model; a conversion and issuing unit, configured to convert the universal smart device control request into a control instruction that complies with a control instruction specification of the smart device to be controlled based on the relevant information by using a smart contract, and issue the control instruction to the smart device to be controlled through a blockchain network, so as to perform corresponding control on the smart device to be controlled.
[0013] According to another aspect of the present application, a device control system is provided, including: a user terminal, used to send a universal intelligent device control request; a cloud platform, communicating with the user terminal through a blockchain network, and used to execute any one of the cross-platform device control methods.
[0014] According to another aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute any one of the cross-platform device control methods.
[0015] The technical solution of the present application is applied to receive a general intelligent device control request; parse the general intelligent device control request to obtain relevant information of the intelligent device to be controlled, including the device type and device model; based on the relevant information, the general intelligent device control request is converted into a control instruction that complies with the control instruction specification of the intelligent device to be controlled by using a smart contract, and the control instruction is sent to the intelligent device to be controlled through the blockchain network to control the intelligent device to be controlled accordingly. The use of blockchain and smart contracts to achieve cross-platform device control simplifies the process while ensuring high security due to the decentralized, tamper-proof and highly transparent characteristics of blockchain technology. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The drawings constituting part of the present application are used to provide a further understanding of the present application. The exemplary embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0017] Figure 1 A hardware structure block diagram of a mobile terminal for executing a cross-platform device control method provided in an embodiment of the present application is shown;
[0018] Figure 2 A schematic diagram of a process of a cross-platform device control method provided according to an embodiment of the present application is shown;
[0019] Figure 3 A structural block diagram of a cloud platform provided according to an embodiment of the present application is shown;
[0020] Figure 4 A schematic diagram of a device control system provided according to an embodiment of the present application is shown.
[0021] The above drawings include the following reference numerals:
[0022] 102, processor; 104, memory; 106, transmission device; 108, input and output devices. DETAILED DESCRIPTION
[0023] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0024] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0025] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0026] As introduced in the background technology, the prior art lacks a technology for controlling smart devices across platforms that is simple to operate and highly secure. In order to solve the problem of the lack of a technology for controlling smart devices across platforms that is simple to operate and highly secure, the embodiments of the present application provide a cross-platform device control method, a cloud platform, a device control system and a computer-readable storage medium.
[0027] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0028] The method embodiments provided in the embodiments of the present application can be executed in a cloud platform or a similar computing device. Taking the operation on a cloud platform as an example, Figure 1 1 is a hardware structure diagram of a cloud platform of a cross-platform device control method according to an embodiment of the present invention. Figure 1 As shown, the cloud platform may include one or more ( Figure 1 Only one is shown in the figure) processor 102 (processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the cloud platform may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is for illustration only and does not limit the structure of the cloud platform. Figure 1 More or fewer components as shown, or with Figure 1Different configurations are shown.
[0029] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the cross-platform device control method in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, the above method is implemented. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories can be connected to the cloud platform via a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof. The transmission device 106 is used to receive or send data via a network. The above-mentioned specific network examples may include a wireless network provided by a communication provider of the cloud platform. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0030] In this embodiment, a cross-platform device control method running on a cloud platform is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0031] Figure 2 is a flow chart of a cross-platform device control method according to an embodiment of the present application. Figure 2 As shown, the method comprises the following steps:
[0032] Step S201: receiving a general intelligent device control request; for example, turning on the air conditioner in the living room and setting the temperature to 24 degrees; turning on the air conditioner in the master bedroom and setting the temperature to 26 degrees; turning on the sweeping robot in the living room and sweeping the master bedroom;
[0033] Specifically, receiving the above-mentioned smart device control request sent by the user terminal through the blockchain network; wherein the user terminal may be a smart phone or other terminal device;
[0034] Among them, blockchain technology is a distributed database technology that allows multiple participants to share, store and confirm transaction information in an immutable, secure and transparent database. The core features of blockchain technology include decentralization, immutability, traceability and transparency. The following are some key concepts and features of blockchain technology:
[0035] 1. Decentralization: The blockchain network does not rely on a single centralized authority or server, but is maintained by multiple nodes distributed around the world. This makes the network more robust and less susceptible to single point failures.
[0036] 2. Immutability: Once data is added to the blockchain, it is almost impossible to change or delete it. This is because each block contains the hash value of the previous block, forming a chain structure. Any change to the historical record will cause the hash value of all subsequent blocks to change, which can be detected by other participants in the network.
[0037] 3. Traceability: Every transaction on the blockchain is public and can be queried through a blockchain browser. This facilitates auditing and supervision, while also increasing the transparency of transactions.
[0038] 4. Transparency: Although the participants in the transaction can remain anonymous, all transaction records are public and anyone can view the transaction history on the blockchain.
[0039] 5. Encryption technology: Blockchain uses advanced encryption technology to protect the security of transaction data. The pairing of public and private keys ensures that only users with the correct private key can access the assets in their accounts.
[0040] 6. Consensus mechanism: Nodes in the blockchain network need to reach a consensus on the addition of new blocks. Common consensus mechanisms include Proof of Work (PoW), Proof of Stake (PoS), and Delegated Proof of Stake (DPoS).
[0041] 7. Smart Contracts: Smart contracts are programs stored on the blockchain that execute automatically when preset conditions are met. This enables complex transactions and agreements to be executed without intermediaries.
[0042] 8. Scalability: With the development of technology, blockchain networks are constantly being optimized to handle more transactions and more complex application scenarios.
[0043] Step S202: parsing the general smart device control request to obtain relevant information of the smart device to be controlled, wherein the relevant information includes the device type and model;
[0044] For example, the types of smart devices to be controlled are smart speakers, smart lighting, smart thermostats, smart door locks, smart refrigerators, smart washing machines and dryers, smart TVs, smart sweeping robots, smart air conditioners, smart kitchen appliances, smart curtains, and smart sockets, etc.
[0045] Specifically, the device model of the to-be-controlled smart device is set by different manufacturers when the devices are shipped out of the factory, and the same type of controlled smart device has at least one model.
[0046] Specifically, step S202: parsing the above-mentioned universal smart device control request to obtain relevant information of the smart device to be controlled, including:
[0047] Step S2021: parsing the universal smart device control request to obtain device description information;
[0048] For example, if the general smart device control request is "turn on the air conditioner in the living room and set the temperature to 24 degrees", the device description information obtained by parsing is the air conditioner in the living room;
[0049] Step S2022: Based on the above device description information, match the device registration information on the blockchain to obtain the relevant information of the above smart device to be controlled.
[0050] That is to say, the device information of multiple types and multiple signals of different brands has been registered on the blockchain in advance, and the information of smart devices in multiple houses in the house has been uploaded, so after matching according to the device description information, the type, model, manufacturer and other information of the air conditioner in the living room can be obtained.
[0051] Step S203: Based on the above relevant information, a smart contract is used to convert the above general smart device control request into a control instruction that complies with the control instruction specification of the above smart device to be controlled, and the above control instruction is sent to the above smart device to be controlled through the blockchain network to perform corresponding control on the above smart device to be controlled.
[0052] Among them, smart contracts are the core of blockchain technology and are configured in advance. The application of smart contracts can convert general smart device control requests into instructions in a format that can be recognized by the smart device to be controlled, so as to achieve control of the smart device to be controlled.
[0053] The cross-platform device control method of the present application is applied, by receiving a general intelligent device control request; parsing the general intelligent device control request to obtain relevant information of the intelligent device to be controlled, the relevant information including the device type and device model; based on the relevant information, a smart contract is used to convert the general intelligent device control request into a control instruction that conforms to the control instruction specification of the intelligent device to be controlled, and the control instruction is sent to the intelligent device to be controlled through the blockchain network to control the intelligent device to be controlled accordingly. The use of blockchain and smart contracts to achieve cross-platform device control simplifies the process while ensuring high security due to the decentralized, tamper-proof and highly transparent characteristics of blockchain technology.
[0054] Specifically, based on the above relevant information, the above smart contract is used to convert the above general smart device control request into a control instruction that complies with the control instruction specification of the above smart device to be controlled, including:
[0055] The predefined rules configured in the above smart contract are used to convert the above general smart device control request into a control instruction that complies with the above control instruction specification of the above smart device to be controlled.
[0056] Among them, the above-mentioned predefined rules include: device type rules, device model rules, protocol conversion rules and operation logic rules. The above-mentioned device type rules represent the control instruction set corresponding to the device type, the above-mentioned device model rules represent the control instruction set corresponding to the device model, the above-mentioned protocol conversion rules represent the conversion of the protocol of the above-mentioned general smart device control request into the communication protocol used by the specific device, and the above-mentioned operation logic rules define the logic flow of specific operations. Through predefined rules, the system can standardize the control logic of various devices and reduce development and maintenance costs. Improve the scalability and compatibility of the system and support more types and models of home appliances. General control requests are converted into control instructions for specific home appliances.
[0057] In addition, the automatic conversion of general control requests is realized to reduce the complexity of user operations. The user experience is improved, allowing users to conveniently control various home appliances. The target home appliances and the required control instructions are determined through smart contracts. And the automatic execution and immutability of smart contracts are used to ensure the security and accuracy of control instructions. Function: Enhance the security and reliability of the system and avoid human intervention and erroneous operations.
[0058] In addition, before receiving the universal smart device control request, the method further includes: receiving an authentication and authorization request sent by the user terminal; and if the authentication and authorization request sent by the user terminal is deemed to be passed, determining that the user terminal has the authority to send the universal smart device control request to the cloud platform. The steps of user terminal authentication and authorization are added to increase security.
[0059] Furthermore, after converting the general smart device control request into a control instruction that complies with the control instruction specification of the smart device to be controlled by using the smart contract based on the relevant information, the method further includes: using the smart contract to sign the control instruction that complies with the control instruction specification of the smart device to be controlled and storing it on the blockchain to ensure the authenticity and immutability of the control instruction.
[0060] Furthermore, the method further includes: receiving a command execution result, the command execution result being an execution result generated after the smart device to be controlled executes the corresponding control command; and feeding back the command execution result to the user terminal. The user can intuitively see the control result of the device on the user terminal, for example, the air conditioner has been adjusted to 27 degrees.
[0061] A specific embodiment is provided below, taking "a user controls the air conditioner in the living room through a mobile phone APP" as an example, including:
[0062] User sends a request: The user enters or selects "Turn on the air conditioner in the living room and set the temperature to 24 degrees" on the mobile phone APP. The APP sends the request to the public cloud service platform.
[0063] Request parsing: The public cloud service platform receives the request and parses the device type (air conditioner), location (living room), and operation (turn on and set the temperature to 24 degrees).
[0064] Match device type and model: The public cloud service platform queries the device database and finds the device ID and model corresponding to the air conditioner in the living room.
[0065] Search for predefined rules: The public cloud service platform searches for corresponding predefined rules based on the model of the air conditioner and determines the control instruction set supported by the model.
[0066] Generate control instructions: The public cloud service platform converts general requests into specific control instructions based on predefined rules, such as "power on instruction" and "set temperature to 24 degrees instruction".
[0067] Encapsulated communication protocol: The public cloud service platform encapsulates the control instructions into a specific communication protocol format according to the air conditioner's communication method (such as Wi-Fi).
[0068] Smart contract execution: The public cloud service platform calls the smart contract through the blockchain network. The smart contract receives and parses the control request, queries the device ID, matches the predefined rules, generates and signs the control instruction, and stores it on the blockchain.
[0069] Instruction sending: The smart contract sends the signed control instructions to the target air-conditioning equipment through the blockchain network.
[0070] Execution and feedback: The air conditioning equipment receives the control command, starts up and sets the temperature to 24 degrees.
[0071] The air conditioning equipment will feed back the execution results to the blockchain network, and users can view the control results on the mobile phone APP.
[0072] The embodiment of the present application also provides a cloud platform. It should be noted that the cloud platform of the embodiment of the present application can be used to execute the cross-platform device control method provided by the embodiment of the present application. The device is used to implement the above-mentioned embodiments and preferred embodiments, and the descriptions have been omitted. As used below, the term "module" can implement a combination of software and / or hardware for a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.
[0073] The following is an introduction to the cloud platform provided in the embodiments of the present application.
[0074] Figure 3 Schematic diagram of a cloud platform according to an embodiment of the present application. Figure 3 As shown, the cloud platform includes:
[0075] A first receiving unit 31 is used to receive a universal intelligent device control request;
[0076] A parsing unit 32, configured to parse the universal smart device control request to obtain relevant information of the smart device to be controlled, wherein the relevant information includes the device type and device model;
[0077] The conversion and sending unit 33 is used to convert the above-mentioned general smart device control request into a control instruction that complies with the control instruction specification of the above-mentioned smart device to be controlled based on the above-mentioned relevant information by using a smart contract, and send the above-mentioned control instruction to the above-mentioned smart device to be controlled through the blockchain network, so as to perform corresponding control on the above-mentioned smart device to be controlled.
[0078] The cloud platform of the present application receives a general intelligent device control request; parses the general intelligent device control request to obtain relevant information of the intelligent device to be controlled, including the device type and device model; based on the relevant information, uses a smart contract to convert the general intelligent device control request into a control instruction that complies with the control instruction specification of the intelligent device to be controlled, and sends the control instruction to the intelligent device to be controlled through the blockchain network to control the intelligent device to be controlled accordingly. The use of blockchain and smart contracts to achieve cross-platform device control simplifies the process while ensuring high security due to the decentralized, tamper-proof and highly transparent characteristics of blockchain technology.
[0079] An optional solution, the conversion and sending unit includes a conversion module, which is used to convert the above-mentioned general smart device control request into a control instruction that complies with the control instruction specification of the above-mentioned smart device to be controlled based on the above-mentioned relevant information using a smart contract, wherein the conversion module is specifically implemented as: using the predefined rules configured in the above-mentioned smart contract to convert the above-mentioned general smart device control request into a control instruction that complies with the above-mentioned control instruction specification of the above-mentioned smart device to be controlled, wherein the above-mentioned predefined rules include: device type rules, device model rules, protocol conversion rules and operation logic rules, the above-mentioned device type rules represent a set of control instructions corresponding to the device type, the above-mentioned device model rules represent a set of control instructions corresponding to the device model, the above-mentioned protocol conversion rules represent the conversion of the protocol of the above-mentioned general smart device control request into the communication protocol used by a specific device, and the above-mentioned operation logic rules define the logical flow of a specific operation.
[0080] In an optional solution, the first receiving unit is specifically implemented as: receiving the above-mentioned smart device control request sent by the user terminal through the above-mentioned blockchain network.
[0081] An optional solution, the above-mentioned device also includes a second receiving unit and a determination unit, the second receiving unit is used to receive the authentication and authorization request sent by the above-mentioned user terminal before receiving the universal smart device control request; the determination unit is used to determine that the above-mentioned user terminal has the authority to send the above-mentioned universal smart device control request to the cloud platform when the authentication and authorization request sent by the above-mentioned user terminal is deemed to be passed.
[0082] An optional solution, the parsing unit includes a parsing module and a matching module, the parsing module is used to parse the above-mentioned universal smart device control request to obtain device description information; the matching module is used to match the device registration information on the blockchain based on the above-mentioned device description information to obtain relevant information of the above-mentioned smart device to be controlled.
[0083] In an optional solution, the above-mentioned device also includes a signature storage unit, which is used to use the above-mentioned smart contract to sign the control instructions that comply with the control instruction specifications of the above-mentioned smart device to be controlled and store them on the blockchain after converting the above-mentioned general smart device control request into a control instruction that complies with the control instruction specifications of the above-mentioned smart device to be controlled based on the above-mentioned relevant information using the above-mentioned smart contract.
[0084] An optional solution, the above-mentioned device also includes a third receiving unit and a feedback unit, the third receiving unit is used to receive the instruction execution result, the above-mentioned instruction execution result is the execution result generated after the above-mentioned intelligent device to be controlled executes the corresponding control instruction; the feedback unit is used to feed back the above-mentioned instruction execution result to the user terminal.
[0085] The cloud platform includes a processor and a memory. The first receiving unit, the parsing unit, the conversion and sending unit, etc. are all stored in the memory as program units, and the processor executes the program units stored in the memory to implement corresponding functions. The modules are all located in the same processor; or, the modules are located in different processors in any combination.
[0086] The processor includes a kernel, which retrieves the corresponding program unit from the memory. One or more kernels can be set, and the problem of lacking a cross-platform control technology for smart devices that is simple to operate and highly secure can be solved by adjusting kernel parameters.
[0087] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0088] The embodiment of the present invention provides a device control system, such as Figure 4 As shown, including:
[0089] The user terminal is used to send a universal smart device control request; specifically, the user initiates the universal smart device control request by operating on the user terminal;
[0090] The cloud platform (i.e., a public cloud service platform) communicates with the above-mentioned user terminal through a blockchain network, and is used to execute any of the above-mentioned cross-platform device control methods.
[0091] Among them, the blockchain network is used to store and transmit control instructions to ensure the security and transparency of data. Specifically, the blockchain network adopts the form of a public chain or a consortium chain to ensure that the data is open, transparent and cannot be tampered with. All control instructions and device status information are recorded on the blockchain in the form of transactions, and each home appliance has a unique identifier. Smart contracts are the core of blockchain technology, which automatically execute instruction conversion through pre-defined rules. Each smart contract corresponds to a home appliance control protocol, which can convert general control requests into control instructions for specific brands and types of home appliances.
[0092] More specifically, since home appliance control involves multiple parties (such as home appliance manufacturers, service providers, and users), the blockchain network uses a consortium chain to ensure data transparency and immutability while improving performance and controllability. All control instructions and device status information are recorded on the blockchain in the form of transactions, and each home appliance device has a unique identifier.
[0093] Control instruction transaction: Each control instruction is recorded as a transaction on the blockchain, containing the following information: instruction ID, user ID, device ID, control instruction content, timestamp and digital signature;
[0094] Device status transaction: Each change in device status is also recorded as a transaction on the blockchain, containing the following information: status ID, device ID, status content, timestamp and digital signature, thereby ensuring the security and accuracy of the information.
[0095] During data transmission, all data uses encryption technology (such as TLS / SSL) to ensure the confidentiality and integrity of the data. At the same time, new transactions are broadcast to all nodes through the blockchain network to ensure data consistency among all nodes.
[0096] Smart contract design includes control contracts and status contracts. The control contract is responsible for converting general control requests into control instructions for specific home appliances. Each brand or type of home appliance has a corresponding control contract. The status contract is responsible for recording and querying the status information of home appliances to ensure that the status data is transparent and cannot be tampered with.
[0097] Public cloud service platform: responsible for receiving user control requests and converting them into instructions that different home appliances can recognize through smart contracts; its main functions include: User authentication and authorization: ensuring that only authorized users can send control requests. Request parsing and distribution: parsing user control requests and converting them into specific home appliance control instructions through smart contracts. Status monitoring and feedback: real-time monitoring of the status of home appliances and recording feedback information on the blockchain.
[0098] Home appliances: receive and execute control instructions from the public cloud;
[0099] The control process of the device control system of this application to realize the control of the smart device is as follows:
[0100] Step S1: User sends a request: The user sends a home appliance control request to the public cloud service platform via a smartphone or other terminal device.
[0101] Step S2: Request parsing: The public cloud service platform parses the request and determines the target home appliance and the required control instructions through the smart contract.
[0102] Step S3: Instruction conversion: The smart contract converts the general control request into the control instruction of the specific home appliance according to the predefined rules.
[0103] The specific explanations of the predefined rules are as follows:
[0104] Predefined rules are rules and logic set by the system during the design and development phase, which are used to convert general user control requests into control instructions that can be understood and executed by specific home appliances. These rules mainly include:
[0105] Device type rules: define different control instruction sets according to device types (such as air conditioners, TVs, lights, etc.).
[0106] Device model rules: Based on the specific model of the device, define the control instructions and parameter ranges supported by the model.
[0107] Protocol conversion rules: Convert general control requests into the communication protocol used by specific devices (such as infrared, Wi-Fi, Bluetooth, etc.).
[0108] Operation logic rules: define the logic flow of a specific operation. For example, when turning on the air conditioner, you may need to send the "power on" command first, and then send the "set temperature" command.
[0109] The specific implementation process of instruction conversion is:
[0110] Parsing general smart device control requests: The control requests sent by users are usually general natural language or predefined format instructions, such as "turn on the air conditioner in the living room and set the temperature to 24 degrees."
[0111] Matching device type and model: The system matches the specific device type and model based on the device description in the request (such as "air conditioner in the living room").
[0112] Search for predefined rules: Search for corresponding predefined rules based on device type and model.
[0113] Generate control instructions: According to predefined rules, convert general smart device control requests into control instructions for specific devices. For example, the corresponding "turn on" instruction and "set temperature to 24 degrees" instruction for air conditioners.
[0114] Encapsulate communication protocol: According to the communication method of the device (such as infrared, Wi-Fi, etc.), encapsulate the control instructions into a specific communication protocol format.
[0115] The specific description of the smart contract operation process is as follows:
[0116] Receiving user requests: The smart contract receives the general smart device control request sent by the user through the blockchain network;
[0117] Device identification: The smart contract queries the device registration information on the blockchain based on the device description information in the request to determine the unique identifier of the target home appliance (such as device ID);
[0118] Rule matching: The smart contract searches for the corresponding predefined rules and control instruction sets based on the device ID;
[0119] Instruction generation: Smart contracts convert general requests into specific control instructions based on predefined rules;
[0120] Instruction signing and storage: The smart contract signs the generated control instructions and stores them on the blockchain to ensure the authenticity and immutability of the instructions;
[0121] Instruction sending: The smart contract sends the signed control instructions to the target home appliance through the blockchain network.
[0122] Step S4: Instruction sending: The converted control instruction is sent to the target home appliance through the blockchain network.
[0123] Step S5: Execution and feedback: The home appliance executes the control instruction and feeds back the execution result to the blockchain network for user query.
[0124] An embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the cross-platform device control method.
[0125] Specifically, the cross-platform device control method includes:
[0126] Step S201: receiving a general intelligent device control request;
[0127] Step S202: parsing the general smart device control request to obtain relevant information of the smart device to be controlled, wherein the relevant information includes the device type and model;
[0128] Step S203: Based on the above relevant information, a smart contract is used to convert the above general smart device control request into a control instruction that complies with the control instruction specification of the above smart device to be controlled, and the above control instruction is sent to the above smart device to be controlled through the blockchain network to perform corresponding control on the above smart device to be controlled.
[0129] Optionally, based on the above-mentioned relevant information, the above-mentioned smart contract is used to convert the above-mentioned general smart device control request into a control instruction that complies with the control instruction specification of the above-mentioned smart device to be controlled, including: using the predefined rules configured in the above-mentioned smart contract to convert the above-mentioned general smart device control request into a control instruction that complies with the above-mentioned control instruction specification of the above-mentioned smart device to be controlled, wherein the above-mentioned predefined rules include: device type rules, device model rules, protocol conversion rules and operation logic rules, the above-mentioned device type rules represent a set of control instructions corresponding to the device type, the above-mentioned device model rules represent a set of control instructions corresponding to the device model, the above-mentioned protocol conversion rules represent the conversion of the protocol of the above-mentioned general smart device control request into the communication protocol used by a specific device, and the above-mentioned operation logic rules define the logical flow of a specific operation.
[0130] Optionally, receiving a general smart device control request includes: receiving the above-mentioned smart device control request sent by the user terminal through the above-mentioned blockchain network.
[0131] Optionally, before receiving the universal smart device control request, the above method also includes: receiving an authentication and authorization request sent by the above user terminal; when the authentication and authorization request sent by the above user terminal is deemed to be passed, determining that the above user terminal has the authority to send the above universal smart device control request to the cloud platform.
[0132] Optionally, the general smart device control request is parsed to obtain relevant information of the smart device to be controlled, including: parsing the general smart device control request to obtain device description information; based on the device description information, matching the device registration information on the blockchain to obtain relevant information of the smart device to be controlled.
[0133] Optionally, after converting the general smart device control request into a control instruction that complies with the control instruction specification of the smart device to be controlled using the smart contract based on the above-mentioned relevant information, the method further includes: using the smart contract to sign the control instruction that complies with the control instruction specification of the smart device to be controlled and storing it on the blockchain.
[0134] Optionally, the method further includes: receiving an instruction execution result, where the instruction execution result is an execution result generated after the smart device to be controlled executes the corresponding control instruction; and feeding back the instruction execution result to a user terminal.
[0135] An embodiment of the present invention provides a processor, and the processor is used to run a program, wherein the cross-platform device control method is executed when the program is run.
[0136] Specifically, the cross-platform device control method includes:
[0137] Step S201: receiving a general intelligent device control request;
[0138] Step S202: parsing the general smart device control request to obtain relevant information of the smart device to be controlled, wherein the relevant information includes the device type and model;
[0139] Step S203: Based on the above relevant information, a smart contract is used to convert the above general smart device control request into a control instruction that complies with the control instruction specification of the above smart device to be controlled, and the above control instruction is sent to the above smart device to be controlled through the blockchain network to perform corresponding control on the above smart device to be controlled.
[0140] Optionally, based on the above-mentioned relevant information, the above-mentioned smart contract is used to convert the above-mentioned general smart device control request into a control instruction that complies with the control instruction specification of the above-mentioned smart device to be controlled, including: using the predefined rules configured in the above-mentioned smart contract to convert the above-mentioned general smart device control request into a control instruction that complies with the above-mentioned control instruction specification of the above-mentioned smart device to be controlled, wherein the above-mentioned predefined rules include: device type rules, device model rules, protocol conversion rules and operation logic rules, the above-mentioned device type rules represent a set of control instructions corresponding to the device type, the above-mentioned device model rules represent a set of control instructions corresponding to the device model, the above-mentioned protocol conversion rules represent the conversion of the protocol of the above-mentioned general smart device control request into the communication protocol used by a specific device, and the above-mentioned operation logic rules define the logical flow of a specific operation.
[0141] Optionally, receiving a general smart device control request includes: receiving the above-mentioned smart device control request sent by the user terminal through the above-mentioned blockchain network.
[0142] Optionally, before receiving the universal smart device control request, the above method also includes: receiving an authentication and authorization request sent by the above user terminal; when the authentication and authorization request sent by the above user terminal is deemed to be passed, determining that the above user terminal has the authority to send the above universal smart device control request to the cloud platform.
[0143] Optionally, the general smart device control request is parsed to obtain relevant information of the smart device to be controlled, including: parsing the general smart device control request to obtain device description information; based on the device description information, matching the device registration information on the blockchain to obtain relevant information of the smart device to be controlled.
[0144] Optionally, after converting the general smart device control request into a control instruction that complies with the control instruction specification of the smart device to be controlled using the smart contract based on the above-mentioned relevant information, the method further includes: using the smart contract to sign the control instruction that complies with the control instruction specification of the smart device to be controlled and storing it on the blockchain.
[0145] Optionally, the method further includes: receiving an instruction execution result, where the instruction execution result is an execution result generated after the smart device to be controlled executes the corresponding control instruction; and feeding back the instruction execution result to a user terminal.
[0146] An embodiment of the present invention provides a device, the device including a processor, a memory, and a program stored in the memory and executable on the processor, and when the processor executes the program, at least the following steps are implemented:
[0147] Step S201: receiving a general intelligent device control request;
[0148] Step S202: parsing the general smart device control request to obtain relevant information of the smart device to be controlled, wherein the relevant information includes the device type and model;
[0149] Step S203: Based on the above relevant information, a smart contract is used to convert the above general smart device control request into a control instruction that complies with the control instruction specification of the above smart device to be controlled, and the above control instruction is sent to the above smart device to be controlled through the blockchain network to perform corresponding control on the above smart device to be controlled.
[0150] Optionally, based on the above-mentioned relevant information, the above-mentioned smart contract is used to convert the above-mentioned general smart device control request into a control instruction that complies with the control instruction specification of the above-mentioned smart device to be controlled, including: using the predefined rules configured in the above-mentioned smart contract to convert the above-mentioned general smart device control request into a control instruction that complies with the above-mentioned control instruction specification of the above-mentioned smart device to be controlled, wherein the above-mentioned predefined rules include: device type rules, device model rules, protocol conversion rules and operation logic rules, the above-mentioned device type rules represent a set of control instructions corresponding to the device type, the above-mentioned device model rules represent a set of control instructions corresponding to the device model, the above-mentioned protocol conversion rules represent the conversion of the protocol of the above-mentioned general smart device control request into the communication protocol used by a specific device, and the above-mentioned operation logic rules define the logical flow of a specific operation.
[0151] Optionally, receiving a general smart device control request includes: receiving the above-mentioned smart device control request sent by the user terminal through the above-mentioned blockchain network.
[0152] Optionally, before receiving the universal smart device control request, the above method also includes: receiving an authentication and authorization request sent by the above user terminal; when the authentication and authorization request sent by the above user terminal is deemed to be passed, determining that the above user terminal has the authority to send the above universal smart device control request to the cloud platform.
[0153] Optionally, the general smart device control request is parsed to obtain relevant information of the smart device to be controlled, including: parsing the general smart device control request to obtain device description information; based on the device description information, matching the device registration information on the blockchain to obtain relevant information of the smart device to be controlled.
[0154] Optionally, after converting the general smart device control request into a control instruction that complies with the control instruction specification of the smart device to be controlled using the smart contract based on the above-mentioned relevant information, the method further includes: using the smart contract to sign the control instruction that complies with the control instruction specification of the smart device to be controlled and storing it on the blockchain.
[0155] Optionally, the method further includes: receiving an instruction execution result, where the instruction execution result is an execution result generated after the smart device to be controlled executes the corresponding control instruction; and feeding back the instruction execution result to a user terminal.
[0156] The devices in this article can be servers, PCs, PADs, mobile phones, etc.
[0157] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program for initializing at least the following method steps:
[0158] Step S201: receiving a general intelligent device control request;
[0159] Step S202: parsing the general smart device control request to obtain relevant information of the smart device to be controlled, wherein the relevant information includes the device type and model;
[0160] Step S203: Based on the above relevant information, a smart contract is used to convert the above general smart device control request into a control instruction that complies with the control instruction specification of the above smart device to be controlled, and the above control instruction is sent to the above smart device to be controlled through the blockchain network to perform corresponding control on the above smart device to be controlled.
[0161] Optionally, based on the above-mentioned relevant information, the above-mentioned smart contract is used to convert the above-mentioned general smart device control request into a control instruction that complies with the control instruction specification of the above-mentioned smart device to be controlled, including: using the predefined rules configured in the above-mentioned smart contract to convert the above-mentioned general smart device control request into a control instruction that complies with the above-mentioned control instruction specification of the above-mentioned smart device to be controlled, wherein the above-mentioned predefined rules include: device type rules, device model rules, protocol conversion rules and operation logic rules, the above-mentioned device type rules represent a set of control instructions corresponding to the device type, the above-mentioned device model rules represent a set of control instructions corresponding to the device model, the above-mentioned protocol conversion rules represent the conversion of the protocol of the above-mentioned general smart device control request into the communication protocol used by a specific device, and the above-mentioned operation logic rules define the logical flow of a specific operation.
[0162] Optionally, receiving a general smart device control request includes: receiving the above-mentioned smart device control request sent by the user terminal through the above-mentioned blockchain network.
[0163] Optionally, before receiving the universal smart device control request, the above method also includes: receiving an authentication and authorization request sent by the above user terminal; when the authentication and authorization request sent by the above user terminal is deemed to be passed, determining that the above user terminal has the authority to send the above universal smart device control request to the cloud platform.
[0164] Optionally, the general smart device control request is parsed to obtain relevant information of the smart device to be controlled, including: parsing the general smart device control request to obtain device description information; based on the device description information, matching the device registration information on the blockchain to obtain relevant information of the smart device to be controlled.
[0165] Optionally, after converting the general smart device control request into a control instruction that complies with the control instruction specification of the smart device to be controlled using the smart contract based on the above-mentioned relevant information, the method further includes: using the smart contract to sign the control instruction that complies with the control instruction specification of the smart device to be controlled and storing it on the blockchain.
[0166] Optionally, the method further includes: receiving an instruction execution result, where the instruction execution result is an execution result generated after the smart device to be controlled executes the corresponding control instruction; and feeding back the instruction execution result to a user terminal.
[0167] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0168] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0169] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0170] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0171] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0172] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0173] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0174] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0175] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0176] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A cross-platform device control method, characterized in that: include: Receive general intelligent device control requests; Parsing the universal smart device control request to obtain relevant information of the smart device to be controlled, the relevant information including the device type and device model; Based on the relevant information, a smart contract is used to convert the general smart device control request into a control instruction that complies with the control instruction specification of the smart device to be controlled, and the control instruction is sent to the smart device to be controlled through the blockchain network to perform corresponding control on the smart device to be controlled.
2. The method according to claim 1, characterized in that Based on the relevant information, the general smart device control request is converted into a control instruction that complies with the control instruction specification of the smart device to be controlled by using the smart contract, including: The predefined rules configured in the smart contract are used to convert the general smart device control request into a control instruction that complies with the control instruction specification of the smart device to be controlled, Among them, the predefined rules include: device type rules, device model rules, protocol conversion rules and operation logic rules. The device type rules represent a set of control instructions corresponding to the device type, the device model rules represent a set of control instructions corresponding to the device model, the protocol conversion rules represent the conversion of the protocol of the general intelligent device control request into the communication protocol used by the specific device, and the operation logic rules define the logical flow of specific operations.
3. The method according to claim 1, characterized in that Receive general smart device control requests, including: Receive the smart device control request sent by the user terminal through the blockchain network.
4. The method according to claim 3, characterized in that Before receiving the universal smart device control request, the method further includes: Receiving an authentication and authorization request sent by the user terminal; When the authentication and authorization request sent by the user terminal is deemed to be passed, it is determined that the user terminal has the authority to send the universal smart device control request to the cloud platform.
5. The method according to claim 1, characterized in that The general intelligent device control request is parsed to obtain relevant information of the intelligent device to be controlled, including: Parsing the universal intelligent device control request to obtain device description information; Based on the device description information, the device registration information on the blockchain is matched to obtain relevant information of the smart device to be controlled.
6. The method according to claim 1, characterized in that After converting the general smart device control request into a control instruction that complies with a control instruction specification of the smart device to be controlled by using the smart contract based on the relevant information, the method further includes: The smart contract is used to sign a control instruction that complies with the control instruction specification of the smart device to be controlled and store it on the blockchain.
7. The method according to any one of claims 1 to 6, characterized in that The method further comprises: Receiving an instruction execution result, wherein the instruction execution result is an execution result generated after the intelligent device to be controlled executes the corresponding control instruction; The command execution result is fed back to the user terminal.
8. A cloud platform, characterized in that: include: A first receiving unit, configured to receive a universal intelligent device control request; A parsing unit, configured to parse the universal smart device control request to obtain relevant information of the smart device to be controlled, wherein the relevant information includes a device type and a device model; A conversion and sending unit is used to convert the general smart device control request into a control instruction that complies with the control instruction specification of the smart device to be controlled based on the relevant information by using a smart contract, and send the control instruction to the smart device to be controlled through a blockchain network to perform corresponding control on the smart device to be controlled.
9. A device control system, characterized in that: include: User terminal, used to send universal intelligent device control request; The cloud platform communicates with the user terminal via a blockchain network, and is used to execute the cross-platform device control method described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the cross-platform device control method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Control method and device of intelligent home, storage medium, and robot
CN110618614A
Internet of Things device networking control method and control system based on block chain
CN111224962A
Internet of Things equipment control method and device, storage medium and electronic device
CN112689006A
Internet of Things communication method and cloud server
CN117880326A