Blockchain-based information publishing method, device, and computer equipment

By storing encrypted information on the blockchain and decrypting and publishing it when the conditions are met, the problem of confidential information being tampered with or replaced in the server is solved, and the secure and reliable release of information is achieved.

CN112487100BActive Publication Date: 2025-09-02ANT BLOCKCHAIN TECHNOLOGY (SHANGHAI) CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202011474924.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-04-02
Publication Date
2025-09-02
Estimated Expiration
2040-04-02

AI Technical Summary

Technical Problem

In the prior art, when confidential information is stored in a server in advance, there is a risk of tampering or replacing, resulting in insufficient reliability and it is impossible to ensure that the information will not be leaked before the release conditions are met.

Method used

Taking advantage of the open and transparent nature of the blockchain network and the difficult data to tamper with, the encrypted information to be published is stored on the blockchain through smart contracts, and the decryption key is broadcast by the information publishing node when the release conditions are met to realize the conditional release of information.

Benefits of technology

Ensure that information cannot be read directly before the release conditions are met, avoiding the possibility of information being tampered with or replaced, and improving the reliability of information release.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112487100B_ABST
    Figure CN112487100B_ABST
Patent Text Reader

Abstract

A blockchain-based information publishing method, apparatus, and computer device, the method being applied to nodes in a blockchain network; wherein the blockchain deploys a smart contract for publishing information; the smart contract stores information to be published that is encrypted by the information publishing node in the blockchain network based on an encryption key held by the information publishing node; the method comprising: receiving a target transaction for invoking the smart contract, which is broadcasted to the blockchain network by the information publishing node in the blockchain network when the information to be published meets a publishing condition; wherein the target transaction includes a decryption key corresponding to the encryption key; in response to the target transaction, invoking the decryption logic in the smart contract to decrypt the information to be published stored in the smart contract based on the decryption key; and invoking the publishing logic in the smart contract to publish the decrypted information to be published.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] One or more embodiments of this specification relate to the field of blockchain technology, and in particular, to a blockchain-based information publishing method, apparatus, and computer device. Background Art

[0002] Blockchain technology, also known as distributed ledger technology, is an emerging technology that enables multiple computing devices to jointly maintain a complete distributed database. Due to its decentralized, transparent nature, the ability of each computing device to participate in database records, and the rapid synchronization of data between computing devices, blockchain technology has been widely applied in numerous fields. Summary of the Invention

[0003] This specification discloses a blockchain-based information publishing method, device, and computer equipment.

[0004] According to a first aspect of an embodiment of this specification, a blockchain-based information publishing method is disclosed, which is applied to a node in a blockchain network; wherein the blockchain deploys a smart contract for publishing information; the smart contract stores information to be published that is encrypted by the information publishing node in the blockchain network based on an encryption key held by the information publishing node; the method includes:

[0005] receiving, when the information to be published meets the publishing conditions, a target transaction for invoking the smart contract broadcast by an information publishing node in the blockchain network to the blockchain network; wherein the target transaction includes a decryption key corresponding to the encryption key;

[0006] In response to the target transaction, calling the decryption logic in the smart contract to decrypt the information to be published stored in the smart contract based on the decryption key; and

[0007] After the decryption of the information to be published is completed, the publishing logic in the smart contract is further called to publish the decrypted information to be published.

[0008] According to a second aspect of the embodiments of this specification, a blockchain-based information publishing method is disclosed, which is applied to nodes in a blockchain network; the blockchain deploys a smart contract for publishing information; the smart contract stores information to be published, which is encrypted by the information publishing node in the blockchain network based on an encryption key held by the information publishing node; wherein the decryption key corresponding to the encryption key is sharded by the information publishing node based on a threshold algorithm, converted into a plurality of key shards, and respectively sent to a plurality of nodes in the blockchain network; the method comprises:

[0009] Determining whether the information to be published meets the publishing conditions;

[0010] If the information to be published meets the publishing conditions, broadcast the key fragment received from the information publishing node to the blockchain network, and collect the key fragments broadcasted by other nodes; and restore the decryption key based on the collected key fragments;

[0011] After restoring the decryption key, constructing a target transaction for invoking the smart contract; wherein the target transaction includes the restored decryption key;

[0012] The target transaction is broadcasted to the blockchain network, so that the nodes in the blockchain network respond to the target transaction, call the decryption logic in the smart contract, decrypt the information to be published stored in the smart contract based on the decryption key, and after the decryption is completed, further call the publishing logic in the smart contract to publish the decrypted information to be published.

[0013] According to a third aspect of the embodiments of this specification, a blockchain-based information publishing device is disclosed, which is applied to a node in a blockchain network; wherein the blockchain deploys a smart contract for publishing information; the smart contract stores information to be published that is encrypted by the information publishing node in the blockchain network based on an encryption key held by the information publishing node; the device includes:

[0014] a target transaction receiving module for receiving a target transaction for invoking the smart contract, which is broadcasted to the blockchain network by an information publishing node in the blockchain network when the information to be published meets the publishing conditions; wherein the target transaction includes a decryption key corresponding to the encryption key;

[0015] The information decryption and publishing module calls the decryption logic in the smart contract in response to the target transaction, and decrypts the information to be published stored in the smart contract based on the decryption key; and after decrypting the information to be published, further calls the publishing logic in the smart contract to publish the decrypted information to be published.

[0016] According to a fourth aspect of the embodiments of this specification, a blockchain-based information publishing device is disclosed, which is applied to a node in a blockchain network; the blockchain deploys a smart contract for publishing information; the smart contract stores information to be published that is encrypted by the information publishing node in the blockchain network based on an encryption key held by the information publishing node; wherein the decryption key corresponding to the encryption key is sharded by the information publishing node based on a threshold algorithm, converted into a plurality of key shards, and respectively sent to a plurality of nodes in the blockchain network; the device comprises:

[0017] A publishing condition determination module, which determines whether the information to be published meets the publishing conditions;

[0018] a decryption key recovery module, which, when the information to be published meets the publishing conditions, broadcasts the key fragments received from the information publishing node to the blockchain network and collects the key fragments broadcasted by other nodes; and, based on the collected key fragments, recovers the decryption key;

[0019] a target transaction construction module, which, after restoring the decryption key, constructs a target transaction for invoking the smart contract; wherein the target transaction includes the restored decryption key;

[0020] The target transaction sending module broadcasts the target transaction to the blockchain network, so that the nodes in the blockchain network respond to the target transaction, call the decryption logic in the smart contract, decrypt the information to be published stored in the smart contract based on the decryption key, and after decryption is completed, further call the publishing logic in the smart contract to publish the decrypted information to be published.

