CN112785432B - Block chain-based device control method, apparatus, device and storage medium - Google Patents

Block chain-based device control method, apparatus, device and storage medium Download PDF

Info

Publication number
CN112785432B
CN112785432B CN202110089212.1A CN202110089212A CN112785432B CN 112785432 B CN112785432 B CN 112785432B CN 202110089212 A CN202110089212 A CN 202110089212A CN 112785432 B CN112785432 B CN 112785432B
Authority
CN
China
Prior art keywords
control instruction
control
intelligent
ros
block chain
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110089212.1A
Other languages
Chinese (zh)
Other versions
CN112785432A (en
Inventor
吴莹强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alipay Hangzhou Information Technology Co Ltd
Original Assignee
Alipay Hangzhou Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alipay Hangzhou Information Technology Co Ltd filed Critical Alipay Hangzhou Information Technology Co Ltd
Priority to CN202110089212.1A priority Critical patent/CN112785432B/en
Publication of CN112785432A publication Critical patent/CN112785432A/en
Application granted granted Critical
Publication of CN112785432B publication Critical patent/CN112785432B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]

Abstract

The application provides a device control method, a device and a storage medium based on a block chain. Wherein the blockchain is deployed with intelligent contracts for managing intelligent devices. The method may include receiving a device control request initiated by a claimant. And calling the intelligent contract to obtain a control instruction corresponding to the equipment control request, and sending the control instruction to the intelligent equipment so as to control the intelligent equipment to execute a control action corresponding to the control instruction. And transferring the virtual resource anchored with the control instruction value to the block chain account corresponding to the intelligent equipment from the block chain account corresponding to the demand party.

Description

