Application control method, device, equipment and storage medium

By using smart contracts and authorization databases on the blockchain, control between decentralized applications is achieved, user experience and functional diversity problems are solved, and application security and control instructions are improved.

CN111444496BActive Publication Date: 2025-01-17TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010213409.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-03-24
Publication Date
2025-01-17
Estimated Expiration
2041-01-17

AI Technical Summary

Technical Problem

Existing decentralized applications cannot be controlled through other decentralized applications, limiting user experience and functional diversity.

Method used

By obtaining the command information of the target user, generating control instructions, and using the smart contract and authorization database in the blockchain, control of the second decentralized application is realized to ensure the secure transmission and execution of control instructions.

Benefits of technology

It improves the security of decentralized applications and the transmission security of control instructions, reduces the risk of being controlled at will, and improves user experience and functional diversity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111444496B_ABST
    Figure CN111444496B_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses an application control method, device, equipment and storage medium, the method comprising: obtaining instruction information of a target user, the instruction information carries a first application identifier, the first application identifier is used to mark a second decentralized application, and the instruction information is used to control the second decentralized application to perform a target operation function; generating a control instruction according to the instruction information and the second application identifier of the first decentralized application; executing a first smart contract to obtain authorization data of the target user from a user authorization database of the second decentralized application in the blockchain; when the authorization data of the target user is obtained, obtaining a second smart contract associated with the second decentralized application from the blockchain, and executing the second smart contract to send the control instruction to the second decentralized application through the blockchain, so that the second decentralized application performs the target operation function. By adopting the embodiment of the present application, applications can be controlled based on blockchain, and the applicability is high.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to an application control method, device, equipment and storage medium. Background Art

[0002] With the development of blockchain technology, many Dapps (Decentralized Applications) have appeared on the blockchain network, such as game Dapps, shopping Dapps, etc.

[0003] As the types of decentralized applications increase, the functional diversity of decentralized applications is becoming more and more important. However, nowadays, a decentralized application can often only independently complete some operating functions, such as browsing web pages, uploading pictures, etc. However, for two applications that have decentralized applications involved, users cannot control another application through a decentralized application to achieve some operating functions, which reduces the user experience. Therefore, how to control another application through a decentralized application has become an urgent problem to be solved. Summary of the invention

[0004] The embodiments of the present application provide an application control method, apparatus, device, and storage medium, which can control applications based on blockchain and have high applicability.

[0005] The present application provides an application control method, the method comprising:

[0006] Obtaining instruction information of a target user, the instruction information carrying a first application identifier, the first application identifier being used to mark a second decentralized application, and the instruction information being used to control the second decentralized application to perform a target operation function;

[0007] Generate a control instruction according to the instruction information and the second application identifier of the first decentralized application;

[0008] Execute the first smart contract to obtain the authorization data of the target user from the user authorization database of the second decentralized application in the blockchain;

[0009] When the authorization data of the target user is obtained, a second smart contract associated with the second decentralized application is obtained from the blockchain, and the second smart contract is executed to send the control instruction to the second decentralized application through the blockchain, so that the second decentralized application performs the target operation function.

[0010] The present application provides another application control method, which includes:

[0011] Receiving a control instruction sent by the blockchain, and determining a second application identifier of the first decentralized application according to the control instruction;

[0012] The first application identifier of the second decentralized application and the second application identifier are sent to the consensus node in the blockchain, so that the consensus node determines whether the second decentralized application and the first decentralized application have a control relationship;

[0013] When the second decentralized application and the first decentralized application have the control relationship, the instruction information is determined according to the control instruction, and the target operation function corresponding to the instruction information is executed.

[0014] The present application embodiment provides an application control device, which includes:

[0015] A first acquisition module is used to acquire instruction information of a target user, the instruction information carries a first application identifier, the first application identifier is used to mark a second decentralized application, and the instruction information is used to control the second decentralized application to perform a target operation function;

[0016] A generation module, configured to generate a control instruction according to the instruction information and the second application identifier of the first decentralized application;

[0017] A second acquisition module, configured to execute the first smart contract to acquire the authorization data of the target user from a user authorization database of the second decentralized application in the blockchain;

[0018] The first execution module is used to obtain the second smart contract associated with the second decentralized application from the blockchain when the authorization data of the target user is obtained, and execute the second smart contract to send the control instruction to the second decentralized application through the blockchain, so that the second decentralized application performs the target operation function.

[0019] In a possible implementation, the generation module includes:

[0020] A first acquisition unit is used to acquire the instruction status parameter of the instruction information, and send the instruction status parameter to the consensus node in the blockchain, so that the consensus node determines whether the instruction information is in an executable state according to the instruction status parameter;

[0021] A generating unit is used to generate a control instruction according to the instruction information and the second application identifier of the first decentralized application when the instruction information is in an executable state.

[0022] In a possible implementation, the generation module includes:

[0023] A first encryption unit, used to encrypt the instruction information according to a first private key of the first decentralized application to obtain encrypted instruction information;

[0024] A marking unit is used to mark the above-mentioned encrypted instruction information according to the second application identifier of the above-mentioned first decentralized application to obtain a control instruction.

[0025] In a possible implementation, the first execution module includes:

[0026] A first processing unit, configured to perform a hash calculation on the instruction information to obtain first summary information of the instruction information;

[0027] A second encryption unit is used to send a key acquisition request to the target user to obtain a second private key of the target user, and encrypt the first summary information according to the second private key to obtain a digital signature of the instruction information;

[0028] A sending unit is used to send the control instruction and the digital signature to the blockchain, and execute the second smart contract to make the blockchain send the control instruction and the digital signature to the second decentralized application, triggering the second decentralized application to receive the control instruction and the digital signature.

[0029] In a possible implementation manner, the above device further includes:

[0030] The first sending module is further configured to send a communication request to the second decentralized application when the authorization information of the target user is not obtained, so that the second decentralized application sends a synchronization sequence number and a first confirmation character;

[0031] The first receiving module is further used to receive the synchronization sequence number and the first confirmation character, and send a second confirmation character to the second decentralized application to establish a communication connection with the second decentralized application;

[0032] The second sending module is also used to send the above-mentioned control instruction to the above-mentioned second decentralized application through the above-mentioned communication connection, so that the above-mentioned second decentralized application performs the above-mentioned target operation function.