[0021] In the above technical solution, on the one hand, since in the blockchain network, the information publishing node will broadcast the decryption key only when the publishing conditions corresponding to the information to be published are met, it can be guaranteed that the information to be published cannot be directly read when the corresponding publishing conditions are not met; on the other hand, since the blockchain has the characteristics of openness, transparency and mutual verification, the encrypted information to be disclosed will be disclosed to the blockchain network in advance, which can avoid the possibility of tampering or replacement of the information to be disclosed, and improve the reliability of the mechanism. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the specification and, together with the description, serve to explain the principles.

[0023] Figure 1 This is a schematic diagram of the structure of the blockchain described in this specification;

[0024] Figure 2 This is a schematic diagram of the deployment and invocation process of the smart contract described in this specification;

[0025] Figure 3 This is a flowchart of the blockchain-based information publishing method described in this specification;

[0026] Figure 4 This is an interactive diagram of the key transfer process described in this specification;

[0027] Figure 5 This is another schematic diagram of the structure of the blockchain described in this specification;

[0028] Figure 6 This is a flowchart of another blockchain-based information publishing method described in this specification;

[0029] Figure 7 is another interactive diagram of the key transfer process described in this specification;

[0030] Figure 8 This is a schematic diagram of the structure of the information publishing device based on blockchain described in this specification;

[0031] Figure 9 This is another structural diagram of the blockchain-based information publishing device described in this specification;

[0032] Figure 10 is a diagram illustrating an example structure of an electronic device for information publishing described in this specification;

[0033] Figure 11 This is a structural example diagram of another electronic device for information publishing described in this specification. DETAILED DESCRIPTION

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

[0035] When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this specification. Instead, they are merely examples of systems and methods consistent with certain aspects of this specification, as detailed in the appended claims.

[0036] The terms used in this specification are for the purpose of describing specific embodiments only and are not intended to limit this specification. As used in this specification and the appended claims, the singular forms "a," "an," "the," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.

[0037] It should be understood that although the terms first, second, third, etc. may be used in this specification to describe various information, such information should not be limited to these terms. These terms are merely used to distinguish information of the same type from one another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information without departing from the scope of this specification. Depending on the context, the term "if" as used herein may be interpreted as "when," "when," or "in response to determining."

[0038] In daily life, people often face situations where confidential information can only be released if certain release conditions are met. Examples include scheduled business plans, regularly published lists of lottery winners, and posthumous wills. Premature release of such confidential information can devalue the information at best, or even trigger a series of disputes and losses.

[0039] In related technologies, a mechanism similar to sending emails at a scheduled time can be adopted. First, the above confidential information is pre-stored in the server. When it is determined that the publishing conditions are met, the confidential information is published to avoid leakage of confidential information when the publishing conditions are not met.

[0040] However, in this process, confidential information not only needs to be kept from being leaked, but also needs to be kept from being tampered with or replaced. In the above mechanism, the confidential information pre-stored in the server may be tampered with or replaced, and therefore is not sufficiently reliable.

[0041] Based on this, this specification discloses a blockchain-based information release method, which aims to utilize the characteristics of the blockchain network that the data stored on the chain can be mutually verified by each node and is difficult to tamper with, and broadcast the encrypted data to be released to the blockchain network in advance. The information release node then publishes the decryption key when the corresponding release conditions are met, thereby completing the conditional release of the information to be released.

[0042] When implementing, you can use Figure 1 The blockchain structure shown. Figure 1This is a schematic diagram of the structure of a blockchain described in the specification. Among the multiple nodes in the blockchain, the node that carries the decryption key for the encrypted data to be published can be recorded as the information publishing node. A smart contract is pre-deployed in the blockchain, which contains the encrypted data to be published, as well as the corresponding decryption logic and publishing logic.

[0043] When the information publishing node determines that the publishing conditions corresponding to the information to be published are met, the information publishing node will call the above-mentioned smart contract through a broadcast transaction, and pass the decryption key as a parameter to the decryption logic of the above-mentioned smart contract, so that the decryption logic of the above-mentioned smart contract can be successfully completed. Finally, the publishing logic in the smart contract is used to complete the publication of the information to be published.

[0044] See Figure 2 , Figure 2 This demonstrates a typical process for deploying and invoking a smart contract on a blockchain. A smart contract on a blockchain is a contract whose execution can be triggered by transactions. A smart contract can be defined in code, specifically written in a high-level language and compiled into bytecode that blockchain nodes can directly execute. Once consensus is reached between nodes through a consensus mechanism, the smart contract is successfully deployed and can be subsequently invoked by users.

[0045] Typically, a smart contract can be called by sending a transaction containing information about calling a smart contract to the Ethereum network so that each node executes the transaction. Specifically, the transaction may include information such as the address and parameters of the smart contract to be called. Smart contracts can be independently executed on each node in the blockchain network in a prescribed manner, and all execution records and data are stored on the blockchain. Therefore, when such a transaction is executed, a transaction voucher that cannot be tampered with or lost is stored on the blockchain.

[0046] Applying the above technical solution, on the one hand, because in the blockchain network, the information publishing node will only broadcast the decryption key when the publishing conditions corresponding to the information to be published are met, it can be ensured that the information to be published cannot be directly read if the corresponding publishing conditions are not met;

[0047] On the other hand, due to the characteristics of openness, transparency and mutual verification of blockchain, disclosing encrypted information to be disclosed to the blockchain network in advance can avoid the possibility of tampering or replacement of the information to be disclosed, thereby improving the reliability of the mechanism.

[0048] The technical solutions described in this specification are described in detail below through specific embodiments.

[0049] Please refer to Figure 3 , Figure 3 A blockchain-based information publishing method provided in one embodiment of this specification is applied to a node in a blockchain network; wherein the blockchain deploys a smart contract for publishing information; the smart contract stores information to be published that is encrypted by the information publishing node in the blockchain network based on an encryption key held by the information publishing node; the method performs the following steps:

[0050] S301, receiving a target transaction for invoking the smart contract broadcasted to the blockchain network by an information publishing node in the blockchain network when the information to be published meets a publishing condition; wherein the target transaction includes a decryption key corresponding to the encryption key;

[0051] S302, in response to the target transaction, calling the decryption logic in the smart contract, decrypting the information to be published stored in the smart contract based on the decryption key; and after completing the decryption of the information to be published, further calling the publishing logic in the smart contract to publish the decrypted information to be published.

[0052] The following describes the above solution step by step according to the three steps of smart contract deployment, publishing the information to be published according to the publishing conditions, and handing over the key.

