Data storage processing method, system, device and equipment based on block chain

By analyzing the business message queue in the business system and triggering the target business interface call request, using the blockchain proof storage contract for data proof storage, the inefficiency of proof storage caused by inconsistency of multiple databases is solved, and efficient data proof storage and secure storage are achieved.

CN120597306APending Publication Date: 2025-09-05TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410249091.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-05
Publication Date
2025-09-05

AI Technical Summary

Technical Problem

The existing business data proof-keeping processing is inefficient, and it is impossible to achieve consistency during binlog playback of multiple databases, resulting in inefficient data audit and backup processing.

Method used

By obtaining new business messages in the business message queue, analyzing the associated business interface, and triggering the target business interface call request when the data proof storage conditions are met, the target business data is obtained and associated storage is carried out through the blockchain network's proof storage contract, so that the independent proof storage processing of each business interface is realized.

Benefits of technology

It improves the efficiency of data storage and processing of business systems, avoids the problems of business data omissions and database inconsistencies, reduces cumbersome operations, and realizes decentralized data secure storage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120597306A_ABST
    Figure CN120597306A_ABST
Patent Text Reader

Abstract

The invention relates to a block chain-based data evidence storage processing method and device, equipment and a storage medium. The method comprises the following steps: acquiring at least one newly-added service message in a service message queue, analyzing the at least one newly-added service message, and acquiring service interfaces associated with the at least one newly-added service message. When a target service interface meeting the data evidence storage condition exists in the service interfaces, triggering a target service interface calling request based on the target service interface, receiving target service data matched with the target service interface, and calling an evidence storage contract deployed in the block chain network, and taking the target service data, the server identifier of the service processing server and the interface identifier of the target service interface as associated evidence data, and performing associated storage in a block chain network. By adopting the method, interface calling and data evidence storage processing can be performed on each service interface, data omission is avoided, tedious operation in the data evidence storage processing process is reduced, and the service data evidence storage processing efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of blockchain technology, and in particular to a blockchain-based data evidence processing method, system, device, computer equipment, storage medium and computer program product. Background Art

[0002] With the development of blockchain technology and the widespread application of various business processing systems, massive amounts of business data have emerged in the business processing process. In order to ensure the data security of business data, it is necessary to regularly perform full and incremental data backups of the business system database so that the business data of the business system can be comprehensively reviewed when audits and third-party reviews are required.

[0003] Traditionally, scheduled full database backups and binlogs (Binary Logs, which represent recorded data in a MySQL database used for recovery or as incremental backup data) are often used to store data. This allows data audits to be completed through full data backups and replaying incremental binlogs when audits and third-party reviews are required.

[0004] However, existing backup methods require simultaneous binlog playback for databases corresponding to multiple systems to ensure comprehensive and accurate backups of business data. This means replaying the binlogs of multiple systems to the same time is required to meet the requirements. However, data in online systems is not organized and stored by time, but rather based on change events. For example, when one database is updated, databases in other systems are also updated accordingly. These updates cannot be completed simultaneously at a given moment, but only after the update event is completed can the integrity and consistency of each database be guaranteed. Therefore, when audits or reviews are required, replaying the binlogs of multiple databases to the same time will result in inconsistent data, making subsequent backup processing impossible. This leads to inefficient data storage and evidence processing. Summary of the Invention

[0005] Based on this, it is necessary to provide a blockchain-based data evidence processing method, system, device, computer equipment, computer-readable storage medium and computer program product to address the above technical problems, which can improve the efficiency of evidence processing of business data in business systems.

[0006] In the first aspect, the present application provides a data evidence processing method based on blockchain, including:

[0007] Obtain at least one new service message in the service message queue, parse the at least one new service message, and obtain a service interface associated with each of the at least one new service messages;

[0008] When a target business interface that meets the data notarization conditions exists among the business interfaces, a target business interface call request is triggered based on the target business interface; the target business interface call request is used to instruct the business processing server to obtain target business data that matches the target business interface;

[0009] Receive the target business data fed back by the business processing server, call the evidence contract deployed in the blockchain network, and use the target business data, the server identifier corresponding to the business processing server, and the interface identifier corresponding to the target business interface as associated evidence data, and store them in the blockchain network.

[0010] Secondly, this application also provides a data evidence processing method based on blockchain, including:

[0011] When a changed business data is detected in the database, a new business message is generated based on the changed business data and stored in a business message queue; the new business message is used to instruct the evidence storage service component to obtain the business interface associated with each of the new business messages, and if a target business interface that meets the data evidence storage conditions exists among the business interfaces, a target business interface call request is triggered based on the target business interface;

[0012] Receive a target business interface call request sent by the evidence storage service component, and obtain target business data matching the target business interface from each of the associated databases;

[0013] The target business data is fed back to the evidence service component, so that after receiving the target business data, the evidence service component calls the evidence contract deployed in the blockchain network, and stores the target business data, the server identifier corresponding to the business processing server, and the interface identifier corresponding to the target business interface as associated evidence data in the blockchain network.

[0014] In a third aspect, the present application also provides a blockchain-based data evidence processing system, including: a business processing server, an evidence service component, a business message queue, and a blockchain network; wherein:

[0015] Generating a new business message based on the changed business data, and storing the new business message in the business message queue;

[0016] The evidence storage service component is configured to: obtain at least one new business message in the business message queue, parse the at least one new business message, and obtain a business interface associated with each of the at least one new business message; and trigger a target business interface call request based on the target business interface when a target business interface that meets the data evidence storage conditions exists among the business interfaces.

[0017] The business processing server is further configured to: receive a target business interface call request sent by the evidence storage service component, obtain target business data matching the target business interface from the associated databases, and feed the target business data back to the evidence storage service component;

[0018] The evidence service component is also used to: receive the target business data, and call the evidence contract deployed in the blockchain network, and store the target business data, the server identifier corresponding to the business processing server, and the interface identifier corresponding to the target business interface as associated evidence data in the blockchain network.

[0019] Fourthly, the present application also provides a data evidence processing device based on blockchain, comprising:

[0020] A new service message acquisition module is used to obtain at least one new service message in the service message queue, and parse the at least one new service message to obtain the service interface associated with each of the at least one new service messages;

[0021] A target business interface call request triggering module is configured to trigger a target business interface call request based on a target business interface that satisfies the data evidence storage conditions when a target business interface exists among the business interfaces; the target business interface call request is configured to instruct the business processing server to obtain target business data that matches the target business interface;

[0022] An associated storage module is used to receive the target business data fed back by the business processing server, and call the evidence contract deployed in the blockchain network, and store the target business data, the server identifier corresponding to the business processing server, and the interface identifier corresponding to the target business interface as associated evidence data in the blockchain network.

[0023] In a fifth aspect, the present application also provides a data evidence processing device based on blockchain, comprising:

[0024] A new business message storage module is configured to, upon detecting changed business data in the database, generate a new business message based on the changed business data and store the new business message in a business message queue; the new business message is configured to instruct the evidence storage service component to obtain the business interface associated with each new business message and, if a target business interface that meets the data evidence storage conditions exists among the business interfaces, trigger a target business interface call request based on the target business interface;

[0025] A target business data acquisition module is configured to receive a target business interface call request sent by the evidence storage service component and acquire target business data matching the target business interface from the associated databases;

[0026] The target business data feedback module is used to feed back the target business data to the evidence service component, so that after the evidence service component receives the target business data, it calls the evidence contract deployed in the blockchain network, and stores the target business data, the server identifier corresponding to the business processing server, and the interface identifier corresponding to the target business interface as associated evidence data in the blockchain network.

[0027] In a sixth aspect, the present application further provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the method in the above-mentioned first aspect or its various implementation methods when executing the computer program.

[0028] In a seventh aspect, the present application further provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the method in the above-mentioned second aspect or its various implementation methods when executing the computer program.

[0029] In an eighth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method in the above-mentioned first aspect or its various implementations.

[0030] In a ninth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method in the above-mentioned second aspect or its various implementations.

[0031] In a tenth aspect, the present application also provides a computer program product, comprising a computer program, which, when executed by a processor, implements the method in the above-mentioned first aspect or its various implementations.

[0032] In the eleventh aspect, the present application also provides a computer program product, including a computer program, which implements the method in the above-mentioned second aspect or its various implementation methods when executed by a processor.