[0033] The present application embodiment provides another application control device, which includes:

[0034] A second receiving module, used to receive a control instruction sent by the blockchain, and determine a second application identifier of the first decentralized application according to the control instruction;

[0035] A third sending module, configured to send the first application identifier of the second decentralized application and the second application identifier to a consensus node in the blockchain, so that the consensus node determines whether the second decentralized application and the first decentralized application have a control relationship;

[0036] The second execution module is used to determine the instruction information according to the control instruction when the second decentralized application and the first decentralized application have the control relationship, and execute the target operation function corresponding to the instruction information.

[0037] In a possible implementation manner, the control instruction further carries a digital signature; and the second execution module includes:

[0038] an execution unit, configured to execute a third smart contract to trigger the first decentralized application to obtain the first public key of the target user through the blockchain, and enable the first decentralized application to send the first public key to the second decentralized application through the blockchain;

[0039] A second processing unit is used to perform a hash calculation on the instruction information to obtain first summary information of the instruction information, and decrypt the digital signature according to the first public key to obtain second summary information of the instruction information;

[0040] The second acquisition unit is used to obtain the second public key of the first decentralized application from the blockchain when the first summary information is consistent with the second summary information, and decrypt the encrypted instruction information corresponding to the control instruction according to the second public key to obtain the instruction information.

[0041] The embodiment of the present application provides a device, the device includes a processor and a memory, the processor and the memory are connected to each other. The memory is used to store a computer program that supports the terminal device to execute an application control method provided by the embodiment of the present application, the computer program includes program instructions, and the processor is configured to call the above program instructions to execute an application control method provided by the embodiment of the present application.

[0042] The embodiment of the present application provides another device, which includes a processor and a memory, and the processor and the memory are connected to each other. The memory is used to store a computer program that supports the terminal device to execute another application control method provided in the embodiment of the present application, and the computer program includes program instructions. The processor is configured to call the above program instructions to execute another application control method provided in the embodiment of the present application.

[0043] An embodiment of the present application provides a computer-readable storage medium, which stores a computer program. The computer program is executed by a processor to implement any of the above-mentioned application control methods.

[0044] In the embodiment of the present application, the first decentralized application can determine whether the target user has the control authority of the second decentralized application through the blockchain, which can improve the application security of the second decentralized application and reduce the risk of the second decentralized application being arbitrarily controlled. Furthermore, the first decentralized application can send the control instruction to the second decentralized application through the blockchain, which can improve the transmission security of the control instruction, and can complete the control of the second decentralized application through the blockchain. On the other hand, the first decentralized application can encrypt the instruction information through the private key of the first decentralized application, which can further improve the output transmission security. At the same time, the second decentralized application can verify the validity of the control instruction through the digital signature obtained according to the private key of the target user, which is more stable. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0046] Figure 1 is a network architecture diagram of the application control method provided in an embodiment of the present application;

[0047] Figure 2 is a timing diagram of the application control method provided in an embodiment of the present application;

[0048] Figure 3 This is a schematic diagram of a scenario for establishing a communication connection provided in an embodiment of the present application;

[0049] Figure 4 This is a schematic diagram of a scenario of verification instruction information provided by an embodiment of the present application;

[0050] Figure 5 is a structural diagram of an application control device provided in an embodiment of the present application;

[0051] Figure 6 is a structural diagram of another application control device provided in an embodiment of the present application;

[0052] Figure 7 It is a structural schematic diagram of a device provided in an embodiment of the present application;

[0053] Figure 8 It is a structural schematic diagram of another device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0054] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions 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 are within the scope of protection of this application.

[0055] See also Figure 1 , Figure 1 This is a network architecture diagram of the application control method provided in the embodiment of the present application. Blockchain is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Decentralized applications run based on smart contracts stored in decentralized databases. Figure 1 , decentralized application 20 and decentralized application 30 run on blockchain 40. Decentralized application 20 obtains instruction information of target user 10, the instruction information carries a first application identifier and a user identifier of target user 10, the first application identifier is used to mark decentralized application 30, and the instruction information is used to control decentralized application 30 to perform the target operation function. At this time, decentralized application 20 can generate a control instruction according to the instruction information and the second application identifier of decentralized application 20, and then decentralized application 20 can execute the first smart contract to obtain the authorization data of target user 10 from the user authorization database of centralized application 30 in blockchain 40, so as to determine whether the authorization data of target user 10 is stored in the user authorization database. Further, when the authorization data of target user 10 is obtained in the user authorization database, decentralized application 20 obtains the second smart contract associated with decentralized application 30 from blockchain 40, and executes the second smart contract to send the control instruction to decentralized application 30 through blockchain 40. On the other hand, after receiving the control instruction sent by the decentralized application 20, the decentralized application 30 can determine the second application identifier of the decentralized application 20 according to the control instruction, and send the first application identifier and the second application identifier of the decentralized application 30 to the consensus node in the blockchain 40, so that the consensus node determines whether the decentralized application 30 and the decentralized application 20 have a control relationship. Further, when the decentralized application 30 and the decentralized application 20 have a control relationship, the decentralized application 30 determines the instruction information according to the control instruction, and executes the target operation function corresponding to the instruction information, thereby achieving the purpose of controlling the decentralized application 30 through the decentralized application 20.

[0056] See also Figure 2 , Figure 2 It is a timing diagram of the application control method provided in an embodiment of the present application. Figure 2 The application control method shown may include the following steps S201 to S207.

[0057] S201: Obtain instruction information of a target user.

[0058] In some feasible implementations, when the target user accesses or uses a decentralized application (hereinafter referred to as the first decentralized application for convenience of description), the first decentralized application can monitor the user's operation information in real time. When the target user is monitored for controlling another decentralized application (hereinafter referred to as the second decentralized application for convenience of description) to perform the target operation function, the first decentralized application can obtain the target user's instruction information and then control the second decentralized application to perform the target operation function according to the target user's instruction information. Among them, the above-mentioned instruction information can be gesture information, voice information, and text information, etc., which can be determined according to the actual application scenario, and is not limited here. Among them, the above-mentioned instruction information can be any information that controls the second decentralized application to perform the corresponding target operation function, which can be determined according to the application type and actual application scenario of the second decentralized application, and is not limited here. For example, when the second decentralized application is an access control application installed on the unit door, the above-mentioned instruction information can be used to control the access control application to perform door opening operation functions, door locking functions, etc. For another example, when the second decentralized application is an application installed on a sweeping robot, the above-mentioned instruction information can be used to control the second decentralized application to perform sweeping operation functions, etc. It should be particularly noted that the above-mentioned first decentralized application and the second decentralized application are applications with control functions or information transmission, such as remote control applications, etc., which can also be determined according to the actual application scenario and are not limited here. Among them, the instruction information of the above-mentioned target user may carry an application identifier for marking the second decentralized application (hereinafter referred to as the first application identifier for the convenience of description) and the user identifier of the above-mentioned target user, so that the first decentralized application can determine whether to control the second decentralized application to perform the target function according to the user identifier of the target user and the first application identifier of the second decentralized application.