[0053] In this specification, blockchain can be used as follows Figure 1 The structure shown in the figure shows that the nodes in the blockchain can be divided into two categories from a functional perspective: ordinary nodes and information publishing nodes. Among them, the information publishing nodes can pre-encrypt the information to be published based on the encryption key they hold, and deploy the encrypted information to be published, the corresponding decryption logic (excluding the decryption key), and the publishing logic in the form of a smart contract on the entire blockchain network.

[0054] For ordinary nodes, after the above-mentioned smart contract is deployed and before it is called, it can be regarded as holding the encrypted information to be published in the above-mentioned smart contract, as well as the corresponding decryption logic and publishing logic. However, due to the lack of decryption keys and the fact that the smart contract has not been called, the specific content of the information to be published is still encrypted and unknown to ordinary nodes.

[0055] For the entire blockchain network, if the publishing conditions of the information to be published are not met, the decryption key used to decrypt the encrypted information to be published is secretly held only by the information publishing node. Therefore, in a public environment, the information to be published is still in an encrypted state and the actual content cannot be discovered by the public.

[0056] It is understandable that the specific algorithms for encrypting / decrypting encrypted information, the detailed process of deploying smart contracts, and the implementation details such as the programming language used by smart contracts, the design of decryption logic and publishing logic, etc., may all depend on the specific implementation environment; for example, Figure 2 As shown, when a contract is created, developers can write it in a high-level language, compile it, package it, and deploy it on the blockchain. When the contract is called, the specific method can be a node initiating a transaction containing the contract address. Therefore, those skilled in the art can refer to relevant technical documentation to complete the specific design of the above process, and this specification does not need to be specific.

[0057] In this specification, it can be understood that the above-mentioned information publishing node can be a specific node in the blockchain, or multiple nodes cooperating with each other; for example, node A uses the public key of node B to encrypt the data to be published and completes the deployment of the corresponding smart contract. In this case, the decryption key of the data to be published is the private key of node B, so node B can take on the task of judging whether the publishing conditions are met, and publishing the decryption key and calling the corresponding smart contract. Therefore, nodes A and B jointly realize the function of information publishing.

[0058] In this specification, an information publishing node can, when the publishing conditions corresponding to the information to be published are met, construct a target transaction that can call the corresponding smart contract based on the decryption key of the information to be published, and broadcast the target transaction to the blockchain network; correspondingly, an ordinary node can receive the target transaction broadcasted to the blockchain network by the information publishing node when the publishing conditions corresponding to the information to be published are met, and obtain the decryption key from it;

[0059] For example, the information to be released is a business plan of a company, which needs to be released at 14:00 on March 2, 2020, Beijing time, and a node device of the company on the blockchain is used as the information release node. Then, the business plan can be pre-encrypted and deployed on the blockchain network in the form of a smart contract in the above manner; at 14:00 on March 2, 2020, Beijing time, the information release node determines that the information release conditions are met, and then broadcasts a target transaction for calling the above smart contract to the blockchain, and the target transaction carries the corresponding decryption key; and for other nodes on the blockchain network (such as smart devices on the chain of other companies), after receiving the above target transaction, they can obtain the corresponding decryption key from it.

[0060] In this specification, in response to the target transaction, a regular node can call the decryption logic in the smart contract and, based on the decryption key obtained in the above process, decrypt the encrypted information to be published stored in the smart contract. Afterwards, the regular node can further call the publishing logic in the smart contract to publish the decrypted information to be published.

[0061] Taking the above scenario as an example, after receiving the target transaction that calls the smart contract, the ordinary nodes in the above blockchain can execute the decryption logic in the smart contract, use the decryption key obtained from the target transaction to complete the decryption of the above pre-encrypted business plan, and further publish the decrypted business plan by calling the publishing logic in the smart contract; from the public perspective, after 14:00 on March 2, 2020, Beijing time, everyone can access the above-mentioned scheduled business plan, and the original purpose is achieved.

[0062] In this specification, the publishing conditions in the above design can be set according to specific needs. As long as the information publishing node can identify and make judgments, this specification does not need to make specific limitations.

[0063] In one embodiment shown, the above-mentioned publishing conditions may include: the current time reaches the preset publishing time; for example, in the above-mentioned example of scheduled publishing of a business plan, the preset status is "March 2, 2020 14:00 and later", so at 14:00 on March 2, 2020, the information publishing node can determine that the current time has reached the preset status, that is, trigger subsequent actions.

[0064] In one embodiment shown, the above-mentioned publishing conditions may include: the status of the information publishing event corresponding to the information to be published reaches a preset status; for example, it is necessary to disclose Zhang San's will after his death, then the information to be published is the will, and the corresponding information publishing event is Zhang San's death. The preset status is that the event has occurred, then after Zhang San has actually died, the information publishing node can be triggered to perform subsequent actions.

[0065] In this specification, the type of blockchain can be selected by technical personnel in this field according to specific needs, and this specification does not need to be specifically limited; for example, for the release of internal company information, a private chain within the company can be used to reduce costs and improve efficiency; for more important protocols, a public chain can be selected to obtain higher security; and so on.

[0066] In one embodiment shown, the blockchain may use a consortium chain. Since the consortium chain has both a faster processing speed than a public chain and a higher security than a private chain, it can be used as a compromise solution.

[0067] In this specification, an information publishing node can transfer its own decryption key to other nodes, so that other nodes can also provide the function of information publishing nodes. Figure 4 , Figure 4 The interactive process of key handover is demonstrated.

[0068] In one embodiment shown, corresponding to Figure 4 In the key transfer phase, the information publishing node can use the public key of a common node to encrypt the decryption key, thereby constructing a key transfer transaction and broadcasting it to the blockchain network. The corresponding common node can accept the key transfer transaction broadcasted to the blockchain network by the information publishing node in the above blockchain network. The key transfer transaction includes the decryption key encrypted with the public key of the node.

[0069] Furthermore, in response to the key transfer transaction, the ordinary node can decrypt the encrypted decryption key based on the private key of the node to obtain the decryption key; the node can then switch from an ordinary node to an information publishing node.

[0070] In this specification, after confirming that the key transfer is successful, the information publishing node can be switched to a common node and no longer provide the function of the information publishing node.

[0071] In one embodiment shown, corresponding to Figure 4 In the key transfer confirmation phase, the new information publishing node that receives the decryption key can construct a key transfer confirmation transaction containing its own digital signature and broadcast it to the blockchain network; the original information publishing node responds to the key transfer confirmation transaction, and after verifying the digital signature, it can delete the stored decryption key and switch itself to a normal node.

[0072] By adopting the above scheme, on the one hand, since only specific nodes (i.e., the nodes that provide the public key used to encrypt the decryption key) have the corresponding private key, the decryption key can still be considered to be undisclosed, and the confidentiality of the original information to be released is not affected; on the other hand, the new information publishing node can be used as a backup, which can avoid the negative impact caused by the failure or abnormality of the original information publishing node to a certain extent.