[0033] In the above-mentioned blockchain-based data notarization processing method, device, computer equipment, storage medium and computer program product, by obtaining and parsing at least one new business message in the business message queue, the business interface associated with at least one new business message is obtained, and when there is a target business interface that meets the data notarization conditions in each business interface, the target business interface call request is triggered based on the target business interface, so that the interface call and data notarization processing can be implemented for each business interface of the business processing server respectively, avoiding the omission of business data or the inconsistency of business data in different databases when performing data backup. Furthermore, by triggering a target business interface call request, the business processing server can be instructed to obtain and feedback the target business data that matches the target business interface. After obtaining the target business data that matches the target business interface, the target business data, the server identifier corresponding to the business processing server, and the interface identifier corresponding to the target business interface are used as associated evidence data and stored in the blockchain network by calling the evidence contract deployed in the blockchain network. This enables evidence processing to be implemented for each business interface of the business processing server separately without considering the time before and after occurrence of different events, and the relationship between different events, thereby reducing the tedious operations in the data evidence processing process and further improving the evidence processing efficiency of the business data of the business system. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0035] Figure 1 is a structural diagram of a data sharing system in one embodiment;

[0036] Figure 2 This is a schematic diagram of the structure of a blockchain in one embodiment;

[0037] Figure 3 Schematic diagram of the process of generating a new block in one embodiment;

[0038] Figure 4 This is a diagram of the application environment of a blockchain-based data evidence processing method in one embodiment;

[0039] Figure 51. A flowchart of a blockchain-based data evidence processing method according to an embodiment of the present invention;

[0040] Figure 6 A schematic diagram of a process for associating and storing data in an embodiment;

[0041] Figure 7 A flowchart of a blockchain-based data evidence processing method according to another embodiment;

[0042] Figure 8 A flowchart of a data evidence storage processing method based on blockchain in another embodiment;

[0043] Figure 9 Schematic diagram of the data evidence storage process when the trigger mechanism for business data change reminder is a notification trigger mechanism in one embodiment;

[0044] Figure 10 Schematic diagram of the data notarization process when the trigger mechanism for business data change reminder is a subscription trigger mechanism in one embodiment;

[0045] Figure 11 1. A schematic diagram of a blockchain-based data evidence storage method according to an embodiment of the present invention;

[0046] Figure 12 This is a schematic diagram of the architecture of a blockchain-based data evidence processing system in one embodiment;

[0047] Figure 13 This is a structural block diagram of a data evidence processing device based on blockchain in one embodiment;

[0048] Figure 14 This is a structural block diagram of a data evidence processing device based on blockchain in another embodiment;

[0049] Figure 15 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0050] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0051] Before proceeding with the details, let's first explain some of the terminology used in this application. Blockchain is a novel application model that combines distributed data storage, peer-to-peer transmission, consensus mechanisms, encryption algorithms, and other computer technologies. Blockchain is essentially a decentralized database, a series of data blocks generated using cryptographic methods. Each block contains information about a batch of network transactions, which is used to verify the validity of the information (to prevent counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, the platform product service layer, and the application service layer.

[0052] The underlying blockchain platform can include processing modules such as user management, basic services, smart contracts, and operation monitoring. Among them, the user management module is responsible for the identity information management of all blockchain participants, including maintaining public and private key generation (account management), key management, and maintaining the correspondence between the user's real identity and the blockchain address (authority management), etc., and under authorization, it supervises and audits the transactions of certain real identities and provides risk control rule configuration (risk control audit); the basic service module is deployed on all blockchain node devices to verify the validity of business requests, and records valid requests to storage after consensus is reached. For a new business request, the basic service first adapts the interface to parse and authenticate the request (interface adaptation), and then encrypts the business information through the consensus algorithm (consensus management). The smart contract module is responsible for contract registration, issuance, triggering, and execution. Developers can define contract logic in a programming language and publish it to the blockchain (contract registration). Based on the contract terms, they trigger execution by invoking keys or other events to complete the contract logic. It also provides contract upgrade and cancellation capabilities. The operations monitoring module is primarily responsible for product deployment, configuration modifications, contract settings, cloud adaptation, and real-time status visualization during product release, such as alerts, network status monitoring, and node device health monitoring. The platform's product service layer provides the basic capabilities and implementation framework for typical applications. Developers can build on these capabilities and overlay business features to implement business logic on the blockchain. The application service layer provides blockchain-based application services for business participants.

[0053] The blockchain-based interactive business processing method provided in the embodiments of this application specifically relates to blockchain technology and can be applied to data sharing systems. Figure 1The data sharing system shown, the data sharing system 100 refers to a system for sharing data between nodes, and the data sharing system may include multiple nodes 101, and the multiple nodes 101 may refer to each client in the data sharing system. Each node 101 can receive input information during normal operation and maintain the shared data in the data sharing system based on the received input information. In order to ensure the intercommunication of information in the data sharing system, an information connection can exist between each node in the data sharing system, and information can be transmitted between nodes through the above-mentioned information connection. For example, when any node in the data sharing system receives input information, the other nodes in the data sharing system obtain the input information according to the consensus algorithm, and store the input information as data in the shared data, so that the data stored on all nodes in the data sharing system are consistent.

[0054] Each node in a data sharing system has a corresponding node identifier. Furthermore, each node in the data sharing system can store the node identifiers of other nodes in the system, allowing it to subsequently broadcast generated blocks to other nodes in the data sharing system based on the node identifiers of those nodes. Each node maintains a node identifier list, as shown in the table below, storing the node name and node identifier in this node identifier list. A node identifier can be an IP (Internet Protocol) address or any other information that can be used to identify the node.

[0055] Each node in the data sharing system stores the same blockchain. The blockchain consists of multiple blocks, see Figure 2The blockchain consists of multiple blocks. The genesis block includes a block header and a block body. The block header stores the input information feature value, version number, timestamp and difficulty value. The block body stores the input information. The next block of the genesis block uses the genesis block as the parent block. The next block also includes a block header and a block body. The block header stores the input information feature value of the current block, the block header feature value, version number, timestamp and difficulty value of the parent block, and so on. The block data stored in each block in the blockchain is associated with the block data stored in the parent block, ensuring the security of the input information in the block. Among them, the specific types of blockchain include public chain, private chain and consortium chain. Among them, public chain (Public Blockchain) is a public blockchain, and the access and writing permissions are open to everyone. Private chain (Private Blockchain) is a private blockchain, and the access and writing permissions are only controlled by a certain organization or institution. Consortium chain (Consortium Blockchain) is the blockchain of an institutional alliance, and the access and writing permissions are only open to nodes joining the alliance. The difference between different types of blockchains lies in the access and writing permissions, as well as the degree of decentralization.

[0056] Specifically, when generating each block in the blockchain, see Figure 3 , including steps such as submitting transactions, broadcasting transactions, pre-executing transactions, proposing blocks, verifying blocks, consensus voting, and submitting blocks. Specifically, the client submits a blockchain transaction, such as contract creation, calling transactions, certificate management transactions, etc. The transaction is then broadcast to other nodes in the alliance through the network. Next, the block-producing node selects a batch of transactions from the transaction pool, schedules and executes them in parallel to obtain the results, generates a directed acyclic graph, and broadcasts the generated blocks and directed acyclic graph to other consensus nodes through the consensus module. During the block verification process, the proposed block is received, and the transactions are executed in parallel based on the directed acyclic graph. The consistency of the results is verified. If the results are consistent, a consensus vote is performed on the proposed block based on the corresponding consensus mechanism. The block that completes the consensus vote is submitted to the ledger and the disk operation is completed.

[0057] The data processing method based on blockchain provided in the embodiments of this application can be applied to Figure 4In the application environment shown. The application environment includes a business processing server 402, an evidence service component 404, a blockchain network 406, and a terminal 408. An evidence contract 410 is deployed in the blockchain network 406. Among them, the evidence service component 404 obtains at least one new business message in the business message queue and parses at least one new business message to obtain the business interface associated with each at least one new business message. Among them, when there is a target business interface that meets the data evidence conditions in each business interface, the evidence service component 404 triggers a target business interface call request based on the target business interface, and the target business interface call request is sent to the business processing server 402. The business processing server 402 obtains the target business data that matches the target business interface by responding to the target business interface call request, and feeds back the target business data to the evidence service component 404. Furthermore, the evidence storage service component 40 receives the target business data fed back by the business processing server 402 and calls the evidence storage contract 410 deployed in the blockchain network 406. The target business data, the server identifier corresponding to the business processing server 402, and the interface identifier corresponding to the target business interface are stored as associated evidence data in the blockchain network 406. When data query or data audit is required, the terminal 408 triggers a business data query request and can query the blockchain network 406 for business data that matches the business data query request.

[0058] Similarly, when business processing server 402 detects changes to business data in the database, it generates a new business message based on the changed business data and stores the new business message in the business message queue. The evidence service component 404 obtains at least one new business message from the business message queue and parses the at least one new business message to obtain the business interface associated with each of the at least one new business message. If a target business interface that meets the data evidence storage conditions exists among the business interfaces, the service component triggers a target business interface call request based on the target business interface and sends the target business interface call request to business processing server 402. Furthermore, upon receiving the target business interface call request sent by evidence service component 404, business processing server 402 obtains target business data that matches the target business interface from the associated databases and feeds the target business data back to evidence service component 404. Upon receiving the target business data, evidence service component 404 invokes evidence contract 410 deployed in blockchain network 406 and associates the target business data, the server identifier corresponding to business processing server 402, and the interface identifier corresponding to the target business interface as associated evidence data, which are then stored in blockchain network 406.

[0059] Among them, the business processing server 402 and the evidence storage service component 404 can be implemented by a server. The server can be implemented by an independent server or a server cluster composed of multiple servers. The terminal 408 can be, but is not limited to, various personal computers, laptops, smart phones, tablets, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server can be implemented by an independent server or a server cluster composed of multiple servers. The embodiments of the present application can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, smart transportation, assisted driving, etc.

[0060] In an exemplary embodiment, Figure 5 As shown, a data evidence processing method based on blockchain is provided. The method can be executed by a terminal or a server alone, or by a terminal and a server in collaboration. In the embodiment of the present application, the method is applied to Figure 4 Taking the evidence storage service component 404 in FIG. 5 as an example, the following steps S502 to S506 are included. Among them:

[0061] Step S502: Acquire at least one new service message in the service message queue, parse the at least one new service message, and obtain service interfaces associated with the at least one new service message.

[0062] Specifically, the evidence service component monitors each business message in the message queue, and when it detects that there is a new business message in the business message queue, it obtains and consumes at least one new business message in the business message queue, further parses the at least one new business message consumed, and obtains the business interface associated with each of the at least one new business messages.

[0063] Furthermore, the evidence service component parses at least one new business message consumed, and after obtaining the at least one parsed new business message, based on the at least one parsed new business message, the at least one parsed new business message can be used as an input parameter, so that the business interface associated with the at least one new business message can be called through the at least one input parameter.

[0064] Among them, according to the different triggering mechanisms of the business data change reminder, the types of the newly added business messages are also different. For example, the triggering mechanism of the business data change reminder includes a notification triggering mechanism, and the type of the newly added business message corresponding to the notification triggering mechanism is a business data update message, that is, specifically a business data update message.

[0065] Step S504: When there is a target business interface among the business interfaces that meets the data notarization conditions, a target business interface call request is triggered based on the target business interface. The target business interface call request is used to instruct the business processing server to obtain target business data that matches the target business interface.

[0066] Specifically, each business interface is screened according to a preset data evidence condition, and when it is determined that a target business interface that meets the data evidence condition exists among the business interfaces, a target business interface call request is triggered based on the target business interface.

[0067] Among them, the preset data notarization conditions are used to characterize the conditions that the business interfaces associated with business data need to meet when performing data notarization processing on business data. For example, according to the specific needs in the actual application process, such as the need to perform data notarization processing based on object attribute information, and the object attribute information is specifically obtained by calling the object information access interface, then the current data notarization conditions can be expressed as the need to meet the conditions of the interface name "object attribute information access interface", that is, specifically, from the business interfaces associated with at least one new business message, determine the "object attribute information access interface" as the target business interface that meets the data notarization conditions. Among them, if there is no object attribute information access interface in the business interfaces associated with at least one new business message, it indicates that the data notarization conditions are not met at present, that is, there is no need to perform subsequent data notarization processing.

[0068] It is understandable that, depending on the specific needs in the actual application process, that is, the business data that needs to be processed for data evidence is different, for example, it can be based on object attribute information (such as object name, object address information, etc.) for evidence processing, or based on the object's historical operation information (such as historical access information, historical order information, etc.) for evidence processing. Therefore, the target business interface determined under different needs is different. For example, if data evidence processing is required based on object attribute information, it is necessary to determine the object attribute information access interface as the target business interface from the business interfaces associated with at least one new business message. Similarly, when data evidence processing is required based on the object's historical operation information, it is necessary to determine the object historical operation information access interface as the target business interface from the business interfaces associated with at least one new business message.

[0069] Furthermore, after determining that a target business interface exists among the business interfaces that meets the data notarization conditions, the notarization service component triggers a target business interface call request based on the target business interface and sends the target business interface call request to the business processing server. The business processing server, upon receiving and responding to the target business interface call request, retrieves target business data that matches the target business interface from multiple databases associated with the business processing server and sends the obtained target business data to the notarization service component.

[0070] Step S506: Receive the target business data fed back by the business processing server, call the evidence contract deployed in the blockchain network, and use the target business data, the server identifier corresponding to the business processing server, and the interface identifier corresponding to the target business interface as associated evidence data, and store them in the blockchain network.

[0071] Specifically, the evidence service component receives the target business data fed back by the business processing server and calls the evidence contract deployed in the blockchain network to obtain the server identifier corresponding to the business processing server and the interface identifier corresponding to the target business interface, and then concatenates the server identifier corresponding to the business processing server and the interface identifier corresponding to the target business interface to obtain the business index, and stores the target business data and business index as associated evidence data in the blockchain network.

[0072] Among them, after splicing the server identifier corresponding to the business processing server and the interface identifier corresponding to the target business interface to obtain the business index, the evidence service component further establishes the association relationship between the business index and the target business data, obtains the business storage index structure data, and stores the business storage index structure data in the blockchain network.

[0073] It can be understood that in the process of the evidence service component associating the target business data, the server identifier corresponding to the business processing server, and the interface identifier corresponding to the target business interface as associated evidence data and storing them in the blockchain network, the server identifier corresponding to the business processing server and the interface identifier corresponding to the target business interface are specifically spliced ​​together to obtain a business index, and the target business data and the business index are associated to obtain business storage index structure data including the business index and the target business data associated with the business index, that is, the associated business storage index structure data is specifically stored as associated evidence data in the blockchain network.

[0074] In the above-mentioned blockchain-based data evidence processing method, by obtaining and parsing at least one new business message in the business message queue, the business interface associated with each of the at least one new business message is obtained. When a target business interface that meets the data evidence conditions exists among the business interfaces, a target business interface call request is triggered based on the target business interface. This allows interface call and data evidence processing to be implemented separately for each business interface of the business processing server, avoiding the omission of business data or the problem of inconsistent business data in different databases during data backup. Furthermore, by triggering the target business interface call request, the business processing server can be instructed to obtain and feedback target business data that matches the target business interface. After obtaining the target business data that matches the target business interface, the target business data, the server identifier corresponding to the business processing server, and the interface identifier corresponding to the target business interface are stored as associated evidence data in the blockchain network by calling the evidence contract deployed in the blockchain network. This achieves the implementation of evidence processing for each business interface of the business processing server separately, without considering the time before and after occurrence of different events or the relationship between different events, reducing the tedious operations in the data evidence processing process and further improving the evidence processing efficiency of the business data of the business system.

[0075] In an exemplary embodiment, Figure 6 As shown, the process of associating and storing data is provided. Figure 6 It can be seen that the steps of calling the evidence storage contract deployed in the blockchain network, taking the target business data, the server identifier corresponding to the business processing server, and the interface identifier corresponding to the target business interface as associated evidence data, and storing them in the blockchain network specifically include the following steps S602 to S606. Among them:

[0076] Step S602: Call the evidence storage contract deployed in the blockchain network, concatenate the server identifier corresponding to the business processing server and the interface identifier corresponding to the target business interface to obtain the business index.

[0077] Specifically, the evidence service component obtains the server identifier corresponding to the business processing server and the interface identifier corresponding to the target business interface by calling the evidence contract deployed in the blockchain network, and then concatenates the server identifier corresponding to the business processing server and the interface identifier corresponding to the target business interface to obtain the business index.

[0078] In an exemplary embodiment, a method of obtaining a service index includes:

[0079] Call the evidence storage contract deployed in the blockchain network to obtain the message addition time corresponding to the new business message, splice the server ID corresponding to the business processing server, the interface ID corresponding to the target business interface and the message addition time to obtain the business index.

[0080] Specifically, the evidence service component calls the evidence contract deployed in the blockchain network to obtain the message addition time corresponding to the new business message, the server ID corresponding to the business processing server, and the interface ID corresponding to the target business interface, and concatenates the server ID corresponding to the business processing server, the interface ID corresponding to the target business interface and the message addition time to obtain the business index.

