Business record storage method and apparatus, computer device, and storage medium

By constructing a binary tree to generate hash values ​​and uploading them to the blockchain, the problem of balancing convenience and security in blockchain storage is solved, achieving efficient and secure business record verification and reducing system transformation costs.

CN116015609BActive Publication Date: 2026-04-10INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
INDUSTRIAL AND COMMERCIAL BANK OF CHINA
Filing Date
2022-12-12
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Existing technologies that utilize blockchain to store business records present a challenge in balancing convenience and security. In particular, multiple business parties need to expend significant resources on system modifications and consensus algorithm decisions, while these parties also possess the ability to forge transaction records.

Method used

By constructing a binary tree to generate the hash values ​​of the account's business record summary information and detailed information, and then associating them, the data is sent to the trusted center for on-chain verification, thereby achieving the solidification of business records and preventing business parties from directly modifying the blockchain system.

Benefits of technology

It improves the security and convenience of business record information without modifying the blockchain system. Users can verify in a timely manner whether the record information has been tampered with, and reduce the consumption of computing resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116015609B_ABST
    Figure CN116015609B_ABST
Patent Text Reader

Abstract

The application relates to a business record storage method and device, computer equipment, a storage medium and a computer program product, which can be applied to the technical field of information security and can take into account the convenience and security of business record information fixation. The method comprises the following steps: determining the business record information corresponding to each account in a plurality of accounts in a preset time period; for each account, acquiring the business record summary information corresponding to the account confirmed by the account according to the business record information corresponding to the account; determining a first hash value according to the business record summary information corresponding to each account in a plurality of accounts; determining a second hash value according to the business record information corresponding to each account in a plurality of accounts; associating the first hash value with the second hash value, and sending the associated first hash value and second hash value to a preset trusted center for chain storage.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of information security, and in particular to a business record storage method and device, computer equipment, a storage medium and a computer program product. BACKGROUND

[0002] With the development of computer technology, the requirement for business record information storage security is higher and higher, and as a new type of decentralized distributed ledger, the blockchain has the characteristics of non-tamperability and can improve the storage security of business record information.

[0003] In related technologies, when using a blockchain for storage, the business systems of multiple business parties can be first modified into a blockchain system, and then based on a consensus algorithm, the relevant business record information of the business parties is stored and fixed.

[0004] However, in the storage of business record information based on the blockchain, on the one hand, multiple business parties need to spend a lot of resources to improve the system and make related decisions on the consensus algorithm, and on the other hand, this method also lacks supervisability, and the business parties still have the ability to fake customer transaction records and upload them to the blockchain. It can be seen that the related technologies are difficult to balance convenience and security when fixing business record information. SUMMARY

[0005] Therefore, it is necessary to provide a business record storage method, device, computer equipment, computer readable storage medium and computer program product that can balance convenience and security in view of the above technical problems.

[0006] In a first aspect, the present application provides a business record storage method. The method comprises:

[0007] determining business record information corresponding to each account in a plurality of accounts within a preset time period;

[0008] for each account, obtaining business record summary information corresponding to the account confirmed by the account according to the business record information corresponding to the account;

[0009] determining a first hash value according to the business record summary information corresponding to each account in the plurality of accounts;

[0010] determining a second hash value according to the business record information corresponding to each account in the plurality of accounts;

[0011] associating the first hash value with the second hash value, and sending the associated first hash value and second hash value to a preset trusted center for on-chain storage.

[0012] In one of the embodiments, the determining the first hash value according to the summary information of the business records corresponding to each of the plurality of accounts comprises:

[0013] The summary information of the business records corresponding to each of the plurality of accounts is taken as the node information of the corresponding first leaf node;

[0014] A first binary tree is constructed according to the node information of each first leaf node; the node information of each non-leaf node in the first binary tree comprises the hash value of the node information of at least one child node associated with the non-leaf node, and the child node comprises the first leaf node;

[0015] The first hash value is obtained according to the node information of the first root node of the first binary tree.

[0016] In one of the embodiments, after the first hash value and the second hash value associated with each other are sent to a preset trusted center for chaining, the method further comprises:

[0017] If a verification request for target business record information in the preset time period is received, the node information corresponding to an intermediate node of the first binary tree is obtained; the intermediate node of the first binary tree is a node on a node link between a target first leaf node associated with the target business record information and the first root node;

[0018] A first hash value to be verified is determined according to the node information of the target first leaf node and the node information corresponding to the intermediate node of the first binary tree;

[0019] A verification result of the target business record information is determined according to a comparison result of the first hash value to be verified and the first hash value chained by the trusted center.

[0020] In one of the embodiments, the determining the second hash value according to the business record information corresponding to each of the plurality of accounts comprises:

[0021] The business record information corresponding to each of the plurality of accounts is taken as the node information of the corresponding second leaf node;

[0022] A second binary tree is constructed according to the node information of each second leaf node; the node information of each non-leaf node in the second binary tree comprises the hash value of the node information of a child node associated with the non-leaf node, and the child node comprises the second leaf node;

[0023] The second hash value is determined according to the node information of a second root node of the second binary tree.

[0024] In one of the embodiments, after the first and second hash values of the association are sent to the preset trusted center for chaining, the method further comprises:

[0025] If a verification request for target business record information in the preset time period is received, node information corresponding to an intermediate node of the second binary tree is obtained; the intermediate node is a non-leaf node on a node link between a target second leaf node corresponding to the target business record information and a second root node of the second binary tree;

[0026] According to the target business record information and the node information corresponding to the intermediate node of the second binary tree, a second to-be-verified hash value is determined;

[0027] According to a comparison result of the second to-be-verified hash value and the second hash value chained by the trusted center, a verification result of the target business record information is determined.

[0028] In one of the embodiments, the second hash value is determined according to the node information of the second root node of the second binary tree, comprising:

[0029] Based on the node information of the second root node of the second binary tree, hash values of node information of two child nodes associated with the second root node are obtained;

[0030] The hash values of the node information of the two child nodes are spliced, and a second hash value is obtained by performing hash processing on the string obtained after splicing.

[0031] In one of the embodiments, the second binary tree is constructed according to the node information of each of the plurality of second leaf nodes, comprising:

[0032] Each node in a current layer of the second binary tree to be constructed is determined; wherein the first layer of the second binary tree includes a plurality of second leaf nodes;

[0033] A plurality of groups of nodes are obtained, node information corresponding to each node in a next layer is obtained according to hash values of node information of nodes in each group of nodes, and the next layer is determined as the current layer; each group of nodes includes at most two nodes, and the nodes in each group of nodes are different;

[0034] The step of determining each node in the current layer of the second binary tree to be constructed is returned to be executed until the number of nodes in the current layer is less than a preset threshold, and a constructed second binary tree is obtained.

[0035] In one of the embodiments, the business record summary information corresponding to the account confirmed by the account is obtained according to the business record information corresponding to the account, comprising:

[0036] The account corresponding to each piece of business record information is taken as node information of a third leaf node;

[0037] A third binary tree is constructed according to the node information of each third leaf node; the node information of each non-leaf node in the third binary tree includes a hash value of the node information of at least one child node associated with the non-leaf node, and the child node includes the third leaf node;

[0038] According to the node information of the third root node of the third binary tree, the business record summary information confirmed by the account is obtained.

[0039] In a second aspect, the present application also provides a business record storage device. The device comprises:

[0040] The record information collection module is configured to determine the business record information corresponding to each account in a plurality of accounts within a preset time period;

[0041] The summary information generation module is configured to, for each account, obtain the business record summary information corresponding to the account confirmed by the account according to the business record information corresponding to the account;

[0042] The first hash value determination module is configured to determine a first hash value according to the business record summary information corresponding to each account in a plurality of accounts;

[0043] The second hash value determination module is configured to determine a second hash value according to the business record information corresponding to each account in a plurality of accounts;

[0044] The hash value storage module is configured to associate the first hash value with the second hash value, and send the associated first hash value and second hash value to a preset trusted center for chain storage.

[0045] In a third aspect, the present application also provides a computer device. The computer device comprises a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:

[0046] Determine the business record information corresponding to each account in a plurality of accounts within a preset time period;

[0047] For each account, obtain the business record summary information corresponding to the account confirmed by the account according to the business record information corresponding to the account;

[0048] Determine a first hash value according to the business record summary information corresponding to each account in a plurality of accounts;

[0049] Determine a second hash value according to the business record information corresponding to each account in a plurality of accounts;