[0073] In actual applications, there is still a certain risk when a node directly holds the completed decryption key. Based on this, this specification also discloses another blockchain-based information publishing method. On the basis of the above-mentioned scheme, the decryption key is processed into several shards through a threshold algorithm and is jointly stored by several nodes in the blockchain; only when the number of nodes exceeding the threshold corresponding to the above-mentioned threshold algorithm discloses their key shards, the nodes on the blockchain can restore the decryption key based on the disclosed key shards, and then complete the decryption and disclosure of the information to be published.

[0074] Threshold algorithm-based sharding means dividing the data to be processed into n shards and distributing them to n holders. The data can be recovered based on any number of at least k shards, while any number of shards less than k will not be able to obtain any information in the ciphertext; where k is the "threshold".

[0075] With this solution, since a single node does not hold the complete decryption key, taking n nodes holding shards and a threshold of k as an example, if the decryption key is to be maliciously leaked, at least k nodes are required to act maliciously; and as long as the number of failed nodes is not greater than nk, the key recovery can be successfully completed; therefore, this method significantly avoids the risk of a single node acting maliciously, reduces the risk brought by node failure, and improves the reliability of the entire mechanism.

[0076] It is understandable that in actual design, those skilled in the art can adjust and set the number of slices n and the value of the threshold k according to specific needs, and this specification does not need to make specific limitations.

[0077] See Figure 5 , Figure 5 This is another schematic diagram of the blockchain structure described in this specification. Similar to the previous example, in this scenario, a smart contract is pre-deployed in the blockchain. This smart contract contains encrypted data to be published, as well as corresponding decryption and publishing logic. The blockchain also contains several ordinary nodes that do not carry decryption keys. However, unlike the previous example, the information publishing function in this blockchain is not provided by a single node, but rather by several nodes that carry shards of the decryption keys for the encrypted data to be published.

[0078] Specifically, see Figure 6 , Figure 6This is a flow chart of another blockchain-based information publishing method described in this specification; the method is applied to nodes in a blockchain network; the blockchain deploys a smart contract for publishing information; the smart contract stores information to be published that is encrypted by the information publishing node in the blockchain network based on an encryption key held by the information publishing node; wherein the decryption key corresponding to the encryption key is sharded by the information publishing node based on a threshold algorithm, converted into a plurality of key shards, and respectively sent to a plurality of nodes in the blockchain network; the method comprises the following steps:

[0079] S601, determining whether the information to be published meets the publishing conditions;

[0080] S602: If the information to be published meets the publishing conditions, broadcast the key shards received from the information publishing node to the blockchain network, collect the key shards broadcast by other nodes, and restore the decryption key based on the collected key shards.

[0081] S603: After restoring the decryption key, construct a target transaction for invoking the smart contract; wherein the target transaction includes the restored decryption key;

[0082] S604, broadcasting the target transaction to the blockchain network, so that the nodes in the blockchain network respond to the target transaction, call the decryption logic in the smart contract, decrypt the information to be published stored in the smart contract based on the decryption key, and after the decryption is completed, further call the publishing logic in the smart contract to publish the decrypted information to be published.

[0083] The following describes the above solution step by step according to the three steps of smart contract deployment, publishing the information to be published according to the publishing conditions, and handing over the key.

[0084] In this specification, blockchain can be used as follows Figure 5 The structure shown in the figure shows that the nodes in the blockchain can be divided into three categories from the functional perspective: information publishing nodes (not shown in the figure) Figure 5 ), nodes holding key shards, and ordinary nodes; among them, the information publishing node can encrypt the information to be published based on the encryption key it holds in advance, and deploy the encrypted information to be published together with the corresponding decryption logic (excluding the decryption key) and publishing logic in the form of a smart contract on the entire blockchain network; in addition, the information publishing node can also process the corresponding decryption key into several key shards based on the threshold algorithm, and send them to several other nodes respectively. The node that receives the key shard can be recorded as the node holding the key shard;

[0085] For ordinary nodes, after the above-mentioned smart contract is deployed and before it is called, it can be regarded as holding the encrypted information to be published in the above-mentioned smart contract, as well as the corresponding decryption logic and publishing logic. However, due to the lack of decryption keys and the fact that the smart contract has not been called, the specific content of the information to be published is still encrypted and unknown to ordinary nodes.

[0086] For the entire blockchain network, if the publishing conditions of the information to be published are not met, the decryption key used to decrypt the encrypted information to be published is in a sharded state. Therefore, in a public environment, the information to be published is still encrypted and the actual content cannot be discovered by the public.

[0087] It is understandable that the specific algorithms for encrypting / decrypting encrypted information, the detailed process of deploying smart contracts, and the implementation details such as the programming language used by smart contracts, the design of decryption logic and publishing logic, etc., may all depend on the specific implementation environment; for example, Figure 2 As shown, when a contract is created, developers can write it in a high-level language, compile it, package it, and deploy it on the blockchain. When the contract is called, the specific method can be a node initiating a transaction containing the contract address. Therefore, those skilled in the art can refer to relevant technical documentation to complete the specific design of the above process, and this specification does not need to be specific.

[0088] In this specification, it can be understood that during the execution of this method, in order to ensure that the reassembly of shards is the only way to obtain the complete decryption key, the information publishing node holding the complete decryption key should ensure that its complete decryption key is not leaked. The specific method may be direct deletion or exit from the blockchain network, etc. Those skilled in the art can design it according to the specific situation, and this specification does not make any specific restrictions.

[0089] In this specification, the execution subject of the above method is the node holding the key shard; the node holding the key shard can broadcast the key shard held by it from the information publishing node to the blockchain network when the publishing conditions corresponding to the information to be published are met, and collect the key shards broadcast by other nodes; due to the characteristics of the threshold algorithm, under normal circumstances (there are not too many invalid nodes holding key shards, and there are not too many malicious nodes holding key shards), if and only if the node holding the key shard can meet the publishing conditions corresponding to the information to be published, it can collect enough key shards to complete the restoration of the decryption key.

[0090] In this specification, after the decryption key is restored, a target transaction that can call the corresponding smart contract can be constructed based on the decryption key, and the target transaction can be broadcast to the blockchain network; correspondingly, ordinary nodes can receive the above target transaction and obtain the decryption key from it;

