WO2021208762A1 - Data storage and query - Google Patents

Data storage and query Download PDF

Info

Publication number
WO2021208762A1
WO2021208762A1 PCT/CN2021/085224 CN2021085224W WO2021208762A1 WO 2021208762 A1 WO2021208762 A1 WO 2021208762A1 CN 2021085224 W CN2021085224 W CN 2021085224W WO 2021208762 A1 WO2021208762 A1 WO 2021208762A1
Authority
WO
WIPO (PCT)
Prior art keywords
transaction data
type
target
transaction
storage node
Prior art date
Application number
PCT/CN2021/085224
Other languages
French (fr)
Chinese (zh)
Inventor
李睿
Original Assignee
支付宝(杭州)信息技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 支付宝(杭州)信息技术有限公司 filed Critical 支付宝(杭州)信息技术有限公司
Publication of WO2021208762A1 publication Critical patent/WO2021208762A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2471Distributed queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management

Definitions

  • the present invention relates to the field of computer technology, in particular to a data storage method, query method, device, server and storage medium.
  • the embodiments of this specification provide a data storage method, query method, device, server, and storage medium.
  • the embodiments of this specification provide a transaction data storage method for storing transaction data in a blockchain, and each storage node of the blockchain is configured with a private ledger and a public ledger.
  • the method includes: detecting the type of transaction data; if the type of the transaction data is the first type of transaction data, determining a target storage node in the blockchain that matches the transaction data, and storing the transaction data To the private ledger of the target storage node, and store the summary information generated by encrypting the transaction data in the public ledger of other storage nodes in the blockchain; if the type of the transaction data is a second type of transaction Data, the transaction data is stored in the public ledger of each storage node in the blockchain.
  • the embodiment of this specification provides a transaction data query method for querying transaction data stored in a blockchain, and each storage node of the blockchain is configured with a private ledger and a public ledger.
  • the method includes: obtaining a transaction query request initiated by a user, and determining the type of target transaction data according to the transaction query request; if the type of the target transaction data is the first type of transaction data, downloading from the blockchain Determine the target storage node storing the target transaction data in the private ledger, and send the transaction query request to the target storage node, so that the target storage node stores the private ledger in the private ledger based on the transaction query request
  • the target transaction data is fed back to the user; if the type of the target transaction data is the second type of transaction data, the transaction query request is sent to any storage node in the blockchain, so that the storage node According to the transaction query request, the target transaction data stored in the public ledger is fed back to the user.
  • the embodiment of this specification provides a transaction data query device for querying transaction data stored in a blockchain, and each storage node of the blockchain is configured with a private ledger and a public ledger.
  • the device includes: a determining module, configured to obtain a transaction query request initiated by a user, and determine the type of target transaction data according to the transaction query request; a first query module, configured to determine if the type of the target transaction data is the first For transaction data of one type, the target storage node storing the target transaction data in the private ledger is determined from the blockchain, and the transaction query request is sent to the target storage node, so that the target storage The node feeds back the target transaction data stored in the private ledger to the user based on the transaction query request; the second query module is configured to query the transaction if the type of the target transaction data is the second type of transaction data The request is sent to any storage node in the blockchain, so that the storage node feeds back the target transaction data stored in the public ledger to the user according to the transaction query request.
  • an embodiment of the present specification provides a server, including a memory, a processor, and a computer program stored in the memory and running on the processor, and the processor executes the above-mentioned first or second aspect. Method steps.
  • the embodiments of the present specification provide a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the steps of the method described in the first aspect or the second aspect are realized.
  • the transaction data storage method first detects the type of transaction data. If it is the first type of transaction data, it is necessary to first determine the target storage node in the blockchain that matches the transaction data, and then store the transaction data In the private ledger of the target storage node, the summary information generated by encrypting the transaction data is stored in other storage nodes in the blockchain to ensure the authenticity of the stored data while ensuring the privacy of the first type of transaction data storage If it is the second type of transaction data, the transaction data is stored in the public ledger of any storage node in the blockchain, which realizes the unified and automatic storage of the first type of transaction data and the second type of transaction data. In addition, this solution is highly scalable, and can flexibly classify transaction data according to needs, and configure the target storage node matching the first type of transaction data, so as to facilitate the storage of various transaction data generated by newly-added services .
  • the transaction data query method provided by the embodiment of this specification first determines the type of target transaction data through the acquired transaction query request; if it is the first type of transaction data, first determine from the blockchain that the private ledger is stored The target storage node of the target transaction data forwards the transaction query request to the target storage node to obtain the target transaction data stored in its private ledger; if the target transaction data is the second type of transaction data, the transaction query request is forwarded to the district Any storage node in the block chain obtains the target transaction data stored in its public ledger.
  • configuring the query process for the target transaction data type can meet the user's query requirements for various transaction data. While ensuring the privacy of the first type of transaction data storage, it realizes the unified query of the first type of transaction data and the second type of transaction data. , It is convenient for users to operate.
  • FIG. 3 is a schematic diagram of transaction data storage provided by the first aspect of the embodiments of this specification.
  • FIG. 5 is a block diagram of a transaction data storage device provided by the third aspect of the embodiments of this specification.
  • FIG. 6 is a block diagram of a transaction data query device provided by the fourth aspect of the embodiments of this specification.
  • FIG. 1 is a schematic diagram of an operating environment suitable for the data storage method provided by the embodiment of this specification.
  • the server 300 is in communication connection with one or more storage nodes in the blockchain 100 (the connection of the three storage nodes shown in FIG. 1 is only for illustration) for data communication or interaction.
  • the server 300 may be a business server, that is, a server where a business system is located, providing transaction services for users, and may receive transaction requests initiated by users through the client, process the transaction requests, and generate transaction data.
  • a business server that is, a server where a business system is located, providing transaction services for users, and may receive transaction requests initiated by users through the client, process the transaction requests, and generate transaction data.
  • the blockchain 100 includes a plurality of storage nodes (only the storage nodes 101 to 106 shown in FIG. 1), and these storage nodes can be connected to each other through a network 200 for data communication or interaction.
  • These storage nodes may be personal computers (Personal Computers, PCs), notebook computers, tablet computers, smart phones, wearable devices, and other devices with network functions and data storage functions. It should be noted that the number of storage nodes in FIG. 1 is only for illustration, and does not limit the specific number of storage nodes included in the blockchain 100. In actual application scenarios, more storage nodes can be included and new storage nodes can be added one after another.
  • each storage node of the blockchain is configured with a private ledger and a public ledger.
  • the private ledger is a ledger with access permissions, that is, except for the storage node itself, other storage nodes in the blockchain cannot arbitrarily obtain transaction data from the storage node's private ledger.
  • the public ledger is a ledger without access rights, which is a ledger open to any storage node in the blockchain, and any other storage node can obtain transaction data from the public ledger of the storage node.
  • the transaction data storage method provided in the embodiments of this specification can be applied to the business server in the above system.
  • the public information shared between nodes is used to ensure the authenticity of transactions that cannot be tampered with.
  • the private ledger is used to share only the summary information generated by encrypting the transaction data between non-target storage nodes to ensure the privacy of the stored transaction data of the first type; on the other hand, the transaction data type is uniformly identified, and then the different types are automatically entered
  • the on-chain storage process realizes the unified and automatic storage of the first type of transaction data and the second type of transaction data, which has stronger applicability and scalability, and can flexibly classify transaction data according to needs, as well as the second type of transaction data.
  • One type of transaction data matching target storage node is configured to facilitate the storage of various transaction data generated by newly-added services.
  • the embodiment of this specification also provides a transaction data query method, which can also be applied to the business server in the above-mentioned system for querying private ledgers and public ledgers stored in each storage node of the blockchain through the above-mentioned storage method.
  • a transaction data query method which can also be applied to the business server in the above-mentioned system for querying private ledgers and public ledgers stored in each storage node of the blockchain through the above-mentioned storage method.
  • the query process for the target transaction data type it can meet the user's query requirements for various transaction data. While ensuring the privacy of the first type of transaction data storage, it can realize the first type of transaction data and the second type of transaction.
  • the unified query of data is convenient for users to operate.
  • the embodiments of this specification provide a transaction data storage method for storing transaction data in a blockchain, and each storage node of the blockchain is configured with a private ledger and a public ledger. As shown in Figure 2, the method includes the following steps S201 to S203.
  • Step S201 Detect the type of transaction data.
  • the transaction data to be detected is the transaction data that needs to be stored.
  • the transaction data generated based on the transaction request triggered by the user can be obtained.
  • the content of the specific transaction data is determined according to the business type of the actual application scenario.
  • the transaction data may be related transaction data.
  • related party transactions refer to any behavior or transaction that transfers resources, labor services, or obligations between related parties, regardless of whether the price is charged or not.
  • common related transactions fall into the following categories: purchase or sale of goods, equity investment, provision or acceptance of labor services, provision of funds, research and development transfer, key management compensation, etc.
  • it may also be other types of transaction data, which is not limited here.
  • the types of transaction data may include the first type of transaction data and the second type of transaction data.
  • the first type of transaction data is important and private transaction data that needs to be stored confidentially
  • the second type of transaction data is transaction data that can be made public.
  • the above process of detecting the type of transaction data may include: extracting business feature information from the transaction data; judging whether the business feature information of the transaction data meets preset private storage conditions, and if so, determining the type of transaction data It is the first type of transaction data. If not, the type of the transaction data is determined to be the second type of transaction data.
  • the preset private storage condition is a condition for performing privacy detection on transaction data.
  • the service feature information and the preset private storage conditions can be set according to the needs of actual application scenarios.
  • the business characteristic information may include, but is not limited to, one or more of the business type to which the transaction belongs, the transaction amount, the transaction object, and the contract attribute of the transaction.
  • the business type and contract attributes can be specifically determined according to actual application scenarios.
  • the type of business can include acquiring fee business, profit sharing business, and interest discount business, etc.
  • the contract attributes of the transaction may include the nature of the contract, such as a major transaction or ordinary transaction, the source of the contract, such as from the first contracting platform or the second contracting platform, and the pricing strategy, such as related party pricing or ordinary transaction pricing.
  • the business characteristic information includes the transaction amount, pricing strategy, and business type. Judging whether the business characteristic information of the transaction data meets the preset private storage conditions can be based on the size of the transaction amount. If the transaction amount exceeds 100 million, it is determined that the transaction data meets the preset private storage conditions, otherwise it does not; or, it may be According to the pricing strategy, if the related party preferential rate, it is determined that the transaction data meets the preset private storage condition, otherwise it does not meet; or, it can be a combination of multiple conditions. If the transaction amount exceeds 100 million and the related party If the preferential rate is applied, it is determined that the transaction data meets the preset private storage conditions, and vice versa.
  • transaction data can be flexibly divided into types according to needs.
  • the storage method provided in the embodiment of this specification can also be applied without spending a lot of resources to reconfigure the newly-added transaction data.
  • the on-chain storage process of transaction data generated by the business is highly scalable.
  • Step S202 If the type of transaction data is the first type of transaction data, determine the target storage node in the blockchain that matches the transaction data, store the transaction data in the private ledger of the target storage node, and encrypt the transaction data to generate The summary information of is stored in the public ledger of other storage nodes in the blockchain.
  • the private ledgers of each storage node are set with strict permissions. Access to the private ledgers and access to the transaction data stored in the private ledgers require permission detection. Any storage node in the blockchain has no right to access other storage.
  • the private ledger of the node in contrast, the public ledger in any storage node in the blockchain is open and transparent to other storage nodes in the blockchain, and each storage node in the blockchain can access the public ledger mutually.
  • the transaction data of this type needs to be stored in the private ledger of the storage node matching the transaction data in the blockchain.
  • the target storage node matching the transaction data from the storage nodes of the blockchain specifically determining the target storage node from the storage nodes that are in communication with the business server in the blockchain.
  • the target storage node of the first type of transaction data may be one or multiple.
  • the foregoing process of determining the target storage node in the blockchain that matches the transaction data may include: obtaining business attribute information of the transaction data; business attribute information according to the transaction data, and The preset mapping relationship between the storage node and the business attribute information determines the target storage node that matches the transaction data.
  • the business attribute information can include the size of the transaction amount.
  • the range can be divided according to the amount. If the transaction amount is less than 1 million, it is stored in nodes A, B, and C; the transaction amount is 1 million- 100 million is stored in nodes D, E, and F; if the transaction amount exceeds 100 million, it is stored in nodes G and H.
  • the mapping relationship between the service attribute information and the storage node in the blockchain that is communicatively connected with the service server may be pre-configured. For example, if the service server is in communication connection with 10 storage nodes in the blockchain, the mapping relationship between the service attribute information and the 10 storage nodes can be pre-configured and stored, and then, according to the mapping relationship, from the 10 storage nodes The storage node determines the target storage node of the current transaction data.
  • mapping relationship between service attribute information and all storage nodes in the blockchain can also be pre-configured and stored.
  • the target storage node can also include Storage nodes other than the storage node connected in communication with the server are transferred from the storage node in communication connection with the business server to the private ledger of the target storage node for storage.
  • any storage node in the blockchain that is communicatively connected with the business server can be used as the target storage node.
  • the transaction data is sent to the storage node and stored in the local public ledger, and the storage node broadcasts the transaction data to the rest of the storage nodes in the blockchain, so that other storage nodes store the transaction data in their respective public In the ledger, the shared storage of the second type of transaction data in all storage nodes of the blockchain is realized. Since each block in the blockchain stores the digest value of this block and the digest value of the adjacent block, once the transaction data is tampered with, the digest value will not match the data recorded in the public ledger, which can effectively Ensure the authenticity of transaction data.
  • the service server may mark the type label of the transaction data.
  • the type tag is used to uniquely identify the type of the transaction data, that is, to indicate whether the transaction data is the first type of transaction data or the second type of transaction data.
  • the service server can send the transaction data carrying the type label to the target storage node, thereby facilitating the storage node to determine the transaction data type to be stored, and perform the corresponding storage process according to the transaction data type.
  • transaction data TX1, TX2, and TX3 are the second type of transaction data.
  • the transaction data TX1 is the second type of transaction data
  • the transaction data TX2 and TX3 are the second type of transaction data.
  • Storage nodes A, B, and C are all nodes in the blockchain, and they are all configured with public ledgers and private ledgers.
  • storage nodes A and C are both target storage nodes that match the transaction data TX2, then the transaction data TX2 is stored in the private ledger of the storage nodes A and C, and the digest (Tx2) generated by encrypting the transaction data TX2 is broadcast To be stored in the public ledger of other storage nodes in the blockchain.
  • Storage nodes B and C are both target storage nodes that match the transaction data TX3, then the transaction data TX3 is stored in the private ledger of the storage nodes B and C, and the digest (Tx3) generated by encrypting the transaction data TX3 is broadcast to the district It is stored in the public ledger of other storage nodes in the block chain.
  • the transaction data TX1 is stored in the public ledger of each storage node in the blockchain.
  • the first type of transaction data is only visible on the private ledger of the target storage node, but the digest (Tx2) and digest (Tx3) in the figure above will be distributed and stored in all nodes.
  • the public ledger Relying on the summary value alone, it is impossible to reverse the specific transaction data, and since the summary value is recorded at each node, if the private ledger data is tampered with, the summary value will not match. Therefore, the privacy requirements of data storage can be met while ensuring the authenticity of the data.
  • the embodiments of this specification provide a transaction data query method for querying transaction data stored in the blockchain, specifically for querying transaction data stored in accordance with the transaction data storage method provided by any embodiment of the first aspect.
  • Transaction data is configured with private ledgers and public ledgers.
  • the method includes the following steps S401 to S403.
  • Step S401 Obtain a transaction query request initiated by the user, and determine the type of target transaction data according to the transaction query request.
  • the user can input or select the query conditions of the target transaction data to be queried through the transaction query interface set in the client corresponding to the business server, and after triggering the transaction query, generate a transaction query based on the query conditions entered by the user ask.
  • the query conditions may include, but are not limited to, one or more combinations of index items such as transaction object, transaction amount, and transaction time.
  • the foregoing process of determining the type of target transaction data according to the transaction query request may include: obtaining the business characteristic information of the target transaction data according to the transaction query request; judging whether the business characteristic information meets the preset private storage condition, if so , The type of the target transaction data is determined as the first type of transaction data, if not, the type of the target transaction data is determined as the second type of transaction data, wherein the preset private storage condition is used to privately store the target transaction data The conditions for sex testing.
  • the business server can parse the transaction query request to obtain the business characteristic information of the target transaction data.
  • the transaction query request may include the business characteristic information of the target transaction data to be queried, and in this case, the business characteristic information of the target transaction data may be extracted from the transaction query request.
  • the transaction query request may include the query conditions entered by the user.
  • the business server parses the query conditions of the target transaction data from the transaction query request, it can match the requirements in the preset transaction database according to the query conditions.
  • the transaction database records the key information of the transaction data generated by the business server, where the key information may include the type of the transaction data. In this way, the type of target transaction data to be queried can be found in the transaction database according to the query conditions.
  • Step S402 If the type of the target transaction data is the first type of transaction data, the target storage node storing the target transaction data in the private ledger is determined from the blockchain, and the transaction query request is sent to the target storage node, so that the target The storage node feeds back the target transaction data stored in the private ledger to the user based on the transaction query request.