[0059] S202: Generate a control instruction according to the instruction information and the second application identifier of the first decentralized application.

[0060] In some feasible implementations, after obtaining the instruction information of the target user, the first decentralized application may generate a control instruction based on the instruction information of the target user and the application identifier of the first decentralized application (hereinafter referred to as the second application identifier for the convenience of description) to control the second decentralized application to perform the target operation function corresponding to the above instruction information. Specifically, in order to improve the information security of the above instruction information, the first decentralized application may encrypt the instruction information according to the private key of the first decentralized application (hereinafter referred to as the first private key for the convenience of description) to obtain the encrypted instruction information corresponding to the above instruction information. On the other hand, in order to enable the second decentralized application to recognize that the control instruction comes from the above-mentioned first decentralized application, the first decentralized application may use the second application identifier of the first decentralized application to mark the encrypted information instruction to obtain the control instruction corresponding to the instruction confidence. Optionally, the first decentralized application may also use the preset encryption algorithm of the first decentralized application to encrypt the information instruction, and use the second application identifier to mark the encrypted instruction information to obtain the control instruction corresponding to the instruction information. The preset encryption algorithms include but are not limited to the Data Encryption Standard (DES), the Triple Data Encryption Algorithm (TDEA), and the RSA encryption algorithm, etc., which can be determined based on the actual application scenario and are not limited here. The first application identifier and the second application identifier are only used to mark and distinguish the first decentralized application and the second decentralized application, and can be one or more combinations of numbers, symbols, and strings, which can be determined based on the actual application scenario and are not limited here.

[0061] S203: Execute the first smart contract to obtain authorization data of the target user from the user authorization database of the second decentralized application in the blockchain.

[0062] In some feasible implementations, since the second decentralized application and the first decentralized application are different applications, when the target user uses the first decentralized application, the first decentralized application cannot determine whether the target user can control the second decentralized application to perform the target operation function, that is, the first decentralized application needs to determine whether the target user has the authority to control the target user. Specifically, the first decentralized application can execute the smart contract preset when generating the control instruction (for the convenience of description, hereinafter referred to as the first smart contract) to determine the user authorization database of the second decentralized application from the blockchain. Among them, the authorization data of each user in the user authorization database of the above-mentioned target user is used to illustrate that the corresponding user has the authority to control the second decentralized application. Among them, the authorization data of each user is the authorization data generated by the second decentralized application according to the user information of the user when the user uses the second decentralized application for the first time, and can also be the authorization data set by the second decentralized application for users within a preset range. It can be determined according to the actual application scenario and is not limited here. The first decentralized application can determine the target block storing the first application identifier from the blockchain by executing the first smart contract, or determine the target block marked by the first application identifier from the blockchain, and further obtain the user authorization database of the second decentralized application from the target block. Furthermore, the first decentralized application can obtain the authorization data of the target user from the user authorization database of the second decentralized application according to the user identifier of the target user to determine whether the target user has the authority to control the second decentralized application.

[0063] S204. When the authorization data of the target user is obtained, a second smart contract associated with the second decentralized application is obtained from the blockchain, and the second smart contract is executed to send a control instruction to the second decentralized application through the blockchain, so that the second decentralized application performs the target operation function.

[0064] In some feasible implementations, when the authorization data of the target user is successfully obtained from the user authorization database of the second decentralized application, the first decentralized application can determine that the target user has the authority to control the second decentralized application. Since the first decentralized application and the second decentralized application are based on smart contracts and run on the blockchain, the first decentralized application can determine the smart contract associated with the second decentralized application from the blockchain (for the convenience of description, hereinafter referred to as the second smart contract), and then execute the second smart contract so that the blockchain sends the control instruction to the second decentralized application. Among them, the above-mentioned second smart contract is a smart contract preset by the second decentralized application for being executed by the first decentralized application to trigger the second decentralized application to receive the control instruction sent by the first decentralized application. The specific setting method can be determined based on the actual application scenario and is not limited here.

[0065] Optionally, in some feasible implementations, in order to prevent the control instruction from being tampered with during the transmission process from the first decentralized application to the second decentralized application, and thus ensure that the second decentralized application performs the correct target operation function, the first decentralized application performs a hash calculation on the instruction information to obtain the first summary information of the instruction information. On the other hand, in order to achieve the purpose of preventing the control instruction from being tampered with, the second decentralized application can determine that the control instruction corresponding to the instruction information comes from the second decentralized application, and the first decentralized application can send a key acquisition request to the second decentralized application to obtain the private key of the target user (hereinafter referred to as the second private key for convenience of description). Thus, the first decentralized application can encrypt the above-mentioned first summary information according to the second private key of the target user to obtain the digital signature of the instruction information. Based on the above implementation, the first decentralized application can send the control instruction and the digital signature to the blockchain together, and after executing the above-mentioned second smart contract at the same time so that the blockchain receives the above-mentioned controllable instruction and the digital signature, the control instruction and the digital signature are sent to the second decentralized application, so that the second decentralized application can determine whether the above-mentioned control instruction has been tampered with according to the above-mentioned digital signature.

[0066] Optionally, in some feasible implementations, before generating a control instruction based on the instruction information and the second application identifier of the first decentralized application, the decentralized application may pre-determine whether the instruction information of the target user is in an executable state, that is, whether the target operation function corresponding to the above instruction information can be executed by the second decentralized application. Specifically, the first decentralized application can obtain the instruction state parameter of the instruction information, and send the instruction state parameter to the consensus node in the blockchain so that the consensus node determines whether the instruction information is in an executable state according to the above instruction state parameter. Among them, when each formula node determines that the above instruction state parameter is in an executable state, it can send a signature confirmation message to the first decentralized application. After receiving the signature confirmation message sent by each consensus node, the first decentralized application determines that the above instruction information is in an executable state when the data of the signature confirmation message is greater than the preset ratio of the number of all consensus nodes in the blockchain (such as half, two-thirds, etc., which can be determined according to the actual application scenario and is not limited here). , That is, the above target operation function can be executed by the second decentralized application. Alternatively, the first decentralized application may determine whether there is a signature confirmation message from a preset consensus node in the signature confirmation message it receives. When there is a signature confirmation message from a preset consensus node, the first decentralized application may determine that the above instruction information is in an executable state. The above instruction state parameter may be an instruction field corresponding to the target operation function. For example, for the access control application, 0001 represents the door closing function and 0010 represents the door opening function. Therefore, for each consensus node, when the above instruction state parameter is 0001, the consensus node may obtain the function parameter of the second decentralized application from the blockchain and determine whether there is a state parameter of 0001 in the function parameter. When there is, the consensus node may determine that the above instruction state parameter is in an executable state. Alternatively, the above instruction state parameter may also be the instruction format of the target operation function, and the preset instruction format of the second decentralized application is obtained from the blockchain. When the above instruction format is the preset instruction format of the second decentralized application, each consensus node may determine that the above instruction information is in an executable state. Based on the above implementation, when the above instruction information is in an executable state, the first decentralized application can further generate a control instruction according to the instruction information and the second application identifier of the first decentralized application. It should be noted that the specific implementation method of each consensus node determining whether the instruction information is in an executable state according to the instruction state parameter can be determined according to the actual application scenario and is not limited here.

[0067] In some feasible implementations, when the authorization data of the target user is not successfully obtained from the user authorization database of the second decentralized application, the first decentralized application can directly establish a communication connection with the second decentralized application, and send the control instruction to the second decentralized application through the communication connection, so that the second decentralized application can perform the target operation function according to the control instruction. Specifically, the first decentralized application can send a communication request to the second decentralized application, and after receiving the communication request, if the second decentralized application agrees to establish a communication connection with the first decentralized application, it can send a synchronization sequence number and a first confirmation character to the first decentralized application. Among them, the above-mentioned synchronization sequence number is used to indicate to the first decentralized application that the second decentralized application agrees to establish a communication connection with it, and the above-mentioned first confirmation character user indicates that the second decentralized application confirms the received communication request correctly. Further, after receiving the synchronization sequence number and the first confirmation character, the first decentralized application can send a second confirmation character to the second decentralized application to notify the second decentralized application that the first decentralized application confirms the synchronization sequence number and the second confirmation character sent by it, thereby establishing a communication connection with the second decentralized application. Based on the communication connection between the second decentralized application and the first decentralized application, the first decentralized application can send a control instruction to the second decentralized application through the communication connection to enable the second decentralized application to perform a target operation function.

[0068] See also Figure 3 , Figure 3 Schematic diagram of a scenario for establishing a communication connection provided by an embodiment of the present application. Figure 3 In , SYN represents the synchronization sequence number, ACK represents the confirmation character, and Seq represents the sequence number. When the first decentralized application sends a data packet with a synchronization sequence number of 1 and a randomly generated Seq of X (such as 1234567) to the second decentralized application. Among them, the second decentralized application can know that the first decentralized application requests to establish a communication connection from the synchronization sequence number of 1. Further, after receiving the request, the second decentralized application needs to confirm the establishment of a communication connection. The second decentralized application can send a data packet with a sequence number of Y (Y=X+1) and a confirmation character of 1 to the first decentralized application. Finally, after receiving the data packet sent by the second decentralized application, the first decentralized application can check whether the confirmation character sent by the second decentralized application is 1 and whether the sequence number is X+1. If correct, the first decentralized application sends a data packet with a confirmation character of 1 and a sequence number of Y (Y=X+1) to the second decentralized application, so that the first decentralized application establishes a communication connection with the second decentralized application.

[0069] S205: Receive a control instruction, and determine a second application identifier of the first decentralized application according to the control instruction.

[0070] In some feasible implementations, since the second decentralized application itself is an application with a specific type and specific functions, after receiving the control instruction sent by the blockchain, the second decentralized application can obtain the second application identifier that marks the control instruction, and determine the first decentralized application based on the second application identifier to determine that the above control instruction comes from the first decentralized application. At this time, the second decentralized application can determine whether to execute the control instruction from the first decentralized application, that is, when the second decentralized application has a control relationship with the first decentralized application, the second decentralized application can execute the control instruction from the first decentralized application. Among them, the control relationship between the second decentralized application and other decentralized applications can be stored in the blockchain by the second decentralized application, so that the second decentralized application can search the control relationship between the second decentralized application and the first decentralized application from the blockchain at any time. Among them, the above control relationship is used to illustrate that the first decentralized application has the authority to control the second decentralized application to perform the corresponding operation function.

[0071] S206. Send the first application identifier and the second application identifier of the second decentralized application to a consensus node in the blockchain, so that the consensus node determines whether the second decentralized application and the first decentralized application have a control relationship.

[0072] In some feasible implementations, the second decentralized application may send the first application identifier of the second decentralized application and the second application identifier of the first decentralized application to the consensus node in the blockchain, so that each consensus node determines whether the second decentralized application and the first decentralized application have a control relationship. Specifically, each consensus node can parse all smart contracts in the blockchain, and when there is a contract code of a certain smart contract that has an associated field associated with the first application identifier and the second application identifier, it can be determined that the second decentralized application and the first decentralized application have a control relationship. Alternatively, each consensus node can obtain the application data of the first decentralized application from the blockchain according to the second application identifier, or obtain the application data of the second decentralized application from the blockchain according to the first application identifier. When there is an instruction association record with the second decentralized application in the application data of the first decentralized application, or there is an instruction association record with the first decentralized application in the application data of the second decentralized application, each consensus node can determine that the second decentralized application and the first decentralized application have a control relationship. Alternatively, each consensus node may obtain a list of associated applications of the second decentralized application from the blockchain according to the first application identifier, or obtain a list of associated applications of the first decentralized application from the blockchain according to the second application identifier. When the list of associated applications of the second decentralized application includes the first decentralized application, or when the list of associated applications of the first decentralized application includes the second decentralized application, each consensus node may determine that the first decentralized application and the second decentralized application have a control relationship. After determining that the first decentralized application and the second decentralized application have a control relationship, each consensus node may send a signature confirmation message to the second decentralized application so that the second decentralized application confirms whether the first decentralized application and the second decentralized application have a control relationship according to the received signature confirmation message. The specific implementation method of the second decentralized application determining whether the first decentralized application and the second decentralized application have a control relationship according to the signature confirmation message can be referred to the implementation method shown in step S204, which will not be repeated here.

[0073] S207: When the second decentralized application has a control relationship with the first decentralized application, determine instruction information according to the control instruction, and execute a target operation function corresponding to the instruction information.

[0074] In some feasible implementations, when the second decentralized application and the first decentralized application have a control relationship, the second decentralized application may use a decryption method corresponding to a preset encryption method to decrypt the encrypted instruction information corresponding to the control instruction to obtain instruction information. The control instruction is obtained by the first decentralized application encrypting the instruction information according to the first private key of the first decentralized application, and marking the encrypted instruction information with the second application identifier of the first decentralized application. The first decentralized application may use the public key of the first decentralized application (hereinafter referred to as the second public key for convenience of description) to decrypt the encrypted instruction information using a preset decryption method to obtain the instruction information. The decryption algorithm corresponding to the preset decryption method corresponds to the encryption algorithm used by the first decentralized application, which can be determined according to the actual application scenario and is not limited here.

[0075] In some feasible implementations, when the control instruction received by the second decentralized application also carries a digital signature, the second decentralized application can digitally sign and verify whether the control instruction has been tampered with before receiving the control instruction. Specifically, the second decentralized application can execute a smart contract for obtaining a decryption key (hereinafter referred to as the third smart contract for convenience of description) so that the blockchain triggers the first decentralized application to obtain the public key of the target user (hereinafter referred to as the first public key for convenience of description) under the contract rules of the third smart contract, and sends the first public key to the second decentralized application through the blockchain again. Alternatively, when there is a communication connection between the second decentralized application and the first decentralized application, the second decentralized application can directly send a public key acquisition request to the first decentralized application so that the first decentralized application obtains the first public key of the target user. Furthermore, the first decentralized application performs a hash calculation on the instruction information to obtain the first summary information of the instruction information, and decrypts the digital signature according to the first public key to obtain the second summary information of the instruction information. On the other hand, the second decentralized application can compare the first summary information with the second summary information. When the first summary information and the second summary information are consistent, it means that the instruction information or the control instruction has not been tampered with before the second decentralized application receives the control instruction from the blockchain. At this time, the second decentralized application can execute the target operation function corresponding to the instruction information, such as the access control application executing door opening, the sweeping robot application executing sweeping, etc. The specific operation can be determined according to the actual instruction information and is not limited here. Figure 4 , Figure 4 Schematic diagram of the scene of verification instruction information provided by the embodiment of the present application. Figure 4In the example, it is assumed that the digital signature of the instruction information is 1111111, and after decrypting the digital signature 1111111 using the first public key of the target user, the second summary information 1000100 is obtained. When the second decentralized application performs a hash calculation on the instruction information and obtains the first summary information of the instruction information as 1000100, the first summary information and the second summary information are consistent. The second decentralized application can determine that the instruction information has not been tampered with and can execute the target operation function corresponding to the instruction information.

[0076] In the embodiment of the present application, the first decentralized application can determine whether the target user has the control authority of the second decentralized application through the blockchain, which can improve the application security of the second decentralized application and reduce the risk of the second decentralized application being arbitrarily controlled. Furthermore, the first decentralized application can send the control instruction to the second decentralized application through the blockchain, which can improve the transmission security of the control instruction, and can complete the control of the second decentralized application through the blockchain. On the other hand, the first decentralized application can encrypt the instruction information through the private key of the first decentralized application, which can further improve the output transmission security. At the same time, the second decentralized application can verify the validity of the control instruction through the digital signature obtained according to the private key of the target user, which is more stable.

[0077] See also Figure 5 , Figure 5 1 is a schematic diagram of the structure of an application control device provided in an embodiment of the present application. The device 1 provided in an embodiment of the present application includes:

[0078] A first acquisition module 11 is used to acquire instruction information of a target user, the instruction information carries a first application identifier, the first application identifier is used to mark a second decentralized application, and the instruction information is used to control the second decentralized application to perform a target operation function;

[0079] A generating module 12, configured to generate a control instruction according to the instruction information and the second application identifier of the first decentralized application;

[0080] A second acquisition module 13, configured to execute the first smart contract to acquire the authorization data of the target user from the user authorization database of the second decentralized application in the blockchain;

[0081] The first execution module 14 is used to obtain the second smart contract associated with the second decentralized application from the blockchain when the authorization data of the target user is obtained, and execute the second smart contract to send the control instruction to the second decentralized application through the blockchain, so that the second decentralized application performs the target operation function.

[0082] In some feasible implementations, the generation module 12 includes:

[0083] A first acquisition unit 121 is used to acquire the instruction status parameter of the instruction information, and send the instruction status parameter to the consensus node in the blockchain, so that the consensus node determines whether the instruction information is in an executable state according to the instruction status parameter;

[0084] The generating unit 122 is used to generate a control instruction according to the instruction information and the second application identifier of the decentralized application when the instruction information is in an executable state.

[0085] In some feasible implementations, the generation module 12 includes:

[0086] A first encryption unit 123, configured to encrypt the instruction information according to a first private key of the first decentralized application to obtain encrypted instruction information;

[0087] The marking unit 124 is used to mark the above-mentioned encrypted instruction information according to the second application identifier of the above-mentioned first decentralized application to obtain a control instruction.

[0088] In some feasible implementations, the first execution module 14 includes:

[0089] The first processing unit 141 is used to perform a hash calculation on the instruction information to obtain first summary information of the instruction information;

[0090] The second encryption unit 142 is used to send a key acquisition request to the target user to obtain the second private key of the target user, and encrypt the first summary information according to the second private key to obtain the digital signature of the instruction information;

[0091] The sending unit 143 is used to send the above-mentioned control instruction and the above-mentioned digital signature to the above-mentioned blockchain, and execute the above-mentioned second smart contract to enable the above-mentioned blockchain to send the above-mentioned control instruction and the above-mentioned digital signature to the above-mentioned second decentralized application, triggering the above-mentioned second decentralized application to receive the above-mentioned control instruction and the above-mentioned digital signature.

[0092] In some feasible implementations, the device 1 further includes:

[0093] The first sending module 15 is further configured to send a communication request to the second decentralized application when the authorization information of the target user is not obtained, so that the second decentralized application sends a synchronization sequence number and a first confirmation character;

[0094] The first receiving module 16 is further configured to receive the synchronization sequence number and the first confirmation character, and send a second confirmation character to the second decentralized application to establish a communication connection with the second decentralized application;

[0095] The second sending module 17 is further used to send the control instruction to the second decentralized application through the communication connection, so that the second decentralized application performs the target operation function.

[0096] In a specific implementation, the above-mentioned device 1 can execute the above-mentioned functions through its built-in functional modules. Figure 2 The implementation methods provided in steps S201 to S204 may be specifically referred to the implementation methods provided in the above steps, which will not be repeated here.

[0097] See also Figure 6 , Figure 6 2 is a schematic diagram of the structure of another application control device provided in an embodiment of the present application. The device 2 provided in an embodiment of the present application includes:

[0098] The second receiving module 21 is used to receive the control instruction sent by the blockchain, and determine the second application identifier of the first decentralized application according to the control instruction;

[0099] A third sending module 22, configured to send the first application identifier of the second decentralized application and the second application identifier to a consensus node in the blockchain, so that the consensus node determines whether the second decentralized application and the first decentralized application have a control relationship;

[0100] The second execution module 23 is used to determine instruction information according to the control instruction and execute the target operation function corresponding to the instruction information when the second decentralized application and the first decentralized application have the control relationship.

[0101] In some feasible implementations, the control instruction also carries a digital signature; the second execution module 23 includes:

[0102] An execution unit 231 is used to execute a third smart contract to trigger the first decentralized application to obtain the first public key of the target user through the blockchain, and enable the first decentralized application to send the first public key to the second decentralized application through the blockchain;

[0103] The second processing unit 232 is used to perform a hash calculation on the instruction information to obtain the first summary information of the instruction information, and decrypt the digital signature according to the first public key to obtain the second summary information of the instruction information;

[0104] The second acquisition unit 233 is used to obtain the second public key of the first decentralized application from the blockchain when the first summary information and the second summary information are consistent, and decrypt the encrypted instruction information corresponding to the control instruction according to the second public key to obtain the instruction information.

[0105] In a specific implementation, the device 2 can execute the above-mentioned functions through its built-in functional modules. Figure 2 The implementation methods provided in steps S204 to S207 may be specifically referred to the implementation methods provided in the above steps, which will not be repeated here.

[0106] In the embodiment of the present application, the first decentralized application can determine whether the target user has the control authority of the second decentralized application through the blockchain, which can improve the application security of the second decentralized application and reduce the risk of the second decentralized application being arbitrarily controlled. Furthermore, the first decentralized application can send the control instruction to the second decentralized application through the blockchain, which can improve the transmission security of the control instruction, and can complete the control of the second decentralized application through the blockchain. On the other hand, the first decentralized application can encrypt the instruction information through the private key of the first decentralized application, which can further improve the output transmission security. At the same time, the second decentralized application can verify the validity of the control instruction through the digital signature obtained according to the private key of the target user, which is more stable.

[0107] See also Figure 7 , Figure 7 Schematic diagram of the structure of a device provided in an embodiment of the present application. Figure 7 As shown, the device 1000 in this embodiment may include: a processor 1001, a network interface 1004 and a memory 1005. In addition, the above-mentioned device 1000 may also include: a user interface 1003, and at least one communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. Among them, the user interface 1003 may include a display screen (Display), a keyboard (Keyboard), and the user interface 1003 may optionally include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1004 may be a high-speed RAM memory, or it may be a non-volatile memory (non-volatile memory), such as at least one disk storage. The memory 1005 may optionally also be at least one storage device located away from the aforementioned processor 1001. As Figure 7 As shown, the memory 1005 as a computer-readable storage medium may include an operating system, a network communication module, a user interface module, and a device control application program.

[0108] exist Figure 7In the device 1000 shown, the network interface 1004 can provide a network communication function; the user interface 1003 is mainly used to provide an input interface for the user; and the processor 1001 can be used to call the device control application stored in the memory 1005 to achieve:

[0109] Obtaining instruction information of a target user, the instruction information carrying a first application identifier, the first application identifier being used to mark a second decentralized application, and the instruction information being used to control the second decentralized application to perform a target operation function;

[0110] Generate a control instruction according to the instruction information and the second application identifier of the first decentralized application;

[0111] Execute the first smart contract to obtain the authorization data of the target user from the user authorization database of the second decentralized application in the blockchain;

[0112] When the authorization data of the target user is obtained, a second smart contract associated with the second decentralized application is obtained from the blockchain, and the second smart contract is executed to send the control instruction to the second decentralized application through the blockchain, so that the second decentralized application performs the target operation function.

[0113] In some feasible implementations, the processor 1001 is configured to:

[0114] The instruction status parameters of the instruction information are obtained, and the instruction status parameters are sent to the consensus node in the blockchain, so that the consensus node determines whether the instruction information is in an executable state according to the instruction status parameters;

[0115] When the instruction information is in an executable state, the control instruction is generated according to the instruction information and the second application identifier of the first decentralized application.

[0116] In some feasible implementations, the processor 1001 is configured to:

[0117] The above-mentioned instruction information is encrypted according to the first private key of the above-mentioned first decentralized application to obtain encrypted instruction information;

[0118] The control instruction is obtained by marking the encrypted instruction information according to the second application identifier of the first decentralized application.

[0119] In some feasible implementations, the processor 1001 is configured to:

[0120] The above-mentioned instruction information is hashed to obtain the first summary information of the instruction information;

[0121] The step of sending a key acquisition request to the target user to acquire the second private key of the target user, and encrypting the first summary information according to the second private key to obtain the digital signature of the instruction information;

[0122] The control instruction and the digital signature are sent to the blockchain, and the second smart contract is executed to make the blockchain send the control instruction and the digital signature to the second decentralized application, triggering the second decentralized application to receive the control instruction and the digital signature.