Block chain-based device control method, apparatus, device and storage medium
Technical Field
The present application relates to computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for controlling a device based on a block chain.
Background
Currently, smart devices are widely used. The intelligent device can complete corresponding actions after receiving the control command. But there is no good solution on how to issue trusted control instructions for smart devices and how to make secure payments for productivity paid by smart devices.
Disclosure of Invention
In view of this, the present application discloses a device control method based on a block chain, where an intelligent contract for managing an intelligent device is deployed in the block chain; the method comprises the following steps:
receiving a device control request initiated by a demand party;
calling the intelligent contract to obtain a control instruction corresponding to the equipment control request, and sending the control instruction to the intelligent equipment to control the intelligent equipment to execute a control action corresponding to the control instruction,
and transferring the virtual resource anchored with the control instruction value to the blockchain account corresponding to the intelligent equipment from the blockchain account corresponding to the demand party.
The application also discloses an equipment control method based on the block chain, wherein the block chain is provided with an intelligent contract for managing the intelligent equipment; the method comprises the following steps:
receiving a device control request initiated by a demand party;
transferring transfer logic included in the intelligent contract, and transferring virtual resources anchored by the control instruction value corresponding to the equipment control request from the block chain account corresponding to the demand party to the block chain account corresponding to the intelligent equipment;
after transferring a preset number of virtual resources to the block chain account corresponding to the intelligent device, further calling a sending logic in the intelligent contract to obtain a control instruction corresponding to the device control request, and sending the control instruction to the intelligent device so as to control the intelligent device to execute a control action corresponding to the control instruction.
The application also discloses an equipment control device based on the block chain, wherein the block chain is provided with an intelligent contract for managing the intelligent equipment; the above-mentioned device includes:
the receiving module is used for receiving a device control request initiated by a demand party;
a calling module for calling the intelligent contract to obtain a control instruction corresponding to the device control request and sending the control instruction to the intelligent device to control the intelligent device to execute a control action corresponding to the control instruction,
and transferring the virtual resource anchored with the control instruction value to the blockchain account corresponding to the intelligent equipment from the blockchain account corresponding to the demand party.
The application also discloses an equipment control device based on the block chain, wherein the block chain is provided with an intelligent contract for managing the intelligent equipment; the above-mentioned device includes:
the receiving module is used for receiving a device control request initiated by a demand party;
a first calling module, configured to call a transfer logic included in the intelligent contract, and transfer a virtual resource anchored by a control instruction value corresponding to the device control request to a blockchain account corresponding to the intelligent device from a blockchain account corresponding to the demand party;
and the second calling module is used for further calling the sending logic in the intelligent contract after transferring a preset number of virtual resources to the block chain account corresponding to the intelligent equipment to obtain a control instruction corresponding to the equipment control request, and sending the control instruction to the intelligent equipment so as to control the intelligent equipment to execute a control action corresponding to the control instruction.
The application also discloses an electronic device, which is deployed in the block chain; intelligent contracts used for managing intelligent equipment are deployed in the blockchain; the electronic device includes: a processor; a memory for storing the processor-executable instructions;
wherein the processor is configured to call the executable instructions stored in the memory to implement the device control method as shown in any one of the foregoing embodiments.
The application also discloses a computer readable storage medium, which is deployed in the block chain; intelligent contracts used for managing intelligent equipment are deployed in the blockchain; the storage medium stores a computer program for executing the apparatus control method shown in any one of the embodiments.
In the above scheme, since the intelligent contract may be invoked in response to the device control request to obtain a control instruction corresponding to the device control request, and the control instruction is sent to the intelligent device, control over the intelligent device is completed, and a virtual resource anchored to the value of the control instruction is transferred from a blockchain account corresponding to the demand party to a blockchain account corresponding to the intelligent device; therefore, the control of the intelligent device and the payment of the productivity of the intelligent device can be driven through the intelligent contract, so that the transparency and the non-falsification of a control process and a payment process are ensured, and the trusted management of the intelligent device and the safe payment of the productivity of the intelligent device are realized.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
In order to more clearly illustrate one or more embodiments of the present application or technical solutions in the related art, the drawings needed to be used in the description of the embodiments or the related art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in one or more embodiments of the present application, and other drawings can be obtained by those skilled in the art without inventive exercise.
FIG. 1 is a schematic diagram of one type of intelligent contract creation shown herein;
fig. 2 is a flowchart illustrating a method for controlling a device based on a blockchain according to the present application;
FIG. 3 is a schematic view of a scenario presented herein;
FIG. 4 is a schematic view of a robot control flow shown in the present application;
fig. 5 is a flowchart illustrating a method of device control based on a blockchain according to the present application;
fig. 6 is a schematic structural diagram of a device control apparatus based on a blockchain according to the present application;
fig. 7 is a schematic diagram of a hardware structure of an electronic device shown in the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items. It should also be understood that the word "if" as used herein may be interpreted as "at … …" or "at … …" or "in response to a determination," depending on the context.
The block chain technology, also called distributed ledger technology, is an emerging technology in which several computing devices participate in "accounting" together, and a complete distributed database is maintained together. The blockchain technology has been widely used in many fields due to its characteristics of decentralization, transparency, participation of each computing device in database records, and rapid data synchronization between computing devices.
Blockchains are generally divided into three types: public chain (Public Blockchain), Private chain (Private Blockchain) and alliance chain (Consortium Blockchain). In addition, there are various types of combinations, such as private chain + federation chain, federation chain + public chain, and other different combinations. The most decentralized of these is the public chain. The public chain is represented by bitcoin and ether house, and the participators joining the public chain can read the data record on the chain, participate in transaction, compete for accounting right of new blocks, and the like.
Furthermore, each participant (i.e., node) is free to join and leave the network and perform related operations. Private chains are the opposite, with the network's write rights controlled by an organization or organization and the data read rights specified by the organization. Briefly, a private chain can be a weakly centralized system with strictly limited and few participating nodes. This type of blockchain is more suitable for use within a particular establishment.
A federation chain is a block chain between a public chain and a private chain, and "partial decentralization" can be achieved. Each node in a federation chain typically has a physical organization or organization corresponding to it; participants jointly maintain blockchain operation by authorizing to join the network and forming a benefit-related alliance.
Whether public, private, or alliance, may provide the functionality of an intelligent contract. An intelligent contract on a blockchain is a contract that can be executed on a blockchain system triggered by a transaction. An intelligent contract may be defined in the form of code.
Taking the ethernet as an example, the support user creates and invokes some complex logic in the ethernet network, which is the biggest challenge of ethernet to distinguish from bitcoin blockchain technology. The core of the ethernet plant as a programmable blockchain is the ethernet plant virtual machine (EVM), each ethernet plant node can run the EVM. The EVM is a well-behaved virtual machine, which means that a variety of complex logic can be implemented through it. The user issuing and invoking smart contracts in the etherhouse is running on the EVM. In fact, what the virtual machine directly runs is virtual machine code (virtual machine bytecode, hereinafter referred to as "bytecode"). The intelligent contracts deployed on the blockchain may be in the form of bytecodes.
For example, as shown in fig. 1, after Bob sends a Transaction (Transaction) containing information to create an intelligent contract to the ethernet network, the EVM of node1 may execute the Transaction and generate a corresponding contract instance. The "0 x68e12cf284 …" in fig. 1 represents the address of the contract, the data field of the transaction holds the byte code, and the to field of the transaction is an empty account. After the agreement is achieved between the nodes through the consensus mechanism, the contract is successfully created, and the subsequent user can call the contract.
After the contract is created, a contract account corresponding to the intelligent contract appears on the blockchain and has a specific address, and the contract code and the account storage are stored in the contract account. The behavior of an intelligent contract is controlled by the contract code, while the account store (Storage) of the intelligent contract maintains the state of the contract. In other words, the intelligent contract causes a virtual account to be generated on the blockchain that contains the contract code and account storage.
As mentioned above, the data field containing the transaction that created the smart contract holds what may be the byte code of the smart contract. A bytecode consists of a series of bytes, each of which can identify an operation. Based on the multiple considerations of development efficiency, readability and the like, a developer can select a high-level language to write intelligent contract codes instead of directly writing byte codes. For example, a high-level language such as Solidity, Serpent, LLL, etc. is used. For intelligent contract code written in a high-level language, the intelligent contract code can be compiled by a compiler to generate byte codes which can be deployed on a blockchain.
Taking the Solidity language as an example, the contract written by the method is similar to a Class (Class) in an object-oriented programming language, and various members including state variables, functions, function modifiers, events and the like can be declared in one contract. A state variable is a value permanently stored in the account storage of a smart contract that is used to save the state of the contract.
The application aims to provide a device control method based on a block chain. The method completes the management of the intelligent equipment through the intelligent contract deployed in the block chain, so that the intelligent equipment management and the block chain resource transfer technology are integrated, and the trusted management of the intelligent equipment and the safe payment of the productivity of the intelligent equipment are realized.
The smart device may be any type of smart device. For example, the smart device may be a robot, a mobile phone terminal, a home appliance, or the like.
The method can be applied to a business system built based on the block chain. The service system may comprise several node devices. The node device may be any electronic device deployed in a blockchain. For example, the node device may be a node device corresponding to an item operator, a demander, an intelligent device, and the like. Note that the present application does not specifically limit the device type of the node device.
The block chain may be a public chain, a private chain, or a federation chain. When the block chain is a federation chain, the node device may be a node device that is authenticated and then joins the block chain. It should be noted that the present application does not limit the specific type of the block chain.
An intelligent contract for managing the intelligent device may be deployed in the blockchain. The intelligent contracts can be developed in advance by project operators according to business requirements and deployed in a blockchain. The project operator can refer to one or more of a demand party, an intelligent device developer and an intelligent device management platform.
In some examples, after the intelligent contract is developed by the project operator, the intelligent contract may be packaged by the node device corresponding to the project operator to issue a transaction, and the transaction is sent to the service system. After each node in the service system agrees with the intelligent contract, the intelligent contract can be issued.
The intelligent contract may have transmission logic declared therein. On one hand, the sending logic can interact with the intelligent device, and sends a control instruction corresponding to the device control request to the intelligent device so as to control the intelligent device to execute a control action corresponding to the control instruction;
on the other hand, virtual resources anchored to the control instruction value may be transferred from the blockchain account corresponding to the demand party to the blockchain account corresponding to the smart device.
Referring to fig. 2, fig. 2 is a flowchart illustrating a method for controlling a device based on a blockchain according to the present application.
As shown in fig. 2, the device control method (hereinafter, referred to as a method) may include:
s202, receiving a device control request initiated by a demand party.
The requesting party may be any user who has an operation demand for the smart device. For example, the demander may be a courier. The personnel can take place to dispatch the instruction to the intelligent vehicle, make this dolly send the express delivery to the destination. As another example, the demanding party may be an operator. The worker may send control instructions to the robotic arm to cause the arm to complete production of the product.
The device control request may specifically include specific requirements for the smart device.
In some examples, the device control request may include control instructions for the smart device. The control instruction specifically includes an operation instruction that can be recognized by the intelligent device. For example, the control command may be a forward displacement of 1 meter or a rotation of 360 degrees.
And the demander can complete the input of the control instruction according to the corresponding client. And then the client can generate the equipment control request according to the input information and send the equipment control request to the service system so as to be contracted and called by the system.
In some examples, the control request may include control parameters for the device. Namely, the demander can input the control parameters in the client according to the requirements. The client may then send the device control request to the business system. The service system may generate a control instruction according to the control parameter.
In this example, since the control command is generated by the service system, the credibility of the control command is improved.
In some examples, control instruction generation logic may be developed in developing the intelligent contracts described above. When the control instruction is generated, the generation logic included in the intelligent contract may be called to generate the control instruction based on the control parameter.
Because the control instruction is generated by depending on the intelligent contract, the control instruction can be ensured to be transparent and not to be tampered, and the credibility of the control instruction is further improved.
After receiving the device control request, the service system may execute S204, call the intelligent contract, obtain a control instruction corresponding to the device control request, and send the control instruction to the intelligent device, so as to control the intelligent device to execute a control action corresponding to the control instruction, and transfer a virtual resource, which is anchored by the value of the control instruction, from the blockchain account corresponding to the demand party to the blockchain account corresponding to the intelligent device.
In some examples, the smart contract may issue the control command to the block chain and send block information indicating the control command to the smart device. The smart device may obtain the control command from the block based on the obtained block information.
In some examples, the smart contract may generate, by a sending logic, a sending event including the control command, so that when the server corresponding to the smart device obtains the sending event, the sending event is further sent to a target control unit in an operating system installed in the smart device, so that the target control unit controls the smart device to execute a control operation corresponding to the control command in response to the control command in the sending event.
The server corresponding to the intelligent device may include a block chain as a service (BaaS) platform to which the intelligent device is accessed; or a service program (SDK) installed on the block link node device to which the smart device accesses.
In some examples, the smart device may listen to the sending event in the block chain in a pull-block manner through the BaaS platform. After the BaaS platform monitors the sending event, the sending event can be sent to the intelligent device. The intelligent device can respond to the sending event and complete corresponding control action according to the control instruction in the sending event.
In some examples, the blockchain account may be an account created for a user (e.g., a demander) after the user completes registration in the blockchain. In some examples, the blockchain account may be a contract account, i.e., an account created for the user by the intelligent contract.
In some examples, the virtual resource may be a virtual asset anchored to an offline physical object. By the value anchoring contract carried in the block chain, offline real objects (such as automobiles, real estate, account balance and the like) owned by a demand party can be anchored as virtual assets on the chain and stored in an account corresponding to the demand party.
When a certain demand party finishes controlling the intelligent equipment through the control instruction, the virtual resource anchored by the value of the control instruction needs to be paid to the intelligent equipment.
In some examples, the virtual resource includes a resource that is anchored to a system resource value of the smart device consumed by the control instruction. In executing S204, a first amount of system resources of the smart device consumed by executing the control command may be determined. Then, a second quantity of virtual resources worth anchored to the first quantity is calculated. And finally, transferring the second amount of virtual resources from the block chain account corresponding to the demand party to the block chain account corresponding to the intelligent equipment.
In some examples, the proportional relationship between the unit system resource and the unit virtual resource may be set in advance according to the business requirement. The second number may then be determined based on the first number and the proportional relationship.
In the above example, the amount of the virtual resource transferred can be determined by the amount of the system resource consumed by the smart device, so that the smart device can be paid a reward equivalent to productivity, thereby ensuring the rights and interests of the smart device.
In some examples, the virtual resource includes a resource anchored to an instruction type value of the control instruction. In executing S204, a third amount of the virtual resource anchored to the instruction type value of the control instruction may be calculated. And then transferring the virtual resources with the third quantity from the block chain account corresponding to the demand party to the block chain account corresponding to the intelligent equipment.
In some examples, the correspondence between the instruction type and the number of virtual resources may be maintained in advance in the block chain. The instruction type of the control instruction may be determined first when calculating the third number. And then determining the third quantity by searching the corresponding relation.
In the above example, the amount of the virtual resource to be transferred can be determined by the type of the control command, so that the intelligent device can be paid a reward equivalent to an execution action, thereby ensuring the rights and interests of the intelligent device.
In the above scheme, since the intelligent contract may be called, a control instruction corresponding to the device control request is obtained, and the control instruction is sent to the intelligent device, so as to complete control of the intelligent device, and a virtual resource anchored with the control instruction value is transferred from the blockchain account corresponding to the demand party to the blockchain account corresponding to the intelligent device; therefore, the control of the intelligent device and the payment of the productivity of the intelligent device can be driven through the intelligent contract, so that the transparency and the non-falsification of a control process and a payment process are ensured, and the trusted management of the intelligent device and the safe payment of the productivity of the intelligent device are realized.
In some examples, when transferring the virtual resource anchored to the control instruction value from the blockchain account corresponding to the demand party to the blockchain account corresponding to the smart device, the virtual resource anchored to the control instruction value may be transferred from the blockchain account corresponding to the demand party to the blockchain account corresponding to the smart device in response to sending the control instruction to the control device.
In this example, the device control request includes account information corresponding to the requesting party and account information corresponding to the smart device. The service system may call transfer logic included in the intelligent contract after completing interaction with the intelligent device, so as to obtain the account information from the device control request. And then transferring the virtual resource anchored with the control instruction value to the block chain account corresponding to the intelligent equipment from the account corresponding to the demand party.
Here, since the intelligent device can receive the transferred virtual resource when receiving the control instruction, the rights and interests of the intelligent device are ensured.
In some examples, in response to the smart device executing a control action corresponding to the control command, the virtual resource anchored to the value of the control command may be transferred from the blockchain account corresponding to the demand party to the blockchain account corresponding to the smart device.
In this example, the service system may generate a transmission event through the smart contract, and transmit the control command to the smart device. The intelligent device may complete a control action in response to the control instruction, and generate a result of the action completion as a response to the transmission event to return to the intelligent contract. After receiving the action completion result, the service system may transfer the virtual resource anchored to the control instruction value from the blockchain account corresponding to the demand party to the blockchain account corresponding to the intelligent device.
Here, since the resource transfer is performed after the smart device completes the control action, the rights and interests of the demander are ensured.
In some examples, the control instruction performs digital signature processing based on a private key corresponding to the demander; and/or performing digital signature processing based on a private key corresponding to the intelligent contract.
When the intelligent device analyzes the control instruction, the signature verification of the control instruction can be performed based on the private key corresponding to the demand party and/or the private key corresponding to the intelligent contract. If the verification is passed, the authenticity of the control instruction may be verified.
In this example, the credibility of the control instruction is further ensured through a digital signature mechanism, and the credible management of the intelligent device is realized.
In some examples, the operating system installed in the intelligent device comprises a plurality of control units for responding to control instructions. Wherein, the control units can respectively correspond to different control actions. For example, the smart device may be a robot. The control units can control an arm control unit of a robot arm and a walking control unit of the robot walking. The control unit may be a program code developed in advance by a developer.
It will be appreciated that the control of the smart device at this time may be the control of the control unit described above.
In some examples, when the S204 is executed, the smart contract may be invoked to obtain a control command corresponding to the device control request, and the control command may be sent to a target control unit in an operating system installed in the smart device, so that the target control unit controls the smart device to execute a control action corresponding to the control command in response to the control command.
In some examples, the control command may be issued in the block chain by the smart contract, and block information of a block corresponding to the control command may be sent to the target control unit. The target control unit can acquire the control command through the block information and complete corresponding control action.
In some examples, the Operating System is an ROS (Robot Operating System).
The ROS is a software architecture with high flexibility for writing robot software programs. The ROS may include several ROS nodes (robot operating system nodes) and ROS masters (robot operating system administrators).
The ROS Master can be used for managing the ROS Node and providing basic services. The base services include, but are not limited to, maintaining an intelligent contract requiring party public key.
The ROS Node may be understood as the control unit for controlling the robot to perform different control actions.
The ROS may employ an asynchronous communication scheme such as the Topic mechanism. In some examples, the ROS Node, ROS Master, and the above-described smart contracts may register or publish any Topic and publish messages or subscribe messages under that Topic.
In some examples, a creation request initiated by a claimant may be received; wherein the creation request includes creation information for creating the target Topic. And then responding to the creation request, calling creation logic included in the intelligent contract, and creating the target Topic based on the creation information.
The target Topic may be deployed in the block chain. The block information of the block corresponding to the target Topic that is created may be sent to the ROS, so that each Node included in the ROS may obtain the target Topic through the block information and monitor a message under the target Topic.
After the target Topic is created, the control instruction can be issued to the target Topic deployed by the block chain through the intelligent contract. Then, the block information of the block corresponding to the target Topic is sent to a target control unit subscribing the target Topic, so that the target control unit acquires the control instruction in the target Topic according to the block information and executes corresponding action.
In some examples, a sending logic included in the smart contract may be invoked to generate a sending event including the control instruction, so that when the server corresponding to the smart device obtains the sending event, the sending event is further sent to a target control unit in an operating system installed in the smart device, so that the target control unit responds to the control instruction in the sending event to control the smart device to execute a control action corresponding to the control instruction.
In some examples, the Operating System is an ROS (Robot Operating System). The control unit comprises an ROS node of the ROS system. Topic is deployed in the ROS described above.
In this case, the smart contract may generate a transmission event and then issue the transmission event to the block chain. The service BaaS platform as a block chain accessed by the smart device or a service program (e.g., SDK) installed on the device at the block chain node accessed by the smart device may monitor a transmission event issued in the block chain. After monitoring the sending event, the sending event may be further sent to the smart device. The ROS Master mounted on the smart device may parse the control instruction included in the transmission event, and write the control instruction into the target Topic deployed by the ROS. The target control unit subscribing to the target Topic may obtain the control instruction and complete the corresponding action.
In the above scheme, a control instruction is sent to a target control unit corresponding to the intelligent device through an intelligent contract, so that the target control unit controls the intelligent device to execute a control action corresponding to the control instruction, thereby implementing trusted management on the intelligent device.
The following description is made with reference to an example of a scenario in which a robot is controlled.
Referring to fig. 3, fig. 3 is a schematic view of a scene shown in the present application.
As shown in fig. 3, a robot management system (hereinafter referred to as a system) includes a block chain subsystem (hereinafter referred to as a block chain) and a service subsystem, which are in communication with each other.
The robot management system is used for providing robot management service.
The service subsystem can be connected with and provide services for clients corresponding to the demander A and the intelligent device B. The above-described service is not limited to issuing a smart contract invocation transaction in response to a request of a demander, or performing data interaction with a smart device, or the like. In some examples, the service subsystem may be a BaaS platform.
In fig. 3 it is shown that operator C can develop a set of intelligent contracts according to the business requirements. The smart contract includes sending logic that can send control instructions to the robot and complete a secure payment to the robot. The intelligent contract may also include creation logic to create Topic.
The operator C may send the intelligent contract to the service subsystem, so that the service subsystem constructs an intelligent contract and issues a deposit certificate for trading the contract.
The robot B may be a sweeping robot. The device can carry a client corresponding to the service subsystem to realize interaction with the subsystem.
The Robot B may be equipped with an ROS (Robot Operating System).
In this example, the ROS Node1 (hereinafter referred to as Node1) is assumed to control the robot to walk.
The ROS may employ a one-step communication scheme such as the Topic mechanism. In some examples, the ROS Node (hereinafter referred to as Node), ROS Master (hereinafter referred to as Master), and the above-described smart contracts may register or publish any Topic under which a message or a subscription message is published.
The demander A can send a control instruction to the robot B through the robot management system to complete the control of the robot B.
The demander a and the robot B may be registered in the system in advance. After the registration is completed, the intelligent contract can allocate an account A corresponding to the demand party A and an account B corresponding to the robot B. The demander A can recharge a certain amount of virtual assets in the account A in advance.
After registration is completed, the intelligent contracts may respectively allocate a pair of public and private keys to the demander a and the robot B, and may return contract addresses (i.e., intelligent contract public keys) corresponding to the intelligent contracts to the demander a and the robot B. And the robot B can store the intelligent contract public key into the Master. Node may obtain the public key from the Master. The demander a may broadcast its corresponding public key in the block chain, and the robot B may store the public key of the demander a in the Master.
When the demander A needs to enable the robot B to walk for 1 meter, a walking Topic establishment request can be established through the client A; wherein, the creation request comprises creation information for creating a target Topic (walking Topic); the client a may then send the request to the corresponding service subsystem.
After receiving the request, the service system may construct an intelligent contract call transaction, call a creation logic included in the intelligent contract, and create the target Topic based on the creation information.
In some examples, the target Topic may be published to the block chain after the target Topic is created. The Node may monitor a message under Topic from the block chain through the service subsystem (the server corresponding to the robot) or a service program (e.g., SDK) installed on the block chain Node device accessed by the robot.
In some examples, Topic deployed in a blockchain includes an execute action key; each Node included in the ROS can determine whether to subscribe to the Topic by recognizing the above-mentioned keyword. In this scenario, Node1 is for controlling the robot to walk, and therefore, may subscribe to the control instruction message under the target Topic (walking Topic) described above. When the Node1 monitors the control instruction message under the target Topic, the robot can be controlled to execute corresponding actions through the control instruction.
Referring to fig. 4, fig. 4 is a schematic diagram illustrating a robot control flow according to the present application.
As shown in fig. 4, when the demander a needs to walk the robot B by 1 meter, a device control request may be constructed by the client a. The device control request may include a control instruction for causing the robot B to walk by 1 meter through the Node1, and a contract address corresponding to the intelligent contract. The present application does not limit the specific format of the instructions.
The client a may execute S402, sign the request and the instruction by using the private key corresponding to the demander a, and send the request to the service subsystem.
After receiving the request, the service subsystem can verify the request through a public key corresponding to the demand party, and after the request passes the verification, an intelligent contract invoking transaction is constructed based on the contract address carried in the request and the control instruction. The service subsystem may issue the call transaction to the blockchain. After the node devices in the blockchain reach the consensus, the intelligent contract can be acquired and executed in a locally-installed virtual machine (EVM).
The node device may execute S404, and invoke the sending logic in the intelligent contract, on one hand, sign the control instruction through the private key corresponding to the intelligent contract, and issue the signed control instruction under the walking Topic.
On the other hand, an account A corresponding to the demand party A and an account B corresponding to the robot B are determined. The transfer asset to which the control instruction corresponds may then also be determined. After determining the information, the determined transfer asset may be debited from account a and credited to account B.
The Node1 may execute step S406 to listen for the control command message under the walking Topic. When the control instruction message is monitored, the control instruction message can be acquired from the Topic. And then acquiring the public key corresponding to the intelligent contract and the demander from the Master. And then, the control instruction can be verified through the acquired public key, and the robot is controlled to perform the action of walking for 1 meter after the verification is passed.
In the scheme, on one hand, the robot can complete corresponding actions according to control instructions provided by a demand party through the intelligent contract to achieve the purpose of trusted management; on the other hand, safe payment can be made for the labor of the robot.
The application also provides an equipment control method based on the block chain, and the block chain is deployed with an intelligent contract for managing the intelligent equipment.
Referring to fig. 5, fig. 5 is a flowchart illustrating a method for controlling a device based on a blockchain according to the present application.
As shown in fig. 5, the method may include:
s502, receiving a device control request initiated by a demand party.
And S504, transferring a transfer logic included in the intelligent contract, and transferring the virtual resource anchored by the control instruction value corresponding to the equipment control request from the block chain account corresponding to the demand party to the block chain account corresponding to the intelligent equipment.
And S506, after transferring a preset number of virtual resources to the block chain account corresponding to the intelligent device, further calling a sending logic in the intelligent contract to obtain a control instruction corresponding to the control request and sending the control instruction to the intelligent device so as to control the intelligent device to execute a control action corresponding to the control instruction.
In the above example, since the transfer of the virtual resource can be completed through the transfer-in logic included in the intelligent contract, and then the control of the device can be completed through the interaction with the intelligent device through the sending logic included in the intelligent contract, on one hand, the control of the intelligent device and the payment on the productivity of the intelligent device can be driven through the intelligent contract, so that the transparency and the non-falsification of the control process and the payment process are ensured, and the trusted management of the intelligent device and the safe payment on the productivity of the intelligent device are further realized; on the other hand, the rights and interests of the intelligent equipment can be guaranteed.
Corresponding to any embodiment, the application also provides a device control device based on the block chain.
Referring to fig. 6, fig. 6 is a schematic structural diagram of an apparatus control device based on a blockchain according to the present application.
As shown in fig. 6, the above-mentioned apparatus 60 may include:
a receiving module 61, which receives a device control request initiated by a demand party;
and a calling module 62 for calling the intelligent contract to obtain a control instruction corresponding to the device control request, and sending the control instruction to the intelligent device to control the intelligent device to execute a control action corresponding to the control instruction, and transferring the virtual resource anchored with the control instruction value from the blockchain account corresponding to the demand party to the blockchain account corresponding to the intelligent device.
In some embodiments, the operating system installed in the intelligent device comprises a plurality of control units for responding to control instructions;
the calling module 62 is specifically configured to:
and calling the intelligent contract to obtain a control instruction corresponding to the equipment control request, and sending the control instruction corresponding to the equipment control request to a target control unit in an operating system carried by the intelligent equipment, so that the target control unit responds to the control instruction to control the intelligent equipment to execute a control action corresponding to the control instruction.
In some embodiments, the control units correspond to different control actions.
In some embodiments shown, the invoking module 62 includes:
the issuing module issues the control instruction to the block chain;
and the sending module is used for sending the block information of the block corresponding to the control instruction to the target control unit so that the target control unit can obtain the control instruction according to the block information.
In some embodiments shown, the operating system is an ROS system; said control unit comprises an ROS node in said ROS system; topic is deployed in the block chain;
the publishing module is specifically configured to: issuing the control instruction to a target Topic deployed by the block chain;
the sending module is specifically configured to:
and sending the block information of the block corresponding to the target Topic to a target control unit subscribed to the target Topic so that the target control unit acquires the control instruction in the target Topic according to the block information.
In some illustrated embodiments, the invoking module 62 is specifically configured to:
and calling a sending logic included in the intelligent contract to generate a sending event including the control command, so that when the server corresponding to the intelligent equipment acquires the sending event, the sending event is further sent to a target control unit in an operating system mounted on the intelligent equipment, and the target control unit responds to the control command in the sending event to control the intelligent equipment to execute a control action corresponding to the control command.
In some embodiments shown, the operating system is an ROS system; said control unit comprises an ROS node in said ROS system;
the calling module 62 is specifically configured to:
and further sending the sending event to the target Topic subscribed by the target control unit, so that the target control unit acquires the sending event from the subscribed target Topic.
In some of the illustrated embodiments, the apparatus 60 further comprises:
the creation request receiving module receives a creation request initiated by a demand party; wherein, the creation request includes creation information for creating the target Topic;
and the creating logic calling module is used for calling creating logic included in the intelligent contract in response to the creating request and creating the target Topic based on the creating information.
In some illustrated embodiments, a server corresponding to the smart device includes a block chain as a service, BaaS, platform accessed by the smart device; or, a service program loaded on the block link point device to which the intelligent device is connected.
In some illustrated embodiments, the invoking module 62 is specifically configured to:
responding to the control instruction sent to the control equipment, and transferring virtual resources anchored with the control instruction value to the blockchain account corresponding to the intelligent equipment from the blockchain account corresponding to the demand party; alternatively, the first and second electrodes may be,
and transferring the virtual resource anchored with the control instruction value from the blockchain account corresponding to the demand party to the blockchain account corresponding to the intelligent equipment in response to the intelligent equipment executing the control action corresponding to the control instruction.
In some illustrative embodiments, the virtual resource comprises a resource anchored to a system resource value of the smart device consumed by the control instruction;
the calling module 62 is specifically configured to:
determining a first amount of system resources of the smart device consumed by executing the control command;
calculating a second quantity of virtual resources worth anchored to said first quantity;
and transferring the second amount of virtual resources from the blockchain account corresponding to the demand party to the blockchain account corresponding to the intelligent device.
In some illustrative embodiments, the virtual resource comprises a resource that is anchored to an instruction type value of the control instruction;
the calling module 62 is specifically configured to:
calculating a third amount of the virtual resource anchored to an instruction type value of the control instruction;
and transferring the virtual resources with the third quantity from the block chain account corresponding to the demand party to the block chain account corresponding to the intelligent equipment.
In some embodiments shown, the control instruction performs digital signature processing based on a private key corresponding to the demander; and/or, digital signature processing is carried out based on a private key corresponding to the intelligent contract;
the calling module 62 is specifically configured to:
and sending the control command to a target control unit in an operating system carried by the intelligent equipment, so that the target control unit responds to the control command, performs digital signature verification on the control command by using the public key corresponding to the private key, and controls the intelligent equipment to execute a control action corresponding to the control command when the verification is passed.
In some embodiments shown, the device control request includes control parameters for the smart device; the calling module 62 is specifically configured to:
and calling the intelligent contract and generating a control instruction based on the control parameter.
In some illustrated embodiments, the invoking module 62 is specifically configured to:
and calling generation logic included in the intelligent contract, and generating a control instruction based on the control parameter.
The present application also proposes a device control apparatus 70 based on a blockchain, in which an intelligent contract for managing an intelligent device is deployed. The above apparatus 70 may include:
a receiving module 71, configured to receive a device control request initiated by a requester;
a first transferring module 72, for transferring the transfer logic included in the intelligent contract, and transferring the virtual resource anchored by the control instruction value corresponding to the device control request from the blockchain account corresponding to the demand party to the blockchain account corresponding to the intelligent device;
the second invoking module 73 further invokes a sending logic in the intelligent contract after transferring a preset number of virtual resources to the blockchain account corresponding to the intelligent device, obtains a control instruction corresponding to the device control request, and sends the control instruction to the intelligent device to control the intelligent device to execute a control action corresponding to the control instruction.
The embodiment of the device control apparatus based on the block chain shown in the present application can be applied to an electronic device. Correspondingly, the application discloses an electronic device, which is deployed in a block chain; the blockchain is deployed with intelligent contracts for managing intelligent devices. The apparatus may include: a processor.
A memory for storing processor-executable instructions.
Wherein the processor is configured to call the executable instructions stored in the memory to implement the device control method as shown in any of the above embodiments.
Referring to fig. 7, fig. 7 is a schematic diagram of a hardware structure of an electronic device shown in the present application.
As shown in fig. 7, the electronic device may include a processor for executing instructions, a network interface for making network connections, a memory for storing operating data for the processor, and a non-volatile memory for storing instructions corresponding to the device control apparatus.
The embodiment of the device control apparatus may be implemented by software, or may be implemented by hardware, or a combination of hardware and software. Taking a software implementation as an example, as a logical device, the device is formed by reading, by a processor of the electronic device where the device is located, a corresponding computer program instruction in the nonvolatile memory into the memory for operation. In terms of hardware, in addition to the processor, the memory, the network interface, and the nonvolatile memory shown in fig. 7, the electronic device in which the apparatus is located in the embodiment may also include other hardware according to the actual function of the electronic device, which is not described again.
It should be understood that, in order to increase the processing speed, the command corresponding to the device control apparatus may also be directly stored in the memory, which is not limited herein.
The application provides a computer-readable storage medium, wherein the storage medium is deployed in a block chain; the blockchain is deployed with intelligent contracts for managing intelligent devices. The storage medium stores a computer program for executing the device control method shown in any one of the embodiments.
One skilled in the art will recognize that one or more embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, one or more embodiments of the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, one or more embodiments of the present application may take the form of a computer program product (which may include, but is not limited to, disk storage, CD-ROM, optical storage, and the like) embodied as described above in one or more computer-usable storage media having computer-usable program code embodied therein.
"and/or" in this application means having at least one of the two, for example, "a and/or B" may include three schemes: A. b, and "A and B".
The embodiments in the present application are described in a progressive manner, and the same and similar parts among the embodiments can be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the data processing apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to part of the description of the method embodiment.
The foregoing description of specific embodiments of the present application has been presented. Other embodiments are within the scope of the following claims. In some cases, the acts or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
Embodiments of the subject matter and functional operations described in this application may be implemented in the following: digital electronic circuitry, tangibly embodied computer software or firmware, computer hardware that may include the structures disclosed in this application and their structural equivalents, or combinations of one or more of them. Embodiments of the subject matter described in this application can be implemented as one or more computer programs, i.e., one or more modules encoded in tangible, non-transitory program carriers such as the computer program instructions described above to be executed by a data processing apparatus or to control the operation of a parameter processing apparatus. Alternatively or additionally, the program instructions may be encoded in an artificially generated propagated signal, e.g., a machine-generated electrical, optical, or electromagnetic signal, that is generated to encode information for transmission to suitable receiver apparatus for execution by the data processing apparatus. The computer storage medium may be a machine-readable storage device, a machine-readable storage substrate, a random or serial access memory device, or a combination of one or more of them.
The processes and logic flows described in this application can be performed by one or more programmable computers executing one or more computer programs to perform corresponding functions by operating on input data and generating output. The processes and logic flows described above can also be performed by, and apparatus can also be implemented as, special purpose logic circuitry, e.g., an FPGA (field programmable gate array) or an ASIC (application-specific integrated circuit).
Computers suitable for executing computer programs may include, for example, general and/or special purpose microprocessors, or any other type of central processing unit. Generally, a central processing unit will receive instructions and data from a read-only memory and/or a random access memory. The basic components of a computer may include a central processing unit for implementing or executing instructions and one or more memory devices for storing instructions and data. Generally, a computer will also include, or be operatively coupled to receive data from or transfer data to, or both, one or more mass storage devices for storing data, e.g., magnetic, magneto-optical disks, or optical disks. However, a computer does not necessarily have such a device. Moreover, a computer may be embedded in another device, e.g., a mobile telephone, a Personal Digital Assistant (PDA), a mobile audio or video player, a game console, a Global Positioning System (GPS) receiver, or a portable storage device such as a Universal Serial Bus (USB) flash drive, to name a few.
Computer-readable media suitable for storing computer program instructions and data can include all forms of non-volatile memory, media and memory devices, including by way of example semiconductor memory devices (e.g., EPROM, EEPROM, and flash memory devices), magnetic disks (e.g., internal hard disk or removable disks), magneto-optical disks, and CD ROM and DVD-ROM disks. The processor and the memory can be supplemented by, or incorporated in, special purpose logic circuitry.
Although this application contains many specific implementation details, these should not be construed as limiting the scope of any disclosure or of what may be claimed, but rather as merely describing features of particular disclosed embodiments. Certain features that are described in this application in the context of separate embodiments can also be implemented in combination in a single embodiment. In other instances, features described in connection with one embodiment may be implemented as discrete components or in any suitable subcombination. Moreover, although features may be described above as acting in certain combinations and even initially claimed as such, one or more features from a claimed combination can in some cases be excised from the combination, and the claimed combination may be directed to a subcombination or variation of a subcombination.
Similarly, while operations are depicted in the drawings in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order, or that all illustrated operations be performed, to achieve desirable results. In some cases, multitasking and parallel processing may be advantageous. Moreover, the separation of various system modules and components in the embodiments described above should not be understood as requiring such separation in all embodiments, and it should be understood that the described program components and systems can generally be integrated together in a single software product or packaged into multiple software products.
Thus, particular embodiments of the subject matter have been described. Other embodiments are within the scope of the following claims. In some cases, the actions recited in the claims can be performed in a different order and still achieve desirable results. Further, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some implementations, multitasking and parallel processing may be advantageous.
The above description is only for the purpose of illustrating the preferred embodiments of the present application and is not intended to limit the present application to the particular embodiments of the present application, and any modifications, equivalents, improvements, etc. made within the spirit and principles of the present application should be included within the scope of the present application.