Abstract

Provided in the embodiments of the present description are a data storage method and apparatus, a data query method and apparatus, a server, and a medium. The storage method comprises: first detecting the type of transaction data; and if the data is first-type transaction data, it being necessary to first determine a target storage node, that matches the transaction data, in a blockchain, then store the transaction data in a private ledger of the target storage node, and then store digest information, generated by encrypting the transaction data, in other storage nodes in the blockchain to ensure the authenticity of the stored data while ensuring the privacy of storage of the first-type transaction data; and if the data is second-type transaction data, storing the transaction data in a public ledger of any storage node in the blockchain. The unified and automatic storage of the first-type transaction data and the second-type transaction data is realized.

Description

数据存储、查询Data storage and query 技术领域Technical field
本发明涉及计算机技术领域,尤其涉及一种数据存储方法、查询方法、装置、服务器及存储介质。The present invention relates to the field of computer technology, in particular to a data storage method, query method, device, server and storage medium.
背景技术Background technique
关联交易是集团化企业经营中较常见的交易模式,已经发展成为影响上市公司财务状况和经营成果的一个非常重要的因素。由于其特殊性,一方面监管和披露要求证明交易数据的真实性,另一方面针对管理过程中重要交易数据存在高度私密性,这样也就对交易数据的存储提出了很高的要求。Related party transactions are a relatively common transaction mode in the management of group companies, and they have developed into a very important factor affecting the financial status and operating results of listed companies. Due to its particularity, on the one hand, supervision and disclosure requirements to prove the authenticity of transaction data, on the other hand, there is a high degree of privacy for important transaction data in the management process, which also puts forward high requirements on the storage of transaction data.
发明内容Summary of the invention
本说明书实施例提供了一种数据存储方法、查询方法、装置、服务器及存储介质。The embodiments of this specification provide a data storage method, query method, device, server, and storage medium.
第一方面,本说明书实施例提供了一种交易数据存储方法,用于将交易数据存储在区块链中,所述区块链的每个存储节点中均配置有私有账本和公共账本。所述方法包括:检测交易数据的类型;若所述交易数据的类型为第一类交易数据,则确定所述区块链中与所述交易数据匹配的目标存储节点,将所述交易数据存储至所述目标存储节点的私有账本中,以及将所述交易数据加密产生的摘要信息存储至所述区块链中其他存储节点的公共账本中;若所述交易数据的类型为第二类交易数据,则将所述交易数据存储至所述区块链中每个存储节点的公共账本中。In the first aspect, the embodiments of this specification provide a transaction data storage method for storing transaction data in a blockchain, and each storage node of the blockchain is configured with a private ledger and a public ledger. The method includes: detecting the type of transaction data; if the type of the transaction data is the first type of transaction data, determining a target storage node in the blockchain that matches the transaction data, and storing the transaction data To the private ledger of the target storage node, and store the summary information generated by encrypting the transaction data in the public ledger of other storage nodes in the blockchain; if the type of the transaction data is a second type of transaction Data, the transaction data is stored in the public ledger of each storage node in the blockchain.
第二方面,本说明书实施例提供了一种交易数据查询方法,用于查询区块链中存储的交易数据,所述区块链的每个存储节点中均配置有私有账本和公共账本。所述方法包括:获取用户发起的交易查询请求,并根据所述交易查询请求,确定目标交易数据的类型;若所述目标交易数据的类型为第一类交易数据,则从所述区块链中确定私有账本中存储有所述目标交易数据的目标存储节点,并将所述交易查询请求发送给所述目标存储节点,以使所述目标存储节点基于所述交易查询请求将私有账本中存储的目标交易数据反馈给所述用户;若所述目标交易数据的类型为第二类交易数据,则将所述交易查询请求发送给所述区块链中任意一个存储节点,以使得该存储节点根据所述交易查询请求将公共账本中存储的目标交易数据反馈给所述用户。In the second aspect, the embodiment of this specification provides a transaction data query method for querying transaction data stored in a blockchain, and each storage node of the blockchain is configured with a private ledger and a public ledger. The method includes: obtaining a transaction query request initiated by a user, and determining the type of target transaction data according to the transaction query request; if the type of the target transaction data is the first type of transaction data, downloading from the blockchain Determine the target storage node storing the target transaction data in the private ledger, and send the transaction query request to the target storage node, so that the target storage node stores the private ledger in the private ledger based on the transaction query request The target transaction data is fed back to the user; if the type of the target transaction data is the second type of transaction data, the transaction query request is sent to any storage node in the blockchain, so that the storage node According to the transaction query request, the target transaction data stored in the public ledger is fed back to the user.
第三方面,本说明书实施例提供了一种交易数据存储装置,用于将交易数据存储在区块链中,所述区块链的每个存储节点中均配置有私有账本和公共账本。所述装置包括:检测模块,用于检测交易数据的类型;第一存储模块,用于若所述交易数据的类型为第一类交易数据,则确定所述区块链中与所述交易数据匹配的目标存储节点,将所述交易数据存储至所述目标存储节点的私有账本中,以及将所述交易数据加密产生的摘要信息存储至所述区块链中其他存储节点的公共账本中;第二存储模块,用于若所述交易数据的类型为第二类交易数据,则将所述交易数据存储至所述区块链中每个存储节点的公共账本中。In a third aspect, the embodiments of this specification provide a transaction data storage device for storing transaction data in a blockchain, and each storage node of the blockchain is configured with a private ledger and a public ledger. The device includes: a detection module, used to detect the type of transaction data; a first storage module, used to determine if the type of the transaction data is the first type of transaction data, determine the transaction data in the blockchain The matched target storage node stores the transaction data in the private ledger of the target storage node, and stores the summary information generated by encrypting the transaction data in the public ledger of other storage nodes in the blockchain; The second storage module is configured to store the transaction data in the public ledger of each storage node in the blockchain if the type of the transaction data is the second type of transaction data.
第四方面,本说明书实施例提供了一种交易数据查询装置,用于查询区块链中存储的交易数据,所述区块链的每个存储节点中均配置有私有账本和公共账本。所述装置包括:确定模块,用于获取用户发起的交易查询请求,并根据所述交易查询请求,确定目标交易数据的类型;第一查询模块,用于若所述目标交易数据的类型为第一类交易数据,则从所述区块链中确定私有账本中存储有所述目标交易数据的目标存储节点,并将所述交易查询请求发送给所述目标存储节点,以使所述目标存储节点基于所述交易查询请求将私有账本中存储的目标交易数据反馈给所述用户;第二查询模块,用于若所述目标交易数据的类型为第二类交易数据,则将所述交易查询请求发送给所述区块链中任意一个存储节点,以使得该存储节点根据所述交易查询请求将公共账本中存储的目标交易数据反馈给所述用户。In a fourth aspect, the embodiment of this specification provides a transaction data query device for querying transaction data stored in a blockchain, and each storage node of the blockchain is configured with a private ledger and a public ledger. The device includes: a determining module, configured to obtain a transaction query request initiated by a user, and determine the type of target transaction data according to the transaction query request; a first query module, configured to determine if the type of the target transaction data is the first For transaction data of one type, the target storage node storing the target transaction data in the private ledger is determined from the blockchain, and the transaction query request is sent to the target storage node, so that the target storage The node feeds back the target transaction data stored in the private ledger to the user based on the transaction query request; the second query module is configured to query the transaction if the type of the target transaction data is the second type of transaction data The request is sent to any storage node in the blockchain, so that the storage node feeds back the target transaction data stored in the public ledger to the user according to the transaction query request.
第五方面,本说明书实施例提供了一种服务器,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行上述第一方面或第二方面所述方法的步骤。In a fifth aspect, an embodiment of the present specification provides a server, including a memory, a processor, and a computer program stored in the memory and running on the processor, and the processor executes the above-mentioned first or second aspect. Method steps.
第六方面,本说明书实施例提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现上述第一方面或第二方面所述方法的步骤。In a sixth aspect, the embodiments of the present specification provide a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the steps of the method described in the first aspect or the second aspect are realized.
本说明书实施例提供的交易数据存储方法,通过先检测交易数据的类型,若是第一类交易数据,则需要先确定区块链中与该交易数据匹配的目标存储节点,然后将该交易数据存储至所述目标存储节点的私有账本中,再将该交易数据加密产生的摘要信息存储至区块链中其他存储节点,以在保证第一类交易数据存储私密性的同时保证存储数据的真实性,若是第二类交易数据,则将该交易数据存储至区块链中任意一个存储节点的公共账本中,实现了对第一类交易数据和第二类交易数据统一自动存储。并且,本方案可扩展性强,可以根据需要灵活地对交易数据进行类型划分,以及对第一类交易数据匹配 的目标存储节点进行配置,方便实现对于新增业务产生的各类交易数据的存储。The transaction data storage method provided in the embodiment of this specification first detects the type of transaction data. If it is the first type of transaction data, it is necessary to first determine the target storage node in the blockchain that matches the transaction data, and then store the transaction data In the private ledger of the target storage node, the summary information generated by encrypting the transaction data is stored in other storage nodes in the blockchain to ensure the authenticity of the stored data while ensuring the privacy of the first type of transaction data storage If it is the second type of transaction data, the transaction data is stored in the public ledger of any storage node in the blockchain, which realizes the unified and automatic storage of the first type of transaction data and the second type of transaction data. In addition, this solution is highly scalable, and can flexibly classify transaction data according to needs, and configure the target storage node matching the first type of transaction data, so as to facilitate the storage of various transaction data generated by newly-added services .
相应地,本说明书实施例提供的交易数据查询方法,先通过获取到的交易查询请求确定目标交易数据的类型;若为第一类交易数据,则先从区块链中确定私有账本中存储有该目标交易数据的目标存储节点,再将交易查询请求转发给目标存储节点得到其私有账本中存储的目标交易数据;若该目标交易数据为第二类交易数据,则将交易查询请求转发给区块链中任意一个存储节点得到其公共账本中存储的目标交易数据。这样针对目标交易数据类型配置查询流程,能够满足用户对各类交易数据的查询需求,在保证第一类交易数据存储私密性的同时,实现第一类交易数据和第二类交易数据的统一查询,方便用户操作。Correspondingly, the transaction data query method provided by the embodiment of this specification first determines the type of target transaction data through the acquired transaction query request; if it is the first type of transaction data, first determine from the blockchain that the private ledger is stored The target storage node of the target transaction data forwards the transaction query request to the target storage node to obtain the target transaction data stored in its private ledger; if the target transaction data is the second type of transaction data, the transaction query request is forwarded to the district Any storage node in the block chain obtains the target transaction data stored in its public ledger. In this way, configuring the query process for the target transaction data type can meet the user's query requirements for various transaction data. While ensuring the privacy of the first type of transaction data storage, it realizes the unified query of the first type of transaction data and the second type of transaction data. , It is convenient for users to operate.
附图说明Description of the drawings
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本发明的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:By reading the detailed description of the preferred embodiments below, various other advantages and benefits will become clear to those of ordinary skill in the art. The drawings are only used for the purpose of illustrating the preferred embodiments, and are not considered as a limitation to the present invention. Also, throughout the drawings, the same reference symbols are used to denote the same components. In the attached picture:
图1为适用于本说明书实施例的一种运行环境示意图;Figure 1 is a schematic diagram of an operating environment suitable for the embodiments of this specification;
图2为本说明书实施例第一方面提供的一种交易数据存储方法的流程图;2 is a flowchart of a method for storing transaction data according to the first aspect of the embodiments of this specification;
图3为本说明书实施例第一方面提供的交易数据存储示意图;3 is a schematic diagram of transaction data storage provided by the first aspect of the embodiments of this specification;
图4为本说明书实施例第二方面提供的一种交易数据查询方法的流程图;4 is a flowchart of a method for querying transaction data provided by the second aspect of the embodiments of this specification;
图5为本说明书实施例第三方面提供的一种交易数据存储装置的模块框图;5 is a block diagram of a transaction data storage device provided by the third aspect of the embodiments of this specification;
图6为本说明书实施例第四方面提供的一种交易数据查询装置的模块框图;6 is a block diagram of a transaction data query device provided by the fourth aspect of the embodiments of this specification;
图7为本说明书实施例第五方面提供的服务器的示意图。Fig. 7 is a schematic diagram of a server provided by the fifth aspect of the embodiment of this specification.
具体实施方式Detailed ways
图1为适用于本说明书实施例提供的数据存储方法的运行环境示意图。如图1所示,服务器300与区块链100中的一个或多个存储节点通信连接(图1中示出的连接三个存储节点仅为示意),以进行数据通信或交互。FIG. 1 is a schematic diagram of an operating environment suitable for the data storage method provided by the embodiment of this specification. As shown in FIG. 1, the server 300 is in communication connection with one or more storage nodes in the blockchain 100 (the connection of the three storage nodes shown in FIG. 1 is only for illustration) for data communication or interaction.
其中,服务器300可以是业务服务器,即业务系统所在的服务器,为用户提供交易服务,可以接收用户通过客户端发起的交易请求,对交易请求进行处理并生成交易数据。Wherein, the server 300 may be a business server, that is, a server where a business system is located, providing transaction services for users, and may receive transaction requests initiated by users through the client, process the transaction requests, and generate transaction data.
区块链100包含多个存储节点(如图1中仅示出的存储节点101至106),这些存储节点之间可通过网络200相互相连,以进行数据通信或交互。这些存储节点可以是个人电脑(Personal Computer,PC)、笔记本电脑、平板电脑、智能手机、可穿戴设备等具有网络功能以及数据存储功能的设备。需要说明的是,图1中存储节点数量仅为示意,不对区块链100包含存储节点的具体数量进行限制,在实际应用场景中,可以包含更多的存储节点并陆续增加新的存储节点。The blockchain 100 includes a plurality of storage nodes (only the storage nodes 101 to 106 shown in FIG. 1), and these storage nodes can be connected to each other through a network 200 for data communication or interaction. These storage nodes may be personal computers (Personal Computers, PCs), notebook computers, tablet computers, smart phones, wearable devices, and other devices with network functions and data storage functions. It should be noted that the number of storage nodes in FIG. 1 is only for illustration, and does not limit the specific number of storage nodes included in the blockchain 100. In actual application scenarios, more storage nodes can be included and new storage nodes can be added one after another.
另外,本说明书实施例中,区块链的每个存储节点中均配置有私有账本和公共账本。其中,私有账本为设置有访问权限的账本,也就是说,除存储节点本身以外,区块链中其他存储节点无法任意从该存储节点的私有账本中获取交易数据。相应的,公共账本为无访问权限的账本,是对区块链中任意存储节点均公开的账本,其他任意存储节点均可以从该存储节点的公开账本中获取交易数据。In addition, in the embodiment of this specification, each storage node of the blockchain is configured with a private ledger and a public ledger. Among them, the private ledger is a ledger with access permissions, that is, except for the storage node itself, other storage nodes in the blockchain cannot arbitrarily obtain transaction data from the storage node's private ledger. Correspondingly, the public ledger is a ledger without access rights, which is a ledger open to any storage node in the blockchain, and any other storage node can obtain transaction data from the public ledger of the storage node.
本说明书实施例提供的交易数据存储方法可以应用于上述系统中的业务服务器,一方面通过存储节点中私有账本和公共账本这种结构设计,利用节点间共享的公共信息确保交易不可篡改的真实性,同时利用私有账本在非目标存储节点间只共享对交易数据加密产生的摘要信息保证存储的第一类交易数据的私密性;另一方面,通过统一识别交易数据类型,然后基于类型自动进入不同的上链存储流程,实现了对第一类交易数据和第二类交易数据统一自动存储,具有更强的适用性和可扩展性,可以根据需要灵活地对交易数据进行类型划分,以及对第一类交易数据匹配的目标存储节点进行配置,方便实现对于新增业务产生的各类交易数据的存储。The transaction data storage method provided in the embodiments of this specification can be applied to the business server in the above system. On the one hand, through the structural design of private and public ledgers in the storage nodes, the public information shared between nodes is used to ensure the authenticity of transactions that cannot be tampered with. At the same time, the private ledger is used to share only the summary information generated by encrypting the transaction data between non-target storage nodes to ensure the privacy of the stored transaction data of the first type; on the other hand, the transaction data type is uniformly identified, and then the different types are automatically entered The on-chain storage process realizes the unified and automatic storage of the first type of transaction data and the second type of transaction data, which has stronger applicability and scalability, and can flexibly classify transaction data according to needs, as well as the second type of transaction data. One type of transaction data matching target storage node is configured to facilitate the storage of various transaction data generated by newly-added services.
进一步地,本说明书实施例还提供了一种交易数据查询方法,也可以应用于上述系统中的业务服务器,用于查询通过上述存储方法存储与区块链各存储节点中私有账本以及公共账本中的交易数据,通过针对目标交易数据类型配置查询流程,能够满足用户对各类交易数据的查询需求,在保证第一类交易数据存储私密性的同时,实现第一类交易数据和第二类交易数据的统一查询,方便用户操作。Further, the embodiment of this specification also provides a transaction data query method, which can also be applied to the business server in the above-mentioned system for querying private ledgers and public ledgers stored in each storage node of the blockchain through the above-mentioned storage method. By configuring the query process for the target transaction data type, it can meet the user's query requirements for various transaction data. While ensuring the privacy of the first type of transaction data storage, it can realize the first type of transaction data and the second type of transaction. The unified query of data is convenient for users to operate.
为了更好的理解上述技术方案,下面通过附图以及具体实施例对本说明书实施例的技术方案做详细的说明,应当理解本说明书实施例以及实施例中的具体特征是对本说明书实施例技术方案的详细的说明,而不是对本说明书技术方案的限定,在不冲突的情况下,本说明书实施例以及实施例中的技术特征可以相互组合。本说明书实施例中,术语“多个”表示“两个以上”,即包括两个或大于两个的情况。In order to better understand the above technical solutions, the technical solutions of the embodiments of this specification are described in detail below through the drawings and specific embodiments. It should be understood that the embodiments of this specification and the specific features in the embodiments are of the technical solutions of the embodiments of this specification. The detailed description is not a limitation on the technical solution of this specification. The embodiments of this specification and the technical features in the embodiments can be combined with each other if there is no conflict. In the embodiments of this specification, the term "plurality" means "two or more", that is, two or more than two are included.
第一方面,本说明书实施例提供了一种交易数据存储方法,用于将交易数据存储在 区块链中,区块链的每个存储节点中均配置有私有账本和公共账本。如图2所示,该方法包括以下步骤S201至步骤S203。In the first aspect, the embodiments of this specification provide a transaction data storage method for storing transaction data in a blockchain, and each storage node of the blockchain is configured with a private ledger and a public ledger. As shown in Figure 2, the method includes the following steps S201 to S203.
步骤S201,检测交易数据的类型。Step S201: Detect the type of transaction data.
其中,要检测的交易数据即为需要存储的交易数据。业务服务器中的业务系统监测到交易发生时,例如当监测到交易创建或者监测到交易完成时,可以获取到基于用户触发的交易请求生成的交易数据。具体交易数据的内容根据实际应用场景的业务类型确定。Among them, the transaction data to be detected is the transaction data that needs to be stored. When the business system in the business server detects that a transaction occurs, for example, when the transaction is created or the transaction is completed, the transaction data generated based on the transaction request triggered by the user can be obtained. The content of the specific transaction data is determined according to the business type of the actual application scenario.
本说明书实施例中,交易数据可以是关联交易数据。其中,关联交易是指关联方之间任何转移资源、劳务或义务的行为或交易,不论是否收取价款。按照交易类型划分,常见的关联交易有以下几类:购买或销售商品、股权投资、提供或接受劳务、提供资金、研究与开发转移、关键管理人薪酬等。当然,在本说明书其他实施例中,也可以是其他类型的交易数据,此处不作限制。In the embodiment of this specification, the transaction data may be related transaction data. Among them, related party transactions refer to any behavior or transaction that transfers resources, labor services, or obligations between related parties, regardless of whether the price is charged or not. According to the type of transaction, common related transactions fall into the following categories: purchase or sale of goods, equity investment, provision or acceptance of labor services, provision of funds, research and development transfer, key management compensation, etc. Of course, in other embodiments of this specification, it may also be other types of transaction data, which is not limited here.
具体来讲,交易数据的类型可以包括第一类交易数据和第二类交易数据。其中,第一类交易数据为重大私密的、需要保密存储的交易数据,第二类交易数据为可以公开的交易数据。Specifically, the types of transaction data may include the first type of transaction data and the second type of transaction data. Among them, the first type of transaction data is important and private transaction data that needs to be stored confidentially, and the second type of transaction data is transaction data that can be made public.
作为一种实施方式,上述检测交易数据的类型的过程可以包括:提取交易数据中的业务特征信息;判断交易数据的业务特征信息是否满足预设私密存储条件,若是,则将交易数据的类型确定为第一类交易数据,若否,则将交易数据的类型确定为第二类交易数据。其中,预设私密存储条件为用于对交易数据进行私密性检测的条件。As an implementation manner, the above process of detecting the type of transaction data may include: extracting business feature information from the transaction data; judging whether the business feature information of the transaction data meets preset private storage conditions, and if so, determining the type of transaction data It is the first type of transaction data. If not, the type of the transaction data is determined to be the second type of transaction data. Among them, the preset private storage condition is a condition for performing privacy detection on transaction data.
其中,业务特征信息以及预设私密存储条件可以根据实际应用场景的需要设置。举例来讲,业务特征信息可以包括但不限于交易所属的业务类型、交易金额、交易对象以及交易的合约属性等中的一种或多种信息。其中,业务类型和合约属性具体可以根据实际应用场景确定。例如,业务类型可以包括收单手续费业务、分润业务以及贴息业务等。交易的合约属性可以包括合约性质如重大交易或普通交易、合约来源如来自于第一签约平台或第二签约平台等以及定价策略如关联方定价或普通交易定价等。Among them, the service feature information and the preset private storage conditions can be set according to the needs of actual application scenarios. For example, the business characteristic information may include, but is not limited to, one or more of the business type to which the transaction belongs, the transaction amount, the transaction object, and the contract attribute of the transaction. Among them, the business type and contract attributes can be specifically determined according to actual application scenarios. For example, the type of business can include acquiring fee business, profit sharing business, and interest discount business, etc. The contract attributes of the transaction may include the nature of the contract, such as a major transaction or ordinary transaction, the source of the contract, such as from the first contracting platform or the second contracting platform, and the pricing strategy, such as related party pricing or ordinary transaction pricing.
例如,在一种应用场景中,第一业务平台和第二业务平台发生关联交易,此时,业务特性信息包括交易金额大小、定价策略以及业务类型等。判断交易数据的业务特征信息是否满足预设私密存储条件可以是依据交易金额大小来判定,若交易金额超过1亿则判定该交易数据满足预设私密存储条件,反之则不满足;或者,可以是依据定价策略来判定,若关联方优惠费率则判定该交易数据满足预设私密存储条件,反之则不满足;又 或者,可以是其中的多个条件组合,若交易金额超过1亿且关联方优惠费率,则判定该交易数据满足预设私密存储条件,反之则不满足。For example, in an application scenario, a related transaction occurs between the first business platform and the second business platform. At this time, the business characteristic information includes the transaction amount, pricing strategy, and business type. Judging whether the business characteristic information of the transaction data meets the preset private storage conditions can be based on the size of the transaction amount. If the transaction amount exceeds 100 million, it is determined that the transaction data meets the preset private storage conditions, otherwise it does not; or, it may be According to the pricing strategy, if the related party preferential rate, it is determined that the transaction data meets the preset private storage condition, otherwise it does not meet; or, it can be a combination of multiple conditions. If the transaction amount exceeds 100 million and the related party If the preferential rate is applied, it is determined that the transaction data meets the preset private storage conditions, and vice versa.
在具体实施过程中,可以根据需要灵活地对交易数据进行类型划分,这样对于新增业务产生的各交易数据,本说明书实施例提供的存储方法也能够适用,无需耗费大量资源去重新配置新增业务产生的交易数据的上链存储流程,可扩展性强。In the specific implementation process, transaction data can be flexibly divided into types according to needs. In this way, for each transaction data generated by a newly-added service, the storage method provided in the embodiment of this specification can also be applied without spending a lot of resources to reconfigure the newly-added transaction data. The on-chain storage process of transaction data generated by the business is highly scalable.
步骤S202,若交易数据的类型为第一类交易数据,则确定区块链中与该交易数据匹配的目标存储节点,将交易数据存储至目标存储节点的私有账本中,以及将交易数据加密产生的摘要信息存储至区块链中其他存储节点的公共账本中。Step S202: If the type of transaction data is the first type of transaction data, determine the target storage node in the blockchain that matches the transaction data, store the transaction data in the private ledger of the target storage node, and encrypt the transaction data to generate The summary information of is stored in the public ledger of other storage nodes in the blockchain.
步骤S203,若交易数据的类型为第二类交易数据,则将交易数据存储至区块链中每个存储节点的公共账本中。Step S203: If the type of the transaction data is the second type of transaction data, store the transaction data in the public ledger of each storage node in the blockchain.
可以理解的是,每个存储节点的私有账本均设置有严格的权限,访问私有账本以及获取私有账本中存储的交易数据需要经过权限检测,区块链中任一存储节点均无权访问其他存储节点的私有账本,相对的,区块链中任一存储节点中的公共账本对于区块链中的其他存储节点是公开透明的,区块链中各存储节点可以相互访问公共账本。It is understandable that the private ledgers of each storage node are set with strict permissions. Access to the private ledgers and access to the transaction data stored in the private ledgers require permission detection. Any storage node in the blockchain has no right to access other storage. The private ledger of the node, in contrast, the public ledger in any storage node in the blockchain is open and transparent to other storage nodes in the blockchain, and each storage node in the blockchain can access the public ledger mutually.
对于第一类交易数据来讲,为了保证所存储的第一类交易数据的私密性,需要该类型的交易数据存储在区块链中与该交易数据匹配的存储节点的私有账本中。在此之前,需要先从区块链的存储节点中确定与该交易数据匹配的目标存储节点,具体为从区块链中与业务服务器通信连接的存储节点中确定目标存储节点。本说明书实施例中,第一类交易数据的目标存储节点可以是一个,也可以是多个。在具体实施过程中,可根据需要灵活地对第一类交易数据匹配的目标存储节点进行配置,这样也方便实现对于新增业务产生的各类交易数据的存储,使得本说明书实施例提供的存储方法具体较强的可扩展性。For the first type of transaction data, in order to ensure the privacy of the stored first type of transaction data, the transaction data of this type needs to be stored in the private ledger of the storage node matching the transaction data in the blockchain. Prior to this, it is necessary to determine the target storage node matching the transaction data from the storage nodes of the blockchain, specifically determining the target storage node from the storage nodes that are in communication with the business server in the blockchain. In the embodiment of this specification, the target storage node of the first type of transaction data may be one or multiple. In the specific implementation process, the target storage node matching the first type of transaction data can be flexibly configured according to needs, which is also convenient to realize the storage of various types of transaction data generated by new services, so that the storage provided by the embodiment of this specification Method specific and strong scalability.
作为一种实施方式,上述确定所述区块链中与所述交易数据匹配的目标存储节点的过程可包括:获取交易数据的业务属性信息;根据交易数据的业务属性信息,以及区块链中存储节点与业务属性信息的预设映射关系,确定与该交易数据匹配的目标存储节点。As an implementation manner, the foregoing process of determining the target storage node in the blockchain that matches the transaction data may include: obtaining business attribute information of the transaction data; business attribute information according to the transaction data, and The preset mapping relationship between the storage node and the business attribute information determines the target storage node that matches the transaction data.
业务服务器中预先配置有业务属性信息与区块链中存储节点的映射关系。业务属性信息根据实际应用场景确定,例如可以包括但不限于:业务类型、交易金额大小以及合约类型等中的一种或多种组合。其中,交易合约类型可以根据实际应用场景确定,例如可以包括但不限于:股权投资类合约,融资类合约以及交易类合约等。当然,业务属性信息除了上述信息以外,还可包括其他信息,如交易等级、交易对象等。交易等级是指 预先为所有交易配置的保密等级。交易对象为交易的对手方,如某银行或某网络平台等。The business server is pre-configured with a mapping relationship between business attribute information and storage nodes in the blockchain. The business attribute information is determined according to actual application scenarios, and may include, but is not limited to, one or more combinations of business type, transaction amount, and contract type, for example. Among them, the transaction contract type can be determined according to actual application scenarios, for example, it can include, but is not limited to: equity investment contracts, financing contracts, and transaction contracts. Of course, in addition to the above information, the business attribute information may also include other information, such as transaction level, transaction object, and so on. The transaction level refers to the confidentiality level pre-configured for all transactions. The transaction object is the counterparty of the transaction, such as a bank or a network platform.
举例来讲,在一种应用场景中,业务属性信息可以包括交易金额大小,此时可以依据金额划分区间,交易金额小于100万,则存储在A、B、C节点;交易金额在100万-1亿,则存储在D、E、F节点;交易金额超过1亿,则存储在G、H节点。For example, in an application scenario, the business attribute information can include the size of the transaction amount. In this case, the range can be divided according to the amount. If the transaction amount is less than 1 million, it is stored in nodes A, B, and C; the transaction amount is 1 million- 100 million is stored in nodes D, E, and F; if the transaction amount exceeds 100 million, it is stored in nodes G and H.
在一种可选的实施例中,可以预先配置有业务属性信息与区块链中与业务服务器通信连接的存储节点的映射关系。例如,业务服务器与区块链中的10个存储节点均通信连接,则可以预先配置并存储业务属性信息与这10个存储节点之间的映射关系,进而,根据该映射关系,从这10个存储节点中确定出当前交易数据的目标存储节点。In an optional embodiment, the mapping relationship between the service attribute information and the storage node in the blockchain that is communicatively connected with the service server may be pre-configured. For example, if the service server is in communication connection with 10 storage nodes in the blockchain, the mapping relationship between the service attribute information and the 10 storage nodes can be pre-configured and stored, and then, according to the mapping relationship, from the 10 storage nodes The storage node determines the target storage node of the current transaction data.
当然,在本说明书其他实施例中,也可以预先配置并存储业务属性信息与区块链中所有存储节点之间的映射关系,这样在某些应用场景中,若目标存储节点也可以包含与业务服务器通信连接的存储节点以外的其他存储节点,由与业务服务器通信连接的存储节点中转至该目标存储节点的私有账本中存储。Of course, in other embodiments of this specification, the mapping relationship between service attribute information and all storage nodes in the blockchain can also be pre-configured and stored. In this way, in some application scenarios, if the target storage node can also include Storage nodes other than the storage node connected in communication with the server are transferred from the storage node in communication connection with the business server to the private ledger of the target storage node for storage.
此外,对于第二类交易数据来讲,由于第二类交易数据是无需保密存储的,可以将区块链中与业务服务器通信连接的任意一个存储节点作为目标存储节点。将交易数据发送给该存储节点存储至本地的公共账本中,并由该存储节点将该交易数据广播给区块链中其余的存储节点,以使得其他存储节点将该交易数据存储至各自的公共账本中,实现第二类交易数据在区块链所有存储节点中的共享存储。由于区块链中每个区块均存储有本区块的摘要值和相邻上一个区块的摘要值,一旦篡改交易数据,就导致摘要值与公共账本记录的数据不匹配,能够有效地保证交易数据的真实性。In addition, for the second type of transaction data, since the second type of transaction data does not need to be stored confidentially, any storage node in the blockchain that is communicatively connected with the business server can be used as the target storage node. The transaction data is sent to the storage node and stored in the local public ledger, and the storage node broadcasts the transaction data to the rest of the storage nodes in the blockchain, so that other storage nodes store the transaction data in their respective public In the ledger, the shared storage of the second type of transaction data in all storage nodes of the blockchain is realized. Since each block in the blockchain stores the digest value of this block and the digest value of the adjacent block, once the transaction data is tampered with, the digest value will not match the data recorded in the public ledger, which can effectively Ensure the authenticity of transaction data.
在一种可选的实施例中,业务服务器确定交易数据的类型后,可以标记该交易数据的类型标签。类型标签用于唯一标识该交易数据的类型,即表征该交易数据是第一类交易数据还是第二类交易数据。进而,业务服务器在确定目标存储节点后,就可以将携带有类型标签的交易数据发送给目标存储节点,从而方便存储节点确定要存储的交易数据类型,按交易数据类型进行相应的存储流程。In an optional embodiment, after determining the type of transaction data, the service server may mark the type label of the transaction data. The type tag is used to uniquely identify the type of the transaction data, that is, to indicate whether the transaction data is the first type of transaction data or the second type of transaction data. Furthermore, after determining the target storage node, the service server can send the transaction data carrying the type label to the target storage node, thereby facilitating the storage node to determine the transaction data type to be stored, and perform the corresponding storage process according to the transaction data type.
此时,目标存储节点接收到交易数据后,就可以根据该交易数据携带的类型标签,确定该交易数据是第一类交易数据还是第二类交易数据。若是第一类交易数据,则将该交易数据存储到本地的私有账本中,并对该交易数据进行加密,将加密产生的摘要信息广播到区块链中除该目标存储节点以外的其余存储节点,使得这些存储节点将交易数据加密后的摘要值存储到各自的公共账本中。其中,对交易数据加密的方式可以有多种, 例如,可以采用哈希函数对交易数据进行加密,将输出值作为对交易数据加密产生的摘要信息。若是第二类交易数据,则将该交易数据存储到本地的公共账本中,并将该交易数据广播到区块链中除该目标存储节点以外的其余存储节点,从而将交易数据共享到其余存储节点的公共账本中。At this time, after the target storage node receives the transaction data, it can determine whether the transaction data is the first type of transaction data or the second type of transaction data according to the type label carried by the transaction data. If it is the first type of transaction data, store the transaction data in the local private ledger, encrypt the transaction data, and broadcast the encrypted summary information to other storage nodes in the blockchain except the target storage node , Enabling these storage nodes to store the encrypted digest value of the transaction data in their respective public ledgers. Among them, there may be multiple ways to encrypt the transaction data. For example, a hash function may be used to encrypt the transaction data, and the output value may be used as the summary information generated by encrypting the transaction data. If it is the second type of transaction data, store the transaction data in the local public ledger, and broadcast the transaction data to the rest of the storage nodes in the blockchain except the target storage node, thereby sharing the transaction data to the rest of the storage In the public ledger of the node.
举例来讲,如图3所示,在某应用场景中,有交易数据TX1、TX2和TX3,其中,经过步骤201的检测,交易数据TX1为第二类交易数据,交易数据TX2和TX3为第一类交易数据。存储节点A、B和C均为区块链中的节点,均配置有公共账本和私有账本。其中,存储节点A和C均为与交易数据TX2匹配的目标存储节点,则交易数据TX2存储在存储节点A和C的私有账本中,且将交易数据TX2加密产生的摘要信息digest(Tx2)广播至区块链中其他存储节点的公共账本中存储。存储节点B和C均为与交易数据TX3匹配的目标存储节点,则交易数据TX3存储在存储节点B和C的私有账本中,且将交易数据TX3加密产生的摘要信息digest(Tx3)广播至区块链中其他存储节点的公共账本中存储。而交易数据TX1则存储到区块链中每个存储节点的公共账本中。For example, as shown in Figure 3, in a certain application scenario, there are transaction data TX1, TX2, and TX3. After the detection in step 201, the transaction data TX1 is the second type of transaction data, and the transaction data TX2 and TX3 are the second type of transaction data. One type of transaction data. Storage nodes A, B, and C are all nodes in the blockchain, and they are all configured with public ledgers and private ledgers. Wherein, storage nodes A and C are both target storage nodes that match the transaction data TX2, then the transaction data TX2 is stored in the private ledger of the storage nodes A and C, and the digest (Tx2) generated by encrypting the transaction data TX2 is broadcast To be stored in the public ledger of other storage nodes in the blockchain. Storage nodes B and C are both target storage nodes that match the transaction data TX3, then the transaction data TX3 is stored in the private ledger of the storage nodes B and C, and the digest (Tx3) generated by encrypting the transaction data TX3 is broadcast to the district It is stored in the public ledger of other storage nodes in the block chain. The transaction data TX1 is stored in the public ledger of each storage node in the blockchain.
也就是说,第一类交易数据仅在目标存储节点的私有账本上可见,但对应加密产生的摘要信息,即上图中的digest(Tx2)和digest(Tx3),会分发存储在所有节点的公共账本上面。仅凭借摘要值,无法反推具体的交易数据,且由于摘要值记录在各节点,如果私有账本数据被篡改会导致摘要值不匹配。因此可以在保证数据真实性的同时,满足数据存储的私密性要求。In other words, the first type of transaction data is only visible on the private ledger of the target storage node, but the digest (Tx2) and digest (Tx3) in the figure above will be distributed and stored in all nodes. On the public ledger. Relying on the summary value alone, it is impossible to reverse the specific transaction data, and since the summary value is recorded at each node, if the private ledger data is tampered with, the summary value will not match. Therefore, the privacy requirements of data storage can be met while ensuring the authenticity of the data.
第二方面,本说明书实施例提供了一种交易数据查询方法,用于查询区块链中存储的交易数据,具体用于查询按照上述第一方面任一实施例提供的交易数据存储方法存储的交易数据。其中,区块链的每个存储节点中均配置有私有账本和公共账本。如图4所示,该方法包括以下步骤S401至步骤S403。In the second aspect, the embodiments of this specification provide a transaction data query method for querying transaction data stored in the blockchain, specifically for querying transaction data stored in accordance with the transaction data storage method provided by any embodiment of the first aspect. Transaction data. Among them, each storage node of the blockchain is configured with private ledgers and public ledgers. As shown in Fig. 4, the method includes the following steps S401 to S403.
步骤S401,获取用户发起的交易查询请求,并根据交易查询请求,确定目标交易数据的类型。Step S401: Obtain a transaction query request initiated by the user, and determine the type of target transaction data according to the transaction query request.
举例来讲,用户可以通过与业务服务器对应的客户端中设置的交易查询接口,输入或选择要查询的目标交易数据的查询条件,并在触发交易查询后,根据用户输入的查询条件生成交易查询请求。例如,查询条件可以包括但不限于交易对象、交易金额以及交易时间等索引项中的一种或多种组合。For example, the user can input or select the query conditions of the target transaction data to be queried through the transaction query interface set in the client corresponding to the business server, and after triggering the transaction query, generate a transaction query based on the query conditions entered by the user ask. For example, the query conditions may include, but are not limited to, one or more combinations of index items such as transaction object, transaction amount, and transaction time.
作为一种实施方式,上述根据交易查询请求,确定目标交易数据的类型的过程可以 包括:根据交易查询请求,得到目标交易数据的业务特征信息;判断业务特征信息是否满足预设私密存储条件,若是,则将目标交易数据的类型确定为第一类交易数据,若否,则将目标交易数据的类型确定为第二类交易数据,其中,预设私密存储条件为用于对目标交易数据进行私密性检测的条件。As an implementation manner, the foregoing process of determining the type of target transaction data according to the transaction query request may include: obtaining the business characteristic information of the target transaction data according to the transaction query request; judging whether the business characteristic information meets the preset private storage condition, if so , The type of the target transaction data is determined as the first type of transaction data, if not, the type of the target transaction data is determined as the second type of transaction data, wherein the preset private storage condition is used to privately store the target transaction data The conditions for sex testing.
举例来讲,业务服务器获取到交易查询请求后,可以对交易查询请求进行解析,得到目标交易数据的业务特征信息。例如,交易查询请求中可以包含要查询的目标交易数据的业务特征信息,此时可以从交易查询请求中提取目标交易数据的业务特征信息。For example, after receiving the transaction query request, the business server can parse the transaction query request to obtain the business characteristic information of the target transaction data. For example, the transaction query request may include the business characteristic information of the target transaction data to be queried, and in this case, the business characteristic information of the target transaction data may be extracted from the transaction query request.
需要说明的是,业务特征信息的具体内容以及得到业务特征信息后的类型判断过程,与上述存储方法实施例类似,具体可以参照上述第一方面提供的方法实施例中的相应描述,此处不再赘述。It should be noted that the specific content of the service feature information and the type judgment process after the service feature information is obtained are similar to the foregoing storage method embodiment. For details, please refer to the corresponding description in the foregoing method embodiment provided in the first aspect. Go into details again.
作为另一种实施方式,交易查询请求中可以包含用户输入的查询条件,业务服务器从交易查询请求中解析出目标交易数据的查询条件后,可以根据查询条件,在预设的交易数据库中匹配要查询的目标交易数据,交易数据库中记录有业务服务器产生的交易数据的关键信息,其中,关键信息可以包括交易数据的类型。这样就可以根据查询条件,在交易数据库中查找到要查询的目标交易数据的类型。As another embodiment, the transaction query request may include the query conditions entered by the user. After the business server parses the query conditions of the target transaction data from the transaction query request, it can match the requirements in the preset transaction database according to the query conditions. For the target transaction data to be queried, the transaction database records the key information of the transaction data generated by the business server, where the key information may include the type of the transaction data. In this way, the type of target transaction data to be queried can be found in the transaction database according to the query conditions.
步骤S402,若目标交易数据的类型为第一类交易数据,则从区块链中确定私有账本中存储有目标交易数据的目标存储节点,并将交易查询请求发送给目标存储节点,以使目标存储节点基于交易查询请求将私有账本中存储的目标交易数据反馈给用户。Step S402: If the type of the target transaction data is the first type of transaction data, the target storage node storing the target transaction data in the private ledger is determined from the blockchain, and the transaction query request is sent to the target storage node, so that the target The storage node feeds back the target transaction data stored in the private ledger to the user based on the transaction query request.
需要说明的是,要查询的目标交易数据是按照上述第一方面提供交易数据存储方法存储的。若根据上述步骤S401确定该目标交易数据为第一类交易数据,则该目标交易数据是存储区块链中与该目标交易数据匹配的目标存储节点的私有账本中,区块链中其他存储节点只在公共账本中存储了对该目标交易数据加密产生的摘要信息。因此,需要先确定目标交易数据的目标存储节点,从目标存储节点的私有账本得到目标交易数据。It should be noted that the target transaction data to be queried is stored according to the transaction data storage method provided in the first aspect above. If it is determined according to the above step S401 that the target transaction data is the first type of transaction data, then the target transaction data is stored in the private ledger of the target storage node matching the target transaction data in the blockchain, and other storage nodes in the blockchain Only the summary information generated by encrypting the target transaction data is stored in the public ledger. Therefore, it is necessary to determine the target storage node of the target transaction data first, and obtain the target transaction data from the private ledger of the target storage node.
作为一种实施方式,从区块链中确定私有账本中存储有目标交易数据的目标存储节点的过程可以包括:根据交易查询请求,得到目标交易数据的业务属性信息;根据业务属性信息,以及区块链中存储节点与业务属性信息的预设映射关系,确定私有账本中存储有目标交易数据的目标存储节点。As an implementation manner, the process of determining the target storage node storing the target transaction data in the private ledger from the blockchain may include: obtaining the business attribute information of the target transaction data according to the transaction query request; according to the business attribute information, and the zone The preset mapping relationship between storage nodes and business attribute information in the block chain determines the target storage node that stores the target transaction data in the private ledger.
举例来讲,对交易查询请求进行解析,可以得到目标交易数据的业务属性信息。例如,交易查询请求中可以包含要查询的目标交易数据的业务属性信息,此时可以从交易 查询请求中提取目标交易数据的业务属性信息。For example, by analyzing the transaction query request, the business attribute information of the target transaction data can be obtained. For example, the transaction query request may contain the business attribute information of the target transaction data to be queried. In this case, the business attribute information of the target transaction data can be extracted from the transaction query request.
需要说明的是,业务属性信息的具体内容以及得到业务属性信息后的确定目标存储节点的过程,与上述存储方法实施例类似,具体可以参照上述第一方面提供的方法实施例中的相应描述,此处不再赘述。It should be noted that the specific content of the business attribute information and the process of determining the target storage node after the business attribute information is obtained are similar to the foregoing storage method embodiment. For details, reference may be made to the corresponding description in the method embodiment provided in the first aspect. I won't repeat them here.
作为另一种实施方式,交易查询请求中可以包含用户输入的查询条件,业务服务器从交易查询请求中解析出目标交易数据的查询条件后,可以根据查询条件,在预设的交易数据库中匹配要查询的目标交易数据,交易数据库中记录有业务服务器产生的交易数据的关键信息,其中,关键信息可以包括存储过程中确定的与交易数据匹配的目标存储节点。这样就可以根据查询条件,在交易数据库中查找到私有账本中存储有目标交易数据的目标存储节点。As another embodiment, the transaction query request may include the query conditions entered by the user. After the business server parses the query conditions of the target transaction data from the transaction query request, it can match the requirements in the preset transaction database according to the query conditions. For the queried target transaction data, the transaction database records the key information of the transaction data generated by the business server, where the key information may include the target storage node that matches the transaction data determined in the storage process. In this way, the target storage node that stores the target transaction data in the private ledger can be found in the transaction database according to the query conditions.
在确定目标存储节点以后,就可以将交易查询请求发送给该目标存储节点。目标存储节点就可以基于交易查询请求将私有账本中存储的目标交易数据反馈给用户。需要说明的是,所确定的目标存储节点可以有一个或多个,若存在多个目标存储节点,则可以将交易查询请求发送给每个目标存储节点,每个目标存储节点均返回其私有账本中存储的目标交易数据。After the target storage node is determined, the transaction query request can be sent to the target storage node. The target storage node can then feed back the target transaction data stored in the private ledger to the user based on the transaction query request. It should be noted that there can be one or more target storage nodes determined. If there are multiple target storage nodes, the transaction query request can be sent to each target storage node, and each target storage node returns its private ledger. Target transaction data stored in.
为了确保存储节点私有账本中存储的交易数据的私密性,在一种可选的实施例中,若要查询的目标交易数据为第一类交易数据,业务服务器在转发交易查询请求之前,需要先对用户进行权限验证,以确定用户是否具有查询该目标交易数据的权限,若有,则将交易查询请求转发到目标存储节点,若没有,则结束本地查询,返回错误信息。举例来讲,可以在业务服务器中针对每个存储节点的私有账本配置白名单列表或者预先约定的密钥,若用户在白名单列表内或者是用户提供了预先约定的密钥,则判定用户通过权限验证。In order to ensure the privacy of the transaction data stored in the private ledger of the storage node, in an optional embodiment, if the target transaction data to be queried is the first type of transaction data, the business server needs to first before forwarding the transaction query request Perform permission verification on the user to determine whether the user has the permission to query the target transaction data, if so, forward the transaction query request to the target storage node, if not, end the local query and return an error message. For example, a whitelist or a pre-appointed key can be configured in the business server for the private ledger of each storage node. If the user is in the whitelist or the user provides the pre-appointed key, it is determined that the user passes Permission Validation.
在一种可选的实施例中,存储节点中也可以设置私有账本的访问权限,若目标交易数据为第一类交易数据,业务服务器在向目标存储节点转发交易查询请求时,需要携带权限信息,存储节点接收到交易查询请求后,在根据交易查询请求确定要查询的目标交易数据为私有账本中存储的数据时,需要先验证交易查询请求携带的权限信息,若验证通过,再根据交易查询请求从私有账本中查找目标交易数据并反馈给用户,若验证不通过,则不响应该交易查询请求,结束本次查询。其中,权限信息可以根据实际应用场景预先配置,例如,可以是预先约定的密钥。这样有利于避免私有账本中的交易数据泄漏,进一步确保私有账本中存储的交易数据的私密性。In an optional embodiment, the storage node may also set access permissions for the private ledger. If the target transaction data is the first type of transaction data, the business server needs to carry the permission information when forwarding the transaction query request to the target storage node After the storage node receives the transaction query request, when it determines that the target transaction data to be queried is the data stored in the private ledger according to the transaction query request, it needs to verify the authority information carried in the transaction query request. If the verification is passed, then query according to the transaction Request to find the target transaction data from the private ledger and feed it back to the user. If the verification fails, the transaction query request will not be responded to and the query will be ended. Wherein, the permission information can be pre-configured according to actual application scenarios, for example, it can be a pre-appointed key. This helps avoid leakage of transaction data in the private ledger, and further ensures the privacy of the transaction data stored in the private ledger.
步骤S403,若目标交易数据的类型为第二类交易数据,则将交易查询请求发送给区块链中任意一个存储节点,以使得该存储节点根据交易查询请求将公共账本中存储的目标交易数据反馈给用户。Step S403: If the type of the target transaction data is the second type of transaction data, the transaction query request is sent to any storage node in the blockchain, so that the storage node stores the target transaction data in the public ledger according to the transaction query request. Feedback to users.
由于第二类交易数据是区块链中所有存储节点共享存储的交易数据,从区块链中任意一个存储节点的公共账本均可以获取。因此,确定目标交易数据为第二类交易数据后,业务服务器可以将交易查询请求转发给区块链中任意一个存储节点,具体地,可以转发给区块链中与业务服务器通信连接的存储节点中的任意一个存储节点。Since the second type of transaction data is the transaction data shared by all storage nodes in the blockchain, it can be obtained from the public ledger of any storage node in the blockchain. Therefore, after determining that the target transaction data is the second type of transaction data, the business server can forward the transaction query request to any storage node in the blockchain, specifically, it can be forwarded to the storage node in the blockchain that is in communication with the business server Any storage node in.
存储节点接收到交易查询请求,且根据交易查询请求确定要查询的目标交易数据为公共账本中存储的交易数据时,则根据交易查询请求将公共账本中存储的目标交易数据反馈给用户。When the storage node receives the transaction query request and determines that the target transaction data to be queried is transaction data stored in the public ledger according to the transaction query request, it will feed back the target transaction data stored in the public ledger to the user according to the transaction query request.
进一步地,为了确保用户查询到的交易数据真实可靠,在一种可选的实施例中,在上述步骤S402和步骤S403中,存储节点将目标交易数据反馈给用户之前,可以先对目标交易数据进行防篡改校验,具体可以验证本地存储的目标交易数据加密后的摘要值与其他存储节点中存储的摘要值一致,若一致,则表示本地存储的目标交易数据是真实可靠的,将本地存储目标交易数据反馈给用户,若不一致,则表示本地存储的目标交易数据可能已被篡改,查询失败,返回错误信息。Further, in order to ensure that the transaction data queried by the user is true and reliable, in an optional embodiment, in the above step S402 and step S403, the storage node may first report the target transaction data before feeding back the target transaction data to the user. Perform tamper-proof verification, which can specifically verify that the encrypted digest value of the locally stored target transaction data is consistent with the digest value stored in other storage nodes. If they are consistent, it means that the locally stored target transaction data is true and reliable, and it will be stored locally. The target transaction data is fed back to the user. If it is inconsistent, it means that the locally stored target transaction data may have been tampered with, the query fails, and an error message is returned.
本说明书实施例提供的交易数据查询方法,能够满足用户对各类交易数据的查询需求,实现第一类交易数据和第二类交易数据的统一查询,方便用户操作,既能够保证查询到的交易数据的真实可靠性,又能够在保证私有账本中交易数据的私密性的同时,方便私有账本中交易数据的查询。The transaction data query method provided by the embodiments of this specification can meet the user's query requirements for various transaction data, realize the unified query of the first type of transaction data and the second type of transaction data, facilitate user operations, and can not only ensure the transactions found The authenticity of the data can ensure the privacy of the transaction data in the private ledger, and at the same time facilitate the query of the transaction data in the private ledger.
第三方面,本说明书实施例提供了一种交易数据存储装置,可以运行于业务服务器中,用于将交易数据存储在区块链中,所述区块链的每个存储节点中均配置有私有账本和公共账本。请参考图5,该存储装置50包括:检测模块51,用于检测交易数据的类型;第一存储模块52,用于若所述交易数据的类型为第一类交易数据,则确定所述区块链中与所述交易数据匹配的目标存储节点,将所述交易数据存储至所述目标存储节点的私有账本中,以及将所述交易数据加密产生的摘要信息存储至所述区块链中其他存储节点的公共账本中;第二存储模块53,用于若所述交易数据的类型为第二类交易数据,则将所述交易数据存储至所述区块链中每个存储节点的公共账本中。In the third aspect, the embodiment of this specification provides a transaction data storage device, which can be run in a business server for storing transaction data in a blockchain, and each storage node of the blockchain is configured with Private ledgers and public ledgers. Please refer to FIG. 5, the storage device 50 includes: a detection module 51 for detecting the type of transaction data; a first storage module 52 for determining the area if the type of the transaction data is the first type of transaction data The target storage node matching the transaction data in the block chain stores the transaction data in the private ledger of the target storage node, and stores the summary information generated by encrypting the transaction data in the block chain In the public ledger of other storage nodes; the second storage module 53 is used to store the transaction data in the public account of each storage node in the blockchain if the type of the transaction data is the second type of transaction data In the ledger.
在一种可选的实施例中,上述检测模块51包括:提取子模块511,用于提取所述交 易数据中的业务特征信息;判断子模块512,用于判断所述业务特征信息是否满足预设私密存储条件,若是,则将所述交易数据的类型确定为第一类交易数据,若否,则将所述交易数据的类型确定为第二类交易数据,其中,所述预设私密存储条件为用于对交易数据进行私密性检测的条件。In an optional embodiment, the aforementioned detection module 51 includes: an extraction sub-module 511, configured to extract business characteristic information in the transaction data; and a judging sub-module 512, configured to determine whether the business characteristic information meets the requirements Set private storage conditions, if yes, determine the type of the transaction data as the first type of transaction data, if not, determine the type of the transaction data as the second type of transaction data, wherein the preset private storage The condition is the condition used to check the privacy of the transaction data.
在一种可选的实施例中,上述第一存储模块52用于:获取所述交易数据的业务属性信息;根据所述业务属性信息,以及区块链中存储节点与业务属性信息的预设映射关系,确定与所述交易数据匹配的目标存储节点。In an optional embodiment, the above-mentioned first storage module 52 is configured to: obtain the business attribute information of the transaction data; The mapping relationship determines the target storage node that matches the transaction data.
关于上述装置,其中各个模块的具体功能已经在本说明书实施例第一方面提供的方法实施例中进行了详细描述,此处将不做详细阐述,具体实施过程可以参照上述第一方面提供的方法实施例。Regarding the above device, the specific functions of each module have been described in detail in the method embodiments provided in the first aspect of the embodiments of this specification, and will not be elaborated here. For the specific implementation process, please refer to the method provided in the first aspect. Examples.
第四方面,本说明书实施例提供了一种交易数据查询装置,可以运行于业务服务器中,用于查询区块链中存储的交易数据,所述区块链的每个存储节点中均配置有私有账本和公共账本。请参考图6,该查询装置60包括:In the fourth aspect, the embodiment of this specification provides a transaction data query device, which can run in a business server for querying transaction data stored in a blockchain, and each storage node of the blockchain is configured with Private ledgers and public ledgers. Please refer to FIG. 6, the query device 60 includes:
确定模块61,用于获取用户发起的交易查询请求,并根据所述交易查询请求,确定目标交易数据的类型;第一查询模块62,用于若所述目标交易数据的类型为第一类交易数据,则从所述区块链中确定私有账本中存储有所述目标交易数据的目标存储节点,并将所述交易查询请求发送给所述目标存储节点,以使所述目标存储节点基于所述交易查询请求将私有账本中存储的目标交易数据反馈给所述用户;第二查询模块63,用于若所述目标交易数据的类型为第二类交易数据,则将所述交易查询请求发送给所述区块链中任意一个存储节点,以使得该存储节点根据所述交易查询请求将公共账本中存储的目标交易数据反馈给所述用户。The determining module 61 is configured to obtain a transaction query request initiated by the user and determine the type of target transaction data according to the transaction query request; the first query module 62 is configured to determine if the type of the target transaction data is the first type of transaction Data, the target storage node storing the target transaction data in the private ledger is determined from the blockchain, and the transaction query request is sent to the target storage node, so that the target storage node is based on the The transaction query request feeds back the target transaction data stored in the private ledger to the user; the second query module 63 is configured to send the transaction query request if the type of the target transaction data is the second type of transaction data To any storage node in the blockchain, so that the storage node feeds back the target transaction data stored in the public ledger to the user according to the transaction query request.
在一种可选的实施例中,上述确定模块61包括:获取子模块611,用于根据所述交易查询请求,得到目标交易数据的业务特征信息;判断子模块612,用于判断所述业务特征信息是否满足预设私密存储条件,若是,则将所述目标交易数据的类型确定为第一类交易数据,若否,则将所述目标交易数据的类型确定为第二类交易数据,其中,所述预设私密存储条件为用于对目标交易数据进行私密性检测的条件。In an optional embodiment, the above-mentioned determining module 61 includes: an obtaining sub-module 611, configured to obtain business characteristic information of the target transaction data according to the transaction query request; and a judging sub-module 612, configured to determine the business Whether the characteristic information meets the preset private storage condition, if so, the type of the target transaction data is determined as the first type of transaction data, if not, the type of the target transaction data is determined as the second type of transaction data, wherein , The preset private storage condition is a condition for performing privacy detection on the target transaction data.
在一种可选的实施例中,上述第一查询模块62用于:根据所述交易查询请求,得到目标交易数据的业务属性信息;根据所述业务属性信息,以及区块链中存储节点与业务属性信息的预设映射关系,确定私有账本中存储有所述目标交易数据的目标存储节点。In an optional embodiment, the above-mentioned first query module 62 is configured to: obtain the business attribute information of the target transaction data according to the transaction query request; according to the business attribute information, and the storage nodes in the blockchain and The preset mapping relationship of the business attribute information determines the target storage node where the target transaction data is stored in the private ledger.
关于上述装置,其中各个模块的具体功能已经在本说明书实施例第二方面提供的方法实施例中进行了详细描述,此处将不做详细阐述,具体实施过程可以参照上述第二方面提供的方法实施例。Regarding the above device, the specific functions of each module have been described in detail in the method embodiment provided in the second aspect of the embodiments of this specification, and will not be elaborated here. For the specific implementation process, please refer to the method provided in the above second aspect. Examples.
第五方面,基于与前述实施例同样的发明构思,本说明书实施例还提供了一种服务器,如图7所示,包括存储器704、处理器702及存储在存储器704上并可在处理器702上运行的计算机程序,所述处理器702执行所述程序时实现前文所述第一方面提供的交易数据存储方法的任一实施例的步骤或第二方面提供的交易数据查询方法的任一实施例的步骤。In the fifth aspect, based on the same inventive concept as the previous embodiment, the embodiment of this specification also provides a server, as shown in FIG. When executing the program, the processor 702 implements the steps of any embodiment of the transaction data storage method provided in the first aspect or any implementation of the transaction data query method provided in the second aspect Example steps.
其中,在图7中,总线架构(用总线700来代表),总线700可以包括任意数量的互联的总线和桥,总线700将包括由处理器702代表的一个或多个处理器和存储器704代表的存储器的各种电路链接在一起。总线700还可以将诸如外围设备、稳压器和功率管理电路等之类的各种其他电路链接在一起,这些都是本领域所公知的,因此,本文不再对其进行进一步描述。总线接口705在总线700和接收器701和发送器703之间提供接口。接收器701和发送器703可以是同一个元件,即收发机,提供用于在传输介质上与各种其他装置通信的单元。处理器702负责管理总线700和通常的处理,而存储器704可以被用于存储处理器702在执行操作时所使用的数据。Wherein, in FIG. 7, the bus architecture (represented by a bus 700), the bus 700 may include any number of interconnected buses and bridges, and the bus 700 will include one or more processors represented by the processor 702 and a memory 704 represented by The various circuits of the memory are linked together. The bus 700 may also link various other circuits such as peripheral devices, voltage regulators, power management circuits, etc., which are all known in the art, and therefore, no further description will be given herein. The bus interface 705 provides an interface between the bus 700 and the receiver 701 and transmitter 703. The receiver 701 and the transmitter 703 may be the same element, that is, a transceiver, which provides a unit for communicating with various other devices on the transmission medium. The processor 702 is responsible for managing the bus 700 and general processing, and the memory 704 may be used to store data used by the processor 702 when performing operations.
可以理解的是,图7所示的结构仅为示意,本说明书实施例提供的服务器还可包括比图7中所示更多或者更少的组件,或者具有与图7所示不同的配置。图7中所示的各组件可以采用硬件、软件或其组合实现。It is understandable that the structure shown in FIG. 7 is only for illustration, and the server provided in the embodiment of this specification may also include more or less components than those shown in FIG. 7 or have a different configuration from that shown in FIG. 7. Each component shown in FIG. 7 can be implemented by hardware, software, or a combination thereof.
第六方面,基于与前述实施例同样的发明构思,本说明书实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现前文所述第一方面提供的交易数据存储方法的任一实施例的步骤或第二方面提供的交易数据查询方法的任一实施例的步骤。In the sixth aspect, based on the same inventive concept as the previous embodiment, the embodiment of this specification also provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the first aspect described above is realized. The steps of any embodiment of the transaction data storage method provided or the steps of any embodiment of the transaction data query method provided in the second aspect are provided.
上述对本说明书特定实施例进行了描述。其它实施例在所附权利要求书的范围内。在一些情况下,在权利要求书中记载的动作或步骤可以按照不同于实施例中的顺序来执行并且仍然可以实现期望的结果。另外,在附图中描绘的过程不一定要求示出的特定顺序或者连续顺序才能实现期望的结果。在某些实施方式中,多任务处理和并行处理也是可以的或者可能是有利的。The foregoing describes specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims can be performed in a different order than in the embodiments and still achieve desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or sequential order shown in order to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
本说明书是参照根据本说明书实施例的方法、设备(系统)、和计算机程序产品的 流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的设备。This specification is described with reference to flowcharts and/or block diagrams of methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and/or block in the flowchart and/or block diagram, and the combination of processes and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing equipment to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing equipment are used to generate It is a device that realizes the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令设备的制造品,该指令设备实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device. The device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment. The instructions provide steps for implementing the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
尽管已描述了本发明的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例作出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本发明范围的所有变更和修改。Although the preferred embodiments of the present invention have been described, those skilled in the art can make additional changes and modifications to these embodiments once they learn the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present invention.
显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. In this way, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalent technologies, the present invention is also intended to include these modifications and variations.

Claims (14)

  1. 一种交易数据存储方法,用于将交易数据存储在区块链中,所述区块链的每个存储节点中均配置有私有账本和公共账本,所述方法包括:A method for storing transaction data is used to store transaction data in a block chain, each storage node of the block chain is configured with a private ledger and a public ledger, and the method includes:
    检测交易数据的类型;Detect the type of transaction data;
    若所述交易数据的类型为第一类交易数据,则确定所述区块链中与所述交易数据匹配的目标存储节点,将所述交易数据存储至所述目标存储节点的私有账本中,以及将所述交易数据加密产生的摘要信息存储至所述区块链中其他存储节点的公共账本中;If the type of the transaction data is the first type of transaction data, determine the target storage node in the blockchain that matches the transaction data, and store the transaction data in the private ledger of the target storage node, And storing the summary information generated by encrypting the transaction data in the public ledger of other storage nodes in the blockchain;
    若所述交易数据的类型为第二类交易数据,则将所述交易数据存储至所述区块链中每个存储节点的公共账本中。If the type of the transaction data is the second type of transaction data, the transaction data is stored in the public ledger of each storage node in the blockchain.
  2. 根据权利要求1所述的方法,所述检测交易数据的类型,包括:The method according to claim 1, wherein said detecting the type of transaction data comprises:
    提取所述交易数据中的业务特征信息;Extract business feature information from the transaction data;
    判断所述业务特征信息是否满足预设私密存储条件,若是,则将所述交易数据的类型确定为第一类交易数据,若否,则将所述交易数据的类型确定为第二类交易数据,其中,所述预设私密存储条件为用于对交易数据进行私密性检测的条件。Determine whether the business feature information meets the preset private storage conditions, if yes, determine the type of the transaction data as the first type of transaction data, if not, determine the type of the transaction data as the second type of transaction data , Wherein, the preset private storage condition is a condition for performing privacy detection on transaction data.
  3. 根据权利要求1所述的方法,所述确定所述区块链中与所述交易数据匹配的目标存储节点,包括:The method according to claim 1, wherein the determining a target storage node in the blockchain that matches the transaction data includes:
    获取所述交易数据的业务属性信息;Obtaining business attribute information of the transaction data;
    根据所述业务属性信息,以及所述区块链中存储节点与业务属性信息的预设映射关系,确定与所述交易数据匹配的目标存储节点。According to the business attribute information and the preset mapping relationship between the storage node and the business attribute information in the blockchain, a target storage node that matches the transaction data is determined.
  4. 一种交易数据查询方法,用于查询区块链中存储的交易数据,所述区块链的每个存储节点中均配置有私有账本和公共账本,所述方法包括:A transaction data query method for querying transaction data stored in a block chain, each storage node of the block chain is configured with a private ledger and a public ledger, and the method includes:
    获取用户发起的交易查询请求,并根据所述交易查询请求,确定目标交易数据的类型;Obtain the transaction query request initiated by the user, and determine the type of target transaction data according to the transaction query request;
    若所述目标交易数据的类型为第一类交易数据,则从所述区块链中确定私有账本中存储有所述目标交易数据的目标存储节点,并将所述交易查询请求发送给所述目标存储节点,以使所述目标存储节点基于所述交易查询请求将私有账本中存储的目标交易数据反馈给所述用户;If the type of the target transaction data is the first type of transaction data, the target storage node storing the target transaction data in the private ledger is determined from the blockchain, and the transaction query request is sent to the A target storage node, so that the target storage node feeds back the target transaction data stored in the private ledger to the user based on the transaction query request;
    若所述目标交易数据的类型为第二类交易数据,则将所述交易查询请求发送给所述区块链中任意一个存储节点,以使得该存储节点根据所述交易查询请求将公共账本中存储的目标交易数据反馈给所述用户。If the type of the target transaction data is the second type of transaction data, the transaction query request is sent to any storage node in the blockchain, so that the storage node stores the public ledger in the public ledger according to the transaction query request. The stored target transaction data is fed back to the user.
  5. 根据权利要求4所述的方法,所述根据所述交易查询请求,确定目标交易数据 的类型,包括:The method according to claim 4, wherein the determining the type of target transaction data according to the transaction query request comprises:
    根据所述交易查询请求,得到目标交易数据的业务特征信息;Obtain the business characteristic information of the target transaction data according to the transaction query request;
    判断所述业务特征信息是否满足预设私密存储条件,若是,则将所述目标交易数据的类型确定为第一类交易数据,若否,则将所述目标交易数据的类型确定为第二类交易数据,其中,所述预设私密存储条件为用于对目标交易数据进行私密性检测的条件。Determine whether the business feature information meets the preset private storage conditions, if yes, determine the type of the target transaction data as the first type of transaction data, if not, determine the type of the target transaction data as the second type Transaction data, wherein the preset private storage condition is a condition for performing privacy detection on the target transaction data.
  6. 根据权利要求4所述的方法,所述从所述区块链中确定私有账本中存储有所述目标交易数据的目标存储节点,包括:The method according to claim 4, wherein the determining from the blockchain the target storage node storing the target transaction data in the private ledger comprises:
    根据所述交易查询请求,得到目标交易数据的业务属性信息;Obtain the business attribute information of the target transaction data according to the transaction query request;
    根据所述业务属性信息,以及所述区块链中存储节点与业务属性信息的预设映射关系,确定私有账本中存储有所述目标交易数据的目标存储节点。According to the business attribute information and the preset mapping relationship between the storage node and the business attribute information in the blockchain, the target storage node storing the target transaction data in the private ledger is determined.
  7. 一种交易数据存储装置,用于将交易数据存储在区块链中,所述区块链的每个存储节点中均配置有私有账本和公共账本,所述装置包括:A transaction data storage device for storing transaction data in a block chain, each storage node of the block chain is configured with a private ledger and a public ledger, and the device includes:
    检测模块,用于检测交易数据的类型;Detection module, used to detect the type of transaction data;
    第一存储模块,用于若所述交易数据的类型为第一类交易数据,则确定所述区块链中与所述交易数据匹配的目标存储节点,将所述交易数据存储至所述目标存储节点的私有账本中,以及将所述交易数据加密产生的摘要信息存储至所述区块链中其他存储节点的公共账本中;The first storage module is configured to, if the type of the transaction data is the first type of transaction data, determine a target storage node in the blockchain that matches the transaction data, and store the transaction data in the target In the private ledger of the storage node, and storing the summary information generated by encrypting the transaction data in the public ledger of other storage nodes in the blockchain;
    第二存储模块,用于若所述交易数据的类型为第二类交易数据,则将所述交易数据存储至所述区块链中每个存储节点的公共账本中。The second storage module is configured to store the transaction data in the public ledger of each storage node in the blockchain if the type of the transaction data is the second type of transaction data.
  8. 根据权利要求7所述的装置,所述检测模块包括:The device according to claim 7, wherein the detection module comprises:
    提取子模块,用于提取所述交易数据中的业务特征信息;The extraction sub-module is used to extract business feature information in the transaction data;
    判断子模块,用于判断所述业务特征信息是否满足预设私密存储条件,若是,则将所述交易数据的类型确定为第一类交易数据,若否,则将所述交易数据的类型确定为第二类交易数据,其中,所述预设私密存储条件为用于对交易数据进行私密性检测的条件。The judging sub-module is used to judge whether the business feature information meets the preset private storage conditions, if so, the type of the transaction data is determined as the first type of transaction data, if not, the type of the transaction data is determined It is the second type of transaction data, where the preset private storage condition is a condition for performing privacy detection on the transaction data.
  9. 根据权利要求7所述的装置,第一存储模块用于:According to the device according to claim 7, the first storage module is used for:
    获取所述交易数据的业务属性信息;Obtaining business attribute information of the transaction data;
    根据所述业务属性信息,以及所述区块链中存储节点与业务属性信息的预设映射关系,确定与所述交易数据匹配的目标存储节点。According to the business attribute information and the preset mapping relationship between the storage node and the business attribute information in the blockchain, a target storage node that matches the transaction data is determined.
  10. 一种交易数据查询装置,用于查询区块链中存储的交易数据,所述区块链的每个存储节点中均配置有私有账本和公共账本,所述装置包括:A transaction data query device for querying transaction data stored in a block chain, each storage node of the block chain is configured with a private account book and a public account book, and the device includes:
    确定模块,用于获取用户发起的交易查询请求,并根据所述交易查询请求,确定目 标交易数据的类型;The determining module is used to obtain the transaction query request initiated by the user, and determine the type of target transaction data according to the transaction query request;
    第一查询模块,用于若所述目标交易数据的类型为第一类交易数据,则从所述区块链中确定私有账本中存储有所述目标交易数据的目标存储节点,并将所述交易查询请求发送给所述目标存储节点,以使所述目标存储节点基于所述交易查询请求将私有账本中存储的目标交易数据反馈给所述用户;The first query module is configured to, if the type of the target transaction data is the first type of transaction data, determine from the blockchain the target storage node storing the target transaction data in the private ledger, and compare the Sending a transaction query request to the target storage node, so that the target storage node feeds back the target transaction data stored in the private ledger to the user based on the transaction query request;
    第二查询模块,用于若所述目标交易数据的类型为第二类交易数据,则将所述交易查询请求发送给所述区块链中任意一个存储节点,以使得该存储节点根据所述交易查询请求将公共账本中存储的目标交易数据反馈给所述用户。The second query module is configured to send the transaction query request to any storage node in the blockchain if the type of the target transaction data is the second type of transaction data, so that the storage node will The transaction query request feeds back the target transaction data stored in the public ledger to the user.
  11. 根据权利要求10所述的装置,所述确定模块包括:The device according to claim 10, the determining module comprises:
    获取子模块,用于根据所述交易查询请求,得到目标交易数据的业务特征信息;The obtaining sub-module is used to obtain the business characteristic information of the target transaction data according to the transaction query request;
    判断子模块,用于判断所述业务特征信息是否满足预设私密存储条件,若是,则将所述目标交易数据的类型确定为第一类交易数据,若否,则将所述目标交易数据的类型确定为第二类交易数据,其中,所述预设私密存储条件为用于对目标交易数据进行私密性检测的条件。The judging sub-module is used to judge whether the business feature information meets the preset private storage conditions, if so, the type of the target transaction data is determined as the first type of transaction data, if not, the target transaction data is determined to be the first type of transaction data. The type is determined as the second type of transaction data, wherein the preset private storage condition is a condition for performing privacy detection on the target transaction data.
  12. 根据权利要求10所述的装置,所述第一查询模块用于:According to the device of claim 10, the first query module is configured to:
    根据所述交易查询请求,得到目标交易数据的业务属性信息;Obtain the business attribute information of the target transaction data according to the transaction query request;
    根据所述业务属性信息,以及所述区块链中存储节点与业务属性信息的预设映射关系,确定私有账本中存储有所述目标交易数据的目标存储节点。According to the business attribute information and the preset mapping relationship between the storage node and the business attribute information in the blockchain, the target storage node storing the target transaction data in the private ledger is determined.
  13. 一种服务器,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现权利要求1-6任一项所述方法的步骤。A server includes a memory, a processor, and a computer program stored on the memory and capable of running on the processor, and the processor implements the steps of the method according to any one of claims 1 to 6 when the processor executes the program.
  14. 一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现权利要求1-6任一项所述方法的步骤。A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in any one of claims 1-6.
PCT/CN2021/085224 2020-04-13 2021-04-02 Data storage and query WO2021208762A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010286014.XA CN111538757B (en) 2020-04-13 2020-04-13 Data storage method, query method, device, server and medium
CN202010286014.X 2020-04-13

Publications (1)

Publication Number Publication Date
WO2021208762A1 true WO2021208762A1 (en) 2021-10-21

Family

ID=71975052

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/085224 WO2021208762A1 (en) 2020-04-13 2021-04-02 Data storage and query

Country Status (2)

Country Link
CN (1) CN111538757B (en)
WO (1) WO2021208762A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114374521A (en) * 2022-03-22 2022-04-19 广东电力交易中心有限责任公司 Private data protection method, electronic equipment and storage medium

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111538757B (en) * 2020-04-13 2022-02-11 支付宝(杭州)信息技术有限公司 Data storage method, query method, device, server and medium
CN112039893B (en) * 2020-08-31 2023-04-18 成都质数斯达克科技有限公司 Private transaction processing method and device, electronic equipment and readable storage medium
CN113901144B (en) * 2021-10-15 2024-02-06 北京智融云河科技有限公司 Query method, device and storage medium under non-whole network consensus block chain

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107730254A (en) * 2016-08-12 2018-02-23 深圳市嗨马支付信息有限公司 Currency affaris safety trade system and currency method for secure transactions
CN109313753A (en) * 2016-04-01 2019-02-05 摩根大通国家银行 For providing the system and method for data-privacy in privately owned distributed account book
CN110727712A (en) * 2019-10-15 2020-01-24 腾讯科技(深圳)有限公司 Data processing method and device based on block chain network, electronic equipment and storage medium
CN111538757A (en) * 2020-04-13 2020-08-14 支付宝(杭州)信息技术有限公司 Data storage method, query method, device, server and medium

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10402792B2 (en) * 2015-08-13 2019-09-03 The Toronto-Dominion Bank Systems and method for tracking enterprise events using hybrid public-private blockchain ledgers
WO2018115567A1 (en) * 2016-12-19 2018-06-28 Nokia Technologies Oy Method and apparatus for private data transfer between parties
CA3065319A1 (en) * 2017-06-01 2018-12-06 Schvey, Inc. d/b/a/ Axoni Distributed privately subspaced blockchain data structures with secure access restriction management
CN108492105A (en) * 2018-03-07 2018-09-04 物数(上海)信息科技有限公司 Transaction in assets monitoring and managing method, system, equipment and storage medium based on block chain
KR20200002400A (en) * 2018-06-29 2020-01-08 주식회사 케이티 Method for protecting personal information and apparatus therefor
AU2018348318B2 (en) * 2018-11-07 2020-05-21 Advanced New Technologies Co., Ltd. Blockchain system supporting public and private transactions under account models
CN109889503B (en) * 2019-01-22 2022-02-22 平安科技(深圳)有限公司 Identity management method based on block chain, electronic device and storage medium
CN111475829A (en) * 2019-11-08 2020-07-31 支付宝(杭州)信息技术有限公司 Private data query method and device based on block chain account

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109313753A (en) * 2016-04-01 2019-02-05 摩根大通国家银行 For providing the system and method for data-privacy in privately owned distributed account book
CN107730254A (en) * 2016-08-12 2018-02-23 深圳市嗨马支付信息有限公司 Currency affaris safety trade system and currency method for secure transactions
CN110727712A (en) * 2019-10-15 2020-01-24 腾讯科技(深圳)有限公司 Data processing method and device based on block chain network, electronic equipment and storage medium
CN111538757A (en) * 2020-04-13 2020-08-14 支付宝(杭州)信息技术有限公司 Data storage method, query method, device, server and medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114374521A (en) * 2022-03-22 2022-04-19 广东电力交易中心有限责任公司 Private data protection method, electronic equipment and storage medium
CN114374521B (en) * 2022-03-22 2022-07-19 广东电力交易中心有限责任公司 Private data protection method, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN111538757A (en) 2020-08-14
CN111538757B (en) 2022-02-11

Similar Documents

Publication Publication Date Title
US11921682B2 (en) Extracting data from a blockchain network
WO2021208762A1 (en) Data storage and query
CN108805656B (en) Supply and demand matching method, platform, system and computer readable storage medium
US11106659B2 (en) Blockchain-based recording and querying operations
WO2020238250A1 (en) Capital chain information tracing method and system, and server and readable storage medium
AU2021230365A1 (en) Cryptographic data entry blockchain data structure
CN111538786A (en) Block chain data desensitization and tracing storage method and device
CN110955724A (en) Data processing method and device based on block chain, node equipment and storage medium
CN109345159A (en) A kind of method for writing data and device, equipment, storage medium
JP7274198B2 (en) Asset information registration method
CN109828832B (en) Block chain-based data circulation method, device, equipment and medium
CN113609531B (en) Information interaction method, device, equipment, medium and product based on block chain
CN112039893B (en) Private transaction processing method and device, electronic equipment and readable storage medium
US9811669B1 (en) Method and apparatus for privacy audit support via provenance-aware systems
Al Nuaimi et al. Blockchain implementation framework for tracing the dairy supply chain
US20210097463A1 (en) Decentralized Resource Management System
US20190303858A1 (en) Content based message routing for supply chain information sharing
CN111027866B (en) Product model construction method, device, electronic equipment and medium
Li et al. Design and implementation of the drug traceability system based on block chain technology
WO2023087931A1 (en) Data processing method and apparatus, device, readable storage medium and program product
Sudha TrackChain: Hyperledger based pharmaceutical supply chain–Resource utilization perspective
TWM650097U (en) Long-term care trust management system
CN112950386A (en) Trusting transfer method and device based on block chain and electronic equipment
WO2023086142A1 (en) Privacy data management in distributed computing systems
CN113987071A (en) HyperLegger Fabric-based external bridging and chain-crossing method, device, equipment and medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21788689

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21788689

Country of ref document: EP

Kind code of ref document: A1