[0123] In some feasible implementations, the processor 1001 is further configured to:

[0124] When the authorization information of the target user is not obtained, sending a communication request to the second decentralized application, so that the second decentralized application sends a synchronization sequence number and a first confirmation character;

[0125] The receiving of the synchronization sequence number and the first confirmation character, and sending a second confirmation character to the second decentralized application to establish a communication connection with the second decentralized application;

[0126] The control instruction is sent to the second decentralized application via the communication connection so that the second decentralized application executes the target operation function.

[0127] It should be understood that in some feasible implementations, the processor 1001 may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The memory may include a read-only memory and a random access memory, and provide instructions and data to the processor. A portion of the memory may also include a non-volatile random access memory. For example, the memory may also store information about the device type.

[0128] In a specific implementation, the device 1000 can execute the above-mentioned functions through its built-in functional modules. Figure 2The implementation methods provided in steps S201 to S204 may be specifically referred to the implementation methods provided in the above steps, which will not be repeated here.

[0129] See also Figure 8 , Figure 8 is a schematic diagram of the structure of another device provided in an embodiment of the present application. Figure 8 As shown, the device 1100 in this embodiment may include: a processor 1101, a network interface 1104 and a memory 1105. In addition, the above-mentioned device 1100 may also include: a user interface 1103, and at least one communication bus 1102. Among them, the communication bus 1102 is used to realize the connection and communication between these components. Among them, the user interface 1103 may include a display screen (Display), a keyboard (Keyboard), and the user interface 1103 may optionally include a standard wired interface and a wireless interface. The network interface 1104 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1104 may be a high-speed RAM memory, or it may be a non-volatile memory (non-volatile memory), such as at least one disk storage. The memory 1105 may optionally also be at least one storage device located away from the aforementioned processor 1101. As Figure 8 As shown, the memory 1105 as a computer-readable storage medium may include an operating system, a network communication module, a user interface module, and a device control application program.

[0130] exist Figure 8 In the device 1100 shown, the network interface 1104 can provide a network communication function; the user interface 1103 is mainly used to provide an input interface for the user; and the processor 1101 can be used to call the device control application stored in the memory 1105 to achieve:

[0131] Receiving a control instruction sent by the blockchain, and determining a second application identifier of the first decentralized application according to the control instruction;

[0132] Sending the first application identifier and the second application identifier of the second decentralized application to a consensus node in the blockchain, so that the consensus node determines whether the second decentralized application and the first decentralized application have a control relationship;

[0133] When the second decentralized application and the first decentralized application have the control relationship, instruction information is determined according to the control instruction, and a target operation function corresponding to the instruction information is executed.

[0134] In some feasible implementations, the control instruction further carries a digital signature; and the processor 1101 is used to:

[0135] executing a third smart contract to trigger the first decentralized application to obtain the first public key of the target user through the blockchain, and causing the first decentralized application to send the first public key to the second decentralized application through the blockchain;

[0136] Performing a hash calculation on the instruction information to obtain first summary information of the instruction information, and decrypting the digital signature according to the first public key to obtain second summary information of the instruction information;

[0137] When the first summary information and the second summary information are consistent, the second public key of the first decentralized application is obtained from the blockchain, and the encrypted instruction information corresponding to the control instruction is decrypted according to the second public key to obtain the instruction information.

[0138] It should be understood that in some feasible implementations, the processor 1101 may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The memory may include a read-only memory and a random access memory, and provide instructions and data to the processor. A portion of the memory may also include a non-volatile random access memory. For example, the memory may also store information about the device type.

[0139] In a specific implementation, the device 1100 can execute the above-mentioned functions through its built-in functional modules. Figure 2 The implementation methods provided in steps S205 to S207 may be specifically referred to the implementation methods provided in the above steps, which will not be repeated here.

[0140] In the embodiment of the present application, the first decentralized application can determine whether the target user has the control authority of the second decentralized application through the blockchain, which can improve the application security of the second decentralized application and reduce the risk of the second decentralized application being arbitrarily controlled. Furthermore, the first decentralized application can send the control instruction to the second decentralized application through the blockchain, which can improve the transmission security of the control instruction, and can complete the control of the second decentralized application through the blockchain. On the other hand, the first decentralized application can encrypt the instruction information through the private key of the first decentralized application, which can further improve the output transmission security. At the same time, the second decentralized application can verify the validity of the control instruction through the digital signature obtained according to the private key of the target user, which is more stable.

[0141] The present application also provides a computer-readable storage medium, which stores a computer program and is executed by a processor to implement Figure 2 For the methods provided in each step, please refer to the implementation methods provided in the above steps for details, which will not be repeated here.

[0142] The computer-readable storage medium may be an internal storage unit of the task processing device provided in any of the aforementioned embodiments, such as a hard disk or memory of an electronic device. The computer-readable storage medium may also be an external storage device of the electronic device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc., equipped on the electronic device. The computer-readable storage medium may also include a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc. Further, the computer-readable storage medium may also include both an internal storage unit of the electronic device and an external storage device. The computer-readable storage medium is used to store the computer program and other programs and data required by the electronic device. The computer-readable storage medium may also be used to temporarily store data that has been output or is to be output.

[0143] The terms "first", "second", etc. in the claims, specification and drawings of the present application are used to distinguish different objects, rather than to describe a specific order. 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 that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices. Mentioning "embodiment" in this article means that the specific features, structures or characteristics described in conjunction with the embodiment may be included in at least one embodiment of the present application. Displaying the phrase at various positions in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments. The term "and / or" used in the present application specification and the attached claims refers to any combination of one or more of the items listed in association and all possible combinations, and includes these combinations.

[0144] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Professional and technical personnel may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0145] The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.

Claims

1. An application control method, characterized in that: The method comprises: Acquire instruction information of a target user, where the instruction information carries a first application identifier, where the first application identifier is used to mark a second decentralized application, and the instruction information is used to control the second decentralized application to perform a target operation function; Obtaining instruction status parameters of the instruction information, and sending the instruction status parameters to multiple consensus nodes in the blockchain; each consensus node is used to send a signature confirmation message to the first decentralized application when determining that the instruction status parameters are in an executable state; When receiving a signature confirmation message sent by at least one consensus node among the multiple consensus nodes, counting the number of the received signature confirmation messages, and when the data of the signature confirmation message is greater than a preset ratio of the number of the multiple consensus nodes, determining that the instruction information is in an executable state; When the instruction information is in an executable state, generating a control instruction according to the instruction information and the second application identifier of the first decentralized application; Executing a first smart contract to obtain authorization data of the target user from a user authorization database of the second decentralized application in the blockchain; When the authorization data of the target user is obtained, a second smart contract associated with the second decentralized application is obtained from the blockchain, and the second smart contract is executed to send the control instruction to the second decentralized application through the blockchain, so that the second decentralized application performs the target operation function.

2. The method according to claim 1, characterized in that The generating of the control instruction according to the instruction information and the second application identifier of the first decentralized application includes: Encrypting the instruction information according to the first private key of the first decentralized application to obtain encrypted instruction information; The encrypted instruction information is marked according to the second application identifier of the first decentralized application to obtain a control instruction.

3. The method according to claim 1, characterized in that The executing the second smart contract to send the control instruction to the second decentralized application through the blockchain includes: Performing a hash calculation on the instruction information to obtain first summary information of the instruction information; Sending a key acquisition request to the target user to acquire a second private key of the target user, and encrypting the first summary information according to the second private key to obtain a digital signature of the instruction information; The control instruction and the digital signature are sent to the blockchain, and the second smart contract is executed to cause the blockchain to send the control instruction and the digital signature to the second decentralized application, triggering the second decentralized application to receive the control instruction and the digital signature.

4. The method according to claim 1, characterized in that: The method further comprises: When the authorization information of the target user is not obtained, sending a communication request to the second decentralized application, so that the second decentralized application sends a synchronization sequence number and a first confirmation character; receiving the synchronization sequence number and the first confirmation character, and sending a second confirmation character to the second decentralized application to establish a communication connection with the second decentralized application; The control instruction is sent to the second decentralized application through the communication connection, so that the second decentralized application performs the target operation function.

5. An application control method, characterized in that: The method comprises: The second decentralized application receives the control instruction sent by the blockchain, and determines the second application identifier of the first decentralized application according to the control instruction; the control instruction is generated according to the instruction information and the second application identifier when the instruction information is in an executable state; the first decentralized application is used to obtain the instruction state parameter of the instruction information, and send the instruction state parameter to multiple consensus nodes in the blockchain; each consensus node is used to send a signature confirmation message to the first decentralized application when determining that the instruction state parameter is in an executable state; the first decentralized application is also used to count the number of signature confirmation messages received when receiving the signature confirmation message sent by at least one consensus node among the multiple consensus nodes, and determine that the instruction information is in an executable state when the data of the signature confirmation message is greater than a preset ratio of the number of the multiple consensus nodes; The second decentralized application sends the first application identifier of the second decentralized application and the second application identifier to a consensus node in the blockchain, so that the consensus node determines whether the second decentralized application and the first decentralized application have a control relationship; When the second decentralized application and the first decentralized application have the control relationship, the second decentralized application determines the instruction information according to the control instruction and executes the target operation function corresponding to the instruction information.

6. The method according to claim 5, characterized in that The control instruction also carries a digital signature; and determining instruction information according to the control instruction includes: Executing a third smart contract to trigger the first decentralized application to obtain a first public key of a target user through the blockchain, and causing the first decentralized application to send the first public key to the second decentralized application through the blockchain; the target user refers to a user who initiates the instruction information in the first decentralized application; Performing a hash calculation on the instruction information to obtain first summary information of the instruction information, and decrypting the digital signature according to the first public key to obtain second summary information of the instruction information; When the first summary information and the second summary information are consistent, the second public key of the first decentralized application is obtained from the blockchain, and the encrypted instruction information corresponding to the control instruction is decrypted according to the second public key to obtain the instruction information.

7. An application control device, characterized in that: The device comprises: A first acquisition module, used to acquire instruction information of a target user, the instruction information carries a first application identifier, the first application identifier is used to mark a second decentralized application, and the instruction information is used to control the second decentralized application to perform a target operation function; A generation module, configured to obtain instruction status parameters of the instruction information, and send the instruction status parameters to multiple consensus nodes in the blockchain; each consensus node is configured to send a signature confirmation message to the first decentralized application when determining that the instruction status parameters are in an executable state; The generating module is further configured to, when receiving a signature confirmation message sent by at least one consensus node among the plurality of consensus nodes, count the number of signature confirmation messages received, and determine that the instruction information is in an executable state when the data of the signature confirmation message is greater than a preset ratio of the number of the plurality of consensus nodes; The generating module is further configured to generate a control instruction according to the instruction information and the second application identifier of the first decentralized application when the instruction information is in an executable state; A second acquisition module, configured to execute the first smart contract to acquire the authorization data of the target user from a user authorization database of the second decentralized application in the blockchain; The first execution module is used to obtain a second smart contract associated with the second decentralized application from the blockchain when the authorization data of the target user is obtained, and execute the second smart contract to send the control instruction to the second decentralized application through the blockchain, so that the second decentralized application performs the target operation function.

8. An application control device, characterized in that: The device is applied to a second decentralized application; the device includes: A second receiving module is used to receive a control instruction sent by the blockchain, and determine a second application identifier of the first decentralized application according to the control instruction; the control instruction is generated according to the instruction information and the second application identifier when the instruction information is in an executable state; the first decentralized application is used to obtain an instruction state parameter of the instruction information, and send the instruction state parameter to multiple consensus nodes in the blockchain; each consensus node is used to send a signature confirmation message to the first decentralized application when determining that the instruction state parameter is in an executable state; the first decentralized application is also used to count the number of signature confirmation messages received when receiving a signature confirmation message sent by at least one consensus node among the multiple consensus nodes, and determine that the instruction information is in an executable state when the data of the signature confirmation message is greater than a preset ratio of the number of the multiple consensus nodes; A third sending module, configured to send the first application identifier and the second application identifier of the second decentralized application to a consensus node in the blockchain, so that the consensus node determines whether the second decentralized application and the first decentralized application have a control relationship; The second execution module is used to determine instruction information according to the control instruction and execute the target operation function corresponding to the instruction information when the second decentralized application and the first decentralized application have the control relationship.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method and device controlling terminal

    CN103678993A

  • A method and apparatus for program execution

    CN109388923A