Claims (14)

1. A device control method based on a block chain, wherein an intelligent contract used for managing intelligent devices is deployed in the block chain; the block chain is in communication connection with a BaaS platform; the smart device includes an ROS system; the ROS system is accessed into the BaaS platform; the ROS system comprises at least one ROS node; the ROS system deploys Topic for transmitting messages; the method comprises the following steps:
receiving a device control request initiated by a demand party;
calling the intelligent contract to obtain a control instruction corresponding to the equipment control request, calling a sending logic included in the intelligent contract to generate a sending event containing the control instruction, when the BaaS platform obtains the sending event, further sending the sending event to a target Topic deployed in an ROS system so that a target ROS node subscribing the target Topic can obtain the control instruction and execute a control action corresponding to the control instruction, and,
and transferring virtual resources anchored with the control instruction value to the blockchain account corresponding to the intelligent equipment from the blockchain account corresponding to the demand party.
2. The method of claim 1, wherein transferring the virtual resource anchored to the control instruction value from the blockchain account corresponding to the demand party to the blockchain account corresponding to the smart device comprises:
responding to the control instruction sent to the intelligent equipment, and transferring virtual resources anchored with the control instruction value to the blockchain account corresponding to the intelligent equipment from the blockchain account corresponding to the demand party; alternatively, the first and second electrodes may be,
and responding to the intelligent equipment executing the control action corresponding to the control instruction, and transferring the virtual resource anchored with the control instruction value from the blockchain account corresponding to the demand party to the blockchain account corresponding to the intelligent equipment.
3. The method of claim 1 or 2, the virtual resource comprising a resource anchored to a system resource value of the smart device consumed by the control instruction;
the transferring the virtual resource anchored with the control instruction value from the blockchain account corresponding to the demand party to the blockchain account corresponding to the intelligent device includes:
determining a first amount of system resources of the smart device consumed by executing the control instruction;
computing a second quantity of virtual resources that are worth anchored to the first quantity;
and transferring the virtual resources of the second quantity from the block chain account corresponding to the demand party to the block chain account corresponding to the intelligent equipment.
4. The method of claim 1 or 2, the virtual resource comprising a resource anchored to an instruction type value of the control instruction;
the transferring the virtual resource anchored with the control instruction value from the blockchain account corresponding to the demand party to the blockchain account corresponding to the intelligent device includes:
calculating a third amount of the virtual resource anchored to an instruction type value of the control instruction;
and transferring the virtual resources with the third quantity from the block chain account corresponding to the demand party to the block chain account corresponding to the intelligent equipment.
5. The method of claim 1, wherein the control instruction is digitally signed based on a first private key corresponding to the demander and digitally signed based on a second private key corresponding to the smart contract;
the target ROS node executes a control action corresponding to the control instruction, and the control action comprises the following steps: and the target ROS node performs digital signature verification on the control instruction based on a first public key corresponding to the first private key and a second public key corresponding to the second private key, and executes a control action corresponding to the control instruction when the verification is passed.
6. The method of claim 1, the device control request comprising control parameters for the smart device; the calling the intelligent contract to obtain the control instruction corresponding to the equipment control request comprises the following steps:
and calling the intelligent contract and generating a control instruction based on the control parameter.
7. The method of claim 6, the invoking the smart contract, generating control instructions based on the control parameters, comprising:
and calling generation logic included in the intelligent contract, and generating a control instruction based on the control parameter.
8. A device control method based on a block chain, wherein an intelligent contract used for managing intelligent devices is deployed in the block chain; the block chain is in communication connection with a BaaS platform; the smart device includes an ROS system; the ROS system is accessed into the BaaS platform; the ROS system comprises at least one ROS node; the ROS system deploys Topic for transmitting messages; the method comprises the following steps:
receiving a device control request initiated by a demand party;
transferring transfer logic included by the intelligent contract, and transferring virtual resources anchored by the control instruction value corresponding to the equipment control request to the blockchain account corresponding to the intelligent equipment from the blockchain account corresponding to the demand party;
after transferring a preset number of virtual resources to a block chain account corresponding to the intelligent device, further calling a sending logic in the intelligent contract to obtain a control instruction included in the device control request, and generating a sending event including the control instruction, wherein when the BaaS platform obtains the sending event, the BaaS platform further sends the sending event to a target Topic deployed in an ROS system, so that a target ROS node subscribing the target Topic obtains the control instruction and executes a control action corresponding to the control instruction.
9. A device control apparatus based on a blockchain, in which an intelligent contract for managing an intelligent device is deployed; the block chain is in communication connection with a BaaS platform; the smart device includes an ROS system; the ROS system is accessed into the BaaS platform; the ROS system comprises at least one ROS node; the ROS system deploys Topic for transmitting messages; the device comprises:
the receiving module is used for receiving a device control request initiated by a demand party;
a calling module for calling the intelligent contract to obtain a control instruction corresponding to the device control request, calling a sending logic included in the intelligent contract to generate a sending event including the control instruction, when the BaaS platform obtains the sending event, further sending the sending event to a target Topic deployed in an ROS system so that a target ROS node subscribing the target Topic can obtain the control instruction and execute a control action corresponding to the control instruction, and,
and transferring virtual resources anchored with the control instruction value to the blockchain account corresponding to the intelligent equipment from the blockchain account corresponding to the demand party.
10. A device control apparatus based on a blockchain, in which an intelligent contract for managing an intelligent device is deployed; the block chain is in communication connection with a BaaS platform; the smart device includes an ROS system; the ROS system is accessed into the BaaS platform; the ROS system comprises at least one ROS node; the ROS system deploys Topic for transmitting messages; the device comprises:
the receiving module is used for receiving a device control request initiated by a demand party;
the first calling module is used for calling transfer logic included by the intelligent contract, and transferring virtual resources anchored by the control instruction value corresponding to the equipment control request to the block chain account corresponding to the intelligent equipment from the block chain account corresponding to the demand party;
and the second calling module is used for further calling a sending logic in the intelligent contract after transferring a preset number of virtual resources to the block chain account corresponding to the intelligent equipment to obtain a control instruction included in the equipment control request, and generating a sending event containing the control instruction, wherein when the BaaS platform obtains the sending event, the sending event is further sent to a target Topic deployed in an ROS system, so that a target ROS node subscribing the target Topic can obtain the control instruction and execute a control action corresponding to the control instruction.
11. An electronic device deployed in a blockchain; intelligent contracts used for managing intelligent equipment are deployed in the blockchain; the block chain is in communication connection with a BaaS platform; the smart device includes an ROS system; the ROS system is accessed into the BaaS platform; the ROS system comprises at least one ROS node; the ROS system deploys Topic for transmitting messages;
the electronic device includes:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to invoke executable instructions stored in the memory to implement:
receiving a device control request initiated by a demand party;
calling the intelligent contract to obtain a control instruction corresponding to the equipment control request, calling a sending logic included in the intelligent contract to generate a sending event containing the control instruction, and further sending the sending event to a target Topic deployed in an ROS system by the BaaS platform when the BaaS platform obtains the sending event so that a target ROS node subscribing the target Topic can obtain the control instruction and execute a control action corresponding to the control instruction;
and transferring virtual resources anchored with the control instruction value to the blockchain account corresponding to the intelligent equipment from the blockchain account corresponding to the demand party.
12. An electronic device deployed in a blockchain; intelligent contracts used for managing intelligent equipment are deployed in the blockchain; the block chain is in communication connection with a BaaS platform; the smart device includes an ROS system; the ROS system is accessed into the BaaS platform; the ROS system comprises at least one ROS node; the ROS system deploys Topic for transmitting messages;
the electronic device includes:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to invoke executable instructions stored in the memory to implement:
receiving a device control request initiated by a demand party;
transferring transfer logic included by the intelligent contract, and transferring virtual resources anchored by the control instruction value corresponding to the equipment control request to the blockchain account corresponding to the intelligent equipment from the blockchain account corresponding to the demand party;
after transferring a preset number of virtual resources to a block chain account corresponding to the intelligent device, further calling a sending logic in the intelligent contract to obtain a control instruction included in the device control request, and generating a sending event including the control instruction, wherein when the BaaS platform obtains the sending event, the BaaS platform further sends the sending event to a target Topic deployed in an ROS system, so that a target ROS node subscribing the target Topic obtains the control instruction and executes a control action corresponding to the control instruction.
13. A computer-readable storage medium, the storage medium being deployed in a blockchain; intelligent contracts used for managing intelligent equipment are deployed in the blockchain; the block chain is in communication connection with a BaaS platform; the smart device includes an ROS system; the ROS system is accessed into the BaaS platform; the ROS system comprises at least one ROS node; the ROS system deploys Topic for transmitting messages; the storage medium stores a computer program for executing:
receiving a device control request initiated by a demand party;
calling the intelligent contract to obtain a control instruction corresponding to the equipment control request, calling a sending logic included in the intelligent contract to generate a sending event containing the control instruction, and further sending the sending event to a target Topic deployed in an ROS system by the BaaS platform when the BaaS platform obtains the sending event so that a target ROS node subscribing the target Topic can obtain the control instruction and execute a control action corresponding to the control instruction;
and transferring virtual resources anchored with the control instruction value to the blockchain account corresponding to the intelligent equipment from the blockchain account corresponding to the demand party.
14. A computer-readable storage medium, the storage medium being deployed in a blockchain; intelligent contracts used for managing intelligent equipment are deployed in the blockchain; the block chain is in communication connection with a BaaS platform; the smart device includes an ROS system; the ROS system is accessed into the BaaS platform; the ROS system comprises at least one ROS node; the ROS system deploys Topic for transmitting messages; the storage medium stores a computer program for executing:
receiving a device control request initiated by a demand party;
transferring transfer logic included in the intelligent contract, transferring virtual resources anchored by the control instruction value corresponding to the equipment control request from the blockchain account corresponding to the demand party to the blockchain account corresponding to the intelligent equipment, and,
after transferring a preset number of virtual resources to a block chain account corresponding to the intelligent device, further calling a sending logic in the intelligent contract to obtain a control instruction included in the device control request, and generating a sending event including the control instruction, wherein when the BaaS platform obtains the sending event, the BaaS platform further sends the sending event to a target Topic deployed in an ROS system, so that a target ROS node subscribing the target Topic obtains the control instruction and executes a control action corresponding to the control instruction.
CN202110089212.1A 2021-01-22 2021-01-22 Block chain-based device control method, apparatus, device and storage medium Active CN112785432B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110089212.1A CN112785432B (en) 2021-01-22 2021-01-22 Block chain-based device control method, apparatus, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110089212.1A CN112785432B (en) 2021-01-22 2021-01-22 Block chain-based device control method, apparatus, device and storage medium