[0050] associate the first hash value with the second hash value, and send the associated first hash value and the second hash value to a preset trusted center for chain.

[0051] In a fourth aspect, the present application also provides a computer readable storage medium. The computer readable storage medium has a computer program stored thereon, and the computer program, when executed by a processor, implements the following steps:

[0052] determining business record information corresponding to each account in a plurality of accounts within a preset time period;

[0053] For each account, obtaining business record summary information corresponding to the account confirmed by the account according to the business record information corresponding to the account;

[0054] determining a first hash value according to the business record summary information corresponding to each account in a plurality of accounts;

[0055] determining a second hash value according to the business record information corresponding to each account in a plurality of accounts;

[0056] associate the first hash value with the second hash value, and send the associated first hash value and the second hash value to a preset trusted center for chain.

[0057] In a fifth aspect, the present application also provides a computer program product. The computer program product comprises a computer program, and the computer program, when executed by a processor, implements the following steps:

[0058] determining business record information corresponding to each account in a plurality of accounts within a preset time period;

[0059] For each account, obtaining business record summary information corresponding to the account confirmed by the account according to the business record information corresponding to the account;

[0060] determining a first hash value according to the business record summary information corresponding to each account in a plurality of accounts;

[0061] determining a second hash value according to the business record information corresponding to each account in a plurality of accounts;

[0062] associate the first hash value with the second hash value, and send the associated first hash value and the second hash value to a preset trusted center for chain.

[0063] The business record storage method, device, computer equipment, storage medium and computer program product server end can determine the business record information corresponding to each account in a plurality of accounts in a preset time period. For each account, the business record summary information corresponding to the account confirmed by the account can be obtained according to each piece of business record information corresponding to the account. Then, the first hash value can be determined according to the business record summary information corresponding to each account in the plurality of accounts. The server end can also determine the second hash value according to the business record information corresponding to each account in the plurality of accounts. Then, the first hash value and the second hash value can be associated, and the associated first hash value and second hash value are sent to a preset trusted center for chaining. In this application, on the one hand, the first hash value corresponding to the business record summary information of each account can be fixed based on the account as the summary dimension, so that the user can check whether the business record information of the user is tampered with in time. On the other hand, the business party can generate the second hash value based on the plurality of business records obtained, and send the associated first hash value and second hash value to the trusted center for chaining. This facilitates mutual verification of the first hash value and the second hash value, and does not require the business party to modify the blockchain, so that convenience and security can be considered when fixing the business record information. BRIEF DESCRIPTION OF DRAWINGS

[0064] Figure 1 An application environment diagram of a business record storage method in an embodiment;

[0065] Figure 2 A flowchart of a business record storage method in an embodiment;

[0066] Figure 3 A flowchart of a step of determining a first hash value in an embodiment;

[0067] Figure 4 A diagram of a first binary tree in an embodiment;

[0068] Figure 5 A diagram of a mapping relationship between input content and hash value in an embodiment;

[0069] Figure 6 A flowchart of a step of determining a second hash value in an embodiment;

[0070] Figure 7 A diagram of a second binary tree in an embodiment;

[0071] Figure 8a A diagram of a binary tree construction method in an embodiment;

[0072] Figure 8bA schematic diagram of another binary tree construction manner in an embodiment;

[0073] Figure 9 A schematic diagram of a node link in an embodiment;

[0074] Figure 10 A schematic diagram of a third binary tree in an embodiment;

[0075] Figure 11 A schematic diagram of a relationship of business record information in an embodiment;

[0076] Figure 12 A schematic diagram of a chain of a trusted center in an embodiment;

[0077] Figure 13 A structural block diagram of a business record storage device in an embodiment;

[0078] Figure 14 An internal structure diagram of a computer device in an embodiment. DETAILED DESCRIPTION

[0079] In order to make the purposes, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application.

[0080] It should be noted that the business record storage method, device, computer device, storage medium and computer program product provided by the present application can be applied to the field of information security technology, and can also be applied to other related fields.

[0081] In order to facilitate the understanding of the embodiments of the present application, the manner of storing and fixing business information by the related art will be described first. As a new type of decentralized distributed ledger, the block chain has the characteristics of non-tamperability. In recent years, the block chain technology has accelerated development and is constantly trying to land in new fields, especially in the financial, government, social public service, social and other industries. The block chain has been popularized and applied. The tamper-proof nature of the block chain can be well used for evidence management.

[0082] However, the blockchain solution has two problems: on the one hand, the storage method based on the blockchain needs a consensus algorithm, and the nodes in the blockchain need to reach an agreement or determine a target option among multiple options, in which process each node needs to participate in calculation and consume corresponding computing power, which will greatly affect the efficiency and waste computing power, on the other hand, the system of the business party is usually a non-blockchain system, and a large amount of evidence information cannot directly enter the blockchain, and when storing based on the blockchain, a large amount of resources and time are often needed to transform the blockchain system, which has a great impact on daily operation. Moreover, the business party also has the possibility of forging business record information.

[0083] The business record storage method provided by the embodiments of the present application can be applied to an application environment as shown in the figure. Figure 1 The application environment includes a terminal, a server and a trusted center; the terminal can be one or more terminals; the server can be a server of a business party, which can be used to interact with the terminal and obtain business record information associated with an account logged on the terminal; and the trusted center can be a processing center trusted by the server.

[0084] In the present application, a user can handle related businesses through a terminal logged in a corresponding account, and the terminal can interact with the server and generate business record information associated with the account during the business processing process. Within a preset time period, the server can simultaneously communicate with multiple terminals and correspondingly obtain the business record information corresponding to each account in the multiple accounts in the time period. For each account, the server can obtain the business record summary information corresponding to the account confirmed by the account according to each piece of business record information of the account; then, according to the business record summary information corresponding to each account in the multiple accounts, a first hash value is determined, and according to the business record information corresponding to each account in the multiple accounts, a second hash value is determined, after the first hash value and the second hash value are associated, the associated first hash value and second hash value are sent to a preset trusted center for on-chain.

[0085] The terminal communicates with the server through a network, and the server communicates with the trusted center through a network. The terminal can be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, Internet of Things devices and portable wearable devices, etc. The portable wearable device can be a smart watch, a smart bracelet, a head-mounted device, etc.

[0086] The server can be implemented by an independent server or a server cluster composed of multiple servers, and the server can have a corresponding data storage system. The data storage system can store the data required to be processed by the server, and the data storage system can be integrated on the server, or placed on a cloud or other network server.

[0087] In one embodiment, asFigure 2 As shown, a service record storage method is provided, and the method is applied to Figure 1 a server in the service record storage method, including the following steps:

[0088] S210, determining service record information corresponding to each account in a plurality of accounts in a preset time period.

[0089] As an example, the service record information can be record information generated in a service processing process, for example, the service record information can include transaction details.

[0090] In a specific implementation, the server can collect the service record information of the account according to a preset time interval to obtain the service record information of each of the plurality of accounts in the preset time period. The preset time period can also be referred to as a time window.

[0091] For example, the service party can be a business system A of a bank, and a large amount of service record information (such as transaction details) will be obtained in the daily operation process. The server can collect the service record information of a plurality of accounts in the same day in units of days to obtain the service record information of each of the plurality of accounts in the preset time period.

[0092] S220, for each account, obtaining service record summary information corresponding to the account confirmed by the account according to each piece of service record information of the account.

[0093] As an example, the service record summary information can be generated based on each piece of service record information of the same account. The service record summary information corresponds to the service record information under the same account, that is, the service record summary information changes with the change of the service record information. When the service record information under the account changes, the service record summary information also changes accordingly.

[0094] In actual application, after obtaining the service record information of each of the plurality of accounts in the preset time period, the service record information can be summarized in the dimension of the account. Specifically, for each account, the service record summary information confirmed by the account can be obtained according to each piece of service record information of the account in the preset time period.

[0095] In some cases, the service end can archive historical business record information to form historical evidence (such as the content formed by archiving the business record information in a preset time period), and provide it to the judicial organ when needed in the future, but there is still a problem that the business record information stored by the service end is illegally tampered with, for example, the system administrator or hacker tampers with the relevant content, therefore, and the business record summary information can be business record summary information confirmed by the corresponding account. The confirmed business record summary information can also be queried and browsed by the corresponding account. For example, the business party can provide a query interface of the business record information and the business record summary information, so that the user can know the change of the business record information under the account in time, improve the transparency of the information system of the business party, and protect the authenticity and integrity of the customer business record information.

[0096] S230, determining a first hash value according to the business record summary information corresponding to each account in the plurality of accounts.

[0097] After obtaining the business record summary information of the plurality of accounts, the business record summary information of the plurality of accounts can be fixed. Specifically, the hash value corresponding to the business record summary information of the plurality of accounts can be obtained. For the sake of distinction, the hash value is referred to as a first hash value.

[0098] It can be understood that the first hash value is generated based on the confirmed business record summary information of the plurality of accounts, and changes with the change of each business record summary information, that is, when any one of the business record summary information of the plurality of accounts changes, the value of the first hash value will also change. By generating the first hash value corresponding to the plurality of business record summary information, on the one hand, the business record summary information of the plurality of accounts in a preset time period can be simplified and fixed, avoiding storing a large amount of information when fixing, and effectively improving the efficiency of fixing the plurality of business record summary information. On the other hand, by generating the first hash value of each business record summary information in the dimension of the account, it can be determined whether the business record information of one or more accounts in the plurality of accounts is tampered with in time, and the efficiency of checking the business record information of each user is effectively improved.

[0099] S240, determining a second hash value according to the business record information corresponding to each account in the plurality of accounts.

[0100] Further, the server can obtain the hash values corresponding to the plurality of pieces of service record information after obtaining the plurality of pieces of service record information within the preset time period. For ease of distinction, the hash values can be referred to as second hash values. It can be understood that the second hash values generated based on the plurality of pieces of service record information will change with the change of each piece of service record information, that is, when any piece of service record information in the plurality of pieces of service record information changes, the value of the second hash value will also change. By generating the second hash values corresponding to the plurality of pieces of service record information, the plurality of pieces of service record information within the preset time period can be fixed in a simplified manner. When the plurality of pieces of service record information is fixed, storage or fixation of a large amount of service record information is avoided, and the efficiency of fixing the plurality of pieces of service record information is effectively improved.

[0101] S250, associate the first hash value with the second hash value, and send the associated first hash value and second hash value to a preset trusted center for chaining.

[0102] For example, the trusted center can be a data processing center provided by an institution other than the service provider. For example, if the service provider is a bank, the trusted center can include a data processing center provided by an official institution.

[0103] After obtaining the first hash value and the second hash value, the first hash value and the second hash value can be associated, and the associated first hash value and second hash value can be sent to the trusted center for chaining processing.

[0104] Specifically, the trusted center can store one or more groups of associated first hash values and second hash values in a linked list structure. Each group of associated first hash values and second hash values can be the content of a node on the linked list structure. For example, the node of the linked list structure of the trusted center can include the following node content:

[0105] 1. Node time information and other basic information. The node time information is the time of the preset time period corresponding to the first hash value and the second hash value. For example, if the first hash value corresponding to the service record summary information and the second hash value corresponding to the service record information are generated by counting in days, the node time information can be the corresponding date.

[0106] 2、the first hash value of the current node and the first hash processing parameter, the first hash processing parameter can be obtained by performing hash processing on the first hash value and the first hash processing parameter stored by the previous node; the first node for storing the first hash value and the second hash value, wherein the first hash processing parameter can be a preset value, for example, it can be a digital signature announced by a trusted center. The first hash value and the first hash processing parameter based on the content stored by the previous node stored in the current node can be used as a pointer to the previous node, for tracing the nodes and verifying whether the first hash value stored in the linked list structure is tampered with.

[0107] 3、the second hash value of the current node and the second hash processing parameter, the second hash processing parameter can be obtained by performing hash processing on the second hash value and the second hash processing parameter stored by the previous node, the first node for storing the first hash value and the second hash value, the second hash processing parameter of the first node can be a preset value, for example, it can be a digital signature announced by a trusted center. The second hash value and the second hash processing parameter based on the content stored by the previous node stored in the current node can be used as a pointer to the previous node, for tracing the nodes and verifying whether the second hash value stored in the linked list structure is tampered with.

[0108] Since the content stored in each node of the trusted center linked list structure is the content after encryption processing (such as hash processing), that is, the specific business record information cannot be derived from the node content, the data processed by the trusted center can be publicly disclosed to the public, and the business party or account can verify whether the node content on the linked list structure is tampered with according to the public information provided by the trusted center, that is, whether it can be traced to the starting node through the node content on the linked list structure.

[0109] 4、the service end corresponding to the business party. The trusted center can set corresponding linked list structures for data storage for the first hash value and the second hash value of the associated service end provided by each business party, for example, linked list structure 1 and linked list structure 2 can be set, wherein the linked list structure 1 is used to store the first hash value and the second hash value of the associated service end provided by the business party A, and the linked list structure 2 is used to store the first hash value and the second hash value of the associated service end provided by the business party B.

[0110] In the business record storage method, the server can determine the business record information corresponding to each account in the plurality of accounts within a preset time period. For each account, the server can obtain the business record summary information corresponding to the account confirmed by the account according to each piece of business record information corresponding to the account. Then, the server can determine the first hash value according to the business record summary information corresponding to each account in the plurality of accounts. The server can also determine the second hash value according to the business record information corresponding to each account in the plurality of accounts. Then, the server can associate the first hash value with the second hash value and send the associated first hash value and second hash value to a preset trusted center for chaining. In this application, on the one hand, the first hash value corresponding to the business record summary information of each account can be fixed based on the account as the summary dimension, so that the user can check whether the business record information of the user is tampered with in time. On the other hand, the business party can generate the second hash value based on the plurality of business records obtained by the business party, and send the associated first hash value and second hash value to the trusted center for chaining. This can facilitate the mutual verification of the first hash value and the second hash value, and does not require the business party to modify the blockchain, so that the convenience and security of the business record information can be considered when the business record information is fixed.

[0111] In one embodiment, as shown in FIG. 2B, S230 can include the following steps: Figure 3

[0112] S231, the business record summary information corresponding to each account in the plurality of accounts is taken as the node information of the corresponding first leaf node.

[0113] As an example, the node information can be the information stored on the corresponding node.

[0114] In practical applications, the first hash value corresponding to the business record summary information of the plurality of accounts can be obtained by constructing a binary tree. For convenience of distinction, the binary tree generated for the business record summary information can be referred to as a first binary tree. The first binary tree can include a plurality of nodes at different levels. The leaf node in the first binary tree can be referred to as a first leaf node. The leaf node can be a node without a child node in the binary tree.

[0115] Specifically, after obtaining the plurality of business record summary information, the number of leaf nodes in the first binary tree can be determined based on the number of business record summary information. The number of leaf nodes is the same as the number of business record summary information. Then, each piece of business record summary information can be taken as the node information of each first leaf node in the first binary tree to be constructed.

[0116] ​Exemplarily, in the process of constructing the first binary tree, the arrangement order of the leaf nodes corresponding to the business record summary information can be sorted according to the account identifier of the corresponding account or the identity identifier of the user associated with the account. The order can be allocated when the account is opened. The determined arrangement order can no longer be changed, but the node information corresponding to the node can change. When there are newly added accounts subsequently, the first binary tree can be expanded horizontally.

[0117] S232, constructing a first binary tree according to the node information of each first leaf node; the node information of each non-leaf node in the first binary tree includes the hash value of the node information of at least one child node associated with the non-leaf node, and the child node includes the first leaf node.

[0118] After obtaining the plurality of first leaf nodes and the node information corresponding thereto, the first binary tree can be constructed according to the node information of each of the plurality of first leaf nodes. Specifically, when constructing the first binary tree, the plurality of first leaf nodes can be taken as the starting point, and the first binary tree can be constructed from the leaf nodes to the root nodes.

[0119] When constructing the first binary tree, a plurality of non-leaf nodes can be generated. The non-leaf node refers to a node having a corresponding child node. The child node of the non-leaf node can be one or more, for example, two. For each non-leaf node, the node information of the non-leaf node can be generated according to the hash value of the node information of each associated child node.

[0120] Taking the construction of the non-leaf nodes corresponding to the plurality of leaf nodes as an example, when generating the non-leaf nodes, at least one leaf node associated with the current non-leaf node to be generated can be determined from the plurality of leaf nodes as the child node of the non-leaf node. Then, the hash value of the node information of each child node can be obtained. For example, the business record summary information corresponding to each leaf node can be hashed, and then the hash values of the node information of each child node can be determined as the node information of the non-leaf node. Taking the non-leaf node A as an example, the non-leaf node A can have two associated child nodes a1 and a2. After the node information of the child nodes a1 and a2 is hashed, the obtained hash values H1 and H2 can be taken as the node information of the non-leaf node A.

[0121] Referring to the above manner, each non-leaf node in the first binary tree can be constructed layer by layer, Figure 4 An example of a first binary tree is shown.

[0122] S233, obtaining a first hash value according to the node information of the first root node of the first binary tree.

[0123] After the first binary tree is acquired, the node information of the root node of the first binary tree can be acquired. In order to distinguish, the root node of the first binary tree is referred to as the first root node in this embodiment. Then, the first hash value can be determined according to the node information of the first root node. For example, the hash values of the node information of the two child nodes associated with the first root node can be acquired based on the node information of the first root node of the first binary tree; the hash values of the node information of the two child nodes are spliced, and the first hash value is obtained by hashing the spliced string.

[0124] Specifically, the mapping relationship between the input content (for example, the evidence x to be solidified) and the hash value H(x) can be as shown in Figure 5 According to the properties of the hash function, it can be known that a slight change in the input content x will cause a large change in the hash value H(x), and H(x) can be used as the primary key of x. H(x) is commonly referred to as the fingerprint of x.

[0125] When the first binary tree is generated, according to the collision resistance of the hash function, it can be known that the hash values acquired are different when the input contents are different. In combination with the above properties, it can be known that when the node information of each child node associated with the non-leaf node changes, the node information of the non-leaf node will also change accordingly. With the node information of the multiple layers of non-leaf nodes of the first binary tree changing in turn, the node information of the first root node will also change significantly.

[0126] In this embodiment, the corresponding first hash value can be acquired through the node information of the first root node of the first binary tree, the business record summary information of each account can be accurately checked based on the first hash value, the account dimension efficient solidification is realized, and due to the irreversibility of the hash algorithm, the leakage of the business record summary information and the business record information of each account can be effectively avoided, which has high security.

[0127] In one embodiment, after S250, the method can further include the following steps:

[0128] S261, if a verification request for the target business record information in the preset time period is received, the node information corresponding to the intermediate node of the first binary tree is acquired.

[0129] The intermediate node of the first binary tree is a node on the node link between the target first leaf node associated with the target business record information and the first root node.

[0130] As an example, the target business record information can be business record information to be verified, and the user can verify the business record information generated in the business process, such as the transfer record corresponding to the transfer service, or the exchange record corresponding to the foreign currency exchange service.

[0131] In a specific implementation, the user can request to query the business record information generated in a preset time period in the account corresponding to the user, and send a verification request for the target business record information in the preset time period to the server.

[0132] In response to the received verification request, the server can determine the first leaf node associated with the target business record information from the first binary tree generated in advance as the target first leaf node. The first leaf node associated with the target business record information is a first leaf node whose node information contains the business record summary information corresponding to the target business record information. For example, after receiving the verification request for the target business record information, the account associated with the target business record information and the business record summary information corresponding to each business record information of the account in the preset time period can be determined, and then the first leaf node corresponding to the business record summary information is determined as the target first leaf node associated with the target business record information.

[0133] After the target first leaf node is determined, the node link between the target first leaf node and the first root node can be determined, the nodes on the node link are obtained as the intermediate nodes between the target first leaf node and the first root node, and the node information corresponding to the intermediate nodes is obtained.

[0134] The intermediate nodes can not include the first root node, and the node link between the target first leaf node and the first root node can be a node link from the target first leaf node to the first root node. The node link can also be referred to as a residual branch of the first binary tree. In some examples, the user can obtain the node information of the intermediate node associated with the account and perform the relevant verification by himself.

[0135] S262, determining the first to-be-verified hash value according to the node information of the target first leaf node and the node information corresponding to the intermediate nodes of the first binary tree.

[0136] Specifically, since the intermediate nodes are the nodes between the target first leaf node and the first root node in the first binary tree, in other words, the intermediate nodes are non-leaf nodes in the first binary tree, and the node information of the non-leaf node includes the hash values corresponding to the child nodes associated with the non-leaf node.

[0137] Based on this, after determining the target first leaf node corresponding to the target business record information, the hash value corresponding to the target first leaf node can be obtained, and it is determined whether the hash value is the same as one of the hash values contained in the intermediate node connected with the target first leaf node. If they are the same, the new hash value can be obtained by combining the hash value and another hash value in the intermediate node, and the above determination process is continued to be repeated. For example, if the hash value corresponding to the node information of the target first leaf node A1 is H1, and the node information of the intermediate node B1 connected with the target first leaf node A1 is H1'-H2', after obtaining H1, H1 and H1' can be compared. If they match, the hash value H3 is obtained by combining H1 and H2', and compared with H3' in the node information H3'-H4 of the next intermediate node C1.

[0138] In the process of determining the node information of the next intermediate node according to the current hash value, if the comparison of the hash value matches every time, the node information of the first binary tree root node can be calculated, which is based on the node information of the target first leaf node and can also be called the to-be-verified node information. Then, the first to-be-verified hash value can be determined according to the node information of the first binary tree root node. If it is determined in any matching process that the hash value calculated at present does not match the hash value carried by the node information of the next intermediate node, it can be determined that the business record information is tampered with, and there is a possibility that the target business record information is tampered with.

[0139] S263, determining the verification result of the target business record information according to the comparison result of the first to-be-verified hash value and the first hash value chained on the trusted center.

[0140] After obtaining the first to-be-verified hash value, the first to-be-verified hash value can be compared with the first hash value chained on the trusted center in advance to obtain a comparison result. If the comparison result indicates that they match, it can be determined that the target business record information passes the verification. If the comparison result indicates that they do not match, it is determined that the target business record information does not pass the verification.

[0141] In the embodiment, when verifying the target business record information, the node information of the intermediate node on the corresponding node link can be obtained and hashed, and the first to-be-verified hash value is obtained to quickly verify whether the target business record information is tampered with. In addition to saving computing power, it also has high calculation and verification efficiency.

[0142] In one embodiment, as shown in Figure 6 S240 can include the following steps:

[0143] S241, the business record information corresponding to each account in the plurality of accounts is taken as the node information of the second leaf node.

[0144] In actual application, the second hash value corresponding to the business record summary information of the plurality of accounts can be obtained by constructing a binary tree. For ease of distinction, the binary tree directly generated by using the plurality of business record information can be referred to as a second binary tree. The second binary tree can include a plurality of nodes of different levels, wherein the leaf node in the second binary tree can be referred to as a second leaf node, and the leaf node can refer to a node without a child node in the binary tree.

[0145] In actual application, after obtaining the plurality of business record information, the number of leaf nodes in the second binary tree can be determined based on the number of business record information, and the number of leaf nodes is the same as the number of business record information. Then, each piece of business record information can be taken as the node information of each first leaf node in the second binary tree to be constructed.

[0146] S242, the second binary tree is constructed according to the node information of each second leaf node; the node information of each non-leaf node in the second binary tree includes the hash value of the node information of the child node associated with the non-leaf node, and the child node includes the second leaf node.

[0147] After obtaining the plurality of second leaf nodes and the node information corresponding thereto, the second binary tree can be constructed according to the node information of the plurality of second leaf nodes. Specifically, when the second binary tree is constructed, the plurality of second leaf nodes can be taken as the starting point, and the second binary tree can be constructed from the leaf node to the root node.

[0148] When the second binary tree is constructed, a plurality of non-leaf nodes can be generated. The non-leaf node refers to a node having a corresponding child node. The child node of the non-leaf node can be one or a plurality, for example, two. For each non-leaf node, the node information of the non-leaf node can be generated according to the hash value of the node information of each child node associated therewith.

[0149] Taking the construction of the non-leaf node corresponding to the plurality of leaf nodes as an example, when the non-leaf node is generated, at least one leaf node associated with the current non-leaf node to be generated can be determined from the plurality of leaf nodes as the child node of the non-leaf node. Then, the hash value of the node information of each child node can be obtained, for example, the business record summary information corresponding to each leaf node can be hashed, and then the hash value of the node information of each child node can be determined as the node information of the non-leaf node.

[0150] In an optional embodiment, in the process of constructing the second binary tree, the plurality of second leaf nodes can be sorted. For example, the hash value corresponding to the node information of each second leaf node can be obtained first, and the plurality of second leaf nodes can be sorted according to the hash values, so as to facilitate subsequent related queries. For example, the following sorting can be performed:

