Offline audit method, electronic device and readable storage medium based on blockchain

By creating temporary nodes in the blockchain network and encrypting data using the CA certificate of the audit agency, low-cost, secure offline auditing of blockchain data is achieved, solving the problems of high management costs and data leakage risks.

CN109815747BActive Publication Date: 2024-09-06ANHUI NEW FOX TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201910042024.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-01-17
Publication Date
2024-09-06
Estimated Expiration
2039-01-17

AI Technical Summary

Technical Problem

When auditing blockchain data with existing technology, the audit agency needs to participate in the blockchain network, resulting in high management costs. At the same time, transferring data to the outside creates the risk of data leakage.

Method used

Create a temporary node in the blockchain network, prohibit the generation of messages according to the preset prohibition rules, synchronize the data to be audited to the temporary node within the preset time period, and use the CA certificate of the audit institution to encrypt the data and send it to the audit institution for verification. Decrypt the audit.

Benefits of technology

It reduces management costs, avoids the risk of data leakage, and ensures the security of blockchain data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN109815747B
    Figure CN109815747B
Patent Text Reader

Abstract

The present invention relates to blockchain technology, and provides an offline audit method, an electronic device and a readable storage medium based on blockchain. The method includes: after receiving an audit request for data in a blockchain network from an audit institution, creating a temporary node in the blockchain network, and prohibiting the generation of preset type messages in the blockchain network within a preset time period according to preset prohibition rules; synchronizing the blockchain data to be audited in the blockchain network to the temporary node within the preset time period; using the CA certificate of the audit institution obtained in advance to encrypt the blockchain data in the temporary node; sending the encrypted blockchain data to the audit institution, so that the audit institution can decrypt the blockchain data and then audit it. The present invention does not require the audit institution to participate in the blockchain network, which reduces management costs. Moreover, only the audit institution itself can decrypt and obtain the content of the blockchain data to be audited, ensuring the security of the blockchain data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to an offline audit method, an electronic device and a readable storage medium based on blockchain. Background Art

[0002] When it is necessary to audit the data in the blockchain, since the blockchain data exists in the blockchain environment, the existing technology generally involves the auditing agency in the blockchain network. As a physical node or logical node of the blockchain, the auditing agency needs to suffocate all the audited blockchain-related information, which has a large management cost and is too expensive. If the blockchain data is simply and directly transferred to the outside of the blockchain and provided to the auditing agency, there is a risk of data leakage for the blockchain participants and data security is at risk. Summary of the invention

[0003] The purpose of the present invention is to provide an offline audit method, electronic device and readable storage medium based on blockchain, aiming to ensure data security and conduct offline audit of blockchain data at a low cost.

[0004] To achieve the above object, the present invention provides an offline audit method based on blockchain, and the offline audit method based on blockchain includes:

[0005] After receiving an audit request from an auditing agency for data in a blockchain network, a temporary node is created in the blockchain network, and preset prohibition rules are used to prohibit the generation of preset type messages in the blockchain network within a preset time period;

[0006] Synchronizing the blockchain data to be audited in the blockchain network to the temporary node within the preset time period;

[0007] Using the pre-acquired CA certificate of the auditing agency to encrypt the blockchain data in the temporary node;

[0008] The encrypted blockchain data is sent to the auditing agency so that the auditing agency can decrypt the blockchain data and then conduct an audit.

[0009] Preferably, the preset prohibition rules include:

[0010] Block the blockchain network, or restrict the issuance of keys in the blockchain network, or restrict the endorsement process in the blockchain network.

[0011] Preferably, after the step of synchronizing the blockchain data to be audited in the blockchain network to the temporary node within the preset time period, the blockchain-based offline audit method further includes:

[0012] The prohibition on generating messages of preset types in the blockchain network within a preset time period is lifted, and the temporary node is prevented from generating new data according to preset blocking rules.

[0013] Preferably, the preset blocking rules include:

[0014] Restrict the write operation permission of the temporary node disk, or restrict the access permission of the temporary node to the blockchain network.

[0015] Preferably, after receiving an audit request for data in a blockchain network from an audit institution, before creating a temporary node in the blockchain network and prohibiting the blockchain network from generating messages of a preset type within a preset time period according to a preset prohibition rule, the blockchain-based offline audit method further includes:

[0016] Receive the CA certificate sent by the auditing agency, authenticate the received CA certificate, and save the CA certificate sent by the auditing agency in the blockchain network after the authentication is passed.

[0017] Preferably, after the step of sending the encrypted blockchain data to the auditing agency, the blockchain-based offline auditing method further comprises:

[0018] Delete the temporary node in the blockchain network.

[0019] In addition, to achieve the above-mentioned purpose, the present invention further provides an electronic device, the electronic device comprising a memory and a processor, the memory storing an offline audit system based on blockchain that can be run on the processor, and the offline audit system based on blockchain implements the following steps when executed by the processor:

[0020] After receiving an audit request from an auditing agency for data in a blockchain network, a temporary node is created in the blockchain network, and preset prohibition rules are used to prohibit the generation of preset type messages in the blockchain network within a preset time period;

[0021] Synchronizing the blockchain data to be audited in the blockchain network to the temporary node within the preset time period;

[0022] Using the pre-acquired CA certificate of the auditing agency to encrypt the blockchain data in the temporary node;

[0023] The encrypted blockchain data is sent to the auditing agency so that the auditing agency can decrypt the blockchain data and then conduct an audit.

[0024] Preferably, the preset prohibition rules include:

[0025] Block the blockchain network, or restrict the issuance of keys in the blockchain network, or restrict the endorsement process in the blockchain network.

[0026] Preferably, after the step of synchronizing the blockchain data to be audited in the blockchain network to the temporary node within the preset time period, it also includes:

[0027] The prohibition on generating messages of preset types in the blockchain network within a preset time period is lifted, and the temporary node is prevented from generating new data according to preset blocking rules.

[0028] Furthermore, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, which stores a blockchain-based offline audit system, and the blockchain-based offline audit system can be executed by at least one processor so that the at least one processor performs the steps of the above-mentioned blockchain-based offline audit method.

[0029] The offline audit method, electronic device and readable storage medium based on blockchain proposed in the present invention, by creating a temporary node in the blockchain network, prohibiting the generation of preset type messages in the blockchain network within a preset time period according to preset prohibition rules; synchronizing the blockchain data to be audited in the blockchain network to the temporary node within the preset time period; using the CA certificate of the audit agency obtained in advance to encrypt the blockchain data in the temporary node; sending the encrypted blockchain data to the audit agency, so that the audit agency can decrypt the blockchain data and then audit it. Since the generation of new messages in the blockchain network during data synchronization can be prohibited by creating a temporary node, there is no need for the audit agency to participate in the blockchain network, which reduces management costs. Moreover, the blockchain data to be audited is encrypted using the CA certificate of the audit agency obtained in advance and then sent to the audit agency. Only the audit agency itself can decrypt and obtain the content of the blockchain data to be audited, without the risk of data leakage, ensuring the security of blockchain data. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 This is a schematic diagram of the operating environment of a preferred embodiment of the blockchain-based offline audit system 10 of the present invention;

[0031] Figure 2 This is a flow chart of an embodiment of an offline audit method based on blockchain of the present invention. DETAILED DESCRIPTION

[0032] In order to make the purpose, technical scheme and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0033] It should be noted that the descriptions of "first", "second", etc. in the present invention are only used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.

[0034] The present invention provides an offline audit system based on blockchain. Figure 1 , is a schematic diagram of the operating environment of a preferred embodiment of the blockchain-based offline audit system 10 of the present invention.

[0035] In this embodiment, the blockchain-based offline audit system 10 is installed and runs in an electronic device 1. The electronic device 1 may include, but is not limited to, a memory 11, a processor 12, and a display 13. Figure 1 The electronic device 1 is shown only with components 11 - 13 , but it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.

[0036] The memory 11 is at least one type of computer-readable storage medium. In some embodiments, the memory 11 may be an internal storage unit of the electronic device 1, such as a hard disk or memory of the electronic device 1. In other embodiments, the memory 11 may also be an external storage device of the electronic device 1, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device 1. Further, the memory 11 may also include both an internal storage unit of the electronic device 1 and an external storage device. The memory 11 is used to store application software and various types of data installed in the electronic device 1, such as the program code of the offline audit system 10 based on blockchain, etc. The memory 11 can also be used to temporarily store data that has been output or is to be output.

[0037] In some embodiments, the processor 12 may be a central processing unit (CPU), a microprocessor or other data processing chip, used to run the program code or process data stored in the memory 11, such as executing the blockchain-based offline audit system 10.

[0038] In some embodiments, the display 13 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, etc. The display 13 is used to display information processed in the electronic device 1 and to display a visual user interface, such as created temporary node information, blockchain data to be audited, etc. The components 11-13 of the electronic device 1 communicate with each other via a system bus.

[0039] The blockchain-based offline audit system 10 includes at least one computer-readable instruction stored in the memory 11, and the at least one computer-readable instruction can be executed by the processor 12 to implement various embodiments of the present application.

[0040] The blockchain-based offline audit system 10 implements the following steps when executed by the processor 12:

[0041] Step S1, after receiving an audit request from an auditing agency for data in a blockchain network, create a temporary node in the blockchain network, and prohibit the generation of preset type messages in the blockchain network within a preset time period according to preset prohibition rules;

[0042] Step S2, synchronizing the blockchain data to be audited in the blockchain network to the temporary node within the preset time period;

[0043] Step S3, using the pre-acquired CA certificate of the auditing agency to encrypt the blockchain data in the temporary node;

[0044] Step S4, sending the encrypted blockchain data to the auditing agency, so that the auditing agency can decrypt the blockchain data and then conduct an audit.

[0045] In this embodiment, the blockchain-based offline audit system receives audit requests for data in the blockchain network issued by the audit agency, for example, receives audit requests sent by users through terminals such as mobile phones, tablet computers, and self-service terminal devices, such as receiving audit requests sent by users of the audit agency on clients pre-installed in terminals such as mobile phones, tablet computers, and self-service terminal devices, or receiving audit requests sent by users of the audit agency on browser systems in terminals such as mobile phones, tablet computers, and self-service terminal devices.

[0046] In this embodiment, a blockchain offline audit function based on the PKI (Public Key Infrastructure) public key infrastructure encryption system is provided. First, the auditing agency requesting to audit the blockchain network sends its CA certificate (public key) to the blockchain network, or the blockchain network asks the auditing agency for the agency's CA certificate (public key) for subsequent use. Among them, the CA certificate is obtained by the auditing agency from the certification agency (CA), that is, the application and issuance authority of the digital certificate. In PKI, in order to ensure the correct match between the user's identity and the key held by the user, the public key system requires a trustworthy and independent third-party agency to act as a certification center (CA) to confirm the true identity of the public key owner. This digital certificate contains part of the user's identity information and the public key held by the user. The certification center uses its own private key to add a digital signature to the digital certificate. Any user who wants to issue his own public key can go to the certification center to apply for his own certificate. After identifying the true identity, the certification center issues a digital certificate containing the user's public key. As long as other users can verify that the certificate is authentic and trust the certification center that issues the certificate, they can confirm the user's public key.

[0047] After the blockchain network obtains the CA certificate (public key) of the auditing agency, it needs to authenticate the issued certificate through the certificate chain technology, and will only receive it after the authentication is passed. That is, if the CA authentication center confirms that the CA certificate is indeed the CA certificate (public key) corresponding to the auditing agency, the authentication is passed, and the CA certificate corresponding to the auditing agency is saved in the blockchain network for subsequent use.

[0048] After receiving an audit request from an auditing agency for data in a blockchain network, a temporary node is created in the blockchain network, and the generation of preset type messages in the blockchain network is prohibited within a preset time period according to preset prohibition rules, and the blockchain data to be audited in the blockchain network is synchronized to the temporary node within the preset time period. Specifically, when the auditing agency needs to audit a certain blockchain data in the blockchain network, it applies to create a temporary node by the blockchain network. At this time, the blockchain is prohibited from generating preset type messages within a period of time. The preset type messages can be transaction information, query information, etc. In an optional implementation, the preset type messages are all types of messages, that is, the blockchain is prohibited from generating any messages within a period of time.