[0091] For example, the information to be released is a business plan of a company, which needs to be released at 14:00 on March 2, 2020, Beijing time. Then, the business plan can be pre-encrypted and deployed on the blockchain network in the form of a smart contract in the above manner. The shards of the decryption key are held by several nodes respectively; at 14:00 on March 2, 2020, Beijing time, the information publishing node determines that the information release conditions are met, and the above nodes holding the decryption key shards broadcast their respective key shards to the blockchain, and restore the decryption key based on the received key shards; then send the target transaction for calling the above smart contract, which carries the corresponding decryption key; and for other nodes on the blockchain network (such as smart devices on the chain of other companies), after receiving the above target transaction, they can obtain the corresponding decryption key from it.

[0092] In this specification, after the target transaction is broadcast to the blockchain network, the nodes in the blockchain can respond to the target transaction, call the decryption logic in the smart contract, and decrypt the encrypted information to be published stored in the smart contract based on the decryption key obtained in the above process; then, the publishing logic in the smart contract can be further called to publish the decrypted information to be published;

[0093] Taking the above scenario as an example, after receiving the target transaction that calls the smart contract, the nodes in the above blockchain can execute the decryption logic in the smart contract, use the decryption key obtained from the target transaction to complete the decryption of the above pre-encrypted business plan, and further publish the decrypted business plan by calling the publishing logic in the smart contract. From the public perspective, after 14:00 on March 2, 2020, Beijing time, everyone can access the above-mentioned scheduled business plan, and the original purpose is achieved.

[0094] In this specification, the publishing conditions in the above design can be set according to specific needs. As long as the information publishing node can identify and make judgments, this specification does not need to make specific limitations.

[0095] In one embodiment shown, the above-mentioned publishing conditions may include: the current time reaches the preset publishing time; for example, in the above-mentioned example of scheduled publishing of a business plan, the preset status is "March 2, 2020 14:00 and later", so at 14:00 on March 2, 2020, the information publishing node can determine that the current time has reached the preset status, that is, trigger subsequent actions.

[0096] In one embodiment shown, the above-mentioned publishing conditions may include: the status of the information publishing event corresponding to the information to be published reaches a preset status; for example, it is necessary to disclose Zhang San's will after his death, then the information to be published is the will, and the corresponding information publishing event is Zhang San's death. The preset status is that the event has occurred, then after Zhang San has actually died, the information publishing node can be triggered to perform subsequent actions.

[0097] In this specification, the type of blockchain can be selected by technical personnel in this field according to specific needs, and this specification does not need to be specifically limited; for example, for the release of internal company information, a private chain within the company can be used to reduce costs and improve efficiency; for more important protocols, a public chain can be selected to obtain higher security; and so on.

[0098] In one embodiment, a consortium blockchain can be used as the blockchain. Within this consortium blockchain, several committee nodes with publishing authority for the information to be released can be elected to carry the key shards. The specific election method depends on the specific situation and can be selected by those skilled in the art by referring to relevant technologies. This specification does not impose any specific restrictions. Because consortium blockchains offer both faster processing speeds than public blockchains and higher security than private blockchains, they can serve as a compromise solution.

[0099] In this specification, the publishing authority of a node for information to be published may have a validity period. If the authority of a node holding a key shard expires, the node may transfer the decryption key shard it holds to other nodes holding key shards.

[0100] In one embodiment shown, see Figure 7 , Figure 7 The interactive process of key transfer via secondary sharding is demonstrated. When publishing conditions are not met, in response to the expiration of the validity period of the publishing authority for the information to be published, the committee node can perform secondary sharding on its own key shards based on a threshold algorithm. The resulting shards of the key shards are encrypted using the public keys of other committee nodes in the blockchain, and secondary shard transactions are constructed based on the resulting shards of the encrypted key shards.

[0101] After the secondary sharding transaction is broadcasted to the blockchain network, other committee nodes in the blockchain network can respond to the secondary sharding transaction and decrypt the shards of the key shard encrypted by their respective public keys according to their respective private keys to obtain the shards of the key shard.

[0102] It is understandable that after the authority of any committee node expires, the blockchain can also elect committee nodes, allowing ordinary nodes to become new committee nodes to ensure the relative stability of the number of committee nodes.

[0103] Through the above process, the node with expired authority can distribute the key shards it carries to other committee nodes, and other committee nodes can restore the shards of the key shards to the key shards originally held by the node with expired authority through similar methods, which will not affect the smooth restoration of the original decryption key.

[0104] This specification proposes a blockchain-based information publishing device, which is applied to a node in a blockchain network; wherein a smart contract for publishing information is deployed in the blockchain; the smart contract stores information to be published, which is encrypted by the information publishing node in the blockchain network based on the encryption key held by the information publishing node; see Figure 8 , Figure 8 This is a schematic diagram of the structure of the blockchain-based information publishing device, which includes:

[0105] a target transaction receiving module 801 for receiving a target transaction for invoking the smart contract, which is broadcasted to the blockchain network by an information publishing node in the blockchain network when the information to be published meets the publishing conditions; wherein the target transaction includes a decryption key corresponding to the encryption key;

[0106] The information decryption and publishing module 802, in response to the target transaction, calls the decryption logic in the smart contract and decrypts the information to be published stored in the smart contract based on the decryption key; and after completing the decryption of the information to be published, further calls the publishing logic in the smart contract to publish the decrypted information to be published.

[0107] In this specification, the information publishing node can construct a target transaction that can call the corresponding smart contract based on the decryption key of the information to be published when the publishing conditions corresponding to the information to be published are met, and broadcast the target transaction to the blockchain network; correspondingly, the target transaction receiving module 801 can receive the target transaction broadcasted to the blockchain network by the above-mentioned information publishing node when the publishing conditions corresponding to the information to be published are met, and obtain the decryption key from it.

[0108] In this specification, the information decryption and release module 802 can call the decryption logic in the above-mentioned smart contract in response to the above-mentioned target transaction, and complete the decryption of the encrypted information to be released stored in the smart contract based on the decryption key obtained in the above process; thereafter, it can further call the release logic in the smart contract to release the decrypted information to be released.

[0109] In this specification, the publishing conditions in the above design can be set according to specific needs. As long as the information publishing node can identify and make judgments, this specification does not need to make specific limitations.

[0110] In one embodiment shown, the above-mentioned publishing conditions may include: the current time reaches the preset publishing time; for example, the publishing time can be preset as 14:00 Beijing time on May 2, 2020, then when the current time reaches 14:00 Beijing time on May 2, 2020, subsequent actions can be triggered.

[0111] In one embodiment shown, the above-mentioned publishing conditions may include: the status of the information publishing event corresponding to the information to be published reaches a preset status; for example, it is necessary to disclose Zhang San's will after his death, then the information to be published is the will, and the corresponding information publishing event is Zhang San's death. The preset status is that the event has occurred, then after Zhang San has actually died, the information publishing node can be triggered to perform subsequent actions.