[0151] H(x1) < H(x2) < H(x3) <... < H(x n-1 ) < H(x n )

[0152] Wherein, x1, x2, … x n is the node information of each second leaf node, i.e. the business record information.

[0153] After obtaining the order, the plurality of business record information can be sorted according to the order, and used as the node information of the leaf node of the second binary tree, and the second binary tree is constructed from the leaf to the root.

[0154] S243, determining a second hash value according to the node information of the second root node of the second binary tree.

[0155] After obtaining the second binary tree, the node information of the root node of the second binary tree is obtained. In order to distinguish, the root node of the second binary tree is referred to as the second root node in this embodiment. Then, the second hash value can be determined according to the node information of the second root node.

[0156] In this embodiment, the second hash value can be obtained through the node information of the second root node of the second binary tree, and the second hash value can be used to accurately verify whether the plurality of business record information is tampered with, so as to realize efficient and fixed account dimension. At the same time, due to the irreversibility of the hash algorithm, the leakage of each business record information can be effectively avoided, and the security is high.

[0157] In an embodiment, S243, determining a second hash value according to the node information of the second root node of the second binary tree, comprising:

[0158] Based on the node information of the second root node of the second binary tree, obtaining the hash values of the node information of two child nodes associated with the second root node; concatenating the hash values of the node information of the two child nodes, and performing hash processing on the concatenated string to obtain the second hash value.

[0159] Specifically, after the second binary tree is constructed, the hash values of the node information of two child nodes associated with the second root node can be obtained from the node information of the second root node. Then, the two hash values can be concatenated to obtain a concatenated string, and the concatenated string can be subjected to hash processing to obtain the second hash value.

[0160] In the embodiment, the node information of the second root node is acquired, and the corresponding second hash value is generated. On the one hand, the second hash value is used to solidify the plurality of pieces of service record information constituting the second binary tree at one time. When the solidified service record information is stored subsequently, only the second hash value needs to be stored, and the completed second binary tree does not need to be stored, thereby effectively saving storage space. On the other hand, according to the property of the hash function, the modification of any piece of service record information in the second binary tree will cause the change of the second root node. The second hash value can be used to quickly verify the full evidence set (i.e., all pieces of service record information in a preset time period).

[0161] In one embodiment, S242 constructs the second binary tree according to the node information of each of the plurality of second leaf nodes, which can include the following steps:

[0162] determining each node in a current layer of the second binary tree to be constructed; acquiring a plurality of groups of nodes, obtaining the node information corresponding to each node in a next layer according to the hash values of the nodes in each group of nodes, and determining the next layer as the current layer; returning to perform the step of determining each node in the current layer of the second binary tree to be constructed until the number of nodes in the current layer is less than a preset threshold, and obtaining the constructed second binary tree.

[0163] The first layer of the second binary tree includes a plurality of second leaf nodes; each group of nodes includes at most two nodes, and the nodes in each group of nodes are different.

[0164] Specifically, the second binary tree can be constructed layer by layer. When the current layer of the second binary tree is constructed, each node in the current layer can be determined, and the number of nodes in the current layer can be acquired. In the first layer of the second binary tree, each second leaf node can be determined as a node of the current layer.

[0165] After the nodes in the current layer are determined, the plurality of nodes in the current layer can be divided to obtain a plurality of groups of nodes, each group of nodes including one or two nodes.

[0166] Specifically, when the plurality of groups of nodes are divided, the number of nodes in the current layer can be used for division. If the number of nodes in the current layer is even, each two nodes can be divided into a group. If the number of nodes in the current layer is odd, each two nodes can be divided into a group first, until one node is left un-divided, and the node is taken as a separate group.

[0167] After the plurality of groups of nodes are divided, the node information corresponding to each node in the next layer can be obtained according to the hash values of the node information of each node in each group of nodes. For example, the hash values of the node information of each node in each group of nodes can be spliced (for example, spliced with “|”), and the obtained string after splicing can be used as the node information of the corresponding node in the next layer. The node in the next layer can also be referred to as the parent node corresponding to each node in the same group of nodes in the current layer. In this way, each node in the next layer can be obtained.

[0168] Then, the next layer can be determined as the current layer, and the step of determining each node in the second binary tree to be constructed in the current layer is returned to be executed until the number of nodes in the current layer is less than a preset threshold (for example, 2), and the constructed second binary tree is obtained.

[0169] Figure 7 An example of a second binary tree is shown, in which the leaf nodes can be pushed to the root node (root) layer by layer. If the number of nodes in the current layer is odd, when constructing the rightmost node in the next layer, the “V” type (as shown in Figure 8a ) construction method can be changed to the “I” type (as shown in Figure 8b ) construction method, that is, the rightmost node in the next layer can be based on the “I” type construction method, and the rest is based on the “V” type construction method. In the “V” type construction method, the hash value of the left shoulder is placed on the left, and the hash value of the right shoulder is placed on the right. The “I” type lacks the H value on the right, which can be regarded as a null value.

[0170] It can be understood that the construction method of the first binary tree and the third binary tree in the present application can be the same as the construction method of the second binary tree in the present embodiment. For details, reference can be made to the description of the construction process of the second binary tree, which will not be described herein again.

[0171] In one embodiment, after S250, the method can further include the following steps:

[0172] S271, if a verification request for the target service record information in a preset time period is received, obtaining the node information corresponding to the intermediate node of the second binary tree.

[0173] The intermediate node is a non-leaf node on the node link between the target second leaf node corresponding to the target service record information and the second root node of the second binary tree.

[0174] As an example, the target service record information can be service record information to be verified for authenticity, such as a transfer record corresponding to a transfer remittance service, or a conversion record corresponding to a foreign currency exchange service.

[0175] In actual application, a user can request to query the business record information generated in a preset time period under the account corresponding to the user, and send a verification request for the target business record information in the preset time period to the server.

[0176] In response to the received verification request, the server can determine the second leaf node corresponding to the target business record information from the pre-generated second binary tree as a target second leaf node. The second leaf node corresponding to the target business record information is a second leaf node whose node information contains the target business record information. After the target second leaf node is determined, the node link between the target second leaf node and the second root node can be determined, the nodes on the node link are obtained as the intermediate nodes between the target second leaf node and the second root node, and the node information corresponding to the intermediate nodes is obtained.

[0177] The intermediate nodes can not include the second root node, and the node link between the target second leaf node and the second root node can be a node link from the target second leaf node to the second root node, which can also be referred to as a residual branch of the second binary tree.

[0178] S272, determining a second to-be-verified hash value according to the target business record information and the node information corresponding to the intermediate node of the second binary tree.

[0179] Specifically, since the intermediate node is a node between the target second leaf node and the second root node in the second binary tree, in other words, the intermediate node is a non-leaf node in the second binary tree, and the node information of the non-leaf node includes the hash values corresponding to the child nodes associated with the non-leaf node.

[0180] Based on this, after the target second leaf node corresponding to the target business record information is determined, the hash value corresponding to the target second leaf node can be obtained, and it is determined whether the hash value is the same as one of the hash values contained in the intermediate node connected to the target second leaf node. If they are the same, a new hash value can be obtained by combining the hash value and another hash value in the intermediate node, and the above determination process can be repeated.

[0181] In the process of determining the node information of the next intermediate node according to the current hash value, if the comparison of the hash values matches each time, the node information of the root node of the second binary tree can be calculated, which is based on the node information of the target second leaf node and can also be referred to as to-be-verified node information. Then, the second to-be-verified hash value can be determined according to the node information of the root node of the second binary tree. If the hash value calculated at any time does not match the hash value carried by the node information of the next intermediate node in any matching, it can be determined that the business record information is tampered with, and there is a possibility that the target business record information is tampered with.

[0182] S273, determining the verification result of the target business record information according to the comparison result of the second to-be-verified hash value and the second hash value chained on the trusted center.

[0183] After obtaining the second to-be-verified hash value, the second to-be-verified hash value can be compared with the second hash value chained on the trusted center in advance to obtain a comparison result. If the comparison result indicates that the two match, it can be determined that the target business record information passes the verification. If the comparison result indicates that the two do not match, it is determined that the target business record information fails the verification.

[0184] Figure 9 The node link containing the target business record information to be verified (gray node in the figure) is shown. When verifying the target business record information, only the node information on the node link needs to be verified. Part of the verification process can be as follows:

[0185] H(x) = ① H on the left of the node

[0186] H(①) = ② H on the right of the node

[0187]

[0188] Repeat the above steps and continue to calculate down until the second to-be-verified hash value ROOT2 is obtained. If ROOT2 is equal to the second hash value ROOT1 stored in the trusted center in advance, it can be determined that the target business record information has not been tampered with under the condition that ROOT1 has not been tampered with.

[0189] In this embodiment, when verifying the target business record information, the node information of the intermediate nodes on the corresponding node link can be obtained and hashed to quickly verify whether the target business record information has been tampered with based on the obtained second to-be-verified hash value. While saving computing power, it has high calculation and verification efficiency.

[0190] It can be understood that when receiving the verification request for the target business record information, the first binary tree and the second binary tree can be verified at the same time to improve the reliability of the verification result.

[0191] In one embodiment, S220 obtains the business record summary information corresponding to the account confirmed by the account according to the business record information corresponding to the account, which can include the following contents:

[0192] S221, taking each piece of business record information corresponding to the account as the node information of the corresponding third leaf node.

[0193] In actual applications, the business record summary information corresponding to the plurality of pieces of business record information of the same account can be obtained by constructing a binary tree. For ease of distinction, the generated binary tree can be referred to as a third binary tree (also referred to as an account tree). The third binary tree can include a plurality of nodes at different levels, and the leaf nodes in the third binary tree can be referred to as third leaf nodes.

[0194] Specifically, after obtaining the business record information under the same account, the number of third leaf nodes in the third binary tree can be determined based on the number of pieces of business record information. The number of third leaf nodes is the same as the number of pieces of business record information. Each piece of business record information can be used as node information of each third leaf node in the third binary tree to be constructed. Of course, in some examples, the third binary tree corresponds to an account. A leaf node corresponding to account information, such as an account identifier (such as an ID card number) or a mapping relationship between the account and a corresponding business party (such as a bank to which the account belongs), can also be added to the third binary tree.

[0195] S222, constructing a third binary tree according to the node information of each third leaf node. The node information of each non-leaf node in the third binary tree includes a hash value of the node information of at least one child node associated with the non-leaf node, and the child node includes a third leaf node.

[0196] After obtaining the plurality of third leaf nodes and the node information corresponding thereto, the third binary tree can be constructed according to the node information of each of the plurality of third leaf nodes. When constructing the third binary tree, the plurality of third leaf nodes can be used as starting points, and the third binary tree can be constructed from the leaf nodes to the root nodes.

[0197] In some embodiments, the third binary tree can be constructed in the same manner as the first binary tree and the second binary tree. Details are not described herein again, and can be referred to the construction process of the first binary tree and the second binary tree.

[0198] In some other embodiments, the third binary tree can be expanded in multiple levels, Figure 10 A structure of a third binary tree is shown. The node 0 records the mapping relationship between the account number and the business party. The node 0 can store the account identifier (such as the ID card number of the user) of the account and the interaction public key information. The nodes 1 to 18 are transaction leaf nodes of the account, and record specific business record information. The gray nodes are quasi-root nodes. They were the root nodes of the third binary tree, but as the transaction volume of the account increases in a preset time period, they are gradually changed into intermediate nodes of the upper binary tree. According to the query requirement of the user, the user can query and download the complete third binary tree associated with the account, or can only store the upper recent tree leaves.

[0199] S223, obtaining the account-confirmed service record summary information according to the node information of the third root node of the third binary tree.

[0200] After the third binary tree is obtained, the node information of the root node of the third binary tree can be obtained. In order to distinguish, the root node of the third binary tree is referred to as the third root node in this embodiment. Then, the confirmed service record summary information can be determined according to the node information of the third root node.

[0201] For example, the hash values of the node information of the two child nodes associated with the third root node can be obtained based on the node information of the third root node of the third binary tree; the hash values of the node information of the two child nodes are spliced, and the hash processing is performed on the string obtained after splicing, and the processing result is taken as the confirmed service record summary information.

[0202] In this embodiment, the third binary tree is generated by using the service record information of the same account, and the service record summary information generated according to the root node information of the third binary tree can not only lock the historical service record information of the account through the root node of the third binary tree, but also provide quick backtracking verification for daily query of recent services.

[0203] In order for those skilled in the art to better understand the above steps, the embodiments of the present application are exemplarily illustrated by an example below, but it should be understood that the embodiments of the present application are not limited thereto.

[0204] In a specific implementation, the user and the business party can register an identity, and in a subsequent interaction process, the relevant interaction information is encrypted by using an asymmetric encryption technology (for example, a national secret SM2 algorithm). Specifically, the user and the business party can each have a set of independent public key and private key, and identity authentication and secure communication are performed through digital signature: the user can send a secure access request to the service end of the business party through a terminal, and after receiving the secure access response returned by the service end, identity information is provided for identity authentication, and the service end can negotiate a key with the user after the identity information of the user is authenticated.

[0205] Among them, the public key of the business party is publicized to all users, and the user can complete the mapping and binding between its public key and the account when opening an account with the business party. In each transaction between the user and the business party through the corresponding account, the business party and the account identify each other, complete the identity authentication of each other, so as to ensure the credibility of the transaction between the two parties, so that the whole transaction is real and irrefutable.

[0206] In the business processing process, for example, Figure 11As shown, the business party can periodically divide the currently obtained multiple business record information according to the business time (for example, once a day), and each account (for example, user A) in a unit time (that is, in a preset time period) corresponds to a transaction in the transaction network. Each arrow in the transaction network corresponds to a transaction, the start of the arrow is the transfer-out party, and the end is the transfer-in party. The horizontal dashed line represents the resource flow between different accounts, and the vertical solid line represents the resource flow within the same account.

[0207] Therefore, in a unit time, all the businesses of the business party constitute a horizontal and vertical interlaced transaction network. The business corresponding to one or more horizontal dashed lines can generate a second binary tree (also referred to as a horizontal evidence tree); the business corresponding to each vertical solid line can generate a third binary tree. Each account can view and verify the corresponding third binary tree, and then generate a corresponding first binary tree (also referred to as a vertical evidence tree). The two lock the transaction history from different dimensions: the former locks all transactions of the business party within a preset time from the overall dimension, and the latter locks the entire transaction history of each account from the individual account dimension. The two are interlaced and verified with each other.

[0208] After the business party generates the first binary tree and the second binary tree, the corresponding first hash value and the second hash value can be obtained, and the first hash value and the second hash value can be stored in the chain table structure of the trusted center (for example, in the banking industry, the trusted center can be a data processing center provided by the banking regulatory authority). The chain set by the trusted center can be set with an explanatory text (announcement). The trusted center digitally signs the report, and the public can verify the digital signature (and obtain the plaintext of the announcement) from the public key of the trusted center. The trusted center hashes the digital signature to obtain the starting node of the chain. The storage structure of the chain can be as shown in Figure 12 .

[0209] In verifying whether the business record information x is tampered with, the following steps can be included:

[0210] (1) Horizontally, x is a leaf of a certain residual branch of a second binary tree of business party A;

[0211] (2) The second root node of the second binary tree corresponds to the second hash value root a1 in a node on the chain in the trusted center. Therefore, in one of the verification steps, x can be used to first walk along the residual branch in the second binary tree to root a1 , and then walk along the chain from root a1 in the trusted center to the starting node of the chain, thereby verifying x. The data along the way jointly constitutes an evidence chain.

[0212] (3) Verification of the first binary tree and the third binary tree. On the one hand, customer B can query the corresponding third binary tree of customer B to confirm whether x exists in the third binary tree of customer B; and customer B can also view whether x currently viewed by customer B is tampered through the first binary tree, that is, the hash value corresponding to the third root node of the third binary tree of customer B can be obtained root a2 , and then the residual branch of the first binary tree starting from root a2 can be walked to root a3 , and then the chain of the trusted center starting from root a3 of the residual branch can be walked to the starting node of the chain to realize verification of x.

[0213] (4) Verification of a transaction counterparty. For example, customer B transfers money to customer C, and B can contact C to query and verify the third binary tree of B to confirm whether x exists.

[0214] Regarding forensics, when receiving a forensics application, business party A can first find relevant evidence and dates through the database of the traditional system, and then locate the first binary tree, the second binary tree and the third binary tree of the day through the dates. Through the hash value of the evidence, the corresponding evidence leaf is found, and the residual branch from the leaf to the root is the evidence and proof, and the node information of each intermediate node on the residual branch can be provided to the applicant.

[0215] Since the chain of the trusted center is public, each user can query by himself / herself, and the user can also query his / her own third binary tree, and obtain the residual branch in the first binary tree related to the root node hash value of the third binary tree from the business party A, in addition, the transaction counterparty can also be consulted to query the third binary tree, and if the results of business party A, customer B and customer C are consistent after comparison, it can be determined that the result is reliable.

[0216] For example, a business party generates a business record information of 10000 yuan transfer from Zhang San to Li Si on a certain day (for example, January 1, 2022), and the system records the evidence X (i.e. the business record information) as 10000 yuan transfer from Zhang San to Li Si, and the business party constructs a binary tree with all the business record information of the day to form a second binary tree as shown in Figure 7 , and obtains the hash value corresponding to the second root node root 20220101 .

[0217] In addition, the third binary tree of Zhang San and Li Si can also be constructed respectively, and the first binary tree can be generated according to the root nodes of the third binary trees of the current multiple accounts, and Zhang San and Li Si can access the first binary tree through the interface provided by the business party.

[0218] Further, the business party can obtain the first hash value ROOT 20220101Second Ha5 value root 20220101 The information is notarized and published by the Trusted Center, and recorded on the chain nodes of the Trusted Center on that day (January 1, 2022).

[0219] It was published online and made available to the public.

[0220] Regarding the application of the evidence chain in the Trusted Center, if Zhang San has a dispute with the business party and believes that 100,000 yuan was transferred on January 1, 2022, the business party can send X to ROOT. 20220101 root 20220101 And submissions to the relevant chain of trusted sources as evidence. (By...)

[0221] Since the entire chain is publicly disclosed and cannot be tampered with, Zhang San, Li Si, and the business party can all verify the relevant node information in the first binary tree, the second binary tree, and the third binary tree based on the above information to determine that evidence X has not been tampered with.

[0222] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, as mentioned above...

[0223] At least some steps in the flowcharts involved in the various embodiments may include multiple steps or multiple stages. These five steps or stages are not necessarily completed at the same time, but may be executed at different times.

[0224] The execution order of stages is not necessarily sequential; rather, they can be executed alternately or in turn with other steps or at least a portion of steps or stages within other steps.

[0225] Based on the same inventive concept, this application also provides a business record storage device for implementing the aforementioned business record storage method. The solution provided by this device addresses the problem and is similar to the implementation described in the above-described method.

[0226] Since the solutions are similar, the specific limitations of one or more business record storage device embodiments provided below can be found in the limitations of the business record storage method above, and will not be repeated here.

[0227] In one embodiment, such as Figure 13 As shown, a business record storage device is provided, the device comprising:

[0228] The information collection module 1301 is used to determine the business record information corresponding to each account among multiple accounts within a preset time period.

[0229] The summary information generation module 1302 is configured to, for each account, acquire, according to the business record information corresponding to the account, the business record summary information corresponding to the account confirmed by the account;

[0230] The first hash value determination module 1303 is configured to determine, according to the business record summary information corresponding to each account in the plurality of accounts, a first hash value;

[0231]

[0232] The second hash value determination module 1304 is configured to determine, according to the business record information corresponding to each account in the plurality of accounts, a second hash value;

[0233]

[0234] The hash value storage module 1305 is configured to associate the first hash value with the second hash value, and send the associated first hash value and second hash value to a preset trusted center for chaining.

[0235] In one embodiment, the first hash value determination module 1303 is configured to:

[0236] The business record summary information corresponding to each account in the plurality of accounts is taken as node information of a corresponding first leaf node;

[0237] A first binary tree is constructed according to the node information of each first leaf node; the node information of each non-leaf node in the first binary tree includes a hash value of the node information of at least one child node associated with the non-leaf node, and the child node includes the first leaf node;

[0238] The first hash value is acquired according to the node information of a first root node of the first binary tree.

[0239] In one embodiment, the device further includes:

[0240] The first intermediate node determination module is configured to, if a verification request for target business record information in the preset time period is received, acquire node information corresponding to an intermediate node of the first binary tree; the intermediate node of the first binary tree is a node on a node link between a target first leaf node associated with the target business record information and the first root node;

[0241] The first verification module is configured to determine a first hash value to be verified according to the node information of the target first leaf node and the node information corresponding to the intermediate node of the first binary tree;

[0242] ​​The first check result acquisition module is configured to determine a check result of the target business record information according to a comparison result of the first to-be-checked hash value and the first hash value chained by the trusted center.

[0243] In one embodiment, the second hash value determination module 1304 is configured to:

[0244] The business record information corresponding to each account in the plurality of accounts is taken as node information of a corresponding second leaf node;

[0245] A second binary tree is constructed according to the node information of each second leaf node; the node information of each non-leaf node in the second binary tree includes a hash value of node information of a child node associated with the non-leaf node, and the child node includes the second leaf node;

[0246] A second hash value is determined according to the node information of a second root node of the second binary tree.

[0247] In one embodiment, the apparatus further includes:

[0248] The second intermediate node determination module is configured to, if a check request for target business record information in the preset time period is received, acquire node information corresponding to an intermediate node of the second binary tree; the intermediate node is a non-leaf node on a node link between a target second leaf node corresponding to the target business record information and a second root node of the second binary tree;

[0249] The second check module is configured to determine a second to-be-checked hash value according to the target business record information and the node information corresponding to the intermediate node of the second binary tree;

[0250] The second check result acquisition module is configured to determine a check result of the target business record information according to a comparison result of the second to-be-checked hash value and the second hash value chained by the trusted center.

[0251] In one embodiment, the second hash value determination module 1304 is configured to:

[0252] Based on the node information of the second root node of the second binary tree, a hash value of node information of two child nodes associated with the second root node is acquired;

[0253] The hash values of the node information of the two child nodes are spliced, and a hash process is performed on a string obtained after splicing to obtain a second hash value.

[0254] In one embodiment, the second hash value determination module 1304 is configured to:

[0255] determine each node in a current layer of the second binary tree to be constructed; wherein a first layer of the second binary tree includes a plurality of second leaf nodes;

[0256] obtain a plurality of groups of nodes, obtain node information corresponding to each node in a next layer according to a hash value of node information of each node in each group of nodes, and determine the next layer as the current layer; each group of nodes includes at most two nodes, and the nodes in each group of nodes are different;

[0257] return to the step of determining each node in the current layer of the second binary tree to be constructed until the number of nodes in the current layer is less than a preset threshold, and obtain the constructed second binary tree.

[0258] In an embodiment, the summary information generation module 1302:

[0259] take each piece of business record information corresponding to the account as node information of a corresponding third leaf node;

[0260] construct a third binary tree according to node information of each third leaf node; node information of each non-leaf node in the third binary tree includes a hash value of node information of at least one child node associated with the non-leaf node, and the child node includes the third leaf node;

[0261] obtain business record summary information confirmed by the account according to node information of a third root node of the third binary tree.

[0262] Each module in the above business record storage device can be realized by software, hardware, and a combination thereof, in whole or in part. Each module can be embedded in or independent of a processor in a computer device in hardware form, or can be stored in a memory in a computer device in software form, so as to be called and executed by a processor to perform operations corresponding to each module.

[0263] In an embodiment, a computer device is provided, which can be a server, and an internal structure diagram of the computer device can be as shown in FIG. 8. Figure 14As shown in the figure. The computer device includes a processor, a memory, an input / output interface (I / O for short) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through the system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capability. The memory of the computer device includes a non-volatile storage medium and an 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 the computer program in the non-volatile storage medium. The database of the computer device is used to store business record information and its corresponding binary tree. The input / output 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 through network connection. The computer program is executed by the processor to implement a business record storage method.

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

[0265] In one embodiment, a computer device is provided, comprising a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the following steps:

[0266] Determine the business record information of each account in a plurality of accounts within a preset time period;

[0267] For each of the accounts, according to each piece of business record information of the account, obtain the business record summary information confirmed by the account;

[0268] Obtain a first hash value corresponding to the business record summary information of a plurality of the accounts;

[0269] Obtain a second hash value corresponding to a plurality of the business record information;

[0270] Associate the first hash value with the second hash value, and send the associated first hash value and second hash value to a preset trusted center for chaining.

[0271] In one embodiment, the processor executing the computer program further implements the steps in the other embodiments.

[0272] In one embodiment, a computer readable storage medium is provided, having stored thereon a computer program which, when executed by a processor, implements the following steps:

[0273] determining respective business record information of a plurality of accounts within a preset time period;

[0274] for each of the accounts, obtaining business record summary information confirmed by the account according to each piece of business record information of the account;

[0275] obtaining a first hash value corresponding to the business record summary information of the plurality of accounts;

[0276] obtaining a second hash value corresponding to the plurality of pieces of business record information;

[0277] associating the first hash value with the second hash value, and sending the associated first hash value and second hash value to a preset trusted center for on-chain.

[0278] In one embodiment, the computer program, when executed by the processor, further implements the steps in the other embodiments.

[0279] In one embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the following steps:

[0280] determining respective business record information of a plurality of accounts within a preset time period;

[0281] for each of the accounts, obtaining business record summary information confirmed by the account according to each piece of business record information of the account;

[0282] obtaining a first hash value corresponding to the business record summary information of the plurality of accounts;

[0283] obtaining a second hash value corresponding to the plurality of pieces of business record information;

[0284] associating the first hash value with the second hash value, and sending the associated first hash value and second hash value to a preset trusted center for on-chain.

[0285] In one embodiment, the computer program, when executed by the processor, further implements the steps in the other embodiments.

[0286] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of the country and region.

[0287] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing related hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when the computer program is executed, the processes of the above-mentioned embodiments of each method can be included. Any reference to a memory, database or other medium used in the embodiments provided by the present application can include at least one of a non-volatile and volatile memory. The non-volatile memory can include a read-only memory (Read-Only Memory, ROM), a magnetic tape, a floppy disk, a flash memory, an optical storage, a high-density embedded non-volatile memory, a resistive memory (ReRAM), a magnetoresistive random access memory (Magnetoresistive Random Access Memory, MRAM), a ferroelectric memory (Ferroelectric Random Access Memory, FRAM), a phase change memory (Phase Change Memory, PCM), a graphene memory, etc. The volatile memory can include a random access memory (Random Access Memory, RAM) or an external cache memory, etc. As an illustration but not limitation, the RAM can be in various forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), etc. The database involved in the embodiments provided by the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided by the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., without being limited thereto.

[0288] The technical features of the above embodiments can be combined in any way. To make the description concise, not all possible combinations of the technical features in the above embodiments are described, but as long as the combinations of the technical features do not exist contradictory, they should be considered as the scope of the present disclosure.

[0289] The above-described embodiments are merely illustrative of several embodiments of the present application, and the description is relatively specific and detailed, but should not be understood as a limitation on the scope of the patent. It should be noted that for those skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are all within the scope of the present application. Therefore, the scope of protection of the present application should be subject to the appended claims.

Claims

1. A service record storage method characterized by comprising: The method comprises: determining the business record information corresponding to each account in a plurality of accounts within a preset time period; for each account, obtaining the business record summary information corresponding to the account confirmed by the account according to the business record information corresponding to the account; determining a first hash value according to the business record summary information corresponding to each account in a plurality of accounts; determining a second hash value according to the business record information corresponding to each account in a plurality of accounts; associating the first hash value with the second hash value, and sending the associated first hash value and second hash value to a preset trusted center for on-chain; determining a first hash value according to the business record summary information corresponding to each account in a plurality of accounts, comprising: taking the business record summary information corresponding to each account in a plurality of accounts as the node information of the corresponding first leaf node; constructing a first binary tree according to the node information of each first leaf node; the node information of each non-leaf node in the first binary tree comprises the hash value of the node information of at least one child node associated with the non-leaf node, and the child node includes the first leaf node; obtaining a first hash value according to the node information of the first root node of the first binary tree; determining a second hash value according to the business record information corresponding to each account in a plurality of accounts, comprising: taking the business record information corresponding to each account in a plurality of accounts as the node information of the corresponding second leaf node; constructing a second binary tree according to the node information of each second leaf node; the node information of each non-leaf node in the second binary tree comprises the hash value of the node information of the child node associated with the non-leaf node, and the child node includes the second leaf node; based on the node information of the second root node of the second binary tree, obtaining the hash values of the node information of the two child nodes associated with the second root node; splicing the hash values of the node information of the two child nodes, and performing hash processing on the spliced string to obtain a second hash value.

2. The method of claim 1, wherein, After the first hash value and the second hash value are sent to the preset trusted center for on-chain, it further comprises: if a verification request for target business record information within the preset time period is received, obtaining the node information corresponding to the intermediate node of the first binary tree; the intermediate node of the first binary tree is the node on the node link between the target first leaf node associated with the target business record information and the first root node; determining a first to-be-verified hash value according to the node information of the target first leaf node and the node information corresponding to the intermediate node of the first binary tree; determining the verification result of the target business record information according to the comparison result of the first to-be-verified hash value and the first hash value chained by the trusted center.

3. The method of claim 1, wherein, After the first hash value and the second hash value are sent to the preset trusted center for on-chain, it further comprises: If a verification request for the target service record information in the preset time period is received, node information corresponding to an intermediate node of the second binary tree is obtained; the intermediate node is a non-leaf node on a node link between a target second leaf node corresponding to the target service record information and a second root node of the second binary tree; According to the target service record information and the node information corresponding to the intermediate node of the second binary tree, a second to-be-verified hash value is determined; According to a comparison result of the second to-be-verified hash value and the second hash value chained on the trusted center, a verification result of the target service record information is determined.

4. The method of claim 1, wherein, The second binary tree is constructed according to the node information of each of the plurality of second leaf nodes, including: Each node in a current layer of the second binary tree to be constructed is determined; wherein the first layer of the second binary tree includes a plurality of second leaf nodes; A plurality of groups of nodes are obtained, and node information corresponding to each node in a next layer is obtained according to a hash value of the node information of each node in each group of nodes, and the next layer is determined as the current layer; each group of nodes includes at most two nodes, and the nodes in each group of nodes are different; The step of determining each node in the current layer of the second binary tree to be constructed is returned to be executed until the number of nodes in the current layer is less than a preset threshold, and a constructed second binary tree is obtained.

5. The method according to any one of claims 1 to 4, characterized in that, The business record summary information corresponding to the account confirmed by the account is obtained according to the business record information corresponding to the account, including: Each piece of business record information corresponding to the account is taken as node information of a corresponding third leaf node; A third binary tree is constructed according to the node information of each third leaf node; the node information of each non-leaf node in the third binary tree includes a hash value of the node information of at least one child node associated with the non-leaf node, and the child node includes the third leaf node; The business record summary information confirmed by the account is obtained according to the node information of the third root node of the third binary tree.

6. A service record storage apparatus characterized by comprising: The device includes: A record information collection module is configured to determine business record information corresponding to each account in a plurality of accounts in a preset time period; A summary information generation module is configured to, for each account, obtain business record summary information corresponding to the account confirmed by the account according to the business record information corresponding to the account; A first hash value determination module is configured to determine a first hash value according to the business record summary information corresponding to each account in a plurality of accounts; A second hash value determination module is configured to determine a second hash value according to the business record information corresponding to each account in a plurality of accounts; A hash value storage module is configured to associate the first hash value with the second hash value, and send the associated first hash value and second hash value to a preset trusted center for chaining; The first hash value determination module is specifically configured to take the business record summary information corresponding to each account in a plurality of accounts as node information of a corresponding first leaf node. constructing a first binary tree according to the node information of each first leaf node; the node information of each non-leaf node in the first binary tree comprises a hash value of the node information of at least one child node associated with the non-leaf node, and the child node comprises the first leaf node; obtaining a first hash value according to the node information of a first root node of the first binary tree; the second hash value determination module is specifically configured to: taking the business record information corresponding to each account in the plurality of accounts as the node information of a corresponding second leaf node; constructing a second binary tree according to the node information of each second leaf node; the node information of each non-leaf node in the second binary tree comprises a hash value of the node information of a child node associated with the non-leaf node, and the child node comprises the second leaf node; obtaining a hash value of the node information of two child nodes associated with the second root node based on the node information of a second root node of the second binary tree; splicing the hash values of the node information of the two child nodes, and performing hash processing on the spliced string to obtain a second hash value. 7.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-6 when the computer program is executed by the processor. The processor executes the computer program to realize the steps of the method in any one of claims 1 to 5.

8. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to realize the steps of the method in any one of claims 1 to 5.

9. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to realize the steps of the method in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Data storage method, device and system based on trusted account book database

    CN112507014A