Publications (2)

Publication Number Publication Date
CN112785432A CN112785432A (en) 2021-05-11
CN112785432B true CN112785432B (en) 2022-02-18

Family

ID=75758646

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110089212.1A Active CN112785432B (en) 2021-01-22 2021-01-22 Block chain-based device control method, apparatus, device and storage medium

Country Status (1)

Country Link
CN (1) CN112785432B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116152968A (en) * 2023-04-23 2023-05-23 安徽中科晶格技术有限公司 Control method and device of intelligent lock based on blockchain contract event mechanism

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111432989A (en) * 2018-12-04 2020-07-17 深圳前海达闼云端智能科技有限公司 Artificially enhanced cloud-based robot intelligence framework and related methods

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106021000B (en) * 2016-06-02 2018-06-01 北京百度网讯科技有限公司 For the shared-memory management method and apparatus of robot operating system
CN111444496A (en) * 2020-03-24 2020-07-24 腾讯科技(深圳)有限公司 Application control method, device, equipment and storage medium
CN111694644A (en) * 2020-05-15 2020-09-22 平安科技(深圳)有限公司 Message processing method and device based on robot operating system and computer equipment
CN112015576A (en) * 2020-10-20 2020-12-01 支付宝(杭州)信息技术有限公司 Calling method and device of intelligent contract

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111432989A (en) * 2018-12-04 2020-07-17 深圳前海达闼云端智能科技有限公司 Artificially enhanced cloud-based robot intelligence framework and related methods