[0112] In this specification, the type of blockchain can be selected by technical personnel in this field according to specific needs, and this specification does not need to be specifically limited; for example, for the release of internal company information, a private chain within the company can be used to reduce costs and improve efficiency; for more important protocols, a public chain can be selected to obtain higher security; and so on.

[0113] In one embodiment shown, the blockchain may use a consortium chain. Since the consortium chain has both a faster processing speed than a public chain and a higher security than a private chain, it can be used as a compromise solution.

[0114] In this specification, the above device may also include a key receiving module to receive the decryption key handed over by the information publishing node, so that the node can also provide the function of the information publishing node. Figure 4 , Figure 4 The interactive process of key handover is demonstrated.

[0115] In one embodiment shown, corresponding to Figure 4During the key transfer phase, the device may further include a key receiving module that can accept a key transfer transaction broadcasted by an information publishing node in the above-mentioned blockchain network to the blockchain network; wherein the key transfer transaction includes a decryption key encrypted using the public key of this node; further, the module can decrypt the encrypted decryption key based on the private key of this node to obtain the decryption key; and switch the node from an ordinary node to an information publishing node.

[0116] In this specification, the above-mentioned device may further include a key reception confirmation module, so that the information publishing node can be switched to a common node after confirming that the key transfer is successful, and no longer provide the function of the information publishing node.

[0117] In one embodiment shown, corresponding to Figure 4 In the key transfer confirmation stage, the above-mentioned device may further include a key reception confirmation module, which can construct a key transfer confirmation transaction containing its own digital signature and broadcast it to the blockchain network, so that the original information publishing node responds to the key transfer confirmation transaction. After verifying the digital signature, it can delete the stored decryption key and switch itself to an ordinary node.

[0118] By adopting the above scheme, on the one hand, since only specific nodes (i.e., the nodes that provide the public key used to encrypt the decryption key) have the corresponding private key, the decryption key can still be considered to be undisclosed, and the confidentiality of the original information to be released is not affected; on the other hand, the new information publishing node can be used as a backup, which can avoid the negative impact caused by the failure or abnormality of the original information publishing node to a certain extent.

[0119] This specification also discloses a blockchain-based information publishing device, which is applied to a node in a blockchain network; the blockchain deploys a smart contract for publishing information; the smart contract stores information to be published that is encrypted by the information publishing node in the blockchain network based on an encryption key; wherein the decryption key corresponding to the encryption key is sharded by the information publishing node based on a threshold algorithm, converted into a plurality of key shards, and respectively sent to a plurality of nodes in the blockchain network;

[0120] See Figure 9 , Figure 9 Schematic diagram of the structure of the device, the device includes:

[0121] Release condition determination module 901, determines whether the information to be released meets the release conditions;

[0122] Decryption key recovery module 902, when the information to be published meets the publishing conditions, broadcasts the key fragments received from the information publishing node to the blockchain network, collects the key fragments broadcasted by other nodes, and recovers the decryption key based on the collected key fragments;

[0123] The target transaction construction module 903 constructs a target transaction for invoking the smart contract after restoring the decryption key; wherein the target transaction includes the restored decryption key;

[0124] The target transaction sending module 904 broadcasts the target transaction to the blockchain network, so that the nodes in the blockchain network respond to the target transaction, call the decryption logic in the smart contract, decrypt the information to be published stored in the smart contract based on the decryption key, and after the decryption is completed, further call the publishing logic in the smart contract to publish the decrypted information to be published.

[0125] It is understandable that in actual design, those skilled in the art can adjust and set the number of slices n and the value of the threshold k according to specific needs, and this specification does not need to make specific limitations.

[0126] In this specification, the execution subject of the above method is the node holding the key shard; the above decryption key restoration module 902 can broadcast the key shard held by the information publishing node to the blockchain network when the publishing condition determination module 901 determines that the publishing condition corresponding to the information to be published is met, and collect the key shards broadcast by other nodes; and restore the decryption key based on the collected key shards.

[0127] In this specification, after restoring the decryption key, the target transaction construction module 903 can construct a target transaction that can call the corresponding smart contract based on the decryption key, and the target transaction sending module 904 can broadcast the target transaction to the blockchain network, so that the nodes in the blockchain respond to the above target transaction, can call the decryption logic in the above smart contract, and based on the decryption key obtained in the above process, complete the decryption of the encrypted information to be published stored in the smart contract; after that, the publishing logic in the smart contract can be further called to publish the decrypted information to be published.

[0128] In this specification, the publishing conditions in the above design can be set according to specific needs. As long as the information publishing node can identify and make judgments, this specification does not need to make specific limitations.

[0129] In one embodiment shown, the above-mentioned publishing conditions may include: the current time reaches the preset publishing time; for example, the publishing time can be preset as 14:00 Beijing time on May 2, 2020, then when the current time reaches 14:00 Beijing time on May 2, 2020, subsequent actions can be triggered.

[0130] In one embodiment shown, the above-mentioned publishing conditions may include: the status of the information publishing event corresponding to the information to be published reaches a preset status; for example, it is necessary to disclose Zhang San's will after his death, then the information to be published is the will, and the corresponding information publishing event is Zhang San's death. The preset status is that the event has occurred, then after Zhang San has actually died, the information publishing node can be triggered to perform subsequent actions.

[0131] In this specification, the type of blockchain can be selected by technical personnel in this field according to specific needs, and this specification does not need to be specifically limited; for example, for the release of internal company information, a private chain within the company can be used to reduce costs and improve efficiency; for more important protocols, a public chain can be selected to obtain higher security; and so on.

[0132] In one embodiment, a consortium blockchain can be used as the blockchain. Within this consortium blockchain, several committee nodes with publishing authority for the information to be released can be elected to carry the key shards. The specific election method depends on the specific situation and can be selected by those skilled in the art by referring to relevant technologies. This specification does not impose any specific restrictions. Because consortium blockchains offer both faster processing speeds than public blockchains and higher security than private blockchains, they can serve as a compromise solution.

[0133] In this specification, the publishing authority of a node for information to be published may have a validity period. If the authority of a node holding a key shard expires, the node may transfer the decryption key shard it holds to other nodes holding key shards through the secondary sharding module.

[0134] In one embodiment shown, see Figure 7 , Figure 7 The interactive process of key transfer via secondary sharding is demonstrated. The secondary sharding module can perform secondary sharding on its own key shards based on a threshold algorithm in response to the expiration of its publishing authority for the information to be published, if publishing conditions are not met. The shards of the obtained key shards are encrypted using the public keys of other committee nodes in the blockchain, and secondary sharding transactions are constructed based on the obtained shards of the encrypted key shards.

[0135] After the secondary sharding module broadcasts the secondary sharding transaction to the blockchain network, other committee nodes in the blockchain network can respond to the secondary sharding transaction and decrypt the shards of the key shard encrypted by their respective public keys according to their respective private keys to obtain the shards of the key shard.

[0136] It is understandable that after the authority of any committee node expires, the blockchain can also elect committee nodes, allowing ordinary nodes to become new committee nodes to ensure the relative stability of the number of committee nodes.

[0137] Relying on the above-mentioned secondary sharding module, the node with expired authority can distribute the key shards it carries to other committee nodes, and other committee nodes can restore the shards of the key shards to the key shards originally held by the node with expired authority through similar methods, which will ultimately not affect the smooth restoration of the original decryption key.

[0138] An embodiment of this specification also provides a computer device, which includes at least a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the aforementioned blockchain-based information publishing method is implemented.

[0139] Figure 10 10 is a schematic diagram showing a more specific hardware structure of a computing device provided in an embodiment of this specification. The device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are connected to each other within the device via the bus 1050.

[0140] The processor 1010 can be implemented using a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.

[0141] The memory 1020 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage devices, dynamic storage devices, etc. The memory 1020 can store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 1020 and is called and executed by the processor 1010.

[0142] The input / output interface 1030 is used to connect input / output modules to implement information input and output. The input / output modules can be configured as components within the device (not shown in the figure) or can be externally connected to the device to provide corresponding functions. Input devices may include a keyboard, mouse, touch screen, microphone, various sensors, etc., and output devices may include a display, speaker, vibrator, indicator light, etc.

[0143] The communication interface 1040 is used to connect to a communication module (not shown) to enable communication between the device and other devices. The communication module can communicate via a wired method (such as USB, network cable, etc.) or a wireless method (such as mobile network, WiFi, Bluetooth, etc.).

[0144] The bus 1050 comprises a pathway for transmitting information between the various components of the device (eg, the processor 1010 , the memory 1020 , the input / output interface 1030 , and the communication interface 1040 ).

[0145] It should be noted that although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040, and the bus 1050, in a specific implementation, the device may also include other components necessary for normal operation. In addition, it will be understood by those skilled in the art that the above device may only include the components necessary to implement the embodiments of this specification, and does not necessarily include all the components shown in the figure.

[0146] An embodiment of this specification also provides a computer device, which includes at least a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the aforementioned another blockchain-based information publishing method is implemented.

[0147] Figure 1111 shows a more specific hardware structure diagram of a computing device provided in an embodiment of this specification. The device may include: a processor 1110, a memory 1120, an input / output interface 1130, a communication interface 1140, and a bus 1150. The processor 1110, the memory 1120, the input / output interface 1130, and the communication interface 1140 are connected to each other within the device via the bus 1150.

[0148] The processor 1110 can be implemented using a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.

[0149] The memory 1120 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage devices, dynamic storage devices, etc. The memory 1120 can store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 1120 and is called and executed by the processor 1110.

[0150] The input / output interface 1130 is used to connect input / output modules to implement information input and output. The input / output modules can be configured as components within the device (not shown in the figure) or can be externally connected to the device to provide corresponding functions. Input devices may include a keyboard, mouse, touch screen, microphone, various sensors, etc., and output devices may include a display, speaker, vibrator, indicator light, etc.

[0151] The communication interface 1140 is used to connect to a communication module (not shown) to enable communication between the device and other devices. The communication module can communicate via a wired method (such as USB, network cable, etc.) or a wireless method (such as mobile network, WiFi, Bluetooth, etc.).

[0152] The bus 1150 comprises a pathway for transmitting information between the various components of the device (eg, the processor 1110 , the memory 1120 , the input / output interface 1130 , and the communication interface 1140 ).

[0153] It should be noted that although the above device only shows the processor 1110, the memory 1120, the input / output interface 1130, the communication interface 1140, and the bus 1150, in a specific implementation, the device may also include other components necessary for normal operation. In addition, it will be understood by those skilled in the art that the above device may only include the components necessary to implement the embodiments of this specification, and does not necessarily include all the components shown in the figures.

[0154] The embodiments of this specification also provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the aforementioned blockchain-based information publishing method.

[0155] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The 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 disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0156] The embodiments of this specification also provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the aforementioned another blockchain-based information publishing method.

[0157] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The 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 disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0158] Through the description of the above implementation methods, it can be known that those skilled in the art can clearly understand that the embodiments of this specification can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solutions of the embodiments of this specification, or the part that contributes to the prior art, can be embodied in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or certain parts of the embodiments of this specification.

[0159] The systems, devices, modules, or units described in the above embodiments may be implemented by computer chips or entities, or by products having certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email transceiver, game console, tablet computer, wearable device, or any combination of these devices.

[0160] Each embodiment in this specification is described in a progressive manner, and the same or 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 device 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. The device embodiment described above is merely illustrative, wherein the modules described as separate components may or may not be physically separated, and when implementing the embodiment scheme of this specification, the functions of each module can be implemented in the same one or more software and / or hardware. It is also possible to select some or all of the modules according to actual needs to achieve the purpose of the embodiment scheme. A person of ordinary skill in the art can understand and implement it without paying any creative work.

[0161] The above is only a specific implementation of the embodiment of this specification. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the embodiment of this specification. These improvements and modifications should also be regarded as the scope of protection of the embodiment of this specification.

Claims

1. A blockchain-based information publishing method, applied to any node in a blockchain network other than an information publishing node; the blockchain deploys a smart contract for publishing information; The smart contract stores information to be published that is encrypted by an information publishing node in the blockchain network based on an encryption key held by the node; the method includes: receiving a target transaction for invoking the smart contract broadcast by an information publishing node in the blockchain network to the blockchain network when the information to be published meets a publishing condition; wherein the publishing condition includes that a status of an information publishing event corresponding to the information to be published reaches a preset state, and the target transaction includes a decryption key corresponding to the encryption key; In response to the target transaction, calling the decryption logic in the smart contract to decrypt the information to be published stored in the smart contract based on the decryption key; and After the decryption of the information to be published is completed, the publishing logic in the smart contract is further called to publish the decrypted information to be published.

2. The method according to claim 1, wherein the blockchain is a consortium chain.

3. The method according to claim 2, further comprising: Receiving a key transfer transaction broadcasted to the blockchain network by an information publishing node in the blockchain network; wherein the key transfer transaction includes the decryption key encrypted by the public key of any node; In response to the key transfer transaction, the decryption key encrypted by the public key of any one of the nodes is decrypted according to the private key of any one of the nodes, the decryption key is obtained, and the node is switched to become an information publishing node.