[0081] Among them, by taking the message addition time corresponding to the new business message as part of the business index, when subsequently querying the business data corresponding to the new business message, the query can be further combined with the perspective of time node or time range, so that the business data can be preliminarily screened to avoid querying a large amount of invalid or expired business data, thereby improving the query efficiency of business data.

[0082] Step S604: Establish an association relationship between the business index and the target business data to obtain business storage index structure data.

[0083] Specifically, after obtaining the service index and target service data, an association relationship between the service index and the target service data is further established to obtain service storage index structure data.

[0084] Specifically, the "key+value" index structure can be used to establish an association between the business index and the target business data, that is, the business index is used as the "key" and the target business data is used as the "value" to obtain business storage index structure data in the form of "business index + target business data", so that subsequent queries can be performed based on the business storage index structure data according to the business index to obtain the target business data that matches the queried business index.

[0085] For example, the business index is obtained by concatenating the server identifier corresponding to the business processing server and the interface identifier corresponding to the target business interface. Specifically, the "server identifier + interface identifier" is used as the business index (i.e., key) in the business storage index structure data, and the target business data is used as the "value" to obtain the business storage index structure data.

[0086] Optionally, when obtaining the business index, the message addition time corresponding to the new business message can also be used as part of the business index, that is, "server identifier + interface identifier + message addition time" is used as the business index (i.e. key) in the business storage index structure data, and the target business data is used as the "value" to obtain the business storage index structure data.

[0087] Step S606: Store the business storage index structure data in the blockchain network.

[0088] Specifically, after associating the target business data and the business index to obtain the business storage index structure data including the business index and the target business data associated with the business index, the associated business storage index structure data is stored as associated evidence data in the blockchain network.

[0089] In this embodiment, by calling the evidence storage contract deployed in the blockchain network, the server identifier corresponding to the business processing server and the interface identifier corresponding to the target business interface are spliced ​​to obtain the business index, and an association relationship between the business index and the target business data is established to obtain the business storage index structure data, so as to store the business storage index structure data in the blockchain network. Thus, by adopting the index structure, the business index and business data are associated and stored in the blockchain network, realizing the evidence storage of real-time data of the business system in the blockchain network, which can achieve the purpose of decentralization, ensure the security of business data, prevent malicious tampering, and improve data credibility.

[0090] In an exemplary embodiment, Figure 7 As shown, a data evidence processing method based on blockchain is provided. The method can be executed by a terminal or a server alone, or by a terminal and a server in collaboration. In the embodiment of the present application, the method is applied to Figure 4 The following steps S702 to S706 are described using the evidence storage service component 404 as an example.

[0091] Step S702: Receive a service data query request and obtain a service data query index carried in the service data query request.

[0092] Specifically, the user object can trigger a business data query request based on the terminal. The business data query request carries a business data query index. After receiving the business data query request, the evidence service component can obtain the business data query index carried by the business data query request by parsing the business data query request.

[0093] The business data query index can be set in different formats based on actual needs, including the "server ID + interface ID" format or the "server ID + interface ID + query time range" format. When the business data query index adopts the "server ID + interface ID" format, all business data with the prefix "server ID + interface ID" can be queried.

[0094] Optionally, if the business data query index adopts the "server ID + interface ID + query time range" method, all business data with the prefix "server ID + interface ID" and whose writing time meets the query time can be queried. The query time range can be a specific time range. For example, if the query time is from 2022 to 2025, all business data with the prefix "server ID + interface ID" and whose writing time is between 2022 and 2025 can be queried.

[0095] Step S704: Call the evidence storage contract. When the current query mode is range query, obtain the query time range corresponding to the range query. According to the business data query index and the query time range, perform an iterative query on each business data in the blockchain network to obtain at least one business data that matches the business data query index.

[0096] Specifically, after obtaining the business data query index carried by the business data query request, the evidence storage contract is further called to parse the business data query index. If it is determined that the business data query index includes the query time, the current query method is determined to be a range query, that is, the business data query index adopts the "server identifier + interface identifier + query time range" method, and then when the current query method is a range query, the query time range corresponding to the range query is obtained.

[0097] Furthermore, after obtaining the query time range corresponding to the range query, the business data query index and the query time range are further combined to iteratively query each business data in the blockchain network to obtain at least one business data that matches the business data query index.

[0098] Among them, when the business data query index adopts the "server identifier + interface identifier + query time range" method, for example, the server identifier is "userCenter" and the interface identifier is "userAPI", the query time range can be a specific time range. For example, when the query time is from 2022 to 2025, the spliced ​​business query index can be specifically "userCenter_ userAPI_2022, userCenter_ userAPI_2025", which can query all business data with the prefix "userCenter_ userAPI" and the writing time of the business data is between 2022 and 2025.

[0099] For example, the business data stored in the blockchain network specifically includes: date0: userCenter_userAPI_20211008, date1: userCenter_userAPI_20221228, and date2: userCenter_userAPI_20241102. When querying based on the business data query index of "userCenter_userAPI_2022, userCenter_userAPI_2025", the business data that matches the business data query index includes: date1: userCenter_userAPI_20221228, and date2: userCenter_userAPI_20241102.

[0100] Step S706: Call the evidence storage contract. When the current query method is prefix matching query, perform prefix matching query on each business data in the blockchain network according to the business data query index to obtain at least one business data that matches the business data query index.

[0101] Specifically, after obtaining the business data query index carried by the business data query request, the evidence storage contract is further called to parse the business data query index. If it is determined that the business data query index does not include the query time, the current query method is determined to be a prefix matching query, that is, the business data query index adopts the "server identifier + interface identifier" method, and when the current query method is a prefix matching query, a prefix matching query is performed on each business data in the blockchain network according to the business data query index to obtain at least one business data that matches the business data query index.

[0102] Among them, when the business data query index adopts the "server identifier + interface identifier" method, for example, the server identifier is "userCenter" and the interface identifier is "userAPI", the spliced ​​business data query index is "userCenter_userAPI", and a prefix matching query can be performed on various business data in the blockchain network to obtain all business data with the prefix including "userCenter_userAPI".

[0103] For example, the business data stored in the blockchain network specifically includes: date3: userCenter_userAPI_20201008, date4: userPassport_manageAPI_20221128, and date5: userCenter_userAPI_20231102. When a query is performed based on the "userCenter_ userAPI" business data query index, the business data that matches the business data query index includes: date3: userCenter_ userAPI_20201008, and date5: userCenter_ userAPI_20231102.

[0104] In an exemplary embodiment, when deploying a proof contract on a blockchain network, it specifically includes two parts: writing proof data and reading proof data, where:

[0105] 1) The process of writing attestation data includes: creating a new attestation object (including the business index (key), business data (value), and data change time (also known as the time when the message was added) (time), storing the attestation on the blockchain network, obtaining parameters (including the business index (key), business data (value), and data change time (time) and other corresponding specific parameter values), building a structure to store the data, serializing the data, storing the data on the blockchain network, generating a storage record log, and returning the storage result.

[0106] 2) The process of reading stored data includes: searching for the stored object (including the business data query index, i.e., the query key, such as the "server ID + interface ID" method, or the "server ID + interface ID + query time range" method), obtaining parameters (including the business data query index, i.e., the specific parameter value corresponding to the query key), determining the query method (including range query or prefix match query), obtaining the query result according to the query method, deserializing the query result, generating the query record log, and returning the query result.

[0107] The evidence contract contains key and value, with the server ID, interface ID and query time as the key, and the value is the data returned by the business interface corresponding to the interface ID, which is saved in the blockchain network in the form of JSON serialization.

[0108] For example, when performing a range query during reading of stored evidence data, it is necessary to create an iterator, namely "iterator", which is expressed as "iterator,err:=stub.NewIterator("userCenter_userAPI_2022","userCenter_ userAPI_2025")". Then, all business data with the prefix "userCenter_userAPI" and the data writing time between (2022, 2025) can be queried.

[0109] Optionally, when performing prefix matching queries during the reading of stored evidence data, a prefix matching iterator, namely "preWithKeyIterator", needs to be created. This can be done by "preWithKeyIterator,err:=

[0110] stub.NewIteratorPrefixWithKey("userCenter_userAPI ")", all business data with the prefix "userCenter_userAPI" can be queried.

[0111] In the above-mentioned data evidence processing method on the blockchain, by obtaining the business data query index carried by the received business data query request and calling the evidence contract, when the current query method is a range query, the query time range corresponding to the range query is obtained, and based on the business data query index and the query time range, an iterative query is performed on each business data in the blockchain network to obtain at least one business data that matches the business data query index. Similarly, by calling the evidence contract, when the current query method is a prefix match query, a prefix match query is performed on each business data in the blockchain network based on the business data query index to obtain at least one business data that matches the business data query index. In this way, matching query methods can be provided according to different business data query indexes, so that business data that matches the business data query index can be accurately queried under different query methods. While providing flexible query methods, data query efficiency is further improved, cumbersome operations are avoided, and service resource consumption is reduced.

[0112] In an exemplary embodiment, Figure 8As shown, a data evidence processing method based on blockchain is provided. The method can be executed by a terminal or a server alone, or by a terminal and a server in collaboration. In the embodiment of the present application, the method is applied to Figure 4 Taking the business processing server 402 in the example as an example, the following steps S802 to S806 are described. Among them:

[0113] Step S802: When it is detected that there is changed business data in the database, a new business message is generated based on the changed business data, and the new business message is stored in the business message queue. The new business message is used to instruct the evidence service component to obtain the business interface associated with each new business message, and when there is a target business interface that meets the data evidence conditions in each business interface, the target business interface call request is triggered based on the target business interface.

[0114] Specifically, when the business processing server detects that there is changed business data in the database, that is, when it detects that there is changed business data in any database associated with the business processing server, it generates a new business message based on the changed business data and stores the new business message in the business message queue.

[0115] Among them, the databases associated with the business processing server specifically include the database set up by the business processing server itself, the system database associated with the business processing server (which is different from the database set up by the business processing server itself, and is an externally developed database that can be used by the business processing server to store and access data), and the third-party database that the business processing server is allowed to access.

[0116] In an exemplary embodiment, when the trigger mechanism for a business data change reminder is a notification trigger mechanism and the new business message is a business data update message, when changed business data is detected in a database, the steps of generating a new business message based on the changed business data and storing the new business message in a business message queue include:

[0117] When it is detected that there is changed business data in the database, and the trigger mechanism of the business data change reminder is a notification trigger mechanism, a business data update message is generated according to the changed business data; the business data update message is sent and stored in the business message queue.

[0118] Specifically, when the business processing server detects that there is changed business data in any database associated with the business processing server, and the trigger mechanism for the business data change reminder is a notification trigger mechanism (that is, a trigger mechanism for actively pushing reminder messages), a business data update message is generated based on the changed business data, the business data update message is sent to the business message queue, and the business data update message is further stored in the business message queue.

[0119] Further, if Figure 9 As shown, the trigger mechanism for business data change reminders is the data evidence process when the notification trigger mechanism is used. Figure 9 It can be seen that when the trigger mechanism of business data change reminder is the notification trigger mechanism:

[0120] 1. When a business processing server detects that there is changed business data in any database associated with it (including database A and database B set up by the business processing server itself, system database C associated with the business processing server, and any third-party database D that the business processing server is allowed to access), it generates a business data update message based on the changed business data, and sends and stores the business data update message in the business message queue.

[0121] 2. The evidence storage service component consumes at least one business data update message in the business message queue, parses at least one business data update message, and obtains the business interface associated with each of the at least one business data update messages.

[0122] 3. When the notarization service component determines that there is a target business interface among the business interfaces that meets the data notarization conditions, it triggers a target business interface call request based on the target business interface and sends the target business interface call request to the business processing server.

[0123] Specifically, the evidence service component screens each business interface according to the preset data evidence conditions, and determines whether there is a target business interface that meets the data evidence conditions among the business interfaces. Specifically, according to the specific needs in the actual application process, for example, data evidence processing needs to be based on object attribute information, and the object attribute information is obtained by calling the object information access interface. In this case, the current data evidence condition can be expressed as the condition that the interface name is "object attribute information access interface", that is, specifically, the "object attribute information access interface" is determined from the business interfaces associated with at least one new business message as the target business interface that meets the data evidence conditions.

[0124] 4. After receiving the target business interface call request, the business processing server obtains the target business data that matches the target business interface from database A and database B set up by the business processing server itself, the system database C associated with the business processing server, and the third-party database D that the business processing server is allowed to access, and feeds the target business data back to the evidence service component.

[0125] 5. The evidence service component receives the target business data fed back by the business processing server, calls the evidence contract deployed in the blockchain network, concatenates the server identifier corresponding to the business processing server and the interface identifier corresponding to the target business interface, obtains the business index, and establishes an association between the business index and the target business data to obtain the business storage index structure data, so as to store the business storage index structure data in the blockchain network.

[0126] Among them, the evidence service component can adopt the "key+value" index structure to establish the association relationship between the business index and the target business data, that is, using the business index as the "key" and the target business data as the "value" to obtain the business storage index structure data in the form of "business index + target business data".

[0127] Furthermore, the business index is specifically obtained by concatenating the server identifier corresponding to the business processing server and the interface identifier corresponding to the target business interface. Specifically, the "server identifier + interface identifier" is used as the business index (i.e., key) in the business storage index structure data, and the target business data is used as the "value" to obtain the business storage index structure data.

[0128] Optionally, when obtaining the business index, the message addition time corresponding to the new business message can also be used as part of the business index, that is, "server identifier + interface identifier + message addition time" is used as the business index (i.e. key) in the business storage index structure data, and the target business data is used as the "value" to obtain the business storage index structure data.

[0129] 6. The evidence service component receives the business data query request, obtains the business data query index carried in the business data query request, calls the evidence contract, and queries the business data that matches the business data query index from the blockchain network.

[0130] Specifically, if the business data query index adopts the "server identifier + interface identifier + query time range" method, and then when the current query method is range query, obtain the query time range corresponding to the range query and further combine the business data query index and the query time range to iteratively query the various business data in the blockchain network to obtain at least one business data that matches the business data query index.

[0131] Optionally, if the business data query index adopts the "server identifier + interface identifier" method, and when the current query method is a prefix matching query, a prefix matching query is performed on each business data in the blockchain network according to the business data query index to obtain at least one business data that matches the business data query index.

[0132] Among them, after obtaining at least one business data that matches the business data query index, audit processing or third-party review processing can be performed based on the business data to obtain corresponding audit results.

[0133] In an exemplary embodiment, when the trigger mechanism for a business data change reminder is a subscription trigger mechanism and the new business message is a business log update message, when changed business data is detected in the database, the steps of generating a new business message based on the changed business data and storing the new business message in a business message queue include:

[0134] When it is detected that there is changed business data in the database, and the trigger mechanism of the business data change reminder is a subscription trigger mechanism, a business log update message is generated according to the changed business data; when a data change subscription request is received from the message queue, the business log update message is sent to the message queue, so that the message queue stores the business log update message in the business message queue.

[0135] Specifically, when the business processing server detects that there is changed business data in any database associated with the business processing server, and the trigger mechanism for business data change reminder is a subscription trigger mechanism (i.e., a trigger mechanism for passive subscription reminder messages), it generates a business log update message based on the changed business data, and monitors whether the message queue triggers a data change subscription request.

[0136] When a data change subscription request triggered by a message queue is received, a service log update message is sent to the message queue, so that the message queue stores the service log update message in the service message queue.

[0137] Further, if Figure 10 As shown, the data evidence process when the trigger mechanism of business data change reminder is the subscription trigger mechanism is provided. Figure 10 It can be seen that when the trigger mechanism for business data change reminders is a subscription trigger mechanism:

[0138] 1. When a business processing server detects that there is changed business data in any database associated with it (including database A and database B set up by the business processing server itself, system database C associated with the business processing server, and any third-party database D that the business processing server is allowed to access), it updates the business log according to the changed business data and generates a business log update message.

[0139] 2. When the business processing server receives the data change subscription request triggered by the message queue, it sends the business log update message to the message queue, so that the message queue stores the business log update message in the business message queue.

[0140] 3. The evidence storage service component consumes at least one business log update message in the business message queue, parses at least one business log update message, and obtains the business interface associated with each of the at least one business log update messages.

[0141] 4. When the notarization service component determines that there is a target business interface among the business interfaces that meets the data notarization conditions, it triggers a target business interface call request based on the target business interface and sends the target business interface call request to the business processing server.

[0142] 5. After receiving the target business interface call request, the business processing server obtains the target business data that matches the target business interface from database A and database B set up by the business processing server itself, the system database C associated with the business processing server, and the third-party database D that the business processing server is allowed to access, and feeds the target business data back to the evidence service component.

[0143] 6. The evidence service component receives the target business data fed back by the business processing server, calls the evidence contract deployed in the blockchain network, concatenates the server identifier corresponding to the business processing server and the interface identifier corresponding to the target business interface, obtains the business index, and establishes an association between the business index and the target business data to obtain the business storage index structure data, so as to store the business storage index structure data in the blockchain network.

[0144] 7. The evidence service component receives the business data query request, obtains the business data query index carried in the business data query request, calls the evidence contract, and queries the business data that matches the business data query index from the blockchain network.

[0145] Among them, after obtaining at least one business data that matches the business data query index, audit processing or third-party review processing can be performed based on the business data to obtain corresponding audit results.

[0146] Step S804: Receive the target business interface call request sent by the evidence storage service component, and obtain the target business data that matches the target business interface from the associated databases.

[0147] Specifically, the business processing server receives and responds to the target business interface call request sent by the evidence service component, and obtains the target business data that matches the target business interface from the associated databases, including the database set up by the business processing server itself, the system database associated with the business processing server, and the third-party database that the business processing server is allowed to access.

[0148] In step S806, the target business data is fed back to the evidence service component, so that after receiving the target business data, the evidence service component calls the evidence contract deployed in the blockchain network, and stores the target business data, the server identifier corresponding to the business processing server, and the interface identifier corresponding to the target business interface as associated evidence data in the blockchain network.

[0149] Specifically, the business processing server will obtain the target business data that matches the target business interface from the associated databases and feed it back to the evidence service component. The evidence service component will receive the target business data and call the evidence contract deployed in the blockchain network to obtain the server identifier corresponding to the business processing server and the interface identifier corresponding to the target business interface, and then concatenate the server identifier corresponding to the business processing server and the interface identifier corresponding to the target business interface to obtain the business index. The target business data and business index will be stored as associated evidence data in the blockchain network.

[0150] Among them, after the evidence service component obtains the business index by splicing the server identifier corresponding to the business processing server and the interface identifier corresponding to the target business interface, it further establishes the association relationship between the business index and the target business data, obtains the business storage index structure data, and stores the business storage index structure data as associated evidence data in the blockchain network.

[0151] In an exemplary embodiment, when obtaining the business index, the evidence service component may also adopt the method of using the message addition time corresponding to the new business message as part of the business index, that is, specifically calling the evidence contract deployed in the blockchain network, obtaining the message addition time corresponding to the new business message, splicing the server identifier corresponding to the business processing server, the interface identifier corresponding to the target business interface and the message addition time to obtain the business index.

[0152] Similarly, after the evidence service component obtains the business index by concatenating the server identifier corresponding to the business processing server, the interface identifier corresponding to the target business interface, and the time when the message was added, it further establishes an association between the business index and the target business data, obtains the business storage index structure data, and stores the business storage index structure data as associated evidence data in the blockchain network.

[0153] In the above-mentioned blockchain-based data notarization processing method, when the business processing server detects that there is a change in business data in the database, it generates a new business message based on the changed business data and stores the new business message in the business message queue. The notarization service component obtains and parses the new business message from the business message queue to obtain the business interface associated with each new business message. When there is a target business interface that meets the data notarization conditions in each business interface, it triggers a target business interface call request based on the target business interface and sends the target business interface call request to the business processing server. In this way, interface call and data notarization processing can be implemented for each business interface of the business processing server respectively, avoiding omission of business data or inconsistency of business data in different databases when backing up data. Furthermore, the business processing server obtains the target business data that matches the target business interface from the associated databases by responding to the target business interface call request, and feeds the target business data back to the evidence service component. After receiving the target business data, the evidence service component calls the evidence contract deployed in the blockchain network to store the target business data, the server identifier corresponding to the business processing server, and the interface identifier corresponding to the target business interface as associated evidence data in the blockchain network, thereby realizing evidence processing for each business interface of the business processing server separately without considering the occurrence time of different events and the correlation between different events, reducing the tedious operations in the data evidence processing process, and further improving the evidence processing efficiency of the business data of the business system.

[0154] In an exemplary embodiment, Figure 11 As shown, the overall processing flow of the data evidence processing method based on blockchain is provided. Figure 11 It can be seen that the overall processing flow of the blockchain-based data evidence processing method involves business processing servers, evidence service components, message queues, blockchain networks, and terminals, among which:

[0155] Step S1101: When the business processing server detects that there is changed business data in the database and the trigger mechanism of the business data change reminder is a notification trigger mechanism, it generates a business data update message according to the changed business data, and sends and stores the business data update message to the business message queue.

[0156] Step S1102 : When the business processing server detects that there is changed business data in the database and the trigger mechanism for business data change reminder is a subscription trigger mechanism, a business log update message is generated according to the changed business data.

[0157] Step S1103 : When the service processing server receives the data change subscription request from the message queue, it sends the service log update message to the message queue, so that the message queue receives and stores the service log update message.

[0158] In step S1104, the evidence storage service component obtains at least one new business message in the business message queue, parses the at least one new business message, and obtains the business interface associated with the at least one new business message.

[0159] Step S1105: When there is a target business interface that meets the data notarization conditions among the business interfaces, the notarization service component triggers a target business interface call request based on the target business interface and sends the target business interface call request to the business processing server.

[0160] In step S1106, the business processing server receives and responds to the target business interface call request, obtains target business data that matches the target business interface from the associated databases, and feeds the target business data back to the evidence storage service component.

[0161] In step S1107, the evidence service component receives the target business data and calls the evidence contract deployed in the blockchain network, concatenates the server identifier corresponding to the business processing server and the interface identifier corresponding to the target business interface, and obtains the business index.

[0162] In step S1108, the evidence storage service component establishes an association relationship between the business index and the target business data, obtains the business storage index structure data, and stores the business storage index structure data in the blockchain network.

[0163] Step S1109: The evidence storage service component receives the business data query request and obtains the business data query index carried in the business data query request.

[0164] In step S1110, the evidence service component calls the evidence contract. When the current query mode is range query, it obtains the query time range corresponding to the range query, and performs iterative query on each business data in the blockchain network according to the business data query index and the query time range, and obtains at least one business data that matches the business data query index.

[0165] In step S1111, the evidence service component calls the evidence contract. When the current query method is prefix matching query, a prefix matching query is performed on each business data in the blockchain network according to the business data query index to obtain at least one business data that matches the business data query index.

[0166] In the above-mentioned blockchain-based data notarization processing method, when the business processing server detects that there is a change in business data in the database, it generates a new business message based on the changed business data and stores the new business message in the business message queue. The notarization service component obtains and parses the new business message from the business message queue to obtain the business interface associated with each new business message. When there is a target business interface that meets the data notarization conditions in each business interface, it triggers a target business interface call request based on the target business interface and sends the target business interface call request to the business processing server. In this way, interface call and data notarization processing can be implemented for each business interface of the business processing server respectively, avoiding omission of business data or inconsistency of business data in different databases when backing up data. Furthermore, the business processing server obtains the target business data that matches the target business interface from the associated databases by responding to the target business interface call request, and feeds the target business data back to the evidence service component. After receiving the target business data, the evidence service component calls the evidence contract deployed in the blockchain network to store the target business data, the server identifier corresponding to the business processing server, and the interface identifier corresponding to the target business interface as associated evidence data in the blockchain network, thereby realizing evidence processing for each business interface of the business processing server separately without considering the occurrence time of different events and the correlation between different events, reducing the tedious operations in the data evidence processing process, and further improving the evidence processing efficiency of the business data of the business system.

[0167] It should be understood that, although the steps in the flowcharts of the above embodiments are shown in sequence as indicated by the arrows, these steps are not necessarily performed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be performed in other orders. Moreover, at least a portion of the steps in the flowcharts of the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily to be performed in sequence, but can be performed in turn or alternately with other steps or at least a portion of steps or stages in other steps.

[0168] In an exemplary embodiment, Figure 12 As shown, a blockchain-based data evidence processing system is provided, which specifically includes: a business processing server 1202, an evidence service component 1204, a business message queue 1206, a blockchain network 1208, and a terminal 1210. The blockchain network 1208 is deployed with an evidence contract 1212; wherein:

[0169] The business processing server 1202 is used to: when detecting that there is changed business data in the database, generate a new business message according to the changed business data, and store the new business message in the business message queue 1206 .

[0170] The evidence service component 1204 is used to: obtain at least one new business message in the business message queue 1206, and parse at least one new business message to obtain the business interface associated with each of the at least one new business messages; when there is a target business interface that meets the data evidence conditions in each business interface, trigger a target business interface call request based on the target business interface.

[0171] The business processing server 1202 is also used to: receive the target business interface call request sent by the evidence service component 1204, obtain the target business data matching the target business interface from the associated databases, and feed the target business data back to the evidence service component 1204.

[0172] The evidence service component 1204 is also used to: receive target business data, and call the evidence contract 1212 deployed in the blockchain network 1208, and store the target business data, the server identifier corresponding to the business processing server, and the interface identifier corresponding to the target business interface as associated evidence data in the blockchain network 1208.

[0173] In an exemplary embodiment, the evidence service component 1204 is also used to: receive a business data query request triggered by the terminal 1210, and obtain a business data query index carried by the business data query request; call the evidence contract 1212, and when the current query mode is a range query, obtain a query time range corresponding to the range query, and perform an iterative query on each business data in the blockchain network according to the business data query index and the query time range to obtain at least one business data that matches the business data query index; or call the evidence contract 1212, and when the current query mode is a prefix matching query, perform a prefix matching query on each business data in the blockchain network according to the business data query index to obtain at least one business data that matches the business data query index.

[0174] In an exemplary embodiment, the business processing server 1202 is also used to: when it is monitored that there is changed business data in the database, and the trigger mechanism of the business data change reminder is a notification trigger mechanism, generate a business data update message based on the changed business data, and send and store the business data update message to the business message queue 1206.

[0175] Among them, the business processing server 1202 is also used to: when it is monitored that there is changed business data in the database, and the trigger mechanism of the business data change reminder is a subscription trigger mechanism, generate a business log update message according to the changed business data; when a data change subscription request is received from the message queue, send the business log update message to the message queue 1206, so that the message queue 1206 stores the business log update message in the business message queue 1206.

[0176] In the above-mentioned blockchain-based data evidence processing system, by acquiring and parsing at least one new business message in the business message queue, the business interface associated with each of the at least one new business message is obtained. When a target business interface that meets the data evidence conditions exists among the business interfaces, a target business interface call request is triggered based on the target business interface. This allows interface call and data evidence processing to be implemented separately for each business interface of the business processing server, avoiding the omission of business data or the problem of inconsistent business data in different databases during data backup. Furthermore, by triggering the target business interface call request, the business processing server can be instructed to acquire and feedback target business data that matches the target business interface. After obtaining the target business data that matches the target business interface, the target business data, the server identifier corresponding to the business processing server, and the interface identifier corresponding to the target business interface are stored as associated evidence data in the blockchain network by calling the evidence contract deployed in the blockchain network. This achieves the implementation of evidence processing for each business interface of the business processing server separately, without considering the time before and after occurrence of different events or the relationship between different events, reducing the tedious operations in the data evidence processing process and further improving the evidence processing efficiency of the business data of the business system.

[0177] Based on the same inventive concept, the embodiments of the present application also provide a blockchain-based data evidence processing device for implementing the aforementioned blockchain-based data evidence processing method. The implementation solution provided by this device is similar to the implementation solution described in the aforementioned method. Therefore, the specific limitations of the one or more blockchain-based data evidence processing device embodiments provided below can be found in the above-mentioned limitations of the blockchain-based data evidence processing method, and will not be repeated here.

[0178] In an exemplary embodiment, Figure 13 As shown, a data evidence processing device based on blockchain is provided, including: a new business message acquisition module 1302, a target business interface call request triggering module 1304 and an associated storage module 1306, wherein:

[0179] The new service message obtaining module 1302 is configured to obtain at least one new service message in the service message queue, parse the at least one new service message, and obtain a service interface associated with each of the at least one new service messages;

[0180] The target business interface call request triggering module 1304 is used to trigger a target business interface call request based on the target business interface when a target business interface that meets the data evidence conditions exists among the business interfaces. The target business interface call request is used to instruct the business processing server to obtain target business data that matches the target business interface.

[0181] The associated storage module 1306 is used to receive the target business data fed back by the business processing server, and call the evidence contract deployed in the blockchain network, and store the target business data, the server identifier corresponding to the business processing server, and the interface identifier corresponding to the target business interface as associated evidence data in the blockchain network.

[0182] In the above-mentioned blockchain-based data evidence processing device, by acquiring and parsing at least one new business message in the business message queue, the business interface associated with each of the at least one new business message is obtained. When a target business interface that meets the data evidence conditions exists among the business interfaces, a target business interface call request is triggered based on the target business interface. This allows the interface call and data evidence processing to be implemented separately for each business interface of the business processing server, thereby avoiding the omission of business data or the problem of inconsistent business data in different databases during data backup. Furthermore, by triggering the target business interface call request, the business processing server can be instructed to acquire and feedback target business data that matches the target business interface. After obtaining the target business data that matches the target business interface, the target business data, the server identifier corresponding to the business processing server, and the interface identifier corresponding to the target business interface are stored as associated evidence data in the blockchain network by calling the evidence contract deployed in the blockchain network. This achieves the implementation of evidence processing for each business interface of the business processing server separately, without considering the time before and after occurrence of different events or the relationship between different events, reducing the tedious operations in the data evidence processing process and further improving the evidence processing efficiency of the business data of the business system.

[0183] In an exemplary embodiment, the associated storage module is also used to: call the evidence contract deployed in the blockchain network, splice the server identifier corresponding to the business processing server and the interface identifier corresponding to the target business interface to obtain a business index; establish an association relationship between the business index and the target business data to obtain business storage index structure data; and store the business storage index structure data in the blockchain network.

[0184] In an exemplary embodiment, the associated storage module is also used to: call the evidence storage contract deployed in the blockchain network, obtain the message addition time corresponding to the new business message, splice the server identifier corresponding to the business processing server, the interface identifier corresponding to the target business interface and the message addition time, and obtain the business index.

[0185] In an exemplary embodiment, a blockchain-based data evidence processing device is provided, which also includes a business data query module, which is used to: receive a business data query request, obtain a business data query index carried by the business data query request; call the evidence contract, and query business data matching the business data query index from the blockchain network.

[0186] In an exemplary embodiment, the business data query module is also used to: call the evidence storage contract, and when the current query method is a range query, obtain the query time range corresponding to the range query, and iteratively query each business data in the blockchain network according to the business data query index and the query time range to obtain at least one business data that matches the business data query index.

[0187] In an exemplary embodiment, the business data query module is also used to: call the evidence storage contract, and when the current query method is a prefix matching query, perform a prefix matching query on each business data in the blockchain network according to the business data query index to obtain at least one business data that matches the business data query index.

[0188] In an exemplary embodiment, Figure 14 As shown, a data evidence processing device based on blockchain is provided, including: a new business message storage module 1402, a target business data acquisition module 1404 and a target business data feedback module 1406, wherein:

[0189] New business message storage module 1402 is used to generate new business messages based on the changed business data when monitoring the database, and store the new business messages in the business message queue. The new business messages are used to instruct the evidence storage service component to obtain the business interfaces associated with each new business message, and trigger a target business interface call request based on the target business interface if a target business interface that meets the data evidence storage conditions exists among the business interfaces.

[0190] The target business data acquisition module 1404 is used to receive the target business interface call request sent by the evidence storage service component and obtain the target business data that matches the target business interface from the associated databases;

[0191] The target business data feedback module 1406 is used to feed back the target business data to the evidence service component, so that after receiving the target business data, the evidence service component calls the evidence contract deployed in the blockchain network, and stores the target business data, the server identifier corresponding to the business processing server, and the interface identifier corresponding to the target business interface as associated evidence data in the blockchain network.

[0192] In the above-mentioned blockchain-based data notarization processing device, when the business processing server detects that there is a change in business data in the database, it generates a new business message based on the changed business data and stores the new business message in the business message queue. The notarization service component obtains and parses the new business message from the business message queue to obtain the business interface associated with each new business message. When there is a target business interface that meets the data notarization conditions in each business interface, it triggers a target business interface call request based on the target business interface and sends the target business interface call request to the business processing server. In this way, interface call and data notarization processing can be implemented for each business interface of the business processing server respectively, avoiding the omission of business data or the inconsistency of business data in different databases when backing up data. Furthermore, the business processing server obtains the target business data that matches the target business interface from the associated databases by responding to the target business interface call request, and feeds the target business data back to the evidence service component. After receiving the target business data, the evidence service component calls the evidence contract deployed in the blockchain network to store the target business data, the server identifier corresponding to the business processing server, and the interface identifier corresponding to the target business interface as associated evidence data in the blockchain network, thereby realizing evidence processing for each business interface of the business processing server separately without considering the occurrence time of different events and the correlation between different events, reducing the tedious operations in the data evidence processing process, and further improving the evidence processing efficiency of the business data of the business system.

[0193] In an exemplary embodiment, a new business message storage module is also used to: when it is monitored that there is changed business data in the database, and the trigger mechanism of the business data change reminder is a notification trigger mechanism, generate a business data update message based on the changed business data; send and store the business data update message to the business message queue.

[0194] In an exemplary embodiment, a new business message storage module is also used to: when it is monitored that there is changed business data in the database, and the trigger mechanism for the business data change reminder is a subscription trigger mechanism, generate a business log update message based on the changed business data; when a data change subscription request is received from the message queue, send the business log update message to the message queue, so that the message queue stores the business log update message in the business message queue.

[0195] Each module in the aforementioned blockchain-based data evidence storage and processing device can be implemented in whole or in part through software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in hardware form, or can be stored in a computer device's memory in software form, so that the processor can call and execute the corresponding operations of each module.

[0196] In an exemplary embodiment, a computer device is provided. The computer device may be a server or a terminal. In this embodiment, the computer device is described as a server. The internal structure diagram thereof may be as follows: Figure 15 As shown. The computer device includes a processor, memory, an input / output (I / O) interface, and a communication interface. The processor, memory, and I / O interface are connected via a system bus, and the communication interface is connected to the system bus via the I / O interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The database of the computer device is used to store data such as at least one new business message, a business interface associated with each of the at least one new business message, a target business interface that meets data storage conditions, target business data that matches the target business interface, a storage contract, and associated storage data. The I / O interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals via a network connection. When executed by the processor, the computer program implements a blockchain-based data storage processing method.

[0197] Those skilled in the art will understand that Figure 15 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0198] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the steps in the above-mentioned blockchain-based data evidence processing method are implemented.

[0199] In an exemplary embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned blockchain-based data evidence processing method are implemented.

[0200] In an exemplary embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the steps in the above-mentioned blockchain-based data evidence processing method.

[0201] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0202] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the above-mentioned embodiments. In particular, any reference to memory, database, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processors involved in the various embodiments provided herein may be, but are not limited to, general-purpose processors, central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), programmable logic devices (PLDs), data processing logic devices based on quantum computing, and the like.

[0203] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0204] The above embodiments merely illustrate several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art may make various modifications and improvements without departing from the spirit of the present invention, all of which fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.

Claims

1. A data evidence processing method based on blockchain, characterized in that: The method comprises: Obtain at least one new service message in the service message queue, parse the at least one new service message, and obtain a service interface associated with each of the at least one new service messages; When a target business interface that meets the data notarization conditions exists among the business interfaces, a target business interface call request is triggered based on the target business interface; the target business interface call request is used to instruct the business processing server to obtain target business data that matches the target business interface; Receive the target business data fed back by the business processing server, call the evidence contract deployed in the blockchain network, and use the target business data, the server identifier corresponding to the business processing server, and the interface identifier corresponding to the target business interface as associated evidence data, and store them in the blockchain network.

2. The method according to claim 1, characterized in that The calling of the evidence storage contract deployed in the blockchain network, taking the target business data, the server identifier corresponding to the business processing server, and the interface identifier corresponding to the target business interface as associated evidence data, and storing them in the blockchain network in an associated manner, includes: Calling the evidence storage contract deployed in the blockchain network, splicing the server identifier corresponding to the business processing server and the interface identifier corresponding to the target business interface to obtain a business index; Establishing an association relationship between the business index and the target business data to obtain business storage index structure data; The business storage index structure data is stored in the blockchain network.

3. The method according to claim 2, characterized in that The calling of the evidence storage contract deployed in the blockchain network, splicing the server identifier corresponding to the business processing server and the interface identifier corresponding to the target business interface to obtain the business index, includes: Call the evidence storage contract deployed in the blockchain network to obtain the message addition time corresponding to the new business message, splice the server identifier corresponding to the business processing server, the interface identifier corresponding to the target business interface and the message addition time to obtain the business index.

4. The method according to any one of claims 1 to 3, characterized in that The method further comprises: Receive a business data query request, and obtain a business data query index carried in the business data query request; The evidence storage contract is called to query the blockchain network for business data that matches the business data query index.

5. The method according to claim 4, characterized in that The calling of the evidence storage contract to query the blockchain network for business data matching the business data query index includes: The evidence storage contract is called, and when the current query mode is a range query, a query time range corresponding to the range query is obtained, and according to the business data query index and the query time range, each business data in the blockchain network is iteratively queried to obtain at least one business data that matches the business data query index.

6. The method according to claim 4, characterized in that The calling of the evidence storage contract to query the blockchain network for business data matching the business data query index includes: The evidence storage contract is called. When the current query mode is prefix matching query, a prefix matching query is performed on each business data in the blockchain network according to the business data query index to obtain at least one business data that matches the business data query index.

7. A data evidence processing method based on blockchain, characterized in that: The method comprises: When a changed business data is detected in the database, a new business message is generated based on the changed business data and stored in a business message queue; the new business message is used to instruct the evidence storage service component to obtain the business interface associated with each of the new business messages, and if a target business interface that meets the data evidence storage conditions exists among the business interfaces, a target business interface call request is triggered based on the target business interface; Receive a target business interface call request sent by the evidence storage service component, and obtain target business data matching the target business interface from each of the associated databases; The target business data is fed back to the evidence service component, so that after receiving the target business data, the evidence service component calls the evidence contract deployed in the blockchain network, and stores the target business data, the server identifier corresponding to the business processing server, and the interface identifier corresponding to the target business interface as associated evidence data in the blockchain network.

8. The method according to claim 7, characterized in that The newly added business message is a business data update message. When the changed business data in the database is detected, the newly added business message is generated according to the changed business data, and the newly added business message is stored in the business message queue, including: When it is detected that there is changed business data in the database, and the trigger mechanism of the business data change reminder is a notification trigger mechanism, the business data update message is generated according to the changed business data; The service data update message is sent and stored in the service message queue.

9. The method according to claim 7, characterized in that The newly added business message is a business log update message. When the changed business data in the database is detected, the newly added business message is generated according to the changed business data, and the newly added business message is stored in the business message queue, including: When it is detected that there is changed business data in the database, and the trigger mechanism of the business data change reminder is a subscription trigger mechanism, the business log update message is generated according to the changed business data; When receiving the data change subscription request of the message queue, the service log update message is sent to the message queue, so that the message queue stores the service log update message in the service message queue.

10. A data evidence processing system based on blockchain, characterized in that: The system includes a business processing server, a proof service component, a business message queue, and a blockchain network; wherein: The business processing server is configured to: upon detecting that there is changed business data in the database, generate a new business message according to the changed business data, and store the new business message in the business message queue; The evidence storage service component is configured to: obtain at least one new business message in the business message queue, parse the at least one new business message, and obtain a business interface associated with each of the at least one new business message; and trigger a target business interface call request based on the target business interface when a target business interface that meets the data evidence storage conditions exists among the business interfaces. The business processing server is further configured to: receive a target business interface call request sent by the evidence storage service component, obtain target business data matching the target business interface from the associated databases, and feed the target business data back to the evidence storage service component; The evidence service component is also used to: receive the target business data, and call the evidence contract deployed in the blockchain network, and store the target business data, the server identifier corresponding to the business processing server, and the interface identifier corresponding to the target business interface as associated evidence data in the blockchain network.

11. A data evidence processing device based on blockchain, characterized in that: The device comprises: A new service message acquisition module is used to obtain at least one new service message in the service message queue, and parse the at least one new service message to obtain the service interface associated with each of the at least one new service messages; A target business interface call request triggering module is configured to trigger a target business interface call request based on a target business interface that satisfies the data evidence storage conditions when a target business interface exists among the business interfaces; the target business interface call request is configured to instruct the business processing server to obtain target business data that matches the target business interface; An associated storage module is used to receive the target business data fed back by the business processing server, and call the evidence contract deployed in the blockchain network, and store the target business data, the server identifier corresponding to the business processing server, and the interface identifier corresponding to the target business interface as associated evidence data in the blockchain network.

12. A data evidence processing device based on blockchain, characterized in that: The device comprises: A new business message storage module is configured to, upon detecting changed business data in the database, generate a new business message based on the changed business data and store the new business message in a business message queue; the new business message is configured to instruct the evidence storage service component to obtain the business interface associated with each new business message and, if a target business interface that meets the data evidence storage conditions exists among the business interfaces, trigger a target business interface call request based on the target business interface; A target business data acquisition module is configured to receive a target business interface call request sent by the evidence storage service component and acquire target business data matching the target business interface from the associated databases; The target business data feedback module is used to feed back the target business data to the evidence service component, so that after the evidence service component receives the target business data, it calls the evidence contract deployed in the blockchain network, and stores the target business data, the server identifier corresponding to the business processing server, and the interface identifier corresponding to the target business interface as associated evidence data in the blockchain network.

13. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 9 are implemented.

14. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.

15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.