Also Published As

Publication number Publication date
CN112785432A (en) 2021-05-11

Similar Documents

Publication Publication Date Title
CN110163590B (en) Payment withholding method and device based on block chain, electronic equipment and storage medium
CN110147990B (en) Payment withholding subscription method and device based on block chain and electronic equipment
CN112200571B (en) Resource distribution method and device based on block chain and electronic equipment
CN113157444B (en) Method and device for authenticating computing power service and readable storage medium
CN112801658B (en) Cross-border resource transfer authenticity auditing method and device and electronic equipment
CN112200567B (en) Resource management method and device based on block chain and electronic equipment
CN112200568B (en) Block chain based account creation method and device and electronic equipment
CN110163634B (en) Refund method and device based on blockchain and electronic equipment
CN113327165A (en) Transaction method based on block chain
CN112613877B (en) Intelligent contract triggering method and device applied to block chain network and related equipment
CN110163691B (en) Invoice creating method and device based on block chain and electronic equipment
CN112200572A (en) Resource distribution method and device based on block chain and electronic equipment
CN111985007A (en) Contract signing and executing method and device based on block chain
CN112101919B (en) Data processing method and device, electronic equipment and storage medium
CN113506111A (en) Entity article ownership registration method and device based on block chain
CN111553695B (en) Cross-region payment method and device and electronic equipment
CN112015576A (en) Calling method and device of intelligent contract
CN112785432B (en) Block chain-based device control method, apparatus, device and storage medium
CN112070503A (en) Contract execution method, device, equipment and storage medium based on block chain
CN113159898A (en) Auction method based on block chain
CN112435127A (en) Contract signing method, device, equipment and storage medium based on block chain
CN110458541B (en) Object replacement method and device based on block chain
CN112436946B (en) Block chain-based communication authorization method, device, equipment and storage medium
CN114146415A (en) Game element transaction method and device based on block chain
CN112200570A (en) Resource distribution method and device based on block chain and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant