Method for updating configuration information of application based on blockchain and blockchain node

Automatically update application configuration information through smart contracts in the blockchain system, the problems of low application update efficiency and unreliable configuration information in the existing technology are solved, and rapid and accurate configuration information dissemination and application update are achieved.

CN116032756BActive Publication Date: 2024-12-17ANT BLOCKCHAIN TECHNOLOGY (SHANGHAI) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211698415.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-28
Publication Date
2024-12-17
Estimated Expiration
2042-12-28

AI Technical Summary

Technical Problem

The prior art is difficult to provide new configuration information to deployed applications quickly and accurately, resulting in inefficient application updates and unreliable configuration information sources.

Method used

Through the smart contract in the blockchain system, the manager can send transactions to store new configuration information in the contract state, and the second computing node obtains it from the blockchain system and provides it to the corresponding application to achieve automatic updates.

Benefits of technology

No need for excessive manual intervention, ensuring reliable configuration information sources and improving the rapid accuracy and efficiency of application updates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116032756B_ABST
    Figure CN116032756B_ABST
Patent Text Reader

Abstract

A method and a blockchain node for updating configuration information of an application based on blockchain. The method involves a blockchain system, a first computing node belonging to different participants, and a plurality of second computing nodes, wherein the participants to which the plurality of second computing nodes belong are all deployed with applications, and a smart contract is deployed in the blockchain system. The method comprises: a first computing node sends a first transaction to the blockchain system, the first transaction is used to call a smart contract, and the first transaction includes configuration information for supporting the operation of the application; the blockchain system stores the configuration information in the contract state of the smart contract according to the first transaction; the second computing node obtains the configuration information from the blockchain system, and provides the configuration information to the application, so that the application runs according to the configuration information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of this specification belong to the field of blockchain, and in particular to a method for updating configuration information of an application based on blockchain and a blockchain node. Background Art

[0002] Blockchain is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. In the blockchain system, data blocks are combined into a chain data structure in a sequential manner according to time sequence, and a distributed ledger that cannot be tampered with or forged is guaranteed by cryptography. Due to the characteristics of blockchain such as decentralization, information cannot be tampered with, and autonomy, blockchain has also received more and more attention and application. Summary of the invention

[0003] The object of the present invention is to provide a method and a blockchain node for updating configuration information of an application based on a blockchain.

[0004] In a first aspect, a method for updating configuration information of an application based on a blockchain is provided, the method involving a blockchain system, a first computing node belonging to different participants, and a plurality of second computing nodes, wherein the participants to which the plurality of second computing nodes belong are all deployed with applications, and the blockchain system is deployed with smart contracts. The method comprises: the first computing node sends a first transaction to the blockchain system, the first transaction is used to call the smart contract, and the first transaction includes configuration information for supporting the operation of the application; the blockchain system stores the configuration information in the contract state of the smart contract according to the first transaction; the second computing node obtains the configuration information from the blockchain system, and provides the configuration information to the application belonging to the same participant, so that the application runs according to the configuration information.

[0005] In a second aspect, a method for updating configuration information of an application based on a blockchain is provided, the method involving a blockchain system, a first computing node belonging to different participants, and a plurality of second computing nodes, wherein the participants to which the plurality of second computing nodes belong are all deployed with applications, the blockchain system is deployed with smart contracts, and the method is executed by the blockchain nodes. The method comprises: receiving a first transaction from the first computing node, the first transaction being used to call the smart contract, the first transaction including configuration information for supporting the operation of the application; storing the configuration information in the contract state of the smart contract according to the first transaction; providing the configuration information to the second computing node, so that the second computing node provides the configuration information to the application belonging to the same participant as the second computing node, so that the application runs according to the configuration information.

[0006] In a third aspect, a blockchain node in a blockchain system is provided, wherein the blockchain system is connected to a first computing node and several second computing nodes belonging to different participants, the participants to which the several second computing nodes belong are all deployed with applications, and the blockchain system is deployed with smart contracts. The blockchain node includes: a communication processing unit configured to receive a first transaction from the first computing node, the first transaction is used to call the smart contract, and the first transaction includes configuration information for supporting the operation of the application; a transaction execution unit configured to store the configuration information in the contract state of the smart contract according to the first transaction; the communication processing unit is also configured to provide the configuration information to the second computing node, so that the second computing node provides the configuration information to the application belonging to the same participant as the second computing node, so that the application runs according to the configuration information.

[0007] According to a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed in a computing device, the computing device is caused to execute the method described in the second aspect.

