Blockchain digital bond data processing method, device and service terminal

By pulling data to the service terminal in the blockchain network and converting it into structured data, the problem of high computing resource consumption in the blockchain network is solved, and the efficiency of data query and transaction processing is improved.

CN120196665BActive Publication Date: 2025-09-19ZHONGJINKE INFORMATION TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510153450.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-12
Publication Date
2025-09-19
Estimated Expiration
2045-02-12

AI Technical Summary

Technical Problem

The repeated encryption and decryption process in the blockchain network consumes a lot of computing resources, resulting in low data query efficiency and reduced transaction processing efficiency.

Method used

Pull the data in the blockchain network to the service terminal of the transaction node, and convert the unstructured data into structured data and store it in the preset database. Users can query it directly, reducing the encryption and decryption process.

Benefits of technology

It improves data query efficiency, reduces the consumption of computing resources, and improves transaction processing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120196665B_ABST
    Figure CN120196665B_ABST
Patent Text Reader

Abstract

This application relates to a blockchain digital bond data processing method, device, and service terminal, and relates to the field of blockchain data processing technology, aiming to at least address the problem in related technologies of high computing resource consumption and low data query efficiency, which leads to reduced transaction processing efficiency. The method comprises: obtaining first target data associated with a target transaction node from a blockchain network according to the data acquisition authority of the target transaction node to which the service terminal belongs; the blockchain network includes multiple blockchains; converting the first target data into second target data according to preset data conversion rules; the second target data are all structured data; storing the second target data in a preset database, so that a target user account can query the second target data from the preset database; the target user account is a user account that has data query authority for the second target data in the preset database.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of blockchain data processing technology, and in particular to a blockchain digital bond data processing method, device, and service terminal. Background Art

[0002] Each blockchain in a blockchain network represents a novel application of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms. It is a tamper-proof, shared digital ledger used to record transactions within public or private peer-to-peer networks. The blockchain ledger data structure utilizes a linked list structure and is distributed to all transaction nodes in the network. Asset transactions between transaction nodes within the network are permanently recorded in a chain of blocks linked by a hashing algorithm. To query data related to a specific transaction node, the entire chain of associated blockchains is coded, encrypted for transmission, decrypted for reception, and decrypted for block data. However, this repetitive encryption and decryption process consumes significant computing resources, resulting in inefficient data queries and significantly reduced transaction processing efficiency. Summary of the Invention

[0003] The present invention provides a blockchain digital bond data processing method, device, and service terminal to at least address the related art issues of high computational resource consumption and low data query efficiency, which lead to reduced transaction processing efficiency. The technical solution of the present invention is as follows.

[0004] According to a first aspect of an embodiment of the present invention, a blockchain digital bond data processing method is provided, which is applied to a service terminal of any transaction node among multiple transaction nodes associated with a blockchain network, the method comprising: obtaining first target data associated with the target transaction node from the blockchain network according to the data acquisition authority of the target transaction node to which the service terminal belongs; the blockchain network comprises multiple blockchains; converting the first target data into second target data according to preset data conversion rules; the second target data are all structured data; storing the second target data in a preset database so that a target user account queries the second target data from the preset database; the target user account is a user account that has data query authority for the second target data in the preset database; the target transaction node represents any one of the following bond business nodes: a bond issuance node, a bond registration node, a bond custody node, a bond trading node, and a bond settlement node.

[0005] In one implementation, each blockchain in the blockchain network corresponds to a channel one-to-one; according to the data acquisition authority of the target transaction node to which the service terminal belongs, first target data associated with the target transaction node is obtained from the blockchain network, including: determining a target channel associated with the target transaction node; determining a target blockchain corresponding to the target channel from the blockchain network; obtaining target blockchain data from the target blockchain according to a preset period; and parsing block data of each block in the target blockchain data to obtain the first target data.

[0006] In another implementation, the block data of each block in the target blockchain data is parsed to obtain the first target data, including: according to the first preset on-chain rule of the target transaction node, the data structure of the block data on the target blockchain is plaintext parsed to obtain the target block data of the target block and the target business data type of the target business data included in the target block data; according to the association mapping relationship between the business data type and the encryption algorithm in the configuration file, the target decryption algorithm associated with the target business data type is determined; and the target decryption algorithm is used to decrypt the target block data to obtain the first target data.

[0007] In another implementation, the block data of each block in the target blockchain data is parsed to obtain the first target data, including: according to the second preset on-chain rule of the target transaction node, the data structure on the target blockchain is plaintext parsed to obtain the target block data of the target block and the target algorithm identifier of the target decryption algorithm for decrypting the target block data; using the target decryption algorithm corresponding to the target algorithm identifier to decrypt the target block data to obtain the first target data.

[0008] In another implementation, the preset data conversion rule includes a block data template, a transaction data template, an event data template, a contract data template, and a contract call data template, and the second target data includes second block data, second transaction data, second event data, second contract data, and second contract call data; according to the preset data conversion template, the first target data is converted into the second target data, including: extracting the first block data, the first transaction data, the first event data, the first contract data, and the first contract call data from the first target data; according to the first distribution sequence of the block data in the block data template, the first block data is converted into the second block data; the second block data is distributed and arranged according to the first distribution sequence; and according to the transaction data According to the second distribution sequence of the transaction data in the template, the first transaction data is converted into the second transaction data; the second transaction data is distributed and arranged according to the second distribution sequence; and, according to the third distribution sequence of the event data in the event data template, the first event data is converted into the second event data; the second event data is distributed and arranged according to the third distribution sequence; and, according to the fourth distribution sequence of the contract data in the contract data template, the first contract data is converted into the second contract data; the second contract data is distributed and arranged according to the fourth distribution sequence; and, according to the fifth distribution sequence of the contract call data in the contract call data template, the first contract call data is converted into the second contract call data; the second contract call data is distributed and arranged according to the fourth distribution sequence.