4. The method according to claim 3, further comprising: A key transfer confirmation transaction containing the digital signature of any of the nodes is constructed and broadcast to the blockchain network, so that the original information publishing node responds to the key transfer confirmation transaction, deletes the stored decryption key after verifying the digital signature, and switches to a normal node.

5. A blockchain-based information publishing method, applied to nodes holding key shards in a blockchain network; the blockchain deploys a smart contract for publishing information; the smart contract stores information to be published that is encrypted by the information publishing node in the blockchain network based on the encryption key held by the node; wherein: The decryption key corresponding to the encryption key is sharded by the information publishing node based on a threshold algorithm, converted into a plurality of key shards, and respectively sent to a plurality of nodes in the blockchain network, so that the plurality of nodes become nodes holding the key shards; the method includes: Determining whether the information to be published meets a publishing condition; wherein the publishing condition includes that the status of the information publishing event corresponding to the information to be published reaches a preset state; If the information to be published meets the publishing conditions, broadcast the key fragment received from the information publishing node to the blockchain network, and collect the key fragments broadcasted by other nodes; and restore the decryption key based on the collected key fragments; After restoring the decryption key, constructing a target transaction for invoking the smart contract; wherein the target transaction includes the restored decryption key; The target transaction is broadcasted to the blockchain network, so that the nodes in the blockchain network respond to the target transaction, call the decryption logic in the smart contract, decrypt the information to be published stored in the smart contract based on the decryption key, and after the decryption is completed, further call the publishing logic in the smart contract to publish the decrypted information to be published.

6. The method according to claim 5, wherein the blockchain is a consortium blockchain; the nodes holding key shards are committee nodes; wherein, The committee nodes are several alliance members elected in the alliance chain and having the authority to publish the information to be published.

7. According to the method of claim 6, the publishing authority of the committee node for the information to be published has a validity period; The method further comprises: In the case where the publishing condition is not met, in response to the expiration of the validity period of the publishing authority of the information to be published, performing secondary sharding processing on the key shards held by itself based on the threshold algorithm; Encrypting the obtained shards of the key shards with the public keys of other committee nodes in the blockchain, and constructing secondary shard transactions based on the obtained shards of the encrypted key shards; The secondary sharding transaction is broadcasted to the blockchain network, so that other committee nodes in the blockchain network respond to the secondary sharding transaction, decrypt the shards of the key shard encrypted by their respective public keys according to their respective private keys, and obtain the shards of the key shard.

8. A blockchain-based information publishing device, applied to any node in a blockchain network other than an information publishing node; the blockchain deploys a smart contract for publishing information; The smart contract stores information to be published that is encrypted by an information publishing node in the blockchain network based on an encryption key held by the node; The device comprises: a target transaction receiving module configured to receive a target transaction for invoking the smart contract, which is broadcasted to the blockchain network by an information publishing node in the blockchain network when the information to be published meets a publishing condition; wherein the publishing condition includes the state of an information publishing event corresponding to the information to be published reaching a preset state; The information decryption and publishing module calls the decryption logic in the smart contract in response to the target transaction, decrypts the information to be published stored in the smart contract based on the decryption key corresponding to the encryption key; and after decrypting the information to be published, further calls the publishing logic in the smart contract to publish the decrypted information to be published.

9. The device according to claim 8, wherein the blockchain is a consortium chain.

10. The apparatus according to claim 9, further comprising: A key receiving module receives a key transfer transaction broadcasted by an information publishing node in the blockchain network to the blockchain network; wherein the key transfer transaction includes the decryption key encrypted by the public key of any one of the nodes; in response to the key transfer transaction, the decryption key encrypted by the public key of any one of the nodes is decrypted according to the private key of any one of the nodes to obtain the decryption key, so that any one of the nodes itself is switched to an information publishing node.

11. The apparatus according to claim 10, further comprising: The key receiving confirmation module constructs a key transfer confirmation transaction including the digital signature of any of the nodes and broadcasts it to the blockchain network, so that the original information publishing node responds to the key transfer confirmation transaction, deletes the stored decryption key after verifying the digital signature, and switches to a normal node.

12. A blockchain-based information publishing device, applied to nodes holding key shards in a blockchain network; the blockchain deploys a smart contract for publishing information; the smart contract stores information to be published that is encrypted by the information publishing node in the blockchain network based on the encryption key held by the node; wherein: The decryption key corresponding to the encryption key is sharded by the information publishing node based on a threshold algorithm, converted into a plurality of key shards, and respectively sent to a plurality of nodes in the blockchain network, so that the plurality of nodes become nodes holding the key shards; the device includes: A publishing condition determination module determines whether the information to be published meets the publishing condition; wherein the publishing condition includes that the status of the information publishing event corresponding to the information to be published reaches a preset state; a decryption key recovery module, which, when the information to be published meets the publishing conditions, broadcasts the key fragments received from the information publishing node to the blockchain network and collects the key fragments broadcasted by other nodes; and, based on the collected key fragments, recovers the decryption key; A target transaction construction module, which, after restoring the decryption key, constructs a target transaction for invoking the smart contract; The target transaction sending module broadcasts the target transaction to the blockchain network, so that the nodes in the blockchain network respond to the target transaction, call the decryption logic in the smart contract, decrypt the information to be published stored in the smart contract based on the restored decryption key, and after decryption is completed, further call the publishing logic in the smart contract to publish the decrypted information to be published.

13. The device according to claim 12, wherein the blockchain is a consortium blockchain; the nodes holding the key shards are committee nodes; wherein, The committee nodes are several alliance members elected in the alliance chain and having the authority to publish the information to be published.

14. The apparatus according to claim 13, wherein the authority of the committee node to publish the information to be published has a validity period; The device further comprises: a secondary sharding module, which, in response to the expiration of the validity period of its own publishing authority for the information to be published, performs secondary sharding on the key shards held by itself based on a threshold algorithm when the publishing condition is not satisfied; Encrypting the obtained shards of the multiple key shards with public keys of other committee nodes in the blockchain respectively, and constructing secondary shard transactions based on the obtained encrypted shards of the key shards; broadcasting the secondary shard transactions to the blockchain network, so that other committee nodes in the blockchain network respond to the secondary shard transactions, decrypt the shards of the key shards encrypted by their respective public keys according to their respective private keys, and obtain shards of the key shards.

15. A computer device comprising at least a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the method according to any one of claims 1 to 4 is implemented.

16. A computer device comprising at least a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the method described in any one of claims 5 to 7 is implemented.

Citation Information

Patent Citations

  • Data transaction method, blockchain node server and data submission terminal

    CN108062671A

  • Blockchain encryption ledger based on secret sharing

    CN108809652A

  • Information timed release or transmitting method and information timed release or transmitting device based on blockchain

    CN108881433A