[0049] When the preset prohibition rules prohibit the generation of preset type messages in the blockchain network within the preset time period, the preset prohibition rules include but are not limited to the following prohibition methods: 1. Blocking the blockchain network; 2. Controlling the key issuance process in the blockchain network, thereby controlling various processes that need to be completed using keys; 3. Controlling the endorsement process in the blockchain network. The purpose of prohibiting the generation of preset type messages in the blockchain network within the preset time period is to clarify the completion time of synchronized data. During the period when any message is prohibited in the blockchain network, the blockchain will synchronize the blockchain data to be audited or the data of the entire blockchain network to the newly created temporary node.

[0050] After synchronizing the blockchain data to be audited in the blockchain network to the temporary node within the preset time period, the blockchain data in the temporary node is encrypted using the CA certificate of the auditing agency obtained in advance. And the encrypted blockchain data is sent to the auditing agency for the auditing agency to decrypt the blockchain data and then audit. In an optional implementation, since each block data generated by the blockchain is encrypted to ensure that the data inside the blockchain cannot be read outside the blockchain, all encryption keys will be saved inside the blockchain. Therefore, if an offline audit is to be performed, the block data and the key data need to be submitted at the same time. In this embodiment, the blockchain data and the blockchain key data in the temporary node can be encrypted by the CA certificate (public key) of the auditing agency obtained in advance, and the encrypted blockchain data and the blockchain key data are sent to the auditing agency for the auditing agency to decrypt the blockchain data and then audit. For example, a pre-set encryption algorithm can be used for encryption. In this embodiment, the encryption algorithm used is an asymmetric encryption algorithm, which requires two keys: a public key and a private key. The public key and the private key are a pair. If the data is encrypted with the public key, it can only be decrypted with the corresponding private key; if the data is encrypted with the private key, it can only be decrypted with the corresponding public key. After the block data and key data are encrypted using the CA certificate (public key) of the auditing agency obtained in advance, they can only be decrypted with the private key corresponding to the encrypted public key, and only the auditing agency can apply for the encrypted private key from the CA center based on the encrypted public key, that is, the CA certificate (public key). The security of blockchain data is guaranteed. The asymmetric encryption algorithms in this embodiment include RSA, Elgamal, backpack algorithm, Rabin, DH, ECC (elliptic curve encryption algorithm), etc.

[0051] The encrypted blockchain data is sent to the auditing agency, so that the auditing agency can decrypt the blockchain data and then conduct an audit. For example, after encryption, the data is submitted to the auditing agency through the network, copying, etc. After the submission is completed, the blockchain network is notified, and the blockchain network deletes the temporary node and recycles the resources. After the auditing agency obtains the encrypted key data and block data, during the audit, it can decrypt the data through the CA certificate (private key) applied for from the CA center, and obtain the blockchain data to be audited for auditing operations.

[0052] This embodiment creates a temporary node in the blockchain network, prohibits the generation of preset type messages in the blockchain network within a preset time period according to preset prohibition rules; synchronizes the blockchain data to be audited in the blockchain network to the temporary node within the preset time period; uses the pre-acquired CA certificate of the auditing agency to encrypt the blockchain data in the temporary node; and sends the encrypted blockchain data to the auditing agency for the auditing agency to decrypt the blockchain data and then audit. Since the generation of new messages in the blockchain network during data synchronization can be prohibited by creating a temporary node, there is no need for the auditing agency to participate in the blockchain network, which reduces management costs. Moreover, the blockchain data to be audited is encrypted using the pre-acquired CA certificate of the auditing agency and then sent to the auditing agency. Only the auditing agency itself can decrypt and obtain the content of the blockchain data to be audited, without the risk of data leakage, ensuring the security of blockchain data.

[0053] In an optional embodiment, in the above Figure 1 Based on the embodiment of the present invention, after the blockchain-based offline audit system 10 is executed by the processor 12 to implement the step S2, the following steps are also implemented:

[0054] The prohibition on generating messages of preset types in the blockchain network within a preset time period is lifted, and the temporary node is prevented from generating new data according to preset blocking rules.

[0055] In this embodiment, after the blockchain data to be audited in the blockchain network is synchronized to the temporary node, the prohibition on generating any message in the blockchain network within the preset time period is lifted, so that the blockchain can continue to work, thereby minimizing the impact of the audit on the normal operation of the blockchain network. In addition, the temporary node is prevented from generating new data according to the preset blocking rules to avoid the temporary node from interfering with the normal operation of the blockchain network. The preset blocking rules include but are not limited to the following blocking methods: limiting the write operation permission of the temporary node disk, or limiting the access rights of the temporary node to the blockchain network, etc.

[0056] like Figure 2 As shown, Figure 2 The flowchart of an embodiment of an offline audit method based on blockchain of the present invention is as follows:

[0057] Step S10, after receiving an audit request from an auditing agency for data in a blockchain network, creating a temporary node in the blockchain network, and prohibiting the blockchain network from generating messages of a preset type within a preset time period according to preset prohibition rules;

[0058] Step S20, synchronizing the blockchain data to be audited in the blockchain network to the temporary node within the preset time period;

[0059] Step S30, using the pre-acquired CA certificate of the auditing agency to encrypt the blockchain data in the temporary node;

[0060] Step S40, sending the encrypted blockchain data to the auditing agency, so that the auditing agency can decrypt the blockchain data and then conduct an audit.

[0061] In this embodiment, the blockchain-based offline audit system receives audit requests for data in the blockchain network issued by the audit agency, for example, receives audit requests sent by users through terminals such as mobile phones, tablet computers, and self-service terminal devices, such as receiving audit requests sent by users of the audit agency on clients pre-installed in terminals such as mobile phones, tablet computers, and self-service terminal devices, or receiving audit requests sent by users of the audit agency on browser systems in terminals such as mobile phones, tablet computers, and self-service terminal devices.

[0062] In this embodiment, a blockchain offline audit function based on the PKI (Public Key Infrastructure) public key infrastructure encryption system is provided. First, the auditing agency requesting to audit the blockchain network sends its CA certificate (public key) to the blockchain network, or the blockchain network asks the auditing agency for the agency's CA certificate (public key) for subsequent use. Among them, the CA certificate is obtained by the auditing agency from the certification agency (CA), that is, the application and issuance authority of the digital certificate. In PKI, in order to ensure the correct match between the user's identity and the key held by the user, the public key system requires a trustworthy and independent third-party agency to act as a certification center (CA) to confirm the true identity of the public key owner. This digital certificate contains part of the user's identity information and the public key held by the user. The certification center uses its own private key to add a digital signature to the digital certificate. Any user who wants to issue his own public key can go to the certification center to apply for his own certificate. After identifying the true identity, the certification center issues a digital certificate containing the user's public key. As long as other users can verify that the certificate is authentic and trust the certification center that issues the certificate, they can confirm the user's public key.

[0063] After the blockchain network obtains the CA certificate (public key) of the auditing agency, it needs to authenticate the issued certificate through the certificate chain technology, and will only receive it after the authentication is passed. That is, if the CA authentication center confirms that the CA certificate is indeed the CA certificate (public key) corresponding to the auditing agency, the authentication is passed, and the CA certificate corresponding to the auditing agency is saved in the blockchain network for subsequent use.

[0064] After receiving an audit request from an auditing agency for data in a blockchain network, a temporary node is created in the blockchain network, and the generation of preset type messages in the blockchain network is prohibited within a preset time period according to preset prohibition rules, and the blockchain data to be audited in the blockchain network is synchronized to the temporary node within the preset time period. Specifically, when the auditing agency needs to audit a certain blockchain data in the blockchain network, it applies to create a temporary node by the blockchain network. At this time, the blockchain is prohibited from generating preset type messages within a period of time. The preset type messages can be transaction information, query information, etc. In an optional implementation, the preset type messages are all types of messages, that is, the blockchain is prohibited from generating any messages within a period of time.

[0065] When the preset prohibition rules prohibit the generation of preset type messages in the blockchain network within the preset time period, the preset prohibition rules include but are not limited to the following prohibition methods: 1. Blocking the blockchain network; 2. Controlling the key issuance process in the blockchain network, thereby controlling various processes that need to be completed using keys; 3. Controlling the endorsement process in the blockchain network. The purpose of prohibiting the generation of preset type messages in the blockchain network within the preset time period is to clarify the completion time of synchronized data. During the period when any message is prohibited in the blockchain network, the blockchain will synchronize the blockchain data to be audited or the data of the entire blockchain network to the newly created temporary node.

[0066] After synchronizing the blockchain data to be audited in the blockchain network to the temporary node within the preset time period, the blockchain data in the temporary node is encrypted using the CA certificate of the auditing agency obtained in advance. And the encrypted blockchain data is sent to the auditing agency for the auditing agency to decrypt the blockchain data and then audit. In an optional implementation, since each block data generated by the blockchain is encrypted to ensure that the data inside the blockchain cannot be read outside the blockchain, all encryption keys will be saved inside the blockchain. Therefore, if an offline audit is to be performed, the block data and the key data need to be submitted at the same time. In this embodiment, the blockchain data and the blockchain key data in the temporary node can be encrypted by the CA certificate (public key) of the auditing agency obtained in advance, and the encrypted blockchain data and the blockchain key data are sent to the auditing agency for the auditing agency to decrypt the blockchain data and then audit. For example, a pre-set encryption algorithm can be used for encryption. In this embodiment, the encryption algorithm used is an asymmetric encryption algorithm, which requires two keys: a public key and a private key. The public key and the private key are a pair. If the data is encrypted with the public key, it can only be decrypted with the corresponding private key; if the data is encrypted with the private key, it can only be decrypted with the corresponding public key. After the block data and key data are encrypted using the CA certificate (public key) of the auditing agency obtained in advance, they can only be decrypted with the private key corresponding to the encrypted public key, and only the auditing agency can apply for the encrypted private key from the CA center based on the encrypted public key, that is, the CA certificate (public key). The security of blockchain data is guaranteed. The asymmetric encryption algorithms in this embodiment include RSA, Elgamal, backpack algorithm, Rabin, DH, ECC (elliptic curve encryption algorithm), etc.

[0067] The encrypted blockchain data is sent to the auditing agency, so that the auditing agency can decrypt the blockchain data and then conduct an audit. For example, after encryption, the data is submitted to the auditing agency through the network, copying, etc. After the submission is completed, the blockchain network is notified, and the blockchain network deletes the temporary node and recycles the resources. After the auditing agency obtains the encrypted key data and block data, during the audit, it can decrypt the data through the CA certificate (private key) applied for from the CA center, and obtain the blockchain data to be audited for auditing operations.

[0068] This embodiment creates a temporary node in the blockchain network, prohibits the generation of preset type messages in the blockchain network within a preset time period according to preset prohibition rules; synchronizes the blockchain data to be audited in the blockchain network to the temporary node within the preset time period; uses the pre-acquired CA certificate of the auditing agency to encrypt the blockchain data in the temporary node; and sends the encrypted blockchain data to the auditing agency for the auditing agency to decrypt the blockchain data and then audit. Since the generation of new messages in the blockchain network during data synchronization can be prohibited by creating a temporary node, there is no need for the auditing agency to participate in the blockchain network, which reduces management costs. Moreover, the blockchain data to be audited is encrypted using the pre-acquired CA certificate of the auditing agency and then sent to the auditing agency. Only the auditing agency itself can decrypt and obtain the content of the blockchain data to be audited, without the risk of data leakage, ensuring the security of blockchain data.

[0069] In an optional embodiment, based on the above embodiment, after step S20, the method further includes the following steps:

[0070] The prohibition on generating messages of preset types in the blockchain network within a preset time period is lifted, and the temporary node is prevented from generating new data according to preset blocking rules.

[0071] In this embodiment, after the blockchain data to be audited in the blockchain network is synchronized to the temporary node, the prohibition on generating any message in the blockchain network within the preset time period is lifted, so that the blockchain can continue to work, thereby minimizing the impact of the audit on the normal operation of the blockchain network. In addition, the temporary node is prevented from generating new data according to the preset blocking rules to avoid the temporary node from interfering with the normal operation of the blockchain network. The preset blocking rules include but are not limited to the following blocking methods: limiting the write operation permission of the temporary node disk, or limiting the access rights of the temporary node to the blockchain network, etc.

[0072] In addition, the present invention also provides a computer-readable storage medium, which stores a blockchain-based offline audit system. The blockchain-based offline audit system can be executed by at least one processor so that the at least one processor performs the steps of the blockchain-based offline audit method in the above embodiment. The specific implementation process of steps S10, S20, S30, etc. of the blockchain-based offline audit method is as described above and will not be repeated here.