[0009] In another implementation, the method further includes: associating the second block data in the second target data with the block index identifier; and associating the second transaction data with the transaction index identifier; and associating the second event data with the event index identifier; and associating the second contract data with the contract index identifier; and associating the second contract call data with the contract call identifier.

[0010] In another implementation, the method further includes: encrypting the data to be encrypted in the business data according to the encryption algorithm corresponding to the business type of the business data of the target transaction node in the configuration file; based on the first preset chain rule, uploading the encrypted data to be encrypted, the storage area information of the encrypted data to be encrypted and the unencrypted data in the business data according to the first preset data structure; the unencrypted data includes the business data type.

[0011] In another implementation, the method also includes: encrypting the data to be encrypted in the business data according to a preset encryption algorithm; based on a second preset chain rule, the encrypted data to be encrypted, the decryption algorithm corresponding to the preset encryption algorithm, and the unencrypted data in the business data are chained according to the second preset data structure.

[0012] According to a second aspect of an embodiment of the present invention, a blockchain digital bond data processing device is provided, which is applied to a service terminal of any transaction node among multiple transaction nodes associated with a blockchain network; the device includes: a data acquisition unit, which is used to obtain first target data associated with the target transaction node from the blockchain network according to the data acquisition authority of the target transaction node to which the service terminal belongs; the blockchain network includes multiple blockchains; a data conversion unit, which is used to convert the first target data into second target data according to preset data conversion rules; the second target data are all structured data; a data query unit, which is used to store the second target data in a preset database, so that the target user account queries the second target data from the preset database; the target user account is a user account that has data query authority for the second target data in the preset database; the target transaction node represents any one of the following bond business nodes: bond issuance node, bond registration node, bond custody node, bond trading node and bond settlement node.

[0013] According to a third aspect of an embodiment of the present invention, a blockchain data processing system is provided, which includes an encoder, a decoder, and a preset codebook, and the system is provided with an audio conversion model. The system is configured to execute the blockchain digital bond data processing method as described in the first aspect and any possible implementation thereof.

[0014] According to a fourth aspect of an embodiment of the present invention, a service terminal is provided, comprising: a processor and a memory for storing processor-executable instructions; wherein the processor is configured to execute the executable instructions to implement a blockchain digital bond data processing method as described in the first aspect and any possible implementation thereof.

[0015] According to a fifth aspect of an embodiment of the present invention, a computer-readable storage medium is provided, on which instructions are stored. When the instructions in the computer-readable storage medium are executed by a processor of a service terminal, the service terminal is enabled to execute the blockchain digital bond data processing method as described in the first aspect and any possible implementation thereof.

[0016] According to a sixth aspect of an embodiment of the present disclosure, a computer program product is provided, which includes computer instructions. When the computer instructions are run on a service terminal, the service terminal executes the blockchain digital bond data processing method of the above-mentioned first aspect and any possible implementation thereof.

[0017] The technical solution provided by the embodiments of the present invention brings at least the following beneficial effects: The present application first obtains first target data associated with a target transaction node from a blockchain network. Given that the first target data includes data from different blockchains in the blockchain network, and the encryption and decryption methods of different blockchain data are different, the first target data may include unstructured data. In order to avoid the problem of low indexing efficiency during data query caused by the above-mentioned unstructured data, the first target data is further converted into second target data that is all structured, and the second target data is stored in a preset database of a service terminal device, so that users with query permissions can directly obtain the data they need from the preset database without encryption and decryption, thereby reducing the consumption of computing operation resources by the encryption and decryption process, improving data query efficiency, and thus improving transaction processing efficiency.

[0018] Furthermore, in the implementation manner of the present application, the data associated with the transaction node obtained from the blockchain network is directly pulled to the service terminal of the transaction node (such as a local database). The above-mentioned data pulling process only requires one encryption and decryption process, which can ensure that users with data query permissions can repeatedly query the above-mentioned pulled data, and also greatly reduces the repeated consumption of computing operation resources by the repeated encryption and decryption process.

[0019] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The accompanying drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute an improper limitation of the present disclosure.

[0021] Figure 1 This is a flowchart of a blockchain digital bond data processing method according to an exemplary embodiment;

[0022] Figure 2 This is a block diagram of a blockchain digital bond data processing device according to an exemplary embodiment;

[0023] Figure 3 The figure is a schematic diagram of a service terminal according to an exemplary embodiment. DETAILED DESCRIPTION

[0024] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.

[0025] It should be noted that the terms "first," "second," and the like in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or precedence. It should be understood that the numbers used in this manner are interchangeable where appropriate so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure as detailed in the appended claims.

[0026] Before introducing the blockchain data processing method provided by the embodiments of the present application in detail, a brief introduction to the application scenarios involved in the embodiments of the present application is first given.

[0027] Each blockchain in a blockchain network represents a novel application of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms. It is a tamper-proof, shared digital ledger used to record transactions within public or private peer-to-peer networks. The blockchain ledger data structure utilizes a linked list structure and is distributed to all transaction nodes in the network. Asset transactions between transaction nodes within the network are permanently recorded in a chain of blocks linked by a hashing algorithm. To query data related to a specific transaction node, the entire chain of associated blockchains is coded, encrypted for transmission, decrypted for reception, and decrypted for block data. However, this repetitive encryption and decryption process consumes significant computing resources, resulting in inefficient data queries and significantly reduced transaction processing efficiency.

[0028] In related technologies, the blockchain ledger data structure adopts a linked list structure. The ledger is distributed to all member nodes in the network. In the sequential chain of blocks linked by a hash cryptographic algorithm, the historical records of asset transactions between peer nodes in the network are permanently recorded; its sequential chain is a linked list structure composed of blocks connected in series through hash (also known as hash). Each block consists of two parts: a block header and a block body. The block header is the hash value of the parent block, and the block body contains a list of all transactions in the current block (i.e., account page information).

[0029] Research has found that blockchain is a distributed accounting process, which is stored in the organization of each transaction node. Each organization needs to store all the data on the blockchain, and each organization can only query and use its own data. When querying based on the data on the entire blockchain, its throughput is low, resulting in very low storage efficiency and retrieval efficiency of the blockchain.

[0030] Related blockchain systems typically rely solely on hashing and signature encryption algorithms to support underlying security. Business data security requires the use of traditional symmetric and asymmetric encryption techniques, as well as modern cryptographic algorithms. Furthermore, different business scenarios require different algorithm types, resulting in varying data types on-chain. This makes it difficult to directly pull blockchain ledgers into an organization's traditional local database.

[0031] Therefore, in response to the above problems, this application proposes a blockchain data processing method, which first pulls the data on the blockchain to the local service terminal for storage, and converts the unstructured data in the pulled data into structured data, and then stores it in a preset database, so that users can query data based on the preset database. Based on this, this application pulls the data associated with the transaction node obtained from the blockchain network directly to the service terminal of the transaction node (such as a local database). The above data pulling process only needs to perform a single encryption and decryption process, which can ensure that users with data query permissions can repeatedly query the above pulled data, and also greatly reduces the repeated consumption of computing operation resources by the repeated encryption and decryption process, thereby improving query efficiency.

[0032] Specifically, the structured ledger tool periodically synchronizes block data from the blockchain network, parses the block data into structured data, business information, and status data, and then stores it in the database. For data that was encrypted when uploaded to the chain, if decryption permission is granted, it will be parsed in plain text.

[0033] For ease of understanding, the blockchain data processing method provided in this application is described in detail below with reference to the accompanying drawings.

[0034] The blockchain data processing method is applied to the service terminal of any transaction node among multiple transaction nodes associated with the blockchain network. The service terminal can be a server,

[0035] Figure 1 This is a flowchart of a blockchain digital bond data processing method according to an exemplary embodiment. Figure 1 As shown, the blockchain data processing method includes the following steps.

[0036] S11, according to the data acquisition authority of the target transaction node to which the service terminal belongs, obtain the first target data associated with the target transaction node from the blockchain network.

[0037] The target transaction node mentioned above can be understood as any transaction node on any of the multiple blockchains included in the blockchain network. A blockchain can correspond to multiple transaction nodes. A transaction node can also correspond to at least one blockchain.

[0038] The target transaction node can be any of the following bond business nodes: bond issuance node, bond registration node, bond custody node, bond trading node and bond settlement node.

[0039] It can be understood that the target transaction node can be any one of the following institutions: a bond issuing institution, a bond registration institution, a bond custodian institution, a bond trading institution, and a bond settlement institution.

[0040] Correspondingly, the first target data may be bond issuance data, bond registration data, bond custody data, bond trading data and bond settlement data.

[0041] It should be noted that the data involved in this application can be understood as bond data or bond business data.

[0042] In some implementations, the specific process of obtaining the first target data is as follows.

[0043] First, the target block data of the target block corresponding to the target transaction node is determined from the blockchain network.

[0044] In some implementations, the above-mentioned acquisition of target block data specifically includes the following steps.

[0045] First, determine the target channel associated with the target transaction node.

[0046] In the blockchain network, each blockchain corresponds to a channel one by one. Transaction nodes are associated with channels.

[0047] The target channel representation associated with the target transaction node. The target transaction node has the data acquisition permission to obtain the data of the blockchain corresponding to the target channel.

[0048] Second, determine the target blockchain corresponding to the target channel from the blockchain network.

[0049] Different channels correspond to different blockchains. Therefore, when the target channel is determined, the target blockchain can also be determined.

[0050] Third, according to the preset period, the target blockchain data is obtained from the target blockchain.

[0051] In some embodiments, in order to increase the speed of acquiring target blockchain data, each time a block is acquired through a target channel, block data is transmitted according to the maximum number of blocks allowed by the target channel to acquire the target blockchain data.

[0052] In some embodiments, a ledger structuring tool capable of acquiring first target data is provided in the service terminal. The ledger structuring tool is capable of periodically acquiring blocks from the blockchain and storing the acquired block data in a standardized structure.

[0053] For example, first set the synchronization period and the maximum number of blocks to be synchronized. Then, start the ledger structure tool and obtain the number of all channels in the blockchain network from the configuration file according to the synchronization period. Finally, query the database to find the number of blockchains that each channel has synchronized. During a synchronization period, all channels concurrently synchronize the maximum number of blocks.

[0054] Specifically, the ledger structuring tool is triggered to periodically synchronize blocks, and all channels associated with the target transaction node in the blockchain network are traversed, so that the ledger structuring tool obtains the block data of the block number of the target block of the target blockchain synchronized by the target channel each time based on the association relationship between each target blockchain and the target block in the target transaction node in the configuration file of the unified cryptographic service engine, to obtain the first target block data.

[0055] In one method of acquiring target blockchain data, a full data acquisition request is sent to the target blockchain, and the block data on all blocks in the target blockchain obtained by the request is used as the target blockchain data. Given that the target transaction node only has partial parsing authority for the target blockchain data, the target blockchain data is directly parsed, and the block data of the block that can be successfully parsed is determined as the first target data.

[0056] In another method of obtaining target blockchain data, for the scenario where the association between the block number identifier and the transaction node has been configured during the chain-up process, a target block data acquisition request is sent to the target blockchain, and the target block data composed of each target block in the target blockchain obtained by the request is used as the target blockchain data. Given that the target transaction node only has full parsing authority for the target blockchain data, the target blockchain data is directly parsed to obtain the first target data, which can improve the data request and data parsing speed, thereby improving the acquisition speed of the first target data.

[0057] Secondly, the bond business data ciphertext of each block in the target blockchain data is parsed to obtain the first target data.

[0058] For example, a unified cryptographic service engine with block data parsing capabilities is provided in the service terminal. This unified cryptographic service engine includes multiple block data decryption and encryption algorithms. This unified cryptographic service engine can include six tool sets: key generation, key derivation, key import and conversion, encryption, decryption, and key storage.

[0059] As a decryption method, the data structure of the block data on the target blockchain is parsed in plain text to obtain the target block data of the target block and the target business data type of the target business data included in the target block data; according to the association mapping relationship between the business data type and the encryption algorithm in the configuration file, the target decryption algorithm associated with the target business data type is determined; the target block data is decrypted using the target decryption algorithm to obtain the first target data.

[0060] The target block data includes bond business data in the form of blocks, that is, the data is contained in blocks. The target block data includes ciphertext data in the form of ciphertext and plaintext data in the form of plaintext.

[0061] Specifically, the target block data includes a search block, which includes a ciphertext field indicating ciphertext information and a key ciphertext. The service terminal stores a keyword indicating the encryption field of the ciphertext information, and determines the ciphertext field from the search block based on the keyword.

[0062] (1) According to the first preset on-chain rule of bond business data (BaseInvi in ​​the following example), wherein the bond business data consists of a plaintext bond business data field (a sensitive field set to "blank" in the following example) and a business data ciphertext field (BaseInvi.Ciphertext in the following example), and a business data key ciphertext (BaseCipher in the following example), the bond business data on the block is retrieved, and then the ciphertext field therein is extracted; the central custodian institution retrieves the key ciphertext of the central custodian institution on the block (BaseCipher.Ciphertext in the following example) by combining {tender document serial number, customer account identifier, bond business type, calling user's institution, investor account number} as keywords.

[0063] (2) Obtain the module name field (in the following example: MODENAME) from the retrieved business data key ciphertext (in the following example: BaseCipher), the same module name field (in the following example: module_name) in the configuration file, and then obtain the encryption type (in the following example: enc_type), encryption field (in the following example: enc_feilds) and data ciphertext field (in the following example: ciphertext_field) in the configuration file.

[0064] (3) Based on the encryption algorithm type (enc_type in the following example), the corresponding encryption algorithm interface in the unified cryptographic service engine is called, the local private key of the central custodian is input, the key ciphertext of the central custodian (BaseCipher.Ciphertext in the following example) is decrypted to obtain the data key, and then the data ciphertext field (ciphertext_field in the following example) is decrypted with the data key to obtain the plaintext of the bond business data.

[0065] In this decryption method, since the data type of the business data in the data structure can be directly parsed from the plaintext, a configuration file pre-sets a mapping relationship between different business types and different decryption algorithms. Based on this mapping relationship in the configuration file, a target decryption algorithm corresponding to the target business type is determined. The target decryption algorithm is then invoked to decrypt the encrypted business data in the target block data, obtaining the first target data.

[0066] This decryption method is adapted to the business data of the target transaction node. The corresponding target decryption algorithm is not included in the on-chain data structure. The target decryption algorithm is called based on the associated mapping relationship in the configuration file.

[0067] Specifically, unified encryption and decryption services are implemented through configuration files to support ledger structuring. Ledger structuring tools use dynamic decryption based on configuration files when decrypting data. This requires configuring the encryption algorithm, encrypted fields, and encrypted ciphertext in the configuration files, and the configuration varies across business scenarios.

[0068] Exemplarily, the following programming language is used to parse the on-chain ciphertext data structure of a certain calling configuration file.

[0069] type Basecipher struct{

[0070] Txids[]stringjson:"txids,omitempty"

[0071] ZBSXHstringjson:"ZB5SXH" / / Bidding document serial number

[0072] ID string json:"ID" / / Customer account ID

[0073] MODNAME stringjson: "MODNAME" / / bond business type

[0074] ORG stringjson:"ORG" / / Call the user's organization

[0075] TZRZH stringjson:"TZRZH" / / Investor account

[0076] Ciphertext[]byte`json:"ciphertext" / / ciphertext

[0077] }.

[0078] The on-chain business data structure does not specify which encryption algorithm is used. Instead, it encrypts the required business data (such as age and transfer information) and stores it in the ciphertext of the on-chain ciphertext data structure. Keyword combinations are included in the ciphertext to let users know where the keywords are. The corresponding secret key is also transmitted to the chain. Therefore, different business data decryption algorithms need to be called based on the configuration file for different business types.

[0079] The ledger structuring tool uses dynamic decryption based on the configuration file when decrypting data. It is necessary to configure the encryption algorithm, encrypted fields, encrypted ciphertext, and other contents in the configuration file, and the configuration varies for multiple business scenarios.

[0080]

[0081] The data structure of the on-chain user identity certificate is as follows.

[0082]

[0083]

[0084] In some embodiments, the on-chain data structure includes a business contract, which is used to store user identity certificates and business data on the blockchain ledger.

[0085] The structure of the business data decryption configuration file is as follows.

[0086]

[0087]

[0088] The json content is shown above.

[0089] Org_name is the organization name, and confgs contains an array of decryption configuration content for different contracts: contract name is the contract name, settings is the related decryption configuration for different business modules: Taking the invi-invitation module (configuration file) as an example, env conigs is an array of encryption configuration blocks: enc type is the encryption algorithm name: encfield is the encryption configuration of a specific algorithm, for example, the "ZDCXE" and "ZDSGXE" fields under baseInviInvestorlist.InvestorControl are encrypted as shown in the example: ciphertest field indicates the location of the encrypted ciphertext field. According to the read configuration, the corresponding BBSSDK decryption function is selected for decryption, and the decryption result is returned.

[0090] The specific data decryption steps are as follows.

[0091] First, based on the parsed business data, determine the type of data key and whether it is an encryption business scenario.

[0092] Second, if it is an encryption scenario, request the decryption interface.

[0093] Third, decrypt the encrypted fields according to the configuration and return them to the ledger structuring tool.

[0094] Fourth, the structured tool obtains the returned denormalized data and updates the corresponding business data records.

[0095] Relative to the first decryption method, the data is uploaded to the chain according to the following data upload process: the data to be encrypted in the business data is encrypted according to the encryption algorithm corresponding to the business type of the business data of the target transaction node in the configuration file; based on the first preset upload rule, the encrypted data to be encrypted, the storage area information of the encrypted data to be encrypted and the unencrypted data in the business data are uploaded to the chain according to the first preset data structure; the unencrypted data includes the business data type.

[0096] In some embodiments, the encrypted data to be encrypted, the storage area information of the encrypted data to be encrypted, and the unencrypted data in the business data are combined according to the first preset chain-up rule and input into the target blockchain through the target channel.

[0097] As a second decryption method, according to the second preset on-chain rule of the target transaction node, the data structure on the target blockchain is parsed in plain text to obtain the target block data of the target block and the target algorithm identifier of the target decryption algorithm for decrypting the target block data. The target decryption algorithm corresponding to the target algorithm identifier is used to decrypt the target block data to obtain the first target data.

[0098] Relative to the second decryption method, the data is uploaded to the chain according to the following process: the data to be encrypted in the business data is encrypted according to the preset encryption algorithm; based on the second preset uploading rule, the encrypted data to be encrypted, the decryption algorithm corresponding to the preset encryption algorithm and the unencrypted data in the business data are uploaded to the chain according to the second preset data structure.

[0099] In some embodiments, a target algorithm identifier for a target decryption algorithm for decrypting target block data of a target transaction node is provided. The target algorithm identifier is combined with the encrypted target block data according to a second preset on-chain rule and then input into the target blockchain through a target channel.

[0100] In this decryption method, the target block data structure includes the decryption algorithm for the encrypted data. The target decryption algorithm is obtained by parsing the target blockchain's data structure. This decryption method eliminates the need for configuration files. By establishing consistent data on-chain rules, unified encryption and decryption services are implemented, supporting ledger structuring. By unifying the encryption and decryption interfaces and the ciphertext data structures uploaded to the blockchain across business scenarios, the consistency of uploaded data is ensured. Encryption and decryption strategies are established, enabling the encryption and decryption interfaces to automatically execute and identify the cryptographic algorithm type when called. For example, the following programming language is used to parse an on-chain ciphertext data structure that directly calls a decryption algorithm without calling a configuration file.

[0101] type Ciphertext struct{

[0102] EncTypestring / / encryption algorithm

[0103] Fields[]string / / encrypted fields

[0104] Valuestring / / encrypted ciphertext

[0105] Paramsinterface{} / / decryption parameters,

[0106] }

[0107] The Params field mentioned above is of interface type and can dynamically store ciphertext information according to the actual encryption type. For example, hybrid encryption can be KeyList and attribute encryption can be Policy.

[0108] EncType refers to the encryption algorithm type.

[0109] Fields refers to the protected business data fields.

[0110] Value refers to the encrypted ciphertext.

[0111] Params refers to extended information that dynamically stores ciphertext information based on the actual cryptographic algorithm type. For example, hybrid encryption can be KeyList, and attribute encryption can be Policy.

[0112] For the hybrid encryption algorithm, a KeyList subfield structure containing the public key encryption ciphertext of the symmetric key is added to the param field of the business contract and uploaded to the blockchain along with the business data. Compared to the BaseCipher scheme in solution 1, the Keylist does not include "MODNAME / / invi-," meaning the name of the bond business to which the configuration file belongs does not need to be defined.

[0113] The corresponding on-chain business data structure is as follows.

[0114]

[0115]

[0116] Among them, the on-chain ciphertext is embedded in the business data.

[0117] The content [] in the "cipertexts" above is the on-chain ciphertext data structure, specifically: [{"enctype":"hybrid","fileds":["address","phone'],"value":"sssssssssssssssss'"params":[{"id":"ccdc","org":"ccdc","secret":"bbbbbbbbbbbbbbbb","keylist":["a","a"].

[0118] The corresponding on-chain user identity certificate data structure is consistent with the on-chain user identity certificate data structure in the above-mentioned configuration file calling scenario.

[0119] The decryption process for business data is as follows: no specific configuration is required, and a unified decryption interface is used. The decryption process is as follows. The first method, for the hybrid decryption process, is as follows: first, obtain the bond business data (BaseInvi) on the chain, extract the data ciphertext field (BaseInvi.cipertexts.value) from it, obtain the central custodian's key ciphertext (keylist) through the user identifier (id) and user organization (org) fields, then call the SM2 algorithm decryption interface in the unified cryptographic service, input the central custodian's key ciphertext (keylist) and the central custodian's local private key, decrypt the key ciphertext to obtain the data encryption key, and finally call the SM4 algorithm decryption interface in the unified cryptographic service, input the data ciphertext field (BaseInvi.cipertexts.value) and the data encryption key to obtain the plaintext of the sensitive fields of the bond business data.

[0120] The second method is the decryption process for homomorphic encryption: obtain the bond business data ciphertext (BaseInvi) on the chain, call the SM4 algorithm decryption interface in the unified cryptographic service, input the local decryption key (shard), decrypt the data ciphertext to obtain the bond business data sensitive field plaintext.

[0121] The type of the above-mentioned target decryption algorithm can be an algorithm type supported by the unified cryptographic service engine.

[0122] For example, the national secret algorithms include SM2, SM4, and SM9; non-national secret algorithms include RSA and AES; related cryptographic algorithms include homomorphic Paillier, fully homomorphic CKKS, attribute-based encryption algorithms cp-abe and kp-abe; hybrid encryption (SM4+SM2; SM4+SM9); and quantum-resistant public key cryptography algorithms Kyber and Dilithium.

[0123] S12: Convert the first target data into second target data according to a preset data conversion rule.

[0124] The above second target data are all structured data.

[0125] The second target data is standardized plaintext data. In some embodiments, the preset data conversion rules include a block data template, a transaction data template, an event data template, a contract data template, and a contract call data template, and the second target data includes second block data, second transaction data, second event data, second contract data, and second contract call data.

[0126] The specific process of converting the first target data into the second target data according to the preset data conversion template in the above step S12 is as follows.

[0127] First, first block data, first transaction data, first event data, first contract data, and first contract call data are extracted from the first target data.

[0128] Secondly, according to the first distribution sequence of the block data in the block data template, the first block data is converted into the second block data, so that the second block data is distributed and arranged according to the first distribution sequence.

[0129] Third, according to the second distribution sequence of the transaction data in the transaction data template, the first transaction data is converted into the second transaction data, so that the second transaction data is distributed and arranged according to the second distribution sequence.

[0130] Fourthly, according to the third distribution sequence of the event data in the event data template, the first event data is converted into the second event data, so that the second event data is distributed and arranged according to the third distribution sequence.

[0131] Fifth, according to the fourth distribution sequence of the contract data in the contract data template, the first contract data is converted into the second contract data, so that the second contract data is distributed and arranged according to the fourth distribution sequence.

[0132] Sixth, according to the fifth distribution sequence of the contract call data in the contract call data template, the first contract call data is converted into the second contract call data, so that the second contract call data is distributed and arranged according to the fourth distribution sequence.

[0133] In some specific implementations, regularization rules are used to re-decompose the original decrypted block data into multiple data chains with standard structured data structures. Specifically, after obtaining a block from the blockchain network, the parsed and decrypted block data must be decomposed into multiple data templates with standard structures. These standard structures include the following types of data templates.

[0134] First, the original block - the original block information, mainly includes the following block data, that is, for the original block information, the first distribution sequence of the block data in the block data template is as follows: primary key ID, block number, channel name, block Hash, previous block Hash, block data, block metadata, and verification signature.

[0135] Second, the parsed block - block parsing data, mainly includes the following block data, that is, for the block parsing data, the first distribution sequence of the block data in the block data template is as follows: primary key ID, block number, channel name, block Hash, previous block Hash, data Hash, transaction quantity, on-chain timestamp, and verification signature.

[0136] Third, the parsed transaction - transaction parsing data, mainly includes the following transaction data, that is, the second distribution sequence of the transaction data in the transaction data template is as follows: primary key ID, block number, transaction hash, channel name, creating organization identity, transaction timestamp, contract name, transaction type, contract version, verification, read-write set, and verification signature.

[0137] Fourth, the parsed event - event parsing data mainly includes the following event data, that is, the third distribution sequence of the event data in the event data template is as follows: primary key ID, block number, block time, event name, event payload, channel name, transaction ID, and verification signature.

[0138] Fifth, the parsed contract - contract parsing data mainly includes the following contract data, that is, the fourth distribution sequence of the contract data in the contract data template is as follows: primary key ID, contract name, contract version, contract channel, contract type, and verification signature.

[0139] Sixth, the parsed request-contract call record mainly includes the following contract call data, that is, the fifth distribution sequence of the contract call data in the contract call data template is as follows: primary key ID, contract name, contract version, contract channel, request parameters, and verification signature.

[0140] To facilitate subsequent search queries and improve data query speed, different index identifiers are constructed for data of different business data types. Specifically, the second block data in the second target data is associated with the block index identifier; the second transaction data is associated with the transaction index identifier; the second event data is associated with the event index identifier; the second contract data is associated with the contract index identifier; and the second contract call data is associated with the contract call identifier.

[0141] S13: Storing the second target data in a preset database, so that the target user account queries the second target data from the preset database.

[0142] The target user account is a user account that has data query authority for the second target data in the preset database.

[0143] For each different type of data, a corresponding index is constructed, and the constructed index and standard structure data are stored in the preset database.

[0144] Specifically, the process for storing business data is as follows. Business data is business-related data contained in the parameters of each transaction request and can be obtained by parsing the read-write set within the transaction data. The specific logic involves finding the write-set data within a transaction and locating the state-key and state-value fields within the write-set data. The state-key represents the actual business scenario, and the state-value represents the corresponding business data.

[0145] Through the above-described implementation, first target data associated with the target transaction node is first obtained from the blockchain network. Given that the first target data includes data from different blockchains in the blockchain network, and that different blockchain data uses different encryption and decryption methods, the first target data may include unstructured data. To avoid the problem of low indexing efficiency during data query caused by the aforementioned unstructured data, the first target data is further converted into fully structured second target data, and the second target data is stored in a preset database of the service terminal device. This allows users with query permission to directly obtain the data they need from the preset database without the need for encryption and decryption. This reduces the consumption of computing resources by the encryption and decryption processes, improves data query efficiency, and thus improves transaction processing efficiency.

[0146] Furthermore, in the implementation manner of the present application, the data associated with the transaction node obtained from the blockchain network is directly pulled to the service terminal of the transaction node (such as a local database). The above-mentioned data pulling process only requires one encryption and decryption process, which can ensure that users with data query permissions can repeatedly query the above-mentioned pulled data, and also greatly reduces the repeated consumption of computing operation resources by the repeated encryption and decryption process.

[0147] To implement the aforementioned functions, the blockchain data processing device includes hardware structures and / or software modules that perform the respective functions. Those skilled in the art should readily appreciate that, in conjunction with the algorithmic steps of the various examples described in the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is implemented in hardware or in a hardware-driven manner by computer software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this application.

[0148] The present disclosure also provides a Figure 2 The blockchain digital bond data processing device shown is applied to the service terminal of any transaction node among multiple transaction nodes associated with the blockchain network; the device includes: a data acquisition unit 201, a data conversion unit 202 and a data query unit 203.

[0149] The data acquisition unit 201 is used to obtain the first target data associated with the target transaction node from the blockchain network according to the data acquisition authority of the target transaction node to which the service terminal belongs; the blockchain network includes multiple blockchains; the target transaction node represents any one of the following bond business nodes: bond issuance node, bond registration node, bond custody node, bond trading node and bond settlement node.

[0150] The data conversion unit 202 is configured to convert the first target data into second target data according to a preset data conversion rule; the second target data are all structured data.

[0151] The data query unit 203 is configured to store the second target data in a preset database, so that the target user account can query the second target data from the preset database; the target user account is a user account having data query authority for the second target data in the preset database.

[0152] In one implementation, each blockchain in the blockchain network corresponds to a channel one-to-one; the data acquisition unit 201 is specifically used to: determine a target channel associated with a target transaction node; determine a target blockchain corresponding to the target channel from the blockchain network; obtain target blockchain data from the target blockchain according to a preset period; and parse the block data of each block in the target blockchain data to obtain first target data.

[0153] In another implementation, the data acquisition unit 201 is specifically used to: perform plaintext parsing on the data structure of the block data on the target blockchain according to the first preset on-chain rule of the target transaction node, and obtain the target block data of the target block and the target business data type of the target business data included in the target block data; determine the target decryption algorithm associated with the target business data type according to the association mapping relationship between the business data type and the encryption algorithm in the configuration file; and use the target decryption algorithm to decrypt the target block data to obtain the first target data.

[0154] In another implementation, the data acquisition unit 201 is specifically used to: perform plaintext parsing on the data structure on the target blockchain according to the second preset on-chain rule of the target transaction node, obtain the target block data of the target block and the target algorithm identifier of the target decryption algorithm for decrypting the target block data; use the target decryption algorithm corresponding to the target algorithm identifier to decrypt the target block data to obtain the first target data.

[0155] In another implementation, the preset data conversion rules include a block data template, a transaction data template, an event data template, a contract data template, and a contract call data template, and the second target data includes second block data, second transaction data, second event data, second contract data, and second contract call data; the data conversion unit 202: extracts the first block data, the first transaction data, the first event data, the first contract data, and the first contract call data from the first target data; converts the first block data into the second block data according to the first distribution sequence of the block data in the block data template; the second block data is distributed and arranged according to the first distribution sequence; and Second distribution sequence, converting the first transaction data into the second transaction data; the second transaction data is distributed and arranged according to the second distribution sequence; and, according to the third distribution sequence of the event data in the event data template, converting the first event data into the second event data; the second event data is distributed and arranged according to the third distribution sequence; and, according to the fourth distribution sequence of the contract data in the contract data template, converting the first contract data into the second contract data; the second contract data is distributed and arranged according to the fourth distribution sequence; and, according to the fifth distribution sequence of the contract call data in the contract call data template, converting the first contract call data into the second contract call data; the second contract call data is distributed and arranged according to the fourth distribution sequence.

[0156] In another implementation, the data query unit is also used to: associate the second block data in the second target data with the block index identifier; and, associate the second transaction data with the transaction index identifier; and, associate the second event data with the event index identifier; and, associate the second contract data with the contract index identifier; and, associate the second contract call data with the contract call identifier.

[0157] In another implementation, the device is also used to: encrypt the data to be encrypted in the business data according to the encryption algorithm corresponding to the business type of the business data of the target transaction node in the configuration file; based on the first preset chain rule, the encrypted data to be encrypted, the storage area information of the encrypted data to be encrypted and the unencrypted data in the business data are chained according to the first preset data structure; the unencrypted data includes the business data type.

[0158] In another implementation, the device is also used to: encrypt the data to be encrypted in the business data according to a preset encryption algorithm; based on a second preset chain rule, the encrypted data to be encrypted, the decryption algorithm corresponding to the preset encryption algorithm and the unencrypted data in the business data are chained according to the second preset data structure.

[0159] Regarding the device in the above embodiment, the specific manner in which each unit module performs the operation has been described in detail in the embodiment of the method, and will not be elaborated here.

[0160] Figure 3 This is a schematic diagram of a service terminal provided by this application. Figure 3 The service terminal 50 may include at least one processor 501 and a memory 503 for storing processor-executable instructions. The processor 501 is configured to execute instructions in the memory 503 to implement the blockchain digital bond data processing method in the following embodiment.

[0161] The service terminal is also called a service terminal device, such as a server.

[0162] In addition, the service terminal 50 may further include a communication bus 502 , at least one communication interface 504 , an input device 506 , and an output device 505 .

[0163] The processor 501 may be a central processing unit (CPU), a microprocessor unit, an ASIC, or one or more integrated circuits for controlling the execution of the program of the present application.

[0164] The communication bus 502 may include a pathway for transmitting information between the aforementioned components.

[0165] The communication interface 504 uses any transceiver or other device for communicating with other devices or communication networks, such as Ethernet, radio access network (RAN), wireless local area network (WLAN), etc.

[0166] The input device 506 is used to receive input signals and the output device 505 is used to output signals.

[0167] The memory 503 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, an optical disc storage (including a compressed optical disc, a laser disc, an optical disc, a digital versatile disc, a Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program codes in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory may be independent and connected to the processing unit via a bus. The memory may also be integrated with the processing unit.

[0168] The memory 503 is used to store instructions for executing the solution of the present application, and the execution is controlled by the processor 501. The processor 501 is used to execute the instructions stored in the memory 503, thereby realizing the functions of the method of the present application.

[0169] In a specific implementation, as an embodiment, the processor 501 may include one or more CPUs, such as Figure 3 CPU0 and CPU1 in.

[0170] In a specific implementation, as an embodiment, the service terminal 50 may include multiple processors, such as Figure 3 1 and 507. Each of these processors may be a single-CPU processor or a multi-CPU processor. A processor herein may refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).

[0171] The service terminal is Figure 3 The system shown includes a processor 501 and a memory 503 for storing executable instructions for the processor 501. The processor 501 is configured to execute the executable instructions to implement the blockchain digital bond data processing method according to any of the above-described possible implementations. The aforementioned methods achieve the same technical effects and are not described here in detail to avoid repetition.

[0172] The present application also provides a computer-readable storage medium. When the instructions in the computer-readable storage medium are executed by a processor of a blockchain data processing device or service terminal, the blockchain digital bond data processing device or service terminal can execute the blockchain digital bond data processing method according to any of the above possible implementations. The same technical effects can be achieved, and to avoid repetition, they are not further described here.

[0173] The present application also provides a computer program product, including a computer program or instructions, which are executed by a processor to implement the blockchain digital bond data processing method described in any of the above possible implementations. The method achieves the same technical effects and, to avoid repetition, is not further described here.

[0174] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

[0175] It should be understood that the present application is not limited to the exact structures described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A blockchain digital bond data processing method, characterized in that: A service terminal applied to any transaction node among a plurality of transaction nodes associated with a blockchain network; the method comprising: According to the data acquisition authority of the target transaction node to which the service terminal belongs, obtaining first target data associated with the target transaction node from the blockchain network; the blockchain network includes multiple blockchains; According to a preset data conversion rule, the first target data is converted into second target data; the second target data is all structured data; The second target data is stored in a preset database, so that a target user account can query the second target data from the preset database; the target user account is a user account that has data query permission for the second target data in the preset database; the target transaction node represents any one of the following bond business nodes: a bond issuance node, a bond registration node, a bond custody node, a bond trading node, and a bond settlement node; The step of obtaining the first target data associated with the target transaction node from the blockchain network includes: Parsing the data structure on the target blockchain in the blockchain network in plain text according to the second preset on-chain rule of the target transaction node to obtain target block data of the target block and a target algorithm identifier of a target decryption algorithm for decrypting the target block data; The target decryption algorithm corresponding to the target algorithm identifier is used to decrypt the target block data to obtain the first target data.

2. The blockchain digital bond data processing method according to claim 1 is characterized in that: Each blockchain in the blockchain network corresponds to a channel one-to-one; obtaining the first target data associated with the target transaction node from the blockchain network according to the data acquisition authority of the target transaction node to which the service terminal belongs includes: Determining a target channel associated with the target transaction node; Determine a target blockchain corresponding to the target channel from the blockchain network; Obtain target blockchain data from the target blockchain according to a preset period; Parse the block data of each block in the target blockchain data to obtain the first target data.

3. The blockchain digital bond data processing method according to claim 2 is characterized in that: The parsing of the block data of each block in the target blockchain data to obtain the first target data includes: According to the first preset on-chain rule of the target transaction node, the data structure of the block data on the target blockchain is parsed in plain text to obtain the target block data of the target block and the target business data type of the target business data included in the target block data; Determine the target decryption algorithm associated with the target business data type according to the association mapping relationship between the business data type and the encryption algorithm in the configuration file; The target block data is decrypted using the target decryption algorithm to obtain the first target data.

4. The blockchain digital bond data processing method according to claim 1, characterized in that: The preset data conversion rules include a block data template, a transaction data template, an event data template, a contract data template, and a contract call data template, and the second target data includes second block data, second transaction data, second event data, second contract data, and second contract call data; The converting the first target data into the second target data according to the preset data conversion template includes: Extracting first block data, first transaction data, first event data, first contract data, and first contract call data from the first target data; According to a first distribution sequence of block data in a block data template, the first block data is converted into the second block data; the second block data is distributed and arranged according to the first distribution sequence; and, converting the first transaction data into the second transaction data according to a second distribution sequence of the transaction data in the transaction data template; wherein the second transaction data is distributed and arranged according to the second distribution sequence; and, converting the first event data into the second event data according to a third distribution sequence of event data in the event data template; wherein the second event data is distributed and arranged according to the third distribution sequence; and, converting the first contract data into the second contract data according to a fourth distribution sequence of the contract data in the contract data template; wherein the second contract data is distributed and arranged according to the fourth distribution sequence; And, according to the fifth distribution sequence of the contract call data in the contract call data template, the first contract call data is converted into the second contract call data; the second contract call data is distributed and arranged according to the fourth distribution sequence.

5. The blockchain digital bond data processing method according to claim 4 is characterized in that: The method further comprises: Associating the second block data in the second target data with a block index identifier; and, associating the second transaction data with a transaction index identifier; and, associating the second event data with an event index identifier; and, associating the second contract data with the contract index identifier; And, associating the second contract call data with the contract call identifier.

6. The blockchain digital bond data processing method according to claim 3 is characterized in that: The method further comprises: Encrypting the data to be encrypted in the business data according to the encryption algorithm corresponding to the business type of the business data of the target transaction node in the configuration file; Based on the first preset uploading rule, the encrypted data to be encrypted, the storage area information of the encrypted data to be encrypted and the unencrypted data in the business data are uploaded to the chain according to the first preset data structure; the unencrypted data includes the type of business data.

7. The blockchain digital bond data processing method according to claim 1, characterized in that: The method further comprises: Encrypt the data to be encrypted in the business data according to the preset encryption algorithm; Based on the second preset uploading rule, the encrypted data to be encrypted, the decryption algorithm corresponding to the preset encryption algorithm and the unencrypted data in the business data are uploaded to the chain according to the second preset data structure.

8. A blockchain digital bond data processing device, characterized in that: A service terminal applied to any one of a plurality of transaction nodes associated with a blockchain network; the device comprises: a data acquisition unit, configured to acquire, from a blockchain network, first target data associated with the target transaction node according to the data acquisition authority of the target transaction node to which the service terminal belongs; the blockchain network including a plurality of blockchains; a data conversion unit, configured to convert the first target data into second target data according to a preset data conversion rule; the second target data are all structured data; a data query unit, configured to store the second target data in a preset database, so that a target user account queries the second target data from the preset database; the target user account is a user account having data query authority for the second target data in the preset database; The target transaction node represents any one of the following bond business nodes: a bond issuance node, a bond registration node, a bond custody node, a bond trading node, and a bond settlement node; The data acquisition unit is specifically configured to perform plaintext parsing on a data structure on a target blockchain in the blockchain network according to a second preset on-chain rule of the target transaction node, to obtain target block data of the target block and a target algorithm identifier of a target decryption algorithm for decrypting the target block data; The target decryption algorithm corresponding to the target algorithm identifier is used to decrypt the target block data to obtain the first target data.

9. A service terminal, characterized in that: Any transaction node among a plurality of transaction nodes associated with a blockchain network is configured to execute the blockchain digital bond data processing method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Private data query method and device based on blockchain account

    CN110580418A

  • Method and device for maintaining block chain data, electronic equipment and storage medium

    CN115129785A