[0008] In the scheme of the embodiment of the present specification, when the application is deployed to several users and the manager of the application expects the application to run using new configuration information, the manager of the application can send a first transaction for calling a smart contract to the blockchain system through a first computing node, so that the blockchain system stores new configuration information for supporting the operation of the application in the contract state of the smart contract; for each user who has deployed the application, the user can obtain the configuration information from the blockchain system through a second computing node belonging to the user, and the second computing node provides the configuration information obtained to the application deployed on the user, so that the application deployed on the user runs using the new configuration information. In this way, there is no need for excessive manual intervention, and the blockchain system can ensure that the source of the new configuration information is reliable, which is conducive to faster and more accurate operation of the applications deployed on several users using the new configuration information, and is more efficient. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0010] Figure 1 A system framework diagram of the technical solution provided in the embodiments of this specification;

[0011] Figure 2 A flowchart of a method for updating configuration information of an application based on blockchain provided in an embodiment of this specification;

[0012] Figure 3 A schematic diagram of a process for an exemplary blockchain system to provide configuration information to a computing node;

[0013] Figure 4 This is a schematic diagram of a blockchain node in a blockchain system provided in an embodiment of this specification. DETAILED DESCRIPTION

[0014] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.

[0015] The blockchain system is a distributed network built by multiple nodes. Any two nodes in the blockchain can communicate with each other at the application layer through a peer-to-peer (P2P) network. Figure 1 As shown, the blockchain system may include nodes 1 to 4, and any two nodes among nodes 1 to 4 can realize communication connection at the application layer through the P2P network. The blockchain system uses a decentralized (or multi-centralized) distributed ledger constructed by a chain block structure, which is stored on each node (or most nodes) in the distributed blockchain network. Therefore, the blockchain system needs to solve the problem of consistency and correctness of the ledger data on multiple decentralized (or multi-centralized) nodes. The blockchain program is running on each node of the blockchain system. Under the design of certain fault tolerance requirements, the consensus mechanism is used to ensure that all loyal nodes have the same transactions, thereby ensuring that all loyal nodes have consistent execution results for the same transaction, and multiple transactions arranged in sequence are packaged into blocks and the world state is updated based on the execution results of the multiple transactions.

[0016] A transaction in a blockchain system refers to a task unit that is executed and recorded in the blockchain system. A transaction usually includes a send field (From), a receive field (To), and a data field (Data). Among them, in the case where the transaction is a transfer transaction, the From field indicates the account address that initiates the transaction (i.e., initiates a transfer task to another account), the To field indicates the account address that receives the transaction (i.e., receives the transfer), and the Data field includes the transfer amount. In the case where a transaction calls a smart contract in a blockchain system, the From field indicates the account address that initiates the transaction, the To field indicates the account address of the contract called by the exchange, and the Data field includes the function name in the calling contract and the incoming parameters of the function, etc., which are used to obtain the code of the function from the blockchain system and execute the code of the function when the transaction is executed.

[0017] Smart contracts in blockchain systems are contracts that can be triggered and executed by transactions. Smart contracts can be defined in the form of code. For example, calling a smart contract in a consortium chain is to initiate a transaction pointing to the smart contract address, so that each node in the consortium chain network can run the smart contract code in a distributed manner. It should be noted that in addition to being able to create smart contracts by users, smart contracts can also be set by the system in the genesis block. This type of contract is generally called a genesis contract. Generally, some blockchain system data structures, parameters, properties and methods can be set in the genesis contract. In addition, accounts with system administrator privileges can create system-level contracts or modify system-level contracts (referred to as system contracts).

[0018] In the scenario of deploying smart contracts, a transaction containing smart contract creation information (i.e., a transaction used to create a smart contract) can be sent to the blockchain system. The from field of the transaction is the account address of the transaction initiator, the data field of the transaction includes the code of the smart contract to be created (such as bytecode or machine code), and the to field of the transaction is empty to indicate that the transaction is used to deploy the contract. After the nodes reach an agreement through the consensus mechanism, the contract address of the contract is determined, the contract account corresponding to the contract address of the smart contract is added to the state database, the state storage corresponding to the contract account is allocated, and the contract code is saved in the state storage of the smart contract.

[0019] In the scenario of calling a contract, a transaction for calling a smart contract can be sent to the blockchain system. The from field of the transaction is the account address of the transaction initiator, the to field is the contract address of the smart contract being called, and the data field of the transaction includes the method and parameters for calling the smart contract. After consensus is reached on the transaction in the blockchain system, each node can execute the transaction separately, thereby executing the smart contract separately, and completing the update of the status database corresponding to the execution of the smart contract.

[0020] It should be noted that contract accounts usually also have some states, which are defined by the state variables in the smart contract and generate new values ​​when the smart contract is created and executed. Among them, the contract account can be used to store the contract state related to the smart contract. Once an event triggers the terms in the smart contract (meets the execution conditions), the code can be automatically executed. In the blockchain system, the contract state of the smart contract is saved in the storage trie, and the hash value of the root node of the storage trie is stored in storage_root, so that all contract states of the contract are locked to the contract account through hash. The storage tree is an MPT tree structure that stores the key-value mapping from the state address to the state value. From the root node to the leaf node of the storage tree, the address of a state variable is stored, and a leaf node stores the value of a state variable.

[0021] The blockchain system can correspond to multiple participants. For example, different blockchain nodes may be responsible for connecting with different computing nodes. The interconnected blockchain nodes and computing nodes belong to the same participant, while different blockchain nodes / computing nodes may belong to different participants. The aforementioned participants can be institutions, organizations or natural persons. Figure 1, the blockchain system can be, for example, a consortium chain corresponding to multiple participants / members, where node 1 and computing node 10 in the blockchain system belong to participant A, node 2 and computing node 20 in the blockchain system belong to participant B, node 3 and computing node 30 in the blockchain system belong to participant C, and node 4 and computing node 40 in the blockchain system belong to participant D. Where the blockchain system is not a consortium chain, a single blockchain node in the blockchain system may also be connected to multiple different computing nodes; a computing node can be, for example, a virtual machine, container, or physical machine with a corresponding computer program deployed / running.

[0022] In some technical scenarios, a single application may be deployed on one or more parties that are users, and another party may be the manager of the application. The manager may provide new configuration information to support the operation of the application based on certain needs, so that the application deployed on the user can run with the new configuration information. For example, please continue to refer to Figure 1 , both participant B and participant C have deployed application APP1 managed by participant A, and application APP1 runs on port number P2; participant D may expect application APP1 deployed on participant B and participant C to run on port number P1 based on certain needs, then port number P1 needs to be provided as new configuration information to application APP1 deployed on participant B and participant C, so that application APP1 deployed on participant B and participant C can run on port number P1.

[0023] Application APP1 can be an independent application or a component of a distributed application (DAPP) based on blockchain. When application APP1 is a component of a DAPP based on blockchain, application APP1 is usually used to manage the UI of DAPP. The aforementioned UI is an interactive page that can be directly presented to users through terminals such as personal computers and mobile phones. The UI of DAPP can be implemented through technologies such as JAVA, REACT, and VUE. Users can access application APP1 belonging to DAPP through their terminals, obtain the UI returned by application APP1, and perform corresponding interactive operations based on the UI, so that the terminal held by the user can finally send a transaction to the blockchain system for calling the smart contract belonging to DAPP, thereby completing the corresponding transaction.

[0024] In the related art, since it is difficult to ensure that the source of new configuration information is reliable, it is usually necessary to manually provide the new configuration information to the users of the deployed applications so that the applications deployed on the users can run using the new configuration information. This technical solution may fail to quickly and accurately complete the process of enabling the applications deployed on each user to run using the new configuration information due to too much manual intervention and a large number of users of the deployed applications.

[0025] In the embodiments of this specification, a method and blockchain node for updating the configuration information of an application based on blockchain are provided. When an application is deployed to several users and the manager of the application expects the application to run using new configuration information, the manager of the application can send a first transaction for calling a smart contract to the blockchain system through a first computing node, so that the blockchain system stores new configuration information for supporting the operation of the application in the contract state of the smart contract; for each user who has deployed the application, the user can obtain the configuration information from the blockchain system through a second computing node belonging to the user, and the second computing node provides the configuration information obtained to the application deployed on the user, so that the application deployed on the user runs using the new configuration information. In this way, there is no need for excessive manual intervention, and the blockchain system can ensure that the source of the new configuration information is reliable, which is conducive to faster and more accurate operation of applications deployed on several users using new configuration information, and is more efficient.

[0026] Combine the following Figure 1 The system framework shown exemplarily describes the technical solutions provided in the embodiments of this specification.

[0027] Figure 2 This is a flowchart of a method for updating configuration information of an application based on blockchain provided in an embodiment of this specification.

[0028] The method mainly describes the process of running the application APP1 deployed on participant B using the new configuration information provided by participant A; it can be understood that for the application APP1 deployed on other participants, such as participant C, the same or similar process can be used to realize the operation using the new configuration information provided by participant A. Figure 2 As shown, the method may include but is not limited to part or all of the following steps S21 to S25.

[0029] In step S21, the computing node 10 sends a transaction Tx1 for calling the smart contract C1 to the blockchain system. The transaction Tx1 includes at least configuration information M1 for supporting the operation of the application APP1.

[0030] When Party A expects the application APP1 to run using the new configuration information M1, the staff of Party A can, for example, edit or upload the configuration information M1 used to support the operation of the application APP1 through the computing node 10. The configuration information M1 may include one or more items of information, for example, the configuration information M1 may include: the port number P1 allowed to be used by the application APP1 and the time interval t1 for the application APP1 to poll the relevant computing nodes for configuration information. After obtaining the configuration information M1, the computing node 10 may also verify the legitimacy of the configuration information M1 based on predefined verification rules, for example, verifying whether the length and data format of the information such as the port number P1 and the time interval t1 in the configuration information M1 meet the predetermined conditions. The computing node 10 may send the transaction Tx1 to the blockchain system only if the configuration information M1 passes the legitimacy verification.

[0031] The staff of Party A can also edit or upload the identification information of the parties that are allowed to use the configuration information M1 through the computing node 10. For example, if Party A allows Party B and Party C to use the configuration information M1 and prohibits the other parties from using the configuration information M1, the staff of Party A can also edit or upload the identification information of Party B and Party C through the computing node 10. The identification information of the party can usually be the account of the party registered in the blockchain system, or it can be other forms of identification information; for example, the identification information of Party B and Party C can be the account acount B and the account acount C registered by Party B and Party C in the blockchain system respectively.

[0032] Correspondingly, in addition to the configuration information M1 obtained by the computing node 10, the transaction Tx1 may also include the identification information of the participants who are allowed to use the configuration information M1. Exemplarily, the from field of the transaction Tx1 includes the account acount A registered by the participant A in the blockchain system; the data field of the transaction Tx1 includes the configuration information M1 and the identification of the function F1 in the smart contract C1 requested to be called, and may also include the accounts acount B and acount C registered in the blockchain system by the participants B and C who are allowed to use the configuration information M1; the to field of the transaction Tx1 includes, for example, the contract address of the smart contract C1.

[0033] In step S23, the blockchain system stores the configuration information M1 in the contract state of the smart contract C1 according to the transaction Tx1.

[0034] All or part of the blockchain nodes in the blockchain system can respectively execute the smart contract according to the transaction Tx1, and complete the storage of the configuration information M1 in the contract state of the smart contract C1 stored locally. For example, nodes 1 to 4 in the blockchain system can all execute the function F1 included in the smart contract C1 according to the identifier of the function F1 included in the transaction Tx1, so as to achieve: storing the configuration information M1 in the contract state of the smart contract C1 stored locally in each node such as node 1 to node 4.

[0035] The configuration information M1 can be stored in plain text in the contract state of the smart contract C1. Alternatively, the configuration information M1 can also be stored in the contract state of the smart contract C1 in the form of data ciphertext. For example, when node 2 executes the function F1 included in the smart contract C1 according to the identifier of the function F1 included in the transaction Tx1, it can specifically encrypt the configuration information M1 to obtain the ciphertext data E1, and store the ciphertext data E1 in the contract state of the smart contract C1 stored locally in node 2.

[0036] When the transaction Tx1 includes the identification information of the party that is allowed to use the configuration information M1, the configuration information M1 or the ciphertext data E1 can be specifically stored in the contract state of the smart contract C1 in association with the identification information of the party that is allowed to use the configuration information M1. For example, when the transaction Tx1 includes the accounts acount B and acount C registered in the blockchain system by the parties B and C that are allowed to use the configuration information M1, the node 2 can specifically store the aforementioned configuration information M1 or the ciphertext data E1 in association with the accounts acount B and acount C in the contract state of the smart contract C1 according to the identification of the function F1 included in the transaction Tx1 in the process of executing the function F1 included in the smart contract C1.

[0037] The contract state of the smart contract C1 may also include the storage time T of the configuration information M1 or the ciphertext data E1, which may be, for example, the time when the function F1 in the smart contract C1 obtains the configuration information M1 or the ciphertext data E1. The configuration information M1 / ciphertext data E may be associated with its storage time T and stored in the contract state of the smart contract C1.

[0038] In step S25, the computing node 20 obtains the configuration information M1 from the blockchain system.

[0039] The computing node 20 can send a transaction Tx2 to the blockchain system for calling the function F2 in the smart contract C1, requesting to query the blockchain system for new configuration information for supporting the operation of APP1; correspondingly, the blockchain system, such as node 2 in the blockchain system, can execute the function F2 included in the smart contract C1 according to the transaction Tx2, so as to return the configuration information M1 provided by the computing node 10 and used to support the operation of the application APP1 to the computing node 20.

[0040] The computing node 20 may periodically send a transaction Tx2 to the blockchain system at a predetermined time interval t2, and the transaction Tx2 may include the identification information of the participant B to which the computing node 20 belongs. Exemplarily, the from field of the transaction Tx2 includes the account acount B registered by the participant B in the blockchain system; the data field of the transaction Tx2 includes the identification of the function F2 in the smart contract C1 requested to be called, wherein in the case where the identification information of the participant B is not the account acountB registered by the participant B in the blockchain system, the data field may also include the identification information of the participant B; the to field of the transaction Tx2 includes, for example, the contract address of the smart contract C1.

[0041] For the configuration information M1 supporting the operation of the application APP1 or the ciphertext data E1 corresponding to the configuration information M1, it may be associated with the storage time T and / or the identification information of the participant who is allowed to use the configuration information M1 and stored in the contract state of the smart contract C1. On this basis, see Figure 3 As shown, a node in the blockchain system, such as node 2, can implement part or all of the following steps S251 to S257 in the process of executing function F2 included in smart contract C1 according to transaction Tx2.

[0042] In step S251, query whether the contract status of the smart contract C1 includes configuration information or ciphertext data whose storage time is within a predetermined time interval t2 before the current time.

[0043] Because the computing node 20 can periodically initiate the transaction Tx2 at the time interval t2, a node in the blockchain system, such as node 2, may find the storage time T within the predetermined time interval t2 before the current time when executing the function F2 included in the smart contract C1 based on a transaction Tx2, and then determine the configuration information M1 or ciphertext data E1 stored in association with the storage time T. On this basis, the following step S253 can be continued based on the determined configuration information M1 or ciphertext data E1.

[0044] In step S253, it is determined whether the identification information stored in association with the configuration information M1 or the ciphertext data E1 includes the identification information of the participant B to which the computing node 20 that initiated the transaction Tx2 belongs.

[0045] Referring to the above, the identification information of the participant can be the account registered by the participant in the blockchain system. Taking the case where the configuration information M1 or the ciphertext data E1 is stored in association with the account acount B and the account acount C in the contract state of the smart contract C1, the transaction Tx2 initiated by the computing node 20 includes the account acount B registered by the participant B in the blockchain system. At this time, it can be determined that the identification information associated with the configuration information M1 or the ciphertext data E1 includes the identification information of the participant B to which the computing node 20 that initiated the transaction Tx2 belongs. On the contrary, if participant D, who is not allowed to use the configuration information M1, initiates transaction Tx2 for calling the smart contract C1, then the transaction Tx2 may include the identification information of participant D but not the identification information of participant B or participant C who are allowed to use the configuration information M1. At this time, for transaction Tx2 initiated by participant D, the blockchain system can determine that the identification information associated with the configuration information M1 or the ciphertext data E1 does not include the identification information of participant D to which the computing node 40 that initiated transaction Tx2 belongs during the process of executing the function F2 included in the smart contract according to the transaction Tx2.

[0046] When the identification information associated with the configuration information M1 or the ciphertext data E1 includes the identification information of the participant B to which the computing node 20 that initiated the transaction Tx2 belongs: if the configuration information M1 is directly stored in plain text in the contract state, the following step S255 can be continued to be executed; if the ciphertext data E1 is stored in the contract state, the following steps S255 and S257 can be executed in sequence.

[0047] In step S255, the ciphertext data E1 is decrypted to obtain the configuration information M1.

[0048] In step S257 , the configuration information M1 is sent to the computing node 20 .

[0049] After the computing node 20 obtains the configuration information M1, it can also verify the configuration information M1 based on predefined verification rules, such as verifying whether the length and data format of information such as the port number P1 and time interval t1 in the configuration information M1 meet predetermined conditions, and verifying whether the configuration information M1 is the same as the configuration information obtained by the computing node 20 from the blockchain system last time; when the configuration information M1 is the same as the configuration information obtained by the computing node 20 from the blockchain system last time, the verification fails.

[0050] When the configuration information M1 passes the verification, the computing node 20 may continue to execute step S27 to provide the configuration information M1 to the application APP1 deployed in the participant B to which the computing node 20 belongs.

[0051] APP1 deployed by participant B may run according to the configuration information M2 obtained by computing node 20 from the blockchain system last time, and the configuration information M2 includes, for example, port number P2 and the aforementioned predetermined time interval t2. During the operation of application P1 using configuration information M2, it can communicate with computing node 20 or other computing nodes through port number P2, and can periodically send configuration information polling requests to computing node 20 according to the aforementioned predetermined time interval t2; accordingly, computing node 20 can provide the configuration information M1 newly obtained from the blockchain system to application APP1 deployed on participant B.

[0052] Correspondingly, in step S29, the application APP1 deployed on participant B runs using the configuration information M1.

[0053] The application APP1 deployed on the participant B can, for example, change the configuration information M2 originally used by it to the configuration information M1 in the memory. The application APP1 can directly use the new configuration information M2 without restarting, and perform hot updates on the configuration information used by the application APP1, thereby improving the availability of the application APP1. It should be noted that, when the configuration information M1 includes a predetermined time interval t1, during the operation of the application APP1 using the configuration information M1, the computing node 20 will periodically poll the new configuration information obtained from the blockchain system at a predetermined time interval t1, and correspondingly, the computing node 20 can send the aforementioned transaction Tx2 to the blockchain system at the predetermined time interval t1 in the subsequent process.

[0054] Based on the same concept as the above method embodiment, the embodiment of this specification provides a blockchain node in a blockchain system, wherein the blockchain system is connected to a first computing node and a plurality of second computing nodes belonging to different participants, wherein the participants to which the plurality of second computing nodes belong are all deployed with applications, and the blockchain system is deployed with smart contracts. Figure 4As shown, the blockchain node includes: a communication processing unit 41, configured to receive a first transaction from the first computing node, the first transaction is used to call the smart contract, and the first transaction includes configuration information for supporting the operation of the application; a transaction execution unit 43, configured to store the configuration information in the contract state of the smart contract according to the first transaction; the communication processing unit 41 is also configured to provide the configuration information to the second computing node, so that the second computing node provides the configuration information to the application belonging to the same participant as the second computing node, so that the application runs according to the configuration information.

[0055] In a possible implementation, the transaction execution unit 43 is specifically configured to execute the first function in the smart contract according to the first transaction, so as to achieve: encrypting the configuration information to obtain ciphertext data, and storing the ciphertext data in the contract state of the smart contract.

[0056] In a possible implementation, the communication processing unit 41 is further configured to receive a second transaction from the second computing node, where the second transaction is used to call the smart contract; the transaction execution unit 43 is further configured to execute a second function in the smart contract according to the second transaction to achieve: decrypting the ciphertext data to obtain the configuration information; the communication processing unit 41 is further configured to return the configuration information to the second computing node.

[0057] In a possible implementation, the first transaction also includes first identification information of the party to which each of the plurality of second computing nodes belongs, and the first identification information of the party to which each of the plurality of second computing nodes belongs is associated with the ciphertext data and stored in the contract state of the smart contract; the second transaction also includes second identification information of the party to which the second computing node that initiates the second transaction belongs; wherein, when the transaction execution unit 43 executes the second function in the smart contract according to the second transaction, it further implements: determining whether each first identification information associated with the ciphertext data includes the second identification information.

[0058] In a possible implementation, the contract state of the smart contract also includes the storage time of the ciphertext data; the second transaction is periodically initiated by the second transaction at a predetermined time interval; wherein, when the transaction execution unit 43 executes the second function in the smart contract according to the second transaction, it also implements: determining whether the contract state of the smart contract includes ciphertext data whose storage time is within a predetermined time interval before the current time.

[0059] In a possible implementation, the blockchain system is a consortium chain, and the parties to which the first computing node and the plurality of second computing nodes belong are all members of the consortium chain.

[0060] A computer-readable storage medium is also provided in an embodiment of the present specification, on which a computer program is stored. When the computer program is executed in a computer, the computer is caused to execute each method step performed by the blockchain system, computing node 10 or computing node 20 in the aforementioned method embodiment.

[0061] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages ​​and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.

[0062] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.

[0063] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a server system. Of course, the present application does not exclude that with the development of computer technology in the future, the computer that implements the functions of the above embodiments may be, for example, a personal computer, a laptop computer, a vehicle-mounted human-computer interaction device, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0064] Although one or more embodiments of the present specification provide method operation steps as described in the embodiments or flow charts, more or less operation steps may be included based on conventional or non-creative means. The order of steps listed in the embodiments is only one way of executing the order of many steps, and does not represent the only execution order. When the device or terminal product in practice is executed, it can be executed in sequence or in parallel according to the method shown in the embodiments or the drawings (for example, a parallel processor or a multi-threaded processing environment, or even a distributed data processing environment). The term "include", "include" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, product or equipment including a series of elements includes not only those elements, but also includes other elements that are not explicitly listed, or also includes elements inherent to such a process, method, product or equipment. In the absence of more restrictions, it is not excluded that there are other identical or equivalent elements in the process, method, product or equipment including the elements. For example, if the words first, second, etc. are used to represent the name, they do not represent any specific order.

[0065] For the convenience of description, the above devices are described in various modules according to their functions. Of course, when implementing one or more of the present specification, the functions of each module can be implemented in the same or more software and / or hardware, or the module implementing the same function can be implemented by a combination of multiple sub-modules or sub-units, etc. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0066] The present invention is described with reference to flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0067] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0068] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0069] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0070] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0071] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage, graphene storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0072] It should be understood by those skilled in the art that one or more embodiments of the present specification may be provided as a method, system or computer program product. Therefore, one or more embodiments of the present specification may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, one or more embodiments of the present specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0073] One or more embodiments of the present specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. One or more embodiments of the present specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0074] Each embodiment in this specification is described in a progressive manner, and the same and similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. In the description of this specification, the description of the reference terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of this specification. In this specification, the schematic representation of the above terms does not necessarily target the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, in the absence of mutual contradiction, a person skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples.

[0075] The above description is only an example of one or more embodiments of the present specification and is not intended to limit one or more embodiments of the present specification. For those skilled in the art, one or more embodiments of the present specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification shall be included in the scope of the claims.

Claims

1. A method for updating configuration information of an application based on a blockchain, the method involving a blockchain system, a first computing node and a plurality of second computing nodes belonging to different participants, wherein the participants to which the plurality of second computing nodes belong are all equipped with applications, and a smart contract is deployed in the blockchain system. include: The first computing node sends a first transaction to the blockchain system, where the first transaction is used to call the smart contract, and the first transaction includes configuration information for supporting the running of the application; The blockchain system stores the configuration information in the contract state of the smart contract according to the first transaction; The second computing node sends a second transaction to the blockchain system, where the second transaction is used to call a second function in the smart contract; The blockchain system executes the second function according to the second transaction to provide the configuration information to the second computing node; The second computing node provides the configuration information to the application belonging to the same party as the second computing node, so that the application runs according to the configuration information.

2. According to the method of claim 1, the blockchain system stores the configuration information in the contract state of the smart contract according to the first transaction, specifically: include: The blockchain system executes the first function in the smart contract according to the first transaction to achieve: encrypting the configuration information to obtain ciphertext data, and storing the ciphertext data in the contract state of the smart contract.

3. The method according to claim 2, in, The second computing node obtains the configuration information from the blockchain system, specifically including: The second computing node sends a second transaction to the blockchain system, where the second transaction is used to call a second function in the smart contract; The blockchain system executes the second function in the smart contract according to the second transaction to achieve: decrypting the ciphertext data to obtain the configuration information, and returning the configuration information to the second computing node.

4. According to the method of claim 3, the first transaction further includes the first identification information of the participant to which the plurality of second computing nodes respectively belong, and the first identification information of the participant to which the plurality of second computing nodes respectively belong is associated with the ciphertext data and stored in the contract state of the smart contract; the second transaction further includes the second identification information of the participant to which the second computing node initiating the second transaction belongs; The blockchain system executes the second function in the smart contract according to the second transaction, and further implements: determining whether each first identification information associated with the ciphertext data includes the second identification information.

5. According to the method of claim 3, the contract status of the smart contract also includes the storage time of the ciphertext data; the second transaction is periodically initiated by the second transaction at a predetermined time interval; The blockchain system executes the second function in the smart contract according to the second transaction, and further implements: determining whether the contract state of the smart contract includes ciphertext data whose storage time is within a predetermined time interval before the current time.

6. According to the method described in any one of claims 1 to 5, the blockchain system is a consortium chain, and the participants to which the first computing node and the plurality of second computing nodes belong are all members of the consortium chain.

7. A method for updating configuration information of an application based on a blockchain, the method involving a blockchain system, a first computing node and a plurality of second computing nodes belonging to different participants, the participants to which the plurality of second computing nodes belong are all deployed with applications, the blockchain system is deployed with smart contracts, the method is executed by the blockchain nodes in the blockchain system, the method include: Receiving a first transaction from the first computing node, where the first transaction is used to call the smart contract, and the first transaction includes configuration information for supporting the running of the application; According to the first transaction, storing the configuration information in a contract state of the smart contract; receiving a second transaction from the second computing node, where the second transaction is used to call a second function in the smart contract; The second function is executed according to the second transaction to provide the configuration information to the second computing node, so that the second computing node provides the configuration information to the application belonging to the same participant as the second computing node, so that the application runs according to the configuration information.

8. The method according to claim 7, wherein according to the first transaction, the configuration information is stored in the contract state of the smart contract, specifically: include: Execute a first function in the smart contract according to the first transaction to achieve: encrypt the configuration information to obtain ciphertext data, and store the ciphertext data in the contract state of the smart contract.

9. The method according to claim 8, wherein providing the configuration information to the second computing node comprises: include: receiving a second transaction from the second computing node, wherein the second transaction is used to call the smart contract; Execute a second function in the smart contract according to the second transaction to achieve: decrypt the ciphertext data to obtain the configuration information, and return the configuration information to the second computing node.

10. According to the method of claim 9, the first transaction further includes first identification information of the participants to which the plurality of second computing nodes respectively belong, and the first identification information of the participants to which the plurality of second computing nodes respectively belong is associated with the ciphertext data and stored in the contract state of the smart contract; the second transaction further includes second identification information of the participant to which the second computing node initiating the second transaction belongs; When the blockchain node executes the second function in the smart contract according to the second transaction, it also implements: determining whether the second identification information is included in each first identification information associated with the ciphertext data.

11. According to the method of claim 9, the contract status of the smart contract also includes the storage time of the ciphertext data; the second transaction is periodically initiated by the second transaction at a predetermined time interval; When the blockchain node executes the second function in the smart contract according to the second transaction, it also implements: determining whether the contract state of the smart contract includes ciphertext data whose storage time is within a predetermined time interval before the current time.

12. According to the method described in any one of claims 7 to 11, the blockchain system is a consortium chain, and the participants to which the first computing node and the plurality of second computing nodes belong are all members of the consortium chain.

13. A blockchain node in a blockchain system, wherein the blockchain system is connected to a first computing node and a plurality of second computing nodes belonging to different participants, wherein the participants to which the plurality of second computing nodes belong are all equipped with applications, wherein the blockchain system is equipped with smart contracts, and wherein the blockchain node include: a communication processing unit, configured to receive a first transaction from the first computing node, the first transaction being used to call the smart contract, the first transaction including configuration information for supporting the running of the application; a transaction execution unit, configured to store the configuration information in the contract state of the smart contract according to the first transaction; The communication processing unit is further configured to receive a second transaction from the second computing node, where the second transaction is used to call a second function in the smart contract; The transaction execution unit is further configured to execute the second function according to the second transaction, and to provide the configuration information to the second computing node through the communication processing unit, so that the second computing node provides the configuration information to the application belonging to the same participant as the second computing node, so that the application runs according to the configuration information.

14. According to the blockchain node according to claim 13, the transaction execution unit is specifically configured to execute the first function in the smart contract according to the first transaction, so as to achieve: encrypting the configuration information to obtain ciphertext data, and storing the ciphertext data in the contract state of the smart contract.

15. The blockchain node according to claim 14, wherein the communication processing unit is further configured to receive a second transaction from the second computing node, wherein the second transaction is used to call the smart contract; The transaction execution unit is further configured to execute a second function in the smart contract according to the second transaction to achieve: decrypting the ciphertext data to obtain the configuration information; The communication processing unit is further configured to return the configuration information to the second computing node.

16. According to the blockchain node of claim 15, the first transaction also includes the first identification information of the participants to which the plurality of second computing nodes respectively belong, and the first identification information of the participants to which the plurality of second computing nodes respectively belong is associated with the ciphertext data and stored in the contract state of the smart contract; the second transaction also includes the second identification information of the participant to which the second computing node initiating the second transaction belongs; in, When the transaction execution unit executes the second function in the smart contract according to the second transaction, it also implements: determining whether each first identification information associated with the ciphertext data includes the second identification information.

17. The blockchain node according to claim 15, wherein the contract status of the smart contract also includes the storage time of the ciphertext data; the second transaction is periodically initiated by the second transaction at a predetermined time interval; in, When the transaction execution unit executes the second function in the smart contract according to the second transaction, it also implements: determining whether the contract state of the smart contract includes ciphertext data whose storage time is within a predetermined time interval before the current time.

18. According to the blockchain node described in any one of claims 13-17, the blockchain system is a consortium chain, and the participants to which the first computing node and the plurality of second computing nodes belong are all members of the consortium chain.

19. A computer-readable storage medium having a computer program stored thereon, which, when executed in a computing device, causes the computing device to execute the method according to any one of claims 7 to 12.

Citation Information

Patent Citations

  • Configuration file management method and device for application program

    CN110362357A

  • Security detection method and device based on blockchain system, and storage medium

    CN112989331A