Financial data query method and device based on block chain, and electronic equipment

By building a consortium chain network on the blockchain and utilizing smart contracts, the problems of low efficiency and data security in cross-bank transaction queries have been solved, and efficient and secure cross-bank financial data queries have been achieved.

CN120743971APending Publication Date: 2025-10-03INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510827327.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-19
Publication Date
2025-10-03

AI Technical Summary

Technical Problem

The existing cross-bank transaction query process for enterprises is time-consuming, with low query result accuracy and data security, and the use of third-party platforms poses a single point of failure risk.

Method used

By building a blockchain-based consortium chain network, financial institutions will store data on-chain and use smart contracts to realize automated queries of cross-bank financial data. Combined with distributed storage systems and storage indexes, data encryption and metadata management are performed to ensure data security and query accuracy.

Benefits of technology

It has achieved automation and decentralization of cross-bank transaction queries, significantly improved query efficiency and data security, and ensured the privacy, integrity and traceability of data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120743971A_ABST
    Figure CN120743971A_ABST
Patent Text Reader

Abstract

The invention discloses a financial data query method and device based on a block chain and electronic equipment, and relates to the technical field of block chains or other related technical fields, and the method comprises the steps: receiving a data query request, and analyzing the data query request to obtain metadata information of to-be-queried data; retrieving a storage index based on the metadata information, and determining storage position information of the to-be-queried financial data; broadcasting the data query request to N storage nodes based on the storage position information, and receiving target financial data returned by each storage node; and integrating the target financial data returned by the N storage nodes, generating a financial data query report based on a query demand of the user side, encrypting the financial data query report, and sending the encrypted financial data query report to the user side. According to the financial data query method and device, the technical problems of relatively low query result accuracy and relatively low data security of a financial data query mode by utilizing a third-party platform in the related technology are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of blockchain technology or other related technical fields, and specifically to a blockchain-based financial data query method, device, and electronic device. Background Art

[0002] With the advancement of global economic integration and digital transformation, corporate financial management is becoming increasingly complex. Daily operations often involve managing accounts and managing funds across multiple domestic and international financial institutions. In this context, interbank cash flow inquiries have become a crucial component of corporate financial management, helping companies stay informed of capital dynamics and make informed decisions. However, existing interbank cash flow inquiries face numerous challenges. For example, interbank cash flow inquiries typically require submitting paper applications or electronic forms to various financial institutions, awaiting processing and feedback. This process often takes three to five business days, significantly impacting the timeliness and flexibility of corporate cash management. Furthermore, due to differences in financial systems, the formats and standards of cash flow data vary. This leads to compatibility issues when aggregating interbank cash flow information, increasing the complexity and time required for data processing.

[0003] While using third-party platforms for transaction flow queries offers a certain degree of convenience, these centralized platforms carry the risk of single points of failure. Technical issues or cybersecurity threats can lead to widespread service interruptions, making it difficult to ensure data security and potentially causing financial losses. Furthermore, third-party platforms may have incomplete transaction flow data, resulting in less accurate query results.

[0004] To address the above-mentioned problems, no effective solutions have been proposed so far. Summary of the Invention

[0005] The embodiments of the present invention provide a blockchain-based financial data query method, device, and electronic device thereof, to at least solve the technical problems in related technologies of using third-party platforms to query financial data, resulting in low query result accuracy and low data security.

[0006] According to one aspect of an embodiment of the present invention, a blockchain-based financial data query method is provided, comprising: receiving a data query request sent by a user terminal, authenticating the user terminal, and if the authentication is successful, parsing the data query request to obtain metadata information of the data to be queried; retrieving a storage index based on the metadata information to determine storage location information of the financial data to be queried, wherein the storage location information includes at least storage node information and data storage block information; broadcasting the data query request to N storage nodes based on the storage location information, and receiving target financial data returned by each storage node, wherein N is a positive integer; integrating the target financial data returned by the N storage nodes, generating a financial data query report based on the query requirements of the user terminal, and encrypting the financial data query report and sending it to the user terminal.

[0007] Furthermore, before receiving the data query request sent by the user terminal, it also includes: each financial institution terminal regularly encrypts the financial data and stores it in a distributed storage system, wherein each financial institution jointly joins the blockchain alliance chain network and constructs its own corresponding storage node; metadata information is constructed for the stored financial data, and the metadata information and the mapping relationship between the metadata information and the storage node are stored in the storage index.

[0008] Furthermore, the steps of broadcasting the data query request to N storage nodes based on the storage location information and receiving financial data returned by each of the storage nodes include: broadcasting the data query request to N storage nodes based on the storage node information in the storage location information, and each of the storage nodes extracting target financial data from the target data storage block in the distributed system based on the data storage block information in the storage location information, and sending the target financial data to the smart contract; and receiving the target financial data returned by each of the storage nodes.

[0009] Furthermore, after the financial data query report is encrypted and sent to the user terminal, it also includes: performing a hash operation on the data query records of each financial institution to obtain a hash value of the data query record; generating a Merkle proof of the data query operation based on the hash value of the query record, and generating an audit log based on the Merkle proof, and storing the audit log in the blockchain, wherein the audit log is used by regulatory agencies to verify transactions.

[0010] Furthermore, after broadcasting the data query request to N storage nodes based on the storage location information, it also includes: detecting the response time of the storage node, and retrying the target storage node when the response time of the target storage node exceeds a preset response time threshold; when the retry operation fails, marking the target storage node as a problem node, and triggering the data consistency verification mechanism of each storage node in the alliance chain network based on the problem node.

[0011] Furthermore, the step of authenticating the user terminal includes: verifying the validity of the data signature of the user terminal based on the public key; and verifying the validity of the user authority of the user terminal based on the user role and account information of the user terminal.

[0012] Furthermore, before receiving the data query request sent by the user terminal, it also includes: issuing an inter-bank financial data application form to the user terminal; and generating a data query request based on the inter-bank financial data application form filled out by the user terminal.

[0013] According to another aspect of an embodiment of the present invention, a blockchain-based financial data query device is also provided, including: a receiving unit, used to receive a data query request sent by a user terminal, authenticate the user terminal, and if the authentication is passed, parse the data query request to obtain metadata information of the data to be queried; a determination unit, used to retrieve a storage index based on the metadata information, and determine the storage location information of the financial data to be queried, wherein the storage location information at least includes: storage node information, data storage block information; a broadcast unit, used to broadcast the data query request to N storage nodes based on the storage location information, and receive target financial data returned by each storage node, wherein N is a positive integer; a generation unit, used to integrate the target financial data returned by the N storage nodes, generate a financial data query report based on the query requirements of the user terminal, and encrypt the financial data query report and send it to the user terminal.

[0014] Furthermore, the blockchain-based financial data query device also includes: a first storage module, which is used for each financial institution terminal to regularly encrypt the financial data and store it in a distributed storage system, wherein each financial institution jointly joins the blockchain alliance chain network and constructs its own corresponding storage node; a second storage module, which is used to construct metadata information for the stored financial data, and store the metadata information and the mapping relationship between the metadata information and the storage node in the storage index.

[0015] Furthermore, the broadcast unit includes: a first broadcast module, used to broadcast the data query request to N storage nodes based on the storage node information in the storage location information, and each storage node extracts the target financial data from the target data storage block in the distributed system based on the data storage block information in the storage location information, and sends the target financial data to the smart contract; a first receiving module, used to receive the target financial data returned by each storage node.

[0016] Furthermore, the blockchain-based financial data query device also includes: a first operation module, used to perform hash operations on the data query records of each financial institution to obtain the hash value of the data query record; a first generation module, used to generate a Merkle proof of the data query operation based on the hash value of the query record, and generate an audit log based on the Merkle proof, and store the audit log in the blockchain, wherein the audit log is used by regulatory agencies to perform transaction verification.

[0017] Furthermore, the blockchain-based financial data query device also includes: a first detection module, used to detect the response time of the storage node, and retry the target storage node when the response time of the target storage node exceeds a preset response time threshold; a first marking module, used to mark the target storage node as a problem node when the retry operation fails, and trigger the data consistency verification mechanism of each storage node in the alliance chain network based on the problem node.

[0018] Furthermore, the receiving unit includes: a first verification module for verifying the validity of the data signature of the user terminal based on the public key; and a second verification module for verifying the validity of the user authority of the user terminal based on the user role and account information of the user terminal.

[0019] Furthermore, the blockchain-based financial data query device also includes: a first issuing module, used to issue an inter-bank financial data application form to the user terminal; a second generating module, used to generate a data query request based on the inter-bank financial data application form filled out by the user terminal.

[0020] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is further provided, wherein the computer-readable storage medium includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute any one of the above-mentioned blockchain-based financial data query methods.

[0021] According to another aspect of an embodiment of the present invention, an electronic device is also provided, comprising one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement any one of the above-mentioned blockchain-based financial data query methods.

[0022] In the present application, the following steps are performed: receiving a data query request sent by a user terminal, authenticating the user terminal, parsing the data query request if the authentication is successful, obtaining metadata information of the data to be queried, and retrieving a storage index based on the metadata information to determine the storage location information of the financial data to be queried, wherein the storage location information includes at least: storage node information, data storage block information, and then broadcasting the data query request to N storage nodes based on the storage location information, and receiving the target financial data returned by each storage node, wherein N is a positive integer, and finally integrating the target financial data returned by the N storage nodes, generating a financial data query report based on the query requirements of the user terminal, and encrypting the financial data query report and sending it to the user terminal.

[0023] In this application, the financial data of various financial institutions are uploaded to the chain, the user terminal submits a query request through the blockchain, and the data to be queried is accurately located based on the storage index, and the financial data is queried from the storage nodes corresponding to each financial institution, realizing cross-bank financial data query. The automated and decentralized query mechanism significantly accelerates the query process and improves the efficiency of cross-bank transaction queries. The decentralized and tamper-proof characteristics of blockchain technology are utilized to improve the security of financial data and the accuracy of query results, thereby solving the technical problems in related technologies of using third-party platforms for financial data queries, which have low query result accuracy and low data security. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0025] Figure 1 A hardware structure block diagram of a computer terminal (or mobile device) for implementing a blockchain-based financial data query method is shown;

[0026] Figure 2 is a flowchart of an optional blockchain-based financial data query method according to an embodiment of the present invention;

[0027] Figure 3 This is an optional blockchain-based financial data query system architecture diagram according to an embodiment of the present invention;

[0028] Figure 4 2 is a schematic diagram of an optional blockchain-based financial data query device according to an embodiment of the present invention;

[0029] Figure 5 This is a hardware structure block diagram of an optional electronic device (or mobile device) for executing a blockchain-based financial data query method according to an embodiment of the present invention. DETAILED DESCRIPTION

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

[0031] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0032] It should be noted that the blockchain-based financial data query method and device thereof in this application can be used in the field of blockchain technology. When querying financial data based on blockchain, it can also be used in any field other than the field of blockchain technology. When querying financial data based on blockchain, this application does not limit the application field of the blockchain-based financial data query method and device thereof.

[0033] It should be noted that the collected information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for display, data for analysis, etc.) involved in this application are information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with relevant laws, regulations and standards, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation portals for users to choose to authorize or refuse. For example, an interface is set up between this system and relevant users or institutions to provide users with corresponding operation portals for users to choose to agree or refuse the automated decision-making results; if the user chooses to refuse, the expert decision-making process will be entered.

[0034] The following embodiments of the present invention can be applied to various blockchain-based financial data query systems, applications, and devices. This invention proposes a blockchain-based inter-bank financial data query method, aiming to address the low efficiency of financial transaction data queries between traditional financial institutions, high data security risks, and difficulties in cross-institutional data sharing. By building a consortium blockchain network, enterprise financial transaction data is stored on-chain, and smart contracts are used to automate the authorization and data verification of inter-bank transaction data queries, ensuring data privacy, integrity, and traceability. This allows for efficient and accurate queries while ensuring data security.

[0035] The present invention will be described in detail below with reference to various embodiments.

[0036] Example 1

[0037] According to an embodiment of the present invention, an embodiment of a financial data query method based on blockchain is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0038] The method embodiment provided in the first embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 The following is a hardware block diagram of a computer terminal (or mobile device) for implementing a financial data query method based on blockchain. Figure 1As shown, the computer terminal 10 (or mobile device) may include one or more (illustrated as 102a, 102b, ..., 102n in the figure) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. It will be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components than shown, or with Figure 1 Different configurations shown.

[0039] It should be noted that the one or more processors 102 and / or other data processing circuits described above may generally be referred to herein as "data processing circuitry". The data processing circuitry may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuitry may be a single independent processing module, or may be incorporated in whole or in part into any of the other components of the computer terminal 10 (or mobile device). As described in the embodiments of the present application, the data processing circuitry serves as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).

[0040] Memory 104 can be used to store software programs and modules for application software, such as the program instructions / data storage device corresponding to the blockchain-based financial data query method in the embodiments of the present application. Processor 102 executes the software programs and modules stored in memory 104 to perform various functional applications and data processing, thereby implementing the aforementioned blockchain-based financial data query method. Memory 104 may include high-speed random access memory (RAM) and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, memory 104 may further include memory remotely located from processor 102, which can be connected to computer terminal 10 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0041] The transmission device 106 is configured to receive or transmit data via a network. A specific example of the aforementioned network may include a wireless network provided by the communications provider of the computer terminal 10. In one embodiment, the transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In another embodiment, the transmission device 106 may be a radio frequency (RF) module, which is configured to communicate with the Internet wirelessly.

[0042] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10 (or mobile device).

[0043] Under the above operating environment, this application provides Figure 2 The blockchain-based financial data query method shown is implemented by a blockchain-based financial data query system.

[0044] Figure 2 is a flowchart of an optional blockchain-based financial data query method according to an embodiment of the present invention, such as Figure 2 As shown, the method includes the following steps:

[0045] To address the problems of low query efficiency, high data security risks, and difficulty in cross-institutional data sharing among traditional financial institutions, this invention builds a consortium chain network for multiple financial institutions based on blockchain. Each financial institution stores its financial data on-chain, thereby using smart contracts to achieve automated cross-bank financial data queries, ensuring data privacy, integrity, and traceability.

[0046] Furthermore, before receiving the data query request sent by the user terminal, it also includes: each financial institution terminal regularly encrypts the financial data and stores it in a distributed storage system, wherein each financial institution jointly joins the blockchain alliance chain network and builds its own corresponding storage node; metadata information is constructed for the stored financial data, and the metadata information and the mapping relationship between the metadata information and the storage node are stored in the storage index.

[0047] Specifically, before conducting real-time data queries, various financial institutions jointly maintain a shared ledger based on the blockchain network and deploy relevant storage nodes to form the genesis block of the alliance chain network. Each financial institution regularly collects financial data, which may include: transaction flows, market data, account data, etc., and encrypts the data and stores it in a distributed storage system to improve data reliability and access speed.

[0048] After data is encrypted and stored, financial institutions construct metadata for each piece of encrypted financial data, including but not limited to key fields such as encrypted account ID, transaction date, and transaction type. This metadata and its mapping to storage nodes are then recorded in a storage index, which is then placed on the blockchain to ensure accessibility and immutability.

[0049] By integrating financial institutions into the consortium blockchain network, cross-institutional data sharing is facilitated, breaking down data silos and enhancing data interoperability and usability. Distributed storage systems and storage indexes enable efficient retrieval and access of financial data. While sensitive or large-volume data is stored in external distributed systems, records on the blockchain only contain metadata (such as hash values, data location references, etc.) and key transaction information. This hybrid storage architecture leverages the immutability and security of the blockchain while leveraging the high efficiency and large capacity of external distributed storage systems to store actual data.

[0050] Furthermore, before receiving the data query request sent by the user terminal, the method further includes: issuing an inter-bank financial data application form to the user terminal; and generating a data query request based on the inter-bank financial data application form filled out by the user terminal.

[0051] It should be noted that when users query financial data across banks, they can initiate a data query request to a specific financial institution's blockchain node (which can be a communication node) by logging into their corporate online banking. This data query request is generated based on an interbank financial data application form issued to the user. The user completes and submits the interbank financial data application form, and the system automatically extracts key information from the form and generates a data query request. The interbank financial data application form simplifies the user's filling process and standardizes the query request format, facilitating the subsequent automated processing of smart contracts and rapid responses from the financial institution's storage nodes.

[0052] Step S201: receiving a data query request sent by a user terminal, performing identity authentication on the user terminal, and if the identity authentication is passed, parsing the data query request to obtain metadata information of the data to be queried.

[0053] In the above step S201, the data query request sent by the user end is first received by the blockchain node of the target financial institution. The node first confirms the integrity and format correctness of the request to ensure that it can be correctly parsed and processed by the smart contract module. The digital signature in the query request is then verified by the smart contract layer to confirm the identity of the user. At the same time, the node will also check whether the user has the authority to query specific financial data. After the user identity is verified and the authority check is passed, the smart contract begins to parse the specific content in the query request and extract the metadata information of the data to be queried, such as the encrypted account identifier, transaction time window and query object (i.e., the target financial institution). The extraction of metadata information enables the smart contract to determine the precise scope of the query, including which accounts and transaction data within which time period need to be retrieved. This is a key step in the subsequent data positioning and retrieval work, ensuring the pertinence and efficiency of the query.

[0054] The smart contract module uses the parsed metadata to determine whether the data exists in the local node's blockchain ledger. If so, it further locates the specific data block. If not, it broadcasts the query to the storage nodes of other relevant financial institutions on the consortium chain, thereby finding the target data more widely.

[0055] Furthermore, the step of authenticating the user terminal includes: verifying the validity of the data signature of the user terminal based on the public key; and verifying the validity of the user authority of the user terminal based on the user role and account information of the user terminal.

[0056] Specifically, when receiving an encrypted query request from a user, the financial institution's blockchain node first uses the user's public key to verify the digital signature sent along with the request. This process is completed by calculating the hash value of the request content and using the public key to decrypt the digital signature for comparison. The validity verification of the digital signature ensures that the request indeed originates from the claimed user and has not been tampered with during transmission. The blockchain node will then check the user's role (such as corporate administrator, financial personnel, etc.) and the account information related to the query request. The node matches the user role and account information with the preset permission rules to verify whether the user has the permission to query specific financial data. Verification of the validity of user permissions is an important means of protecting the privacy of financial data. It ensures that only users with appropriate permissions can access the corresponding data.

[0057] Step S202: Retrieve the storage index based on the metadata information to determine the storage location information of the financial data to be queried.

[0058] In step S202, the metadata is used to check the storage index, quickly locate the financial data being queried, and obtain the storage location information for the financial data being queried. The storage index, stored on the blockchain, records the storage location of all financial data in the distributed storage system, including storage node information and data storage block information. The smart contract uses this storage node information to send a request to the target storage node. The storage node locates the data based on the data storage block information, applies the corresponding decryption algorithm, decrypts the data, and prepares to return the query results.

[0059] Step S203: broadcast the data query request to N storage nodes based on the storage location information, and receive the target financial data returned by each storage node.

[0060] In step S203 above, after determining the storage location information of the financial data to be queried, the smart contract immediately initiates a broadcast mechanism, distributing the data query request to the N storage nodes specified in the storage location information. N here refers to the number of nodes actually storing the relevant financial data, which can be one or more, depending on the data distribution. The broadcast mechanism ensures that the data query request is delivered synchronously to all relevant storage nodes, allowing them to retrieve the data and prepare to return the results. By broadcasting to N storage nodes, unnecessary network load is avoided and query efficiency is improved. Based on the data storage block information, the storage node retrieves the financial data from the distributed storage system and returns it to the smart contract.

[0061] Furthermore, the steps of broadcasting the data query request to N storage nodes based on the storage location information and receiving the financial data returned by each storage node include: broadcasting the data query request to N storage nodes based on the storage node information in the storage location information, each storage node extracting the target financial data from the target data storage block in the distributed system based on the data storage block information in the storage location information, and sending the target financial data to the smart contract; and receiving the target financial data returned by each storage node.

[0062] Specifically, the smart contract broadcasts encrypted data query requests to N relevant storage nodes based on the storage node information in the storage location information. Upon receiving the query request, the storage node uses the data storage block information in the storage location information to locate the target data storage block within the distributed system and retrieve the data. Storage nodes possess interfaces and functions for communicating with external distributed storage systems, and can call relevant interfaces to directly retrieve and extract data from external distributed systems. The storage node then sends the acquired financial data back to the smart contract. After receiving the target financial data from the N storage nodes, the smart contract verifies the data, including checking its integrity and consistency to ensure it has not been tampered with.

[0063] Furthermore, after broadcasting the data query request to N storage nodes based on the storage location information, it also includes: detecting the response time of the storage node, and retrying the target storage node when the response time of the target storage node exceeds the preset response time threshold; when the retry operation fails, marking the target storage node as a problem node, and triggering the data consistency verification mechanism of each storage node in the alliance chain network based on the problem node.

[0064] Specifically, after the smart contract broadcasts a data query request to N storage nodes, the system begins real-time monitoring of each storage node's response time. This monitoring accurately measures response times by recording the duration from sending a request to receiving a node's response. This response time monitoring mechanism can promptly detect issues such as network latency and node failures, ensuring the stability and reliability of data queries and maintaining the healthy operation of the consortium blockchain network.

[0065] For target storage nodes whose response time exceeds a preset threshold, the smart contract module will automatically initiate a retry operation, attempting to resend the data query request, giving the node a second chance to respond. The retry operation is designed to handle delayed responses caused by network fluctuations or temporary node failures. By making multiple attempts, it is possible to ensure the smooth completion of data queries and reduce query failures caused by temporary failures.

[0066] In a consortium blockchain network, data changes to a storage node require consensus across all nodes. If the target storage node still fails to respond within the specified timeframe after retrying, the system automatically marks it as a problem node. The smart contract then triggers a data consistency verification mechanism on other storage nodes in the consortium blockchain network to verify whether the data stored by the problem node matches the consensus state within the consortium blockchain network. This involves organizing other nodes in the network to compare the problem node's data to verify its consistency and integrity. This allows for swift action when a storage node anomaly is detected, preventing data inconsistency or loss. Furthermore, through the collaboration of the consortium blockchain network, the system's fault tolerance is enhanced, ensuring the accuracy and reliability of financial data queries.

[0067] Step S204 , integrating the target financial data returned by the N storage nodes, generating a financial data query report based on the query requirements of the user end, and encrypting the financial data query report before sending it to the user end.

[0068] In step S204 above, after receiving the target financial data returned by N storage nodes, the smart contract begins the data integration task. This process involves standardizing the format of data obtained from different nodes to eliminate parsing difficulties caused by differences in data standards between financial institutions. After the data integration is completed, the smart contract filters and extracts relevant information from the integrated data set based on the user's query requirements, such as transaction time, transaction amount, and transaction account, to generate a detailed financial data query report. Generating financial data query reports through smart contracts ensures standardized report generation. The generated financial data query report is encrypted before being sent to the user to protect data privacy and security. The encrypted report is sent to the user via a secure communication channel.

[0069] Furthermore, after the financial data query report is encrypted and sent to the user end, it also includes: performing hash operations on the data query records of each financial institution to obtain the hash value of the data query record; generating a Merkle proof of the data query operation based on the hash value of the query record, and generating an audit log based on the Merkle proof, and storing the audit log in the blockchain, wherein the audit log is used by regulatory agencies to verify transactions.

[0070] Specifically, after returning financial data to the user, a hash operation is performed on the data query records of each financial institution, generating a unique hash value for each query record. A Merkle tree is constructed based on the hash value of the query record, and a Merkle proof is generated. Merkle proofs are key to data auditing and verification. They allow verification of data integrity and consistency without exposing the details of the original query record, providing regulators with an effective tool to audit the compliance and authenticity of data query operations.

[0071] Finally, an audit log containing the Merkle proof is created and stored on the blockchain. The audit log details the query time, initiator, the financial institution being queried, and the Merkle proof. The creation and storage of the audit log on-chain ensures that regulators can readily access this information for transaction verification and compliance reviews. Due to the blockchain's immutable nature, the audit log provides a permanent and transparent record of data query operations, enhancing the credibility of data audits.

[0072] Through the above steps, a data query request sent by a user terminal is received, and the user terminal is authenticated. If the authentication is successful, the data query request is parsed to obtain metadata information of the data to be queried, and a storage index is retrieved based on the metadata information to determine the storage location information of the financial data to be queried, wherein the storage location information at least includes: storage node information, data storage block information, and then the data query request is broadcast to N storage nodes based on the storage location information, and the target financial data returned by each storage node is received, wherein N is a positive integer. Finally, the target financial data returned by the N storage nodes is integrated, and a financial data query report is generated based on the query requirements of the user terminal, and the financial data query report is encrypted and sent to the user terminal.

[0073] In this embodiment, the financial data of various financial institutions are uploaded to the chain, the user terminal submits a query request through the blockchain, and the data to be queried is accurately located based on the storage index, and the financial data is queried from the storage nodes corresponding to each financial institution, realizing cross-bank financial data query. The automated and decentralized query mechanism significantly accelerates the query process and improves the efficiency of cross-bank transaction queries. The decentralized and tamper-proof characteristics of blockchain technology are utilized to improve the security of financial data and the accuracy of query results, thereby solving the technical problems in related technologies of using third-party platforms for financial data queries, which have low query result accuracy and low data security.

[0074] The following describes in detail another optional specific implementation.

[0075] Figure 3 This is an optional blockchain-based financial data query system architecture diagram according to an embodiment of the present invention. The blockchain-based financial data query system includes: a user terminal, a financial institution node (which can be a communication node), a smart contract, an output layer, and a regulatory node. Specifically,

[0076] The user end is the access window provided by the system to the user, which can be corporate online banking, financial APP, etc. The user end fills out the inter-bank flow (i.e. financial data) query application form to generate a data query request and digitally sign and authorize the data query request.

[0077] After receiving the data query request from the user, the financial institution node performs identity authentication and permission verification on the user. If the verification fails, an error code is returned. If the verification passes, the authorization contract is queried, a temporary token is generated, and submitted to the smart contract.

[0078] The smart contract parses the data query request, obtains metadata information (which may include account identification and transaction time), and searches the storage index based on the metadata information to determine the data storage location. At the same time, the data query request is broadcast to multiple storage nodes based on the data storage location. Figure 3 . . Storage node 1 ... storage node N is used as an example).

[0079] Each storage node reads block data from the distributed storage system based on the data storage block information in the data storage location, decrypts the data, and returns it to the smart contract.

[0080] The smart contract integrates the data and generates a standardized report by the output layer, and the encrypted result package is returned to the user end.

[0081] In addition, the regulatory node will construct a Merkle proof for this query operation and generate an audit log for on-chain storage for data integrity verification and regulatory penetration audits. It can perform single transaction verification and batch transaction verification to ensure the transparency and traceability of transaction queries.

[0082] In addition, the blockchain-based financial data query system also includes an arbitration contract unit. After a data query request is broadcast to the storage nodes of various financial institutions, if a storage node does not respond, the contract can mark the problematic node and trigger a consistency check of the nodes of each financial institution in the alliance chain network to ensure the stability of the query process.

[0083] This embodiment of the present invention proposes a blockchain-based inter-bank financial data query method, aiming to address the low efficiency of financial transaction data queries, high data security risks, and difficulties in cross-institutional data sharing among traditional financial institutions. By building a consortium blockchain network, enterprise financial transaction data is stored on-chain, and smart contracts are used to automate the authorization and data verification of inter-bank transaction data queries, ensuring data privacy, integrity, and traceability. This method enables efficient and accurate queries while ensuring data security.

[0084] The following describes it in detail with reference to another embodiment.

[0085] Example 2

[0086] A blockchain-based financial data query device provided in this embodiment includes multiple implementation units, each of which corresponds to each implementation step in the above-mentioned embodiment 1. Its specific implementation methods and beneficial effects can be referred to the above-mentioned method embodiments and will not be repeated here.

[0087] Figure 4 is a schematic diagram of an optional blockchain-based financial data query device according to an embodiment of the present invention, such as Figure 4As shown, the blockchain-based financial data query device may include: a receiving unit 41, a determining unit 42, a broadcasting unit 43, and a generating unit 44, wherein:

[0088] The receiving unit 41 is configured to receive a data query request sent by a user terminal, authenticate the user terminal, and if the authentication is successful, parse the data query request to obtain metadata information of the data to be queried;

[0089] A determining unit 42 is configured to retrieve a storage index based on the metadata information and determine storage location information of the financial data to be queried, wherein the storage location information includes at least storage node information and data storage block information;

[0090] a broadcast unit 43 configured to broadcast the data query request to N storage nodes based on the storage location information, and receive target financial data returned by each storage node, where N is a positive integer;

[0091] The generating unit 44 is configured to integrate the target financial data returned by the N storage nodes, generate a financial data query report based on the query requirements of the user terminal, and encrypt the financial data query report before sending it to the user terminal.

[0092] The above-mentioned blockchain-based financial data query device can receive a data query request sent by a user terminal through a receiving unit 41, authenticate the user terminal, and if the authentication is passed, parse the data query request to obtain metadata information of the data to be queried; retrieve the storage index based on the metadata information through a determination unit 42 to determine the storage location information of the financial data to be queried, wherein the storage location information at least includes: storage node information, data storage block information; broadcast the data query request to N storage nodes based on the storage location information through a broadcast unit 43, and receive the target financial data returned by each storage node, wherein N is a positive integer; integrate the target financial data returned by the N storage nodes through a generation unit 44, generate a financial data query report based on the query requirements of the user terminal, and encrypt the financial data query report and send it to the user terminal.

[0093] In this embodiment, the financial data of various financial institutions are uploaded to the chain, the user terminal submits a query request through the blockchain, and the data to be queried is accurately located based on the storage index, and the financial data is queried from the storage nodes corresponding to each financial institution, realizing cross-bank financial data query. The automated and decentralized query mechanism significantly accelerates the query process and improves the efficiency of cross-bank transaction queries. The decentralized and tamper-proof characteristics of blockchain technology are utilized to improve the security of financial data and the accuracy of query results, thereby solving the technical problems in related technologies of using third-party platforms for financial data queries, which have low query result accuracy and low data security.

[0094] To address the problems of low query efficiency, high data security risks, and difficulty in cross-institutional data sharing among traditional financial institutions, this invention builds a consortium chain network for multiple financial institutions based on blockchain. Each financial institution stores its financial data on-chain, thereby using smart contracts to achieve automated cross-bank financial data queries, ensuring data privacy, integrity, and traceability.

[0095] Furthermore, the blockchain-based financial data query device also includes: a first storage module, which is used for each financial institution terminal to regularly encrypt the financial data and store it in a distributed storage system, wherein each financial institution jointly joins the blockchain alliance chain network and constructs its own corresponding storage node; a second storage module, which is used to construct metadata information for the stored financial data, and store the metadata information and the mapping relationship between the metadata information and the storage node in the storage index.

[0096] Specifically, before conducting real-time data queries, various financial institutions jointly maintain a shared ledger based on the blockchain network and deploy relevant storage nodes to form the genesis block of the alliance chain network. Each financial institution regularly collects financial data, which may include: transaction flows, market data, account data, etc., and encrypts the data and stores it in a distributed storage system to improve data reliability and access speed.

[0097] After data is encrypted and stored, financial institutions construct metadata for each piece of encrypted financial data, including but not limited to key fields such as encrypted account ID, transaction date, and transaction type. This metadata and its mapping to storage nodes are then recorded in a storage index, which is then placed on the blockchain to ensure accessibility and immutability.

[0098] By integrating financial institutions into the consortium blockchain network, cross-institutional data sharing is facilitated, breaking down data silos and enhancing data interoperability and usability. Distributed storage systems and storage indexes enable efficient retrieval and access of financial data. While sensitive or large-volume data is stored in external distributed systems, records on the blockchain only contain metadata (such as hash values, data location references, etc.) and key transaction information. This hybrid storage architecture leverages the immutability and security of the blockchain while leveraging the high efficiency and large capacity of external distributed storage systems to store actual data.

[0099] Furthermore, the broadcast unit includes: a first broadcast module, used to broadcast the data query request to N storage nodes based on the storage node information in the storage location information, and each storage node extracts the target financial data from the target data storage block in the distributed system based on the data storage block information in the storage location information, and sends the target financial data to the smart contract; a first receiving module, used to receive the target financial data returned by each storage node.

[0100] Specifically, the smart contract broadcasts encrypted data query requests to N relevant storage nodes based on the storage node information in the storage location information. Upon receiving the query request, the storage node uses the data storage block information in the storage location information to locate the target data storage block within the distributed system and retrieve the data. Storage nodes possess interfaces and functions for communicating with external distributed storage systems, and can call relevant interfaces to directly retrieve and extract data from external distributed systems. The storage node then sends the acquired financial data back to the smart contract. After receiving the target financial data from the N storage nodes, the smart contract verifies the data, including checking its integrity and consistency to ensure it has not been tampered with.

[0101] Furthermore, the blockchain-based financial data query device also includes: a first operation module, used to perform hash operations on the data query records of each financial institution to obtain the hash value of the data query record; a first generation module, used to generate a Merkle proof of the data query operation based on the hash value of the query record, and generate an audit log based on the Merkle proof, and store the audit log in the blockchain, wherein the audit log is used by regulatory agencies to verify transactions.

[0102] Specifically, after returning financial data to the user, a hash operation is performed on the data query records of each financial institution, generating a unique hash value for each query record. A Merkle tree is constructed based on the hash value of the query record, and a Merkle proof is generated. Merkle proofs are key to data auditing and verification. They allow verification of data integrity and consistency without exposing the details of the original query record, providing regulators with an effective tool to audit the compliance and authenticity of data query operations.

[0103] Finally, an audit log containing the Merkle proof is created and stored on the blockchain. The audit log details the query time, initiator, the financial institution being queried, and the Merkle proof. The creation and storage of the audit log on-chain ensures that regulators can readily access this information for transaction verification and compliance reviews. Due to the blockchain's immutable nature, the audit log provides a permanent and transparent record of data query operations, enhancing the credibility of data audits.

[0104] Furthermore, the blockchain-based financial data query device also includes: a first detection module, used to detect the response time of the storage node, and retry the target storage node when the response time of the target storage node exceeds a preset response time threshold; a first marking module, used to mark the target storage node as a problem node when the retry operation fails, and trigger the data consistency verification mechanism of each storage node in the alliance chain network based on the problem node.

[0105] Specifically, after the smart contract broadcasts a data query request to N storage nodes, the system begins real-time monitoring of each storage node's response time. This monitoring accurately measures response times by recording the duration from sending a request to receiving a node's response. This response time monitoring mechanism can promptly detect issues such as network latency and node failures, ensuring the stability and reliability of data queries and maintaining the healthy operation of the consortium blockchain network.

[0106] For target storage nodes whose response time exceeds a preset threshold, the smart contract module will automatically initiate a retry operation, attempting to resend the data query request, giving the node a second chance to respond. The retry operation is designed to handle delayed responses caused by network fluctuations or temporary node failures. By making multiple attempts, it is possible to ensure the smooth completion of data queries and reduce query failures caused by temporary failures.

[0107] In a consortium blockchain network, data changes to a storage node require consensus across all nodes. If the target storage node still fails to respond within the specified timeframe after retrying, the system automatically marks it as a problem node. The smart contract then triggers a data consistency verification mechanism on other storage nodes in the consortium blockchain network to verify whether the data stored by the problem node matches the consensus state within the consortium blockchain network. This involves organizing other nodes in the network to compare the problem node's data to verify its consistency and integrity. This allows for swift action when a storage node anomaly is detected, preventing data inconsistency or loss. Furthermore, through the collaboration of the consortium blockchain network, the system's fault tolerance is enhanced, ensuring the accuracy and reliability of financial data queries.

[0108] Furthermore, the receiving unit includes: a first verification module for verifying the validity of the data signature of the user terminal based on the public key; and a second verification module for verifying the validity of the user authority of the user terminal based on the user role and account information of the user terminal.

[0109] Specifically, when receiving an encrypted query request from a user, the financial institution's blockchain node first uses the user's public key to verify the digital signature sent along with the request. This process is completed by calculating the hash value of the request content and using the public key to decrypt the digital signature for comparison. The validity verification of the digital signature ensures that the request indeed originates from the claimed user and has not been tampered with during transmission. The blockchain node will then check the user's role (such as corporate administrator, financial personnel, etc.) and the account information related to the query request. The node matches the user role and account information with the preset permission rules to verify whether the user has the permission to query specific financial data. Verification of the validity of user permissions is an important means of protecting the privacy of financial data. It ensures that only users with appropriate permissions can access the corresponding data.

[0110] Furthermore, the blockchain-based financial data query device also includes: a first issuing module, used to issue an inter-bank financial data application form to the user terminal; a second generating module, used to generate a data query request based on the inter-bank financial data application form filled out by the user terminal.

[0111] It should be noted that when users query financial data across banks, they can initiate a data query request to a specific financial institution's blockchain node (which can be a communication node) by logging into their corporate online banking. This data query request is generated based on an interbank financial data application form issued to the user. The user completes and submits the interbank financial data application form, and the system automatically extracts key information from the form and generates a data query request. The interbank financial data application form simplifies the user's filling process and standardizes the query request format, facilitating the subsequent automated processing of smart contracts and rapid responses from the financial institution's storage nodes.

[0112] It should be noted that the receiving unit 41, determining unit 42, broadcasting unit 43, and generating unit 44 correspond to steps S201 to S204 in the first embodiment. The examples and application scenarios implemented by the above units and corresponding steps are the same, but are not limited to the contents disclosed in the first embodiment. It should be noted that the above modules or units can be hardware components or software components stored in a memory (e.g., memory 104) and processed by one or more processors (e.g., processors 102a, 102b, ..., 102n). The above modules or units can also be part of a device and can be run in the computer terminal 10 provided in the first embodiment.

[0113] The present invention is described below in conjunction with another optional embodiment.

[0114] Example 3

[0115] An embodiment of the present invention may further provide an electronic device, Figure 5This is a hardware structure block diagram of an electronic device (or mobile device) that optionally executes a blockchain-based financial data query method according to an embodiment of the present invention, such as Figure 5 As shown, the electronic device may include: one or more ( Figure 5 Only one is shown) processor 502, memory 504, storage controller, and peripheral interface, wherein the peripheral interface is connected to the radio frequency module, audio module and display.

[0116] Among them, the memory can be used to store software programs and modules, such as program instructions / modules corresponding to the methods and devices in the embodiments of the present application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, implementing the above-mentioned method. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network and a combination thereof.

[0117] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: receive a data query request sent by the user terminal, authenticate the user terminal, and if the authentication is passed, parse the data query request to obtain metadata information of the data to be queried; retrieve the storage index based on the metadata information, and determine the storage location information of the financial data to be queried, wherein the storage location information at least includes: storage node information, data storage block information; broadcast the data query request to N storage nodes based on the storage location information, and receive the target financial data returned by each storage node, wherein N is a positive integer; integrate the target financial data returned by the N storage nodes, generate a financial data query report based on the query requirements of the user terminal, and encrypt the financial data query report and send it to the user terminal.

[0118] The processor can also call the information and applications stored in the memory through the transmission device to perform the following steps: each financial institution terminal regularly encrypts the financial data and stores it in a distributed storage system, wherein each financial institution jointly joins the blockchain alliance chain network and builds its own corresponding storage node; metadata information is constructed for the stored financial data, and the metadata information and the mapping relationship between the metadata information and the storage node are stored in the storage index.

[0119] The processor can also call the information and application stored in the memory through the transmission device to perform the following steps: broadcast the data query request to N storage nodes based on the storage node information in the storage location information, and each storage node extracts the target financial data from the target data storage block in the distributed system based on the data storage block information in the storage location information, and sends the target financial data to the smart contract; receive the target financial data returned by each storage node.

[0120] The processor can also call the information and applications stored in the memory through the transmission device to perform the following steps: perform hash operations on the data query records of each financial institution to obtain the hash value of the data query record; generate a Merkle proof of the data query operation based on the hash value of the query record, and generate an audit log based on the Merkle proof, and store the audit log in the blockchain, wherein the audit log is used by regulatory agencies to verify transactions.

[0121] The processor can also call the information and applications stored in the memory through the transmission device to perform the following steps: detect the response time of the storage node, and retry the target storage node if the response time of the target storage node exceeds the preset response time threshold; if the retry operation fails, mark the target storage node as a problem node, and trigger the data consistency verification mechanism of each storage node in the alliance chain network based on the problem node.

[0122] The processor can also call the information and application stored in the memory through the transmission device to perform the following steps: verify the validity of the user's data signature based on the public key; verify the validity of the user's user rights based on the user's user role and account information.

[0123] The processor can also call the information and application stored in the memory through the transmission device to perform the following steps: issuing an inter-bank financial data application form to the user terminal; generating a data query request based on the inter-bank financial data application form filled out by the user terminal.