[0073] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0074] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0075] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the present invention is not limited thereto. The serial numbers of the embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments. In addition, although the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in a different order than that shown here.

[0076] Those skilled in the art may implement the present invention in a variety of variations without departing from the scope and essence of the present invention, such as using a feature of one embodiment to obtain another embodiment. Any modification, equivalent substitution and improvement made within the technical concept of the present invention shall be within the scope of the present invention.

Claims

1. An offline audit method based on blockchain, It is characterized in that The blockchain-based offline audit method includes: After receiving an audit request from an auditing agency for data in a blockchain network, a temporary node is created in the blockchain network, and preset prohibition rules are used to prohibit the generation of preset type messages in the blockchain network within a preset time period, wherein the preset prohibition rules include: blocking the blockchain network, or restricting the issuance of keys in the blockchain network, or restricting the endorsement process in the blockchain network; Synchronizing the blockchain data to be audited in the blockchain network to the temporary node within the preset time period; Using the pre-acquired CA certificate of the auditing agency to encrypt the blockchain data in the temporary node; The encrypted blockchain data is sent to the auditing agency so that the auditing agency can decrypt the blockchain data and then conduct an audit.

2. The offline audit method based on blockchain as claimed in claim 1, It is characterized in that After the step of synchronizing the blockchain data to be audited in the blockchain network to the temporary node within the preset time period, the blockchain-based offline audit method further includes: The prohibition on generating messages of preset types in the blockchain network within a preset time period is lifted, and the temporary node is prevented from generating new data according to preset blocking rules.

3. The offline audit method based on blockchain as claimed in claim 2, It is characterized in that The preset blocking rules include: Restrict the write operation permission of the temporary node disk, or restrict the access permission of the temporary node to the blockchain network.

4. The offline audit method based on blockchain as claimed in claim 1, It is characterized in that After receiving an audit request from an auditing agency for data in a blockchain network, before the step of creating a temporary node in the blockchain network and prohibiting the blockchain network from generating messages of a preset type within a preset time period according to a preset prohibition rule, the blockchain-based offline audit method further includes: Receive the CA certificate sent by the auditing agency, authenticate the received CA certificate, and save the CA certificate sent by the auditing agency in the blockchain network after the authentication is passed.

5. The offline audit method based on blockchain as claimed in claim 1, It is characterized in that After the step of sending the encrypted blockchain data to the auditing agency, the blockchain-based offline auditing method further includes: Delete the temporary node in the blockchain network.

6. An electronic device, It is characterized in that The electronic device includes a memory and a processor. The memory stores an offline audit system based on blockchain that can be run on the processor. When the offline audit system based on blockchain is executed by the processor, the following steps are implemented: After receiving an audit request from an auditing agency for data in a blockchain network, a temporary node is created in the blockchain network, and preset prohibition rules are used to prohibit the generation of preset type messages in the blockchain network within a preset time period; The preset prohibition rules include: blocking the blockchain network, or restricting the issuance of keys in the blockchain network, or restricting the endorsement process in the blockchain network; Synchronizing the blockchain data to be audited in the blockchain network to the temporary node within the preset time period; Using the pre-acquired CA certificate of the auditing agency to encrypt the blockchain data in the temporary node; The encrypted blockchain data is sent to the auditing agency so that the auditing agency can decrypt the blockchain data and then conduct an audit.

7. The electronic device as claimed in claim 6, It is characterized in that The preset prohibition rules include: Block the blockchain network, or restrict the issuance of keys in the blockchain network, or restrict the endorsement process in the blockchain network.

8. The electronic device according to claim 6 or 7, It is characterized in that After the step of synchronizing the blockchain data to be audited in the blockchain network to the temporary node within the preset time period, it also includes: The prohibition on generating messages of preset types in the blockchain network within a preset time period is lifted, and the temporary node is prevented from generating new data according to preset blocking rules.

9. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a blockchain-based offline audit system, and when the blockchain-based offline audit system is executed by a processor, the steps of the blockchain-based offline audit method as described in any one of claims 1 to 5 are implemented.