Transaction information tracing method and system based on block chain, and electronic equipment
By using the target transaction index and user accounts in the blockchain trading system to extract transaction data from the blockchain ledger and distributed database, combined with consensus algorithms and encrypted transmission protocols, the problem of difficult and easy tampering of transaction information is solved, and fast and secure transaction information traceability and anti-tampering effect is achieved.
Patent Information
- Application Number
- CN202510652017.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-20
- Publication Date
- 2025-08-19
AI Technical Summary
In the existing blockchain trading system, transaction information is difficult to trace and easily tampered with, affecting the fairness and transparency of transactions.
By receiving the licensor's retrospective request, the target transaction index or user account is used to extract transaction data from the blockchain ledger and distributed database, and the security and integrity of transaction information are ensured in combination with consensus algorithms and encrypted transmission protocols.
It realizes rapid and accurate tracing of transaction history, ensures that transaction information is tampered with and secure, and improves the transparency and tamper resistance of the trading system.
Smart Images

Figure CN120508562A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of blockchain, and more specifically, to a method, system, and electronic device for tracing transaction information based on blockchain. Background Art
[0002] In the field of blockchain technology, especially in applications involving financial transactions and asset transfers, data traceability and tamper-proofing are the cornerstones of ensuring transaction fairness and transparency. With the increasing diversity of transaction types carried by blockchain networks and the significant increase in transaction volume, the market has placed higher demands on the traceability and tamper-proofing of transaction data.
[0003] Although existing blockchain transaction systems can store transaction data, they are insufficient in terms of transaction data traceability. For example, when it is necessary to query the detailed information or transaction history of a transaction, it is often necessary to use complex algorithms and a large amount of calculations to find the relevant information in the blockchain. This not only reduces query efficiency but also increases the operating costs of the system. At the same time, although data immutability is a hallmark of blockchain, system vulnerabilities and node attacks still expose transaction data to potential tampering risks, threatening the security and trust of the entire transaction ecosystem.
[0004] There is currently no effective solution to the problem that transaction information in blockchain is difficult to trace and easy to tamper with in related technologies. Summary of the Invention
[0005] The main purpose of this application is to provide a blockchain-based transaction information tracing method, system and electronic device to solve the problem in related technologies that transaction information in the blockchain is difficult to trace and easy to be tampered with.
[0006] To achieve the above-mentioned objectives, according to one aspect of the present application, a blockchain-based transaction information tracing method is provided. The method comprises: receiving a target tracing request initiated by an authorized party through a data query interface of a blockchain network; obtaining tracing conditions in the target tracing request, wherein the tracing conditions include at least one of the following: a target transaction index and a target user account, wherein the target transaction index is generated based on a hash value of the target transaction or combined information of the target transaction; locating target block data based on the target transaction index or the target user account; extracting transaction data of the target transaction from a blockchain ledger associated with the target block data, and extracting auxiliary transaction data of the target transaction from a distributed database associated with the target block data, wherein the blockchain ledger is used to store multiple block data in a chain structure; combining the transaction data and the auxiliary transaction data into relevant transaction information of the target transaction, and sending the relevant transaction information to the authorized party.
[0007] Optionally, before receiving the target tracing request initiated by the authorized party through the data query interface of the blockchain network, the method further includes: receiving the target transaction request, and verifying the target transaction request through the target node in the blockchain network; after the target transaction request passes the verification, packaging a preset number of transaction requests that pass the verification into a new block through the target node, wherein the preset number of transaction requests include the target transaction request, and each block includes the hash value of the previous block; broadcasting the new block to other nodes in the blockchain network except the target node, wherein the other nodes add the new block that meets the legitimacy requirements to their own blockchain ledgers.
[0008] Optionally, receiving a target transaction request and verifying the target transaction request through a target node in the blockchain network includes: verifying the legitimacy of the target transaction request based on a consensus algorithm through the target node to obtain a legitimacy verification result, wherein the verification object of the consensus algorithm includes at least one of the following: proof of work, proof of stake; when the legitimacy verification result indicates that the legitimacy verification of the target transaction request fails, determining that the target transaction request verification fails; when the legitimacy verification result indicates that the legitimacy verification of the target transaction request passes, determining that the target transaction request verification passes.
[0009] Optionally, the method also includes: in the process of verifying the legitimacy of the target transaction request based on the consensus algorithm through the target node, detecting whether there is a preset type of node in the blockchain network, wherein the preset type of node includes at least one of the following: a node that tampers with transactions, a node that destroys the consensus mechanism of the consensus algorithm; when the existence of a preset type of node is detected, recording the behavior of the preset type of node and starting an early warning mechanism, wherein the early warning mechanism is used to instruct the processing of the behavior of the preset type of node.
[0010] Optionally, before the target transaction request is verified for legitimacy by the target node based on the legal consensus algorithm, the method further includes: upon receiving the target transaction request, broadcasting the target transaction request to each node in the blockchain network through an encrypted transmission protocol; performing a formal check on the target transaction request through the target node to obtain a formal check result, wherein the formal check includes at least one of the following: checking whether the transaction format is correct, checking whether the digital signature is valid; if the formal check result indicates that the formal check of the target transaction request fails, notifying other nodes of the formal check result; if the formal check result indicates that the formal check of the target transaction request passes, executing the step of verifying the legitimacy of the target transaction request through the target node based on the legal consensus algorithm.
[0011] Optionally, sending the relevant transaction information to the authorized party includes: encrypting sensitive information in the relevant transaction information to obtain encrypted relevant transaction information; converting the encrypted relevant transaction information into information in a visual format, and sending the information in the visual format to the authorized party, wherein the authorized party decrypts the encrypted content in the information in the visual format using a decryption key, and the visual format is at least one of the following: a graph or a table.
[0012] Optionally, the target transaction request is initiated in the following manner: receiving transaction information input by the transaction initiator, wherein the transaction information includes at least one of the following: transaction amount, address of the payee; when the funds in the transaction account of the transaction initiator are greater than or equal to the transaction amount, verifying the identity of the transaction initiator; after the identity authentication of the transaction initiator is passed, digitally signing the transaction information using a private key, generating a target transaction index for the target transaction, and allowing the transaction initiator to initiate a target transaction request, wherein the identity authentication includes at least one of the following: password verification, biometric verification, and the digital signature is used to prove that the target transaction request is initiated by the transaction initiator who has passed the identity authentication and has not been tampered with during transmission.
[0013] To achieve the above-mentioned purpose, according to another aspect of the present application, a blockchain-based transaction information tracing system is provided. The system includes: a data storage module for storing transaction data and auxiliary transaction data in a blockchain network; a transaction initiation module for initiating a target transaction request for a transaction initiator through a transaction device and authenticating the transaction initiator when the target transaction request is initiated; a transaction verification module for verifying the legitimacy of the target transaction request; and a tracing module for generating a unique target transaction index for a target transaction associated with the target transaction request, and upon receiving a target tracing request associated with a target transaction initiated by an authorized party, extracting the transaction data of the target transaction from the blockchain ledger associated with the target block data using the target transaction index, extracting the auxiliary transaction data of the target transaction from the distributed database associated with the target block data, and then providing the transaction data and auxiliary transaction data to the authorized party.
[0014] According to another aspect of the present application, an electronic device is provided, comprising: a memory storing an executable program; and a processor for running the program, wherein when the program runs, the method for tracing transaction information based on blockchain of any one of the embodiments of the present application is executed.
[0015] In an embodiment of the present application, a target tracing request initiated by an authorized party through a data query interface of a blockchain network is received; a tracing condition in the target tracing request is obtained, wherein the tracing condition includes at least one of the following: a target transaction index and a target user account, wherein the target transaction index is generated based on a hash value of the target transaction or combined information of the target transaction; target block data is located according to the target transaction index or the target user account; transaction data of the target transaction is extracted from a blockchain ledger associated with the target block data, and auxiliary transaction data of the target transaction is extracted from a distributed database associated with the target block data, wherein the blockchain ledger is used to store multiple block data in a chain structure; the transaction data and the auxiliary transaction data are combined into relevant transaction information of the target transaction, and the relevant transaction information is sent to the authorized party. This solves the problem in the related art that transaction information in the blockchain is difficult to trace and easy to be tampered with. By using the target transaction index or the target user account to extract relevant transaction information of the target transaction from the blockchain ledger and the distributed database, and sending the relevant transaction information to the authorized party, the transaction history is quickly and accurately traced while ensuring that the transaction information is tamper-proof and secure. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The accompanying drawings, which constitute part of this application, are intended to provide a further understanding of this application. The exemplary embodiments and descriptions of this application are intended to explain this application and do not constitute an improper limitation on this application. In the accompanying drawings:
[0017] Figure 1 This is a hardware structure block diagram of a computer terminal for implementing a transaction information tracing method based on blockchain;
[0018] Figure 2 This is a flowchart of a blockchain-based transaction information tracing method provided in accordance with an embodiment of the present application;
[0019] Figure 3 This is a flowchart of an optional blockchain-based transaction information tracing method provided in accordance with an embodiment of the present application;
[0020] Figure 4 Schematic diagram of a blockchain-based transaction information tracing device according to an embodiment of the present application;
[0021] Figure 5 This is a structural block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0022] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in 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 this application.
[0023] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in a sequence other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising 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.
[0024] Example 1
[0025] According to an embodiment of the present application, a method embodiment for tracing transaction information based on blockchain is also 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.
[0026] 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 This is a hardware structure diagram of a computer terminal for implementing a transaction information tracing method based on blockchain. Figure 1 As shown, the computer terminal 10 may include one or more ( Figure 1The computer system includes a processor 102 (shown as 102a, 102b, ..., 102n) (the processor 102 may include but is not limited to a processing device such as a microprocessor (MCU, Microcontroller Unit) or a programmable logic device (FPGA, Field-Programmable Gate Array)), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, the computer system may also include: a display, an input / output interface (I / O interface, Input / Output 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.
[0027] 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).
[0028] 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 transaction information tracing 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 transaction information tracing 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.
[0029] 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.
[0030] The display may be, for example, a touch screen liquid crystal display (LCD), which enables a user to interact with a user interface of the computer terminal 10 (or mobile device).
[0031] Under the above operating environment, this application provides Figure 2 The blockchain-based transaction information tracing method shown. Figure 2 This is a flowchart of a method for tracing transaction information based on blockchain provided in an embodiment of the present application.
[0032] Step S201: receiving a target tracing request initiated by an authorized party through a data query interface of a blockchain network.
[0033] When the authorized party needs to trace the transaction information of a target transaction, it will use the data query interface to initiate a target tracing request. Through the blockchain network's data query interface, the target transaction index, target user account, target transaction time range, etc. can be entered to query the detailed information of the target transaction. The detailed information includes the initiator, recipient, transaction amount, transaction status, etc. The authorized party is the entity authorized to query and trace transaction data on the blockchain.
[0034] Among them, the blockchain network is a distributed database or ledger system that shares and verifies transaction records among multiple nodes on the network through encrypted linked data blocks to ensure data security; the data query interface is a channel that allows authorized parties to retrieve transaction information on the blockchain network.
[0035] Step S202: Obtain the tracing condition in the target tracing request, wherein the tracing condition includes at least one of the following: a target transaction index and a target user account, wherein the target transaction index is generated based on a hash value of the target transaction or combined information of the target transaction.
[0036] Specifically, the target user account is an account registered by the user at a financial institution within the blockchain, which can record various transaction information of the account. The target transaction index is generated for the target transaction before the transaction initiator's transaction request. Based on the target transaction's hash value or combined information, it can easily detect tampering. In addition, the target transaction index is unique, and the target user account records the account's historical transactions. Both can be used as traceability conditions to trace the target transaction. Entering the traceability conditions into the data query interface allows data search.
[0037] Step S203: locating target block data according to the target transaction index or target user account.
[0038] Specifically, the target block data is in the blockchain, and each block in the blockchain can exchange information and query. The target transaction index or target user account can be used to locate the block in which the transaction information in the target tracing request is located, thereby narrowing the scope of the search and speeding up the extraction of transaction information.
[0039] Step S204: extracting transaction data of the target transaction from a blockchain ledger associated with the target block data, and extracting auxiliary transaction data of the target transaction from a distributed database associated with the target block data, wherein the blockchain ledger is used to store multiple block data in a chain structure.
[0040] Specifically, blockchain ledgers store transaction data in a chained structure. Each block contains the hash value of the previous block, a timestamp, and specific transaction data. If the data in a block is tampered with, the hash values of subsequent blocks will immediately change, making the tampering easy to detect. This feature ensures the integrity and security of transaction data and provides a solid foundation for the tamper-proof function of the target block data.
[0041] The distributed database is used to store auxiliary transaction data related to the target transaction. This auxiliary transaction data includes user account information, including the user's public and private key pairs, which can be used for authentication and signature, providing supplementary data for verifying transaction details and tracing the transaction process. It also includes detailed descriptions of the traded goods or services.
[0042] Both the blockchain ledger and the distributed database are associated with the target block data of the target transaction. When the target block data is located, the transaction data of the target transaction is extracted from the blockchain ledger, and the auxiliary transaction data of the target transaction is extracted from the distributed database, thereby realizing the tracing of the target transaction.
[0043] Step S205: Combine the transaction data and the auxiliary transaction data into relevant transaction information of the target transaction, and send the relevant transaction information to the authorizing party.
[0044] The information can be sent to the authorized party in a visual format, allowing the authorized party to understand the entire transaction process, including initiation, verification, and completion, from the relevant transaction information. The visual format can be a diagram, a table, or both.
[0045] In an embodiment of the present application, a target tracing request initiated by an authorized party through a data query interface of a blockchain network is received; a tracing condition in the target tracing request is obtained, wherein the tracing condition includes at least one of the following: a target transaction index and a target user account, wherein the target transaction index is generated based on a hash value of the target transaction or combined information of the target transaction; target block data is located according to the target transaction index or the target user account; transaction data of the target transaction is extracted from a blockchain ledger associated with the target block data, and auxiliary transaction data of the target transaction is extracted from a distributed database associated with the target block data, wherein the blockchain ledger is used to store multiple block data in a chain structure; the transaction data and the auxiliary transaction data are combined into relevant transaction information of the target transaction, and the relevant transaction information is sent to the authorized party. This solves the problem in the related art that transaction information in the blockchain is difficult to trace and easy to be tampered with. By using the target transaction index or the target user account to extract relevant transaction information of the target transaction from the blockchain ledger and the distributed database, and sending the relevant transaction information to the authorized party, the transaction history is quickly and accurately traced while ensuring that the transaction information is tamper-proof and secure.
[0046] In order to ensure the security and transmission efficiency of transactions, optionally, in the blockchain-based transaction information tracing method provided in the embodiment of the present application, before receiving the target tracing request initiated by the authorized party through the data query interface of the blockchain network, the method further includes: receiving the target transaction request, and verifying the target transaction request through the target node in the blockchain network; after the target transaction request passes the verification, packaging a preset number of transaction requests that pass the verification into a new block through the target node, wherein the preset number of transaction requests include the target transaction request, and each block includes the hash value of the previous block; and broadcasting the new block to other nodes in the blockchain network except the target node, wherein the other nodes add the new block that meets the legitimacy requirements to their own blockchain ledgers.
[0047] Specifically, the authorized party can initiate a transaction request through a transaction application on a terminal device, where the terminal device can be a computer or a mobile phone. When initiating a transaction request, it is necessary to enter necessary information, such as the transaction amount and the payee's address. Then, it is necessary to verify whether the funds in the account initiating the transaction are sufficient and whether the identity of the authorized party initiating the transaction is true. After all the tests are passed, the initiated transaction request will be used as the target transaction request. Among them, the payee's address is a blockchain address, not a traditional bank account number or account name. In the blockchain system, each user corresponds to a public key / private key pair, and the payee's address is a unique string generated by a hash operation of the public key. This address has no direct association with the user's identity (anonymity) and only serves as an identifier for transaction receipt. It is essentially different from the account name and card number in the traditional financial system and belongs to the address format unique to the blockchain network.
[0048] After the authorized party initiates a target transaction request, the blockchain network receives it and verifies it through the target node within the blockchain network. Verification may include using a consensus algorithm to verify the legitimacy of the target transaction request. If the target transaction request passes verification, it is included as one of the pre-packaged transaction requests. When the pre-packaged transaction requests reach a preset number, they are packaged into a new block. The new block is chained to the previous block and contains the hash value of the previous block.
[0049] After the new block is packaged, it is broadcast to all nodes in the blockchain network, excluding the target node. This broadcast process is accomplished through an encrypted transmission protocol, ensuring that the new block's information is quickly and accurately transmitted to every other node in the network. Encrypted transmission protocols, such as TLS / SSL (Transport Layer Security) and DTLS (Datagram Transport Layer Security), are a security layer layered on top of network protocols, protecting the confidentiality of transaction information during transmission. Other nodes will then add the new blocks they receive, if they meet the required legitimacy, to their own blockchain ledgers, completing the ledger update. It should be noted that the target node and other nodes can be servers or other devices with powerful computing capabilities. These comprise the node network, which is based on the network's physical architecture and computing resources and is the hardware support that enables the blockchain network to operate.
[0050] The embodiment of the present application verifies the target transaction request, packages the new block and broadcasts the new block to other nodes, thereby effectively screening legal transactions, ensuring the secure storage of transaction information, and achieving timely synchronization of the new block in the blockchain.
[0051] Optionally, in the blockchain-based transaction information tracing method provided in an embodiment of the present application, receiving a target transaction request, and verifying the target transaction request through a target node in the blockchain network includes: verifying the legitimacy of the target transaction request based on a consensus algorithm through the target node to obtain a legitimacy verification result, wherein the verification object of the consensus algorithm includes at least one of the following: proof of work, proof of stake; if the legitimacy verification result indicates that the legitimacy verification of the target transaction request fails, determining that the target transaction request verification fails; if the legitimacy verification result indicates that the legitimacy verification of the target transaction request passes, determining that the target transaction request verification passes.
[0052] It should be noted that validating the legitimacy of target transaction requests based on a consensus algorithm ensures that transaction verification is completed through network consensus, making it difficult for transactions to be manipulated by a single node. Specifically, different blockchain systems employ different consensus algorithms. In the embodiments of this application, the consensus algorithm verifies at least one of the following: proof of work and proof of stake.
[0053] Taking proof-of-work as an example, target nodes compete for the right to record transactions by solving complex mathematical problems to prove their commitment to the task. Only the first target node to calculate a hash value that meets a specific difficulty requirement is able to package the transaction into a block and add it to the blockchain ledger. This effectively selects the most capable target nodes. Furthermore, this mechanism ensures that transactions are verified through consensus across the entire network, making it difficult for a single node to manipulate the transaction, greatly enhancing its security and credibility. If the legitimacy verification result indicates that the target transaction request has been rejected, it may indicate a violation of regulations, insufficient funds, or formatting errors.
[0054] This embodiment of the application introduces a consensus-based legitimacy verification mechanism to ensure that each transaction undergoes rigorous verification before being added to the blockchain, effectively preventing illegal transactions. Furthermore, through the joint participation and verification of all nodes, not only does it improve data transparency and the network's tamper resistance, but it also ensures the integrity and authenticity of transaction data, providing a basis for subsequent transaction tracing.
[0055] In order to detect whether there are nodes of a preset type in the blockchain and issue an early warning therefor, optionally, in the blockchain-based transaction information tracing method provided in the embodiment of the present application, the method also includes: in the process of verifying the legitimacy of the target transaction request based on the consensus algorithm by the target node, detecting whether there are nodes of a preset type in the blockchain network, wherein the nodes of the preset type include at least one of the following: nodes that tamper with transactions, nodes that destroy the consensus mechanism of the consensus algorithm; when the existence of a node of the preset type is detected, the behavior of the node of the preset type is recorded, and an early warning mechanism is activated, wherein the early warning mechanism is used to instruct the processing of the behavior of the node of the preset type.
[0056] Specifically, preset type nodes refer to nodes that can have a negative impact on the blockchain network, such as nodes that tamper with transactions. Such nodes attempt to illegally modify transaction data, affecting the fairness and transparency of transactions; for example, nodes that destroy the consensus mechanism of the consensus algorithm. Such nodes will interfere with the normal operation of the consensus algorithm, such as cheating, refusing to verify transactions, etc., thereby threatening the stability of the entire network.
[0057] While the target node is verifying the legitimacy of the transaction request, it simultaneously starts monitoring and detecting the behavior of nodes in the network. Once the system detects the existence of a preset type of node, it will immediately record the abnormal behavior of the node and activate the early warning mechanism, such as immediately notifying the network administrator and instructing him to investigate and handle the behavior of the abnormal node.
[0058] The embodiments of the present application embed detection of preset types of nodes in the transaction verification process and process the preset types of nodes to ensure the legitimacy of each transaction, discover and respond to malicious nodes in the network, and maintain the healthy operation of the blockchain network.
[0059] In order to enhance the security of transactions and improve the efficiency of data transmission within the blockchain network, optionally, in the blockchain-based transaction information tracing method provided in the embodiment of the present application, before the target transaction request is verified for legitimacy by the target node based on the legal consensus algorithm, the method also includes: upon receiving the target transaction request, broadcasting the target transaction request to each node in the blockchain network through an encrypted transmission protocol; performing a formal check on the target transaction request through the target node to obtain a formal check result, wherein the formal check includes at least one of the following: checking whether the transaction format is correct, checking whether the digital signature is valid; if the formal check result indicates that the formal check of the target transaction request fails, notifying other nodes of the formal check result; if the formal check result indicates that the formal check of the target transaction request passes, executing the step of verifying the legitimacy of the target transaction request through the target node based on the legal consensus algorithm.
[0060] Specifically, the use of encrypted transmission protocols can ensure the security of transaction information during network transmission and ensure that the transaction request will not be eavesdropped or tampered with by unauthorized parties during transmission in the network.
[0061] The purpose of the formality check is to quickly eliminate transaction requests that clearly do not comply with regulations, reducing the burden of subsequent legality verification and improving network efficiency. If the formality check results indicate a problem with the target transaction request, such as a transaction format error or an invalid digital signature, the target node will immediately notify other nodes of this formality check result, saving them from wasting resources and repeatedly processing the problematic transaction.
[0062] The embodiments of the present application can protect transaction data from potential threats during network transmission by adding pre-steps of encrypted transmission and formal inspection to the blockchain-based transaction information tracing method, ensure the confidentiality and integrity of transaction information, and effectively save network resources.
[0063] In order to improve the security and comprehensibility of transaction data, optionally, in the blockchain-based transaction information tracing method provided in the embodiment of the present application, sending the relevant transaction information to the authorized party includes: encrypting sensitive information in the relevant transaction information to obtain the encrypted relevant transaction information; converting the encrypted relevant transaction information into information in a visual format, and sending the information in the visual format to the authorized party, wherein the authorized party decrypts the encrypted content in the information in the visual format using a decryption key, and the visual format is at least one of the following: picture, table, list, timeline.
[0064] Specifically, when retrieving relevant transaction information from blockchain ledgers and distributed databases, if sensitive portions of this transaction information are identified, encryption technology is used to encrypt this sensitive information. Only authorized parties can view the complete transaction information after entering the correct decryption key. Sensitive transaction information can be identified by pre-setting sensitive fields, such as amounts exceeding a threshold, involving specific industries or accounts, or by the system automatically identifying fields containing private data, such as ID numbers and account balances.
[0065] After encryption, the relevant transaction information is further converted into a more intuitive visual format, such as a chart or list. This not only makes it easier for authorized parties to understand and analyze transaction details, but also improves the readability of the information. This visual format is sent to authorized parties, but sensitive content remains encrypted to protect data security.
[0066] The embodiments of the present application combine encryption of sensitive information with visual display to protect the privacy of transaction participants, prevent unauthorized access to sensitive information during transmission or storage, and improve the readability of transaction information.
[0067] In order to ensure the legality, security and traceability of transactions, optionally, in the blockchain-based transaction information tracing method provided in the embodiment of the present application, the target transaction request is initiated in the following manner: receiving transaction information input by the transaction initiator, wherein the transaction information includes at least one of the following: transaction amount, address of the payee; when the funds in the transaction account of the transaction initiator are greater than or equal to the transaction amount, verifying the identity of the transaction initiator; after the identity authentication of the transaction initiator is passed, digitally signing the transaction information using the private key, generating a target transaction index for the target transaction, and allowing the transaction initiator to initiate a target transaction request, wherein the identity authentication includes at least one of the following: password verification, biometric verification, and the digital signature is used to prove that the target transaction request is initiated by the transaction initiator who has passed the identity authentication and has not been tampered with during the transmission process.
[0068] Specifically, the recipient's address in the transaction information refers to the recipient's blockchain address. Transaction information constitutes the fundamental element of the transaction and is used for subsequent transaction processing and tracing. The identity verification process includes various methods, including password verification and biometric verification.
[0069] The authorized party can choose which verification method to perform, including: password verification, where the authorized party enters a password and the system compares the entered password with a pre-stored password. If they match, the authentication is successful; if not, the authentication fails and the transaction is terminated. Biometric verification includes fingerprint recognition and facial recognition, where fingerprint recognition collects fingerprint information and compares it with a pre-stored fingerprint template. If a match is successful, the authentication is successful; if a match is unsuccessful, the authentication fails and the transaction is terminated. Only authorized parties who have passed authentication can successfully initiate a transaction. Authentication ensures that the transaction request is issued by the authorized party, preventing identity fraud.
[0070] After the transaction initiator's identity is authenticated, the transaction information is digitally signed using the private key. As an encryption technology, the digital signature is like the user's "electronic fingerprint" of the transaction, used to prove that the transaction request was initiated by the authenticated user and was not tampered with by a third party during the transmission process. The private key is a tool for digital signature. At the same time, a target transaction index is generated for the target transaction based on the transaction hash value or its combined information. Both the digital signature and the target transaction index are intended to improve tamper resistance and traceability.
[0071] The embodiment of the present application effectively prevents malicious transaction behavior by unauthorized parties by implementing key steps such as fund sufficiency verification, identity authentication, digital signature and transaction index generation at the transaction initiation stage, ensures the security and legality of the transaction, and provides convenient query conditions for subsequent tracing of the target transaction.
[0072] An embodiment of the present application also provides a transaction information tracing system based on blockchain, which includes: a data storage module for storing transaction data and auxiliary transaction data in the blockchain network.
[0073] The data storage module includes a blockchain ledger unit, which stores all transaction data within the blockchain ledger, and a distributed database unit, which stores auxiliary transaction data within the distributed database. Each block in the blockchain ledger contains the hash value of the previous block, forming a chain structure that can detect tampering and protect the security of the system and transaction data.
[0074] The transaction initiation module is used to initiate a target transaction request for the transaction initiator through the transaction device and to authenticate the transaction initiator when the target transaction request is initiated.
[0075] The transaction initiation module includes: a user terminal unit, which is used to initiate a target transaction request to the authorized party through the transaction device, enter specific transaction information such as the transaction amount, recipient address, etc., and use the private key to digitally sign the transaction; an identity authentication unit, which is used to authenticate the authorized party when the transaction is initiated. This can be password verification or biometric recognition to ensure that the transaction is initiated by the authorized party and prevent identity fraud.
[0076] The transaction verification module is used to verify the legitimacy of the target transaction request.
[0077] The transaction verification module includes a node network unit, which verifies the legitimacy of transaction requests based on pre-set rules and a consensus algorithm after they are sent to the blockchain network. A consensus algorithm execution unit uses a consensus algorithm to ensure that all nodes in the network reach consensus on the validity of the transaction, preventing single points of failure or malicious behavior from impacting transactions. Consensus algorithms include at least one of the following: proof-of-work and proof-of-stake.
[0078] The tracing module is used to generate a unique target transaction index for the target transaction associated with the target transaction request, and when receiving a target tracing request associated with the target transaction initiated by the authorized party, extract the transaction data of the target transaction from the blockchain ledger associated with the target block data through the target transaction index, extract the auxiliary transaction data of the target transaction from the distributed database associated with the target block data, and then provide the transaction data and auxiliary transaction data to the authorized party.
[0079] The tracing module includes a transaction index unit, which generates a unique target transaction index for each transaction. This index serves as an identifier for transaction data and is used for subsequent tracing operations. When an authorized party needs to trace a transaction, the target transaction data is extracted from the blockchain ledger using the target transaction index. Simultaneously, the target transaction's auxiliary transaction data is extracted from the distributed database. A data query interface unit integrates the extracted transaction data and auxiliary transaction data and provides the authorized party with an interface for querying transaction history. The interface allows the authorized party to enter various conditions to query transaction details, allowing the authorized party to easily query and trace transaction information and understand the entire transaction process and details.
[0080] The embodiment of the present application uses a data storage module to maintain stable records, a blockchain ledger unit to ensure the chain connection of transaction data, and a distributed database unit to store auxiliary information, thereby jointly maintaining data integrity; in the transaction initiation module, the user terminal unit facilitates input, and the identity authentication unit strengthens security to ensure that transaction instructions are authentic and reliable; the transaction verification module is strictly audited by the node network unit and the consensus algorithm unit to ensure the legality of the transaction; the tracing module is accurately located through the transaction index unit, and the data query interface unit provides a tracing interface, making the transaction history clear at a glance, thereby significantly enhancing the transaction tracing capability at the system level, reducing operating costs, and strengthening the anti-tampering barrier to ensure the originality and authenticity of transaction data, thereby providing users with a higher level of security and trust.
[0081] Figure 3 This is a flowchart of an optional blockchain-based transaction information tracing method provided in accordance with an embodiment of the present application, which can be implemented by a blockchain-based transaction information tracing system, such as Figure 3 As shown, the method includes:
[0082] The user enters the transaction information on the terminal device and performs authentication and digital signature, broadcasts the transaction request, and the transaction request is sent to the blockchain network via an encrypted transmission protocol and broadcast to all nodes.
[0083] After receiving the transaction request, the node performs a preliminary check to check the correctness of the transaction format and the validity of the digital signature. If it fails, it will be rejected and other nodes will be notified.
[0084] After the initial check is passed, the node will conduct further legitimacy verification based on the consensus algorithm. That is, the node needs to pass mathematical problems with high computational complexity to compete for the right to record accounts. Transactions that have successfully verified their legitimacy will be marked as valid and prepared for subsequent packaging into blocks.
[0085] Nodes package verified transactions into new blocks and broadcast them. The new blocks contain the hash value of the previous block, forming a blockchain. The new blocks are broadcast to other nodes. After other nodes verify the legitimacy of the new blocks, they add them to their local blockchain ledgers, completing the ledger update.
[0086] Authorized parties, such as regulatory agencies, input query conditions such as transaction index, user account or time range through the data query interface to initiate a tracing request. After receiving the tracing request, the system uses the transaction index to locate the specific block in the blockchain ledger, and at the same time searches for auxiliary transaction information in the distributed database to display detailed transaction information in a visual form, including the transaction initiator, payee, transaction amount, transaction time and status, etc., to complete a comprehensive tracing of the transaction history.
[0087] The embodiment of the present application securely initiates transactions through user terminals, and encrypts transmission to ensure network communication security; nodes strictly verify to ensure that the transaction format and signature are correct; the consensus algorithm strengthens the legality review, and valid transactions are recognized by the network; the verified transactions are packaged into new blocks for broadcast, and the blockchain ledger is updated to reflect the transaction status in real time; the traceability request is accurately located through the data query interface, and the blockchain ledger and distributed database are combined to realize transaction traceability, which significantly improves transaction security and traceability efficiency and ensures the non-tamperability of transaction data.
[0088] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0089] Example 2
[0090] The present application also provides a blockchain-based transaction information tracing device. It should be noted that the blockchain-based transaction information tracing device provided in the present application can be used to execute the blockchain-based transaction information tracing method provided in the present application. The following describes the blockchain-based transaction information tracing device provided in the present application.
[0091] According to an embodiment of the present application, a device for implementing the above-mentioned blockchain-based transaction information tracing method is also provided. Figure 4 Schematic diagram of a transaction information tracing device based on blockchain provided in an embodiment of the present application, such as Figure 4 As shown, the device includes: a tracing request receiving unit 401, which is used to receive a target tracing request initiated by an authorized party through a data query interface of a blockchain network;
[0092] The tracing condition acquisition unit 402 is configured to acquire the tracing condition in the target tracing request, wherein the tracing condition includes at least one of the following: a target transaction index and a target user account, where the target transaction index is generated based on a hash value of the target transaction or combined information of the target transactions;
[0093] The block data locating unit 403 is used to locate the target block data according to the target transaction index or the target user account;
[0094] a data extraction unit 404 configured to extract transaction data of a target transaction from a blockchain ledger associated with the target block data, and to extract auxiliary transaction data of the target transaction from a distributed database associated with the target block data, wherein the blockchain ledger is configured to store multiple block data in a chain structure;
[0095] The sending unit 405 is configured to combine the transaction data and the auxiliary transaction data into relevant transaction information of the target transaction; and send the relevant transaction information to the authorizing party.
[0096] In the embodiment of the present application, the tracing request receiving unit 401 receives a target tracing request initiated by an authorized party through a data query interface of a blockchain network; the tracing condition obtaining unit 402 obtains a tracing condition in the target tracing request, wherein the tracing condition includes at least one of the following: a target transaction index and a target user account, wherein the target transaction index is generated based on a hash value of the target transaction or a combination of target transaction information; the block data locating unit 403 locates the target block data according to the target transaction index or the target user account; the data extracting unit 404 extracts the transaction data of the target transaction from the blockchain ledger associated with the target block data, and locates the target block data in the target block data associated with the target block data. The distributed database extracts auxiliary transaction data of the target transaction, wherein the blockchain account book is used to store multiple block data in a chain structure; the sending unit 405 combines the transaction data and the auxiliary transaction data into relevant transaction information of the target transaction, and sends the relevant transaction information to the authorized party, thereby solving the problem that the transaction information in the blockchain in the related technology is difficult to trace and easy to be tampered with. By using the target transaction index or the target user account to extract the relevant transaction information of the target transaction in the blockchain account book and the distributed database, and sending the relevant transaction information to the authorized party, the transaction history is traced quickly and accurately, while ensuring that the transaction information cannot be tampered with and is safe.
[0097] Optionally, in the blockchain-based transaction information tracing device provided in the embodiment of the present application, the tracing request receiving unit 401 includes: a verification module, used to receive a target transaction request and verify the target transaction request through a target node in the blockchain network; a packaging module, used to package a preset number of verified transaction requests into a new block through the target node after the target transaction request passes the verification, wherein the preset number of transaction requests includes the target transaction request, and each block includes a hash value of the previous block; and a broadcast module, used to broadcast the new block to other nodes in the blockchain network except the target node, wherein the other nodes add the new block that meets the legitimacy requirements to their own blockchain ledgers.
[0098] Optionally, in the blockchain-based transaction information tracing device provided in the embodiment of the present application, the verification module includes: a legitimacy verification module, which is used to verify the legitimacy of the target transaction request based on the consensus algorithm through the target node to obtain a legitimacy verification result, wherein the verification object of the consensus algorithm includes at least one of the following: proof of work, proof of stake; a legitimacy verification failure processing module, which is used to determine that the target transaction request has failed the verification when the legitimacy verification result indicates that the legitimacy verification of the target transaction request has failed; a legitimacy verification pass processing module, which is used to determine that the target transaction request has passed the verification when the legitimacy verification result indicates that the legitimacy verification of the target transaction request has passed.
[0099] Optionally, in the blockchain-based transaction information tracing device provided in the embodiment of the present application, the legitimacy verification module includes: a preset type node detection module, which is used to detect whether there are nodes of preset type in the blockchain network during the process of performing legitimacy verification on the target transaction request based on the consensus algorithm through the target node, wherein the preset type of node includes at least one of the following: a node that tampers with the transaction, and a node that destroys the consensus mechanism of the consensus algorithm; an early warning module, which is used to record the behavior of the preset type of node and start the early warning mechanism when the existence of the preset type of node is detected, wherein the early warning mechanism is used to instruct the processing of the behavior of the preset type of node.
[0100] Optionally, in the blockchain-based transaction information tracing device provided in the embodiment of the present application, the legitimacy verification module also includes: a broadcast module, which is used to broadcast the target transaction request to each node in the blockchain network through an encrypted transmission protocol when a target transaction request is received; a formal inspection module, which is used to perform a formal inspection on the target transaction request through the target node to obtain a formal inspection result, wherein the formal inspection includes at least one of the following: checking whether the transaction format is correct and checking whether the digital signature is valid; a formal inspection failure processing module, which is used to notify other nodes of the formal inspection result when the formal inspection result indicates that the formal inspection of the target transaction request fails; a formal inspection pass processing module, which is used to execute the step of performing legitimacy verification on the target transaction request based on the legal consensus algorithm through the target node when the formal inspection result indicates that the formal inspection of the target transaction request passes.
[0101] Optionally, in the blockchain-based transaction information tracing device provided in an embodiment of the present application, the sending unit 405 includes: an encryption module, used to encrypt sensitive information in the relevant transaction information to obtain the encrypted relevant transaction information; a conversion module, used to convert the encrypted relevant transaction information into information in a visual format, and send the information in the visual format to the authorized party, wherein the authorized party decrypts the encrypted content in the information in the visual format using a decryption key, and the visual format is at least one of the following: a graph or a table.
[0102] Optionally, in the blockchain-based transaction information tracing device provided in the embodiment of the present application, the verification module includes: a transaction information receiving module, used to receive transaction information input by the transaction initiator, wherein the transaction information includes at least one of the following: transaction amount, address of the payee; an identity authentication submodule, used to verify the identity of the transaction initiator when the funds in the transaction account of the transaction initiator are greater than or equal to the transaction amount; a digital signature module, used to digitally sign the transaction information using a private key after the identity authentication of the transaction initiator is passed, generate a target transaction index for the target transaction, and allow the transaction initiator to initiate a target transaction request, wherein the identity authentication includes at least one of the following: password verification, biometric verification, and the digital signature is used to prove that the target transaction request is initiated by the transaction initiator who has passed the identity authentication and has not been tampered with during the transmission process.
[0103] It should be noted that the above-mentioned units and modules correspond to steps S201 to S205 in Example 1. The examples and application scenarios implemented by each module and the corresponding steps are the same, but are not limited to the contents disclosed in the above-mentioned Example 1. It should be noted that the above-mentioned 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-mentioned modules can also be part of the device and can be run in the computer terminal 10 provided in Example 1.
[0104] Example 3
[0105] An embodiment of the present application may provide an electronic device, Figure 5 This is a structural block diagram of an electronic device according to an embodiment of the present application. 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.
[0106] 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.
[0107] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: receive a target tracing request initiated by an authorized party through a data query interface of a blockchain network; obtain a tracing condition in the target tracing request, wherein the tracing condition includes at least one of the following: a target transaction index and a target user account, wherein the target transaction index is generated based on a hash value of the target transaction or combined information of the target transaction; locate the target block data according to the target transaction index or the target user account; extract the transaction data of the target transaction from a blockchain account book associated with the target block data, and extract the auxiliary transaction data of the target transaction from a distributed database associated with the target block data, wherein the blockchain account book is used to store multiple block data in a chain structure; combine the transaction data and the auxiliary transaction data into relevant transaction information of the target transaction, and send the relevant transaction information to the authorized party.
[0108] The processor can also call the information and application stored in the memory through the transmission device to perform the following steps: receive the target transaction request, and verify the target transaction request through the target node in the blockchain network; after the target transaction request is verified, the target node packages a preset number of transaction requests that have passed the verification into a new block, wherein the preset number of transaction requests include the target transaction request, and each block contains the hash value of the previous block; broadcast the new block to other nodes in the blockchain network except the target node, wherein the other nodes add the new block that meets the legitimacy requirements to their own blockchain ledgers.
[0109] The processor can also call the information and application stored in the memory through the transmission device to perform the following steps: verify the legitimacy of the target transaction request based on the consensus algorithm through the target node to obtain a legitimacy verification result, wherein the verification object of the consensus algorithm includes at least one of the following: proof of work, proof of stake; when the legitimacy verification result indicates that the legitimacy verification of the target transaction request fails, it is determined that the target transaction request verification fails; when the legitimacy verification result indicates that the legitimacy verification of the target transaction request passes, it is determined that the target transaction request verification passes.
[0110] The processor can also call the information and application stored in the memory through the transmission device to perform the following steps: in the process of verifying the legitimacy of the target transaction request based on the consensus algorithm through the target node, detect whether there are nodes of a preset type in the blockchain network, wherein the nodes of the preset type include at least one of the following: nodes that tamper with transactions, nodes that destroy the consensus mechanism of the consensus algorithm; when the existence of nodes of the preset type is detected, record the behavior of the nodes of the preset type and start the early warning mechanism, wherein the early warning mechanism is used to instruct the processing of the behavior of the nodes of the preset type.
[0111] The processor can also call the information and application stored in the memory through the transmission device to perform the following steps: when a target transaction request is received, the target transaction request is broadcast to each node in the blockchain network through an encrypted transmission protocol; the target transaction request is formally checked by the target node to obtain a formal check result, wherein the formal check includes at least one of the following: checking whether the transaction format is correct, checking whether the digital signature is valid; when the formal check result indicates that the formal check of the target transaction request fails, the formal check result is notified to other nodes; when the formal check result indicates that the formal check of the target transaction request passes, the step of performing legitimacy verification on the target transaction request based on a legal consensus algorithm is executed by the target node.
[0112] The processor can also call the information and applications stored in the memory through the transmission device to perform the following steps: encrypt the sensitive information in the relevant transaction information to obtain the encrypted relevant transaction information; convert the encrypted relevant transaction information into information in a visual format, and send the information in the visual format to the authorized party, wherein the authorized party decrypts the encrypted content in the information in the visual format using a decryption key, and the visual format is at least one of the following: a graph or a table.
[0113] The processor can also call the information and application stored in the memory through the transmission device to perform the following steps: receiving transaction information input by the transaction initiator, wherein the transaction information includes at least one of the following: transaction amount, address of the payee; when the funds in the transaction account of the transaction initiator are greater than or equal to the transaction amount, verifying the identity of the transaction initiator; after the identity authentication of the transaction initiator is passed, digitally sign the transaction information using the private key, generate a target transaction index for the target transaction, and allow the transaction initiator to initiate a target transaction request, wherein the identity authentication includes at least one of the following: password verification, biometric verification, and the digital signature is used to prove that the target transaction request is initiated by the transaction initiator who has passed the identity authentication and has not been tampered with during the transmission process.
[0114] In an embodiment of the present application, a target tracing request initiated by an authorized party through a data query interface of a blockchain network is received; a tracing condition in the target tracing request is obtained, wherein the tracing condition includes at least one of the following: a target transaction index and a target user account, wherein the target transaction index is generated based on a hash value of the target transaction or combined information of the target transaction; target block data is located according to the target transaction index or the target user account; transaction data of the target transaction is extracted from a blockchain ledger associated with the target block data, and auxiliary transaction data of the target transaction is extracted from a distributed database associated with the target block data, wherein the blockchain ledger is used to store multiple block data in a chain structure; the transaction data and the auxiliary transaction data are combined into relevant transaction information of the target transaction, and the relevant transaction information is sent to the authorized party. This solves the problem in the related art that transaction information in the blockchain is difficult to trace and easy to be tampered with. By using the target transaction index or the target user account to extract relevant transaction information of the target transaction from the blockchain ledger and the distributed database, and sending the relevant transaction information to the authorized party, the transaction history is quickly and accurately traced while ensuring that the transaction information is tamper-proof and secure.
[0115] 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 5It 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.
[0116] 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.
[0117] Example 4
[0118] The embodiment of the present application further provides a storage medium. Optionally, in this embodiment, the storage medium can be used to store the program code executed by the blockchain-based transaction information tracing method provided in the first embodiment.
[0119] Optionally, in this embodiment, the 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.
[0120] The present application also provides a computer program product which, when executed on a data processing device, is suitable for executing the steps of a method for tracing transaction information based on blockchain.
[0121] The serial numbers of the above embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0122] In the above embodiments of the present application, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0123] 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 schematic. For example, the division of the units is only 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.
[0124] 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 network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0125] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or 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.
[0126] 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 application is essentially 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, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0127] The above is only a preferred embodiment of the present application. 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 application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A transaction information tracing method based on blockchain, characterized in that: include: Receive target tracing requests initiated by authorized parties through the data query interface of the blockchain network; Obtaining a tracing condition in the target tracing request, wherein the tracing condition includes at least one of the following: a target transaction index and a target user account, wherein the target transaction index is generated based on a hash value of the target transaction or combined information of the target transaction; Locating target block data according to the target transaction index or the target user account; Extracting transaction data of the target transaction from a blockchain ledger associated with the target block data, and extracting auxiliary transaction data of the target transaction from a distributed database associated with the target block data, wherein the blockchain ledger is used to store multiple block data in a chain structure; The transaction data and the auxiliary transaction data are combined into relevant transaction information of the target transaction, and the relevant transaction information is sent to the authorizing party.
2. The method according to claim 1, characterized in that Before receiving a target tracing request initiated by an authorized party through a data query interface of a blockchain network, the method further includes: receiving a target transaction request, and verifying the target transaction request through a target node in the blockchain network; After the target transaction request passes verification, the target node packages a preset number of verified transaction requests into a new block, wherein the preset number of transaction requests includes the target transaction request, and each block includes a hash value of the previous block; The new block is broadcast to other nodes in the blockchain network except the target node, wherein the other nodes add the new block that meets the legitimacy requirements to their own blockchain ledgers.
3. The method according to claim 2, characterized in that Receiving a target transaction request and verifying the target transaction request through a target node in the blockchain network includes: The target node verifies the legitimacy of the target transaction request based on a consensus algorithm to obtain a legitimacy verification result, wherein the verification object of the consensus algorithm includes at least one of the following: proof of work and proof of stake; If the legitimacy verification result indicates that the target transaction request fails the legitimacy verification, determining that the target transaction request fails the verification; In a case where the legitimacy verification result indicates that the legitimacy verification of the target transaction request has passed, it is determined that the target transaction request has passed the verification.
4. The method according to claim 3, characterized in that The method further comprises: In the process of verifying the legitimacy of the target transaction request by the target node based on the consensus algorithm, detecting whether there are nodes of a preset type in the blockchain network, wherein the preset type of nodes includes at least one of the following: a node that tampers with transactions, and a node that destroys the consensus mechanism of the consensus algorithm; In the case where the presence of the preset type of node is detected, the behavior of the preset type of node is recorded and an early warning mechanism is started, wherein the early warning mechanism is used to instruct to process the behavior of the preset type of node.
5. The method according to claim 3, characterized in that Before verifying the legitimacy of the target transaction request by the target node based on a legal consensus algorithm, the method further includes: Upon receiving the target transaction request, broadcasting the target transaction request to each node in the blockchain network via an encrypted transmission protocol; Performing a formal check on the target transaction request by the target node to obtain a formal check result, wherein the formal check includes at least one of the following: checking whether the transaction format is correct, and checking whether the digital signature is valid; If the formal check result indicates that the target transaction request fails the formal check, notifying the other nodes of the formal check result; In a case where the formal check result indicates that the formal check of the target transaction request has passed, a step of verifying the legitimacy of the target transaction request by the target node based on a legal consensus algorithm is performed.
6. The method according to claim 1, characterized in that Sending the relevant transaction information to the authorizer includes: Encrypting sensitive information in the relevant transaction information to obtain encrypted relevant transaction information; Convert the encrypted transaction information into information in a visual format, and send the information in the visual format to the authorized party, wherein the authorized party decrypts the encrypted content in the information in the visual format using a decryption key, and the visual format is at least one of the following: a graph or a table.
7. The method according to claim 2, characterized in that The target transaction request is initiated in the following way: Receiving transaction information input by the transaction initiator, wherein the transaction information includes at least one of the following: transaction amount and payee address; When the funds in the transaction initiator's transaction account are greater than or equal to the transaction amount, verify the identity of the transaction initiator; After the transaction initiator passes identity authentication, the transaction information is digitally signed using a private key, a target transaction index is generated for the target transaction, and the transaction initiator is allowed to initiate the target transaction request, wherein the identity authentication includes at least one of the following: password verification and biometric verification, and the digital signature is used to prove that the target transaction request is initiated by the transaction initiator who has passed the identity authentication and has not been tampered with during transmission.
8. A transaction information tracing system based on blockchain, characterized in that: include: A data storage module, used to store transaction data and auxiliary transaction data in the blockchain network; A transaction initiation module, configured to initiate a target transaction request for a transaction initiator through a transaction device, and authenticate the transaction initiator when the target transaction request is initiated; A transaction verification module, used to verify the legitimacy of the target transaction request; The tracing module is configured to generate a unique target transaction index for the target transaction associated with the target transaction request, and upon receiving a target tracing request associated with the target transaction initiated by the authorized party, extract the transaction data of the target transaction from the blockchain ledger associated with the target block data using the target transaction index, extract the auxiliary transaction data of the target transaction from the distributed database associated with the target block data, and then provide the transaction data and the auxiliary transaction data to the authorized party.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium includes a stored executable program, wherein, when the executable program is running, the device where the computer-readable storage medium is located is controlled to execute the blockchain-based transaction information tracing method according to any one of claims 1 to 7.
10. An electronic device, characterized in that: include: a memory storing an executable program; A processor for running the program, wherein the program, when running, executes the blockchain-based transaction information tracing method described in any one of claims 1 to 7.