[0124] An embodiment of the present invention provides a blockchain-based financial data query method. Financial data from various financial institutions is uploaded to the blockchain. A user submits a query request through the blockchain. The data to be queried is accurately located based on a storage index. Financial data is then queried from the storage nodes corresponding to each financial institution, enabling cross-bank financial data queries. The automated and decentralized query mechanism significantly accelerates the query process and improves the efficiency of cross-bank transaction queries. The decentralized and tamper-proof nature of blockchain technology enhances the security of financial data and the accuracy of query results. This addresses the technical issues of low query accuracy and low data security associated with using third-party platforms for financial data queries in related technologies.

[0125] It can be understood by those skilled in the art that Figure 5 The structure shown is for illustration only, and the electronic device may also be a terminal device such as a smart phone, a tablet computer, a PDA, a mobile Internet device (MID), or a PAD. Figure 5 It does not limit the structure of the above electronic device. For example, the electronic device may also include Figure 5 More or fewer components (such as network interfaces, display devices, etc.) shown in, or with Figure 5 Different configurations shown.

[0126] A person skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, which may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0127] The present invention is described below in conjunction with another optional embodiment.

[0128] Example 4

[0129] The embodiment of the present invention further provides a computer-readable storage medium. Optionally, in the embodiment of the present invention, the computer-readable storage medium can be used to store the program code executed by the blockchain-based financial data query method provided in the first embodiment.

[0130] Optionally, in an embodiment of the present invention, the above-mentioned storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.

[0131] An embodiment of the present invention also provides a computer program product, which, when executed on a data processing device, is suitable for executing the steps of a blockchain-based financial data query method: receiving a data query request sent by a user terminal, authenticating the user terminal, and if the authentication is passed, parsing the data query request to obtain metadata information of the data to be queried; retrieving a storage index based on the metadata information, and determining the storage location information of the financial data to be queried, wherein the storage location information includes at least: storage node information and data storage block information; broadcasting the data query request to N storage nodes based on the storage location information, and receiving target financial data returned by each storage node, wherein N is a positive integer; integrating the target financial data returned by the N storage nodes, generating a financial data query report based on the query requirements of the user terminal, and encrypting the financial data query report and sending it to the user terminal.

[0132] The serial numbers of the above embodiments of the present invention are for description only and do not represent the advantages or disadvantages of the embodiments.

[0133] In the above embodiments of the present invention, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0134] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only exemplary. For example, the division of the units can be a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0135] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0136] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0137] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk, etc. Various media that can store program codes.

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

Claims

1. A financial data query method based on blockchain, characterized in that: include: Receive a data query request sent by a user terminal, authenticate the user terminal, and if the authentication is successful, parse the data query request to obtain metadata information of the data to be queried; Retrieving a storage index based on the metadata information, determining storage location information of the financial data to be queried, wherein the storage location information at least includes: storage node information and data storage block information; broadcasting the data query request to N storage nodes based on the storage location information, and receiving target financial data returned by each storage node, where N is a positive integer; The target financial data returned by the N storage nodes are integrated, a financial data query report is generated based on the query requirements of the user terminal, and the financial data query report is encrypted and sent to the user terminal.

2. The method according to claim 1, characterized in that Before receiving the data query request sent by the user, it also includes: Each financial institution terminal regularly encrypts the financial data and stores it in a distributed storage system, wherein each financial institution jointly joins the blockchain alliance chain network and builds its own corresponding storage node; Metadata information is constructed for the stored financial data, and the metadata information and the mapping relationship between the metadata information and the storage node are stored in the storage index.

3. The method according to claim 1, characterized in that The steps of broadcasting the data query request to the N storage nodes based on the storage location information and receiving the financial data returned by each of the storage nodes include: Broadcasting the data query request to N storage nodes based on the storage node information in the storage location information, each storage node extracting target financial data from a target data storage block in the distributed system based on the data storage block information in the storage location information, and sending the target financial data to the smart contract; Receive the target financial data returned by each of the storage nodes.

4. The method according to claim 1, wherein After encrypting the financial data query report and sending it to the user terminal, the method further includes: Perform hash operations on the data query records of each financial institution to obtain the hash values ​​of the data query records; A Merkle proof of the data query operation is generated based on the hash value of the query record, and an audit log is generated based on the Merkle proof, and the audit log is stored in the blockchain, wherein the audit log is used by regulatory agencies to verify transactions.

5. The method according to claim 1, wherein After broadcasting the data query request to the N storage nodes based on the storage location information, the method further includes: detecting the response time of the storage node, and retrying the target storage node if the response time of the target storage node exceeds a preset response time threshold; In the event that the retry operation fails, the target storage node is marked as a problem node, and a data consistency verification mechanism of each storage node in the alliance chain network is triggered based on the problem node.

6. The method according to claim 1, characterized in that The steps of authenticating the user terminal include: Verifying the validity of the user's data signature based on the public key; The validity of the user rights of the user terminal is verified based on the user role and account information of the user terminal.

7. The method according to claim 1, characterized in that Before receiving the data query request sent by the user, it also includes: issuing an inter-bank financial data application form to the user terminal; A data query request is generated based on the inter-bank financial data application form completed by the user.

8. A financial data query device based on blockchain, characterized in that: include: A receiving unit is configured to receive a data query request sent by a user terminal, authenticate the user terminal, and if the authentication is successful, parse the data query request to obtain metadata information of the data to be queried; a determining unit, configured to retrieve a storage index based on the metadata information and determine storage location information of the financial data to be queried, wherein the storage location information includes at least storage node information and data storage block information; a broadcast unit, configured to broadcast the data query request to N storage nodes based on the storage location information, and receive target financial data returned by each of the storage nodes, where N is a positive integer; A generating unit is configured to integrate the target financial data returned by the N storage nodes, generate a financial data query report based on the query requirements of the user terminal, and encrypt the financial data query report before sending it to the user terminal.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium includes a stored computer program, wherein, when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the blockchain-based financial data query method according to any one of claims 1 to 7.

10. An electronic device, characterized in that: The system comprises one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the blockchain-based financial data query method as described in any one of claims 1 to 7.

Citation Information

Cited By

  • Retrieval method, data positioning information generation method and related device

    CN122173532A