A network transaction settlement optimization method based on blockchain and big data

By introducing blockchain and big data into online transaction settlement technology, the security risks and real-time settlement restrictions brought by centralized services in the existing technology are solved, and decentralized, safe and reliable real-time settlement is achieved.

CN118898482BActive Publication Date: 2025-02-11张家港保税数据科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411390108.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-08
Publication Date
2025-02-11
Estimated Expiration
2044-10-08

AI Technical Summary

Technical Problem

The existing online transaction settlement technology has security risks, single point of failure and data tampering caused by centralized services, and real-time settlement cannot be achieved.

Method used

Adopting the optimization method of online transaction settlement based on blockchain and big data, decentralization is achieved by recording pre-settlement transaction data, generating blockchain blocks, performing transaction settlement and data encryption, and establishing a multi-blockchain collaborative consensus network. Improper and real-time settlement.

Benefits of technology

It improves the security, transparency and efficiency of transactions, reduces the risk of single-point failure of the system, and enhances the reliability of data and the speed of capital flow.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118898482B_ABST
    Figure CN118898482B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of network transaction settlement, specifically a network transaction settlement optimization method based on blockchain and big data, comprising the following steps: step 1, recording transaction data before settlement; step 2, transaction settlement based on blockchain; step 3, recording and encrypting transaction data after settlement; step 4, blockchain expansion after the establishment of multiple network transaction contracts; step 5, multi-blockchain collaboration; the present invention integrates the core characteristics of blockchain technology with the unique needs of transaction settlement business, reconstructs the existing transaction settlement process, realizes the real-time settlement function in the transaction process, thereby significantly improving transaction efficiency and transparency; the present invention constructs a decentralized settlement accounting system to prevent risks such as information leakage. At the same time, the decentralized system will not cause the collapse of the entire system due to a single point of failure, and hash encryption is used to prevent data from being maliciously tampered with, thereby improving system reliability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of network transaction settlement, and specifically to a network transaction settlement optimization method based on blockchain and big data. Background Art

[0002] Online transaction settlement technology refers to the process of payment, settlement and clearing of transaction funds through a series of technical means during online transactions. This technology relies on computer technology, network technology and remote communication technology to ensure the authenticity, security and efficiency of transactions. With the accelerated development of digitalization and informatization, online transaction settlement technology is also constantly innovating and improving. Among them, blockchain technology can improve the security and transparency of transactions and promote the development of online transaction settlement technology.

[0003] As the underlying core technology supporting the operation of the Bitcoin system, blockchain technology originated from the Bitcoin white paper published by scholar Satoshi Nakamoto in 2008. In the article, the author proposed the concept of blockchain, which can link blocks containing valid information in an orderly manner and store them in a distributed manner on each node. With the operation and development of the Bitcoin system, people have begun to pay more attention to this underlying technology. Blockchain technology is a fusion of multiple technologies such as distributed data storage, P2P network communication, cryptography, and consensus mechanism. It has the characteristics of decentralization, time-series recording, collective operation and maintenance, security and trustworthiness, and adaptive consensus. First of all, the decentralized nature of the distributed architecture can not only avoid the rent-seeking behavior of centralized entities and reduce intermediary costs in practical applications, but also the shared data storage characteristics make the generated data difficult to tamper with.

[0004] Existing online transaction settlement technologies still have many deficiencies and limitations. First, the traditional online transaction settlement business system has obvious centralized service characteristics, which leads to unequal status between master and slave nodes in the centralized system. Highly centralized service nodes are always facing risks such as power rent-seeking and information leakage. At the same time, centralized systems are more prone to single point failures, data can be tampered with, and system reliability is reduced.

[0005] Secondly, in the existing online transaction settlement system, since centralized services are easily damaged by subjective and objective factors, in order to improve system availability, multiple backups of the system and data are required, which often leads to increased maintenance costs.

[0006] Finally, the settlement business in the existing online transaction settlement system must be carried out after the market closes. Due to the limitations of this business design, the system cannot achieve real-time settlement or quasi-real-time settlement. The time constraint of unified settlement after the transaction reduces the speed of capital flow.

[0007] Therefore, it is necessary to propose a network transaction settlement optimization method based on blockchain and big data to solve the above problems. Summary of the invention

[0008] The purpose of the present invention is to solve the problems existing in the background technology, and propose a network transaction settlement optimization method based on blockchain and big data;

[0009] The purpose of the present invention can be achieved through the following technical solutions:

[0010] A network transaction settlement optimization method based on blockchain and big data, specifically comprising the following steps:

[0011] Step 1: Record pre-settlement transaction data;

[0012] Every other trading day, obtain the contracts that will reach the settlement time after the preset trading day from all online trading contracts and record them as pending settlement contracts. Obtain the transaction data of the buyer and seller in the pending settlement contracts, including public transaction data, buyer data and seller data, specifically:

[0013] Public transaction data: order number x11(t), order time x12(t), product ID x13(t), latest settlement time x14(t), platform commission rate x15(t), and actual settlement amount x16(t) at the current time t.

[0014] Buyer data: buyer ID x21(t), buyer settlement account x22(t) and buyer settlement account balance x23(t) at the current time t.

[0015] Seller data: seller ID x31(t), seller settlement account x32(t) and seller settlement account balance x33(t) at the current time t.

[0016] As a preferred method of the present invention, a starting data matrix for this transaction is generated, including the buyer's starting data matrix and the seller starting data matrix .

[0017] Further, for the buyer's starting data matrix, a buyer's starting block is generated. The buyer's starting block includes a block header and a block body;

[0018] The block header includes a timestamp, a signature key and a random number Y1; the timestamp refers to the total number of seconds from January 1, 1970 to the current time; the signature key refers to the blockchain private key registered by the buyer; the random number Y1 refers to a random number generated between 0 and 1024 at every preset time interval t;

[0019] As a preferred method of the present invention, a seller starting block is generated for the seller starting data matrix. The seller starting block includes a block header and a block body;

[0020] The block header includes a timestamp, a signature key and a random number Y2; the timestamp refers to the total number of seconds from January 1, 1970 to the current time; the signature key refers to the blockchain private key registered by the seller; the random number Y2 refers to a random number generated between 0 and 1024 at every preset time interval t;

[0021] Step 2: Transaction settlement based on blockchain;

[0022] Extract the latest settlement time x14(t) from each buyer data matrix and seller data matrix, where the latest settlement time includes the settlement year Year, settlement month Month, settlement date Day and settlement hour Hour.

[0023] The timestamp is converted into a datetime object, wherein the datetime object includes: year information dt_year, month information dt_month, day information dt_day, and hour information dt_hour.

[0024] As a preferred method of the present invention, a numerical judgment is performed on the latest settlement time x14(t), the timestamp, the settlement account balances x23(t) and x33(t) of the buyer and seller, and the signature key through logical judgment, specifically:

[0025] The first judgment is to determine whether the information dt_year is equal to the settlement year Year. If so, enter the second judgment; if not, output False;

[0026] Second judgment: judge whether the information dt_month is equal to the settlement month Month. If yes, enter the third judgment; if not, output False;

[0027] The third judgment: judge whether the information dt_day is equal to the settlement date Day. If yes, enter the fourth judgment; if not, output False;

[0028] Fourth judgment: judge whether the information dt_hour is equal to the settlement hour Hour. If so, enter the value initialization stage, set the buyer's evaluation factor A and the seller's evaluation factor B to 0, and then enter the fifth judgment; if not, output False;

[0029] Fifth judgment: judge whether the balance of the buyer's settlement account x23(t) is greater than x16(t)×[1+x15(t)]. If so, set the value of the buyer's evaluation factor A to 1; judge whether the balance of the seller's settlement account x33(t) is greater than 0. If so, set the value of the seller's evaluation factor B to 1; then enter the sixth numerical judgment;

[0030] The sixth judgment: If the value of buyer evaluation factor A is 1 and the value of buyer evaluation factor B is 1, then enter the seventh judgment, otherwise output False;

[0031] The seventh judgment: judge whether the private keys of the buyer and seller are correct; if so, output True; if not, output False.

[0032] When the output result is True, the buyer data matrix and the seller data matrix involved in data judgment are numerically transformed, and the buyer data matrix is ​​set to , let the seller data matrix be .

[0033] The settlement funds of x23(t+1)=x16(t)×[1+x15(t)] are transferred from the buyer's settlement account x22(t); the settlement funds of x33(t+1)=x16(t) are transferred to the seller's settlement account x32(t). The data matrix of the buyer and seller is then marked as the settled data matrix.

[0034] The x16(t)×x15(t) part of the funds transferred from the buyer’s settlement account x22(t) will be used as the platform’s commission.

[0035] Step 3: Record and encrypt transaction data after settlement;

[0036] As a preferred method of the present invention, whenever a buyer and a seller complete the settlement, that is, after the settled data matrix of the buyer and the seller is generated, a new buyer block is generated based on the buyer's starting block that has completed the settlement and the buyer's blockchain is generated in series, and a new seller block is generated based on the seller's starting block that has completed the settlement and the seller's blockchain is generated in series, specifically:

[0037] Generate buyer blockchain: Generate a new settled buyer block for each settled buyer starting block. Each settled buyer block contains a block header and a block body.

[0038] Generate seller blockchain: Generate a new settled seller block for each settled seller starting block. Each settled seller block contains a block header and a block body.

[0039] The block header includes a timestamp, a random number Y, a hash value, etc.; the timestamp refers to the total number of seconds from January 1, 1970 to the current time, and the random number Y refers to a random number Y generated between 0 and 1024 at every preset time interval t; the hash value specifically refers to the result of hashing the last starting buyer data matrix or the starting seller data matrix in the contract;

[0040] The block body includes a settled buyer data matrix and a settled seller data matrix.

[0041] The newly generated settled buyer block and the buyer's starting block are connected in series through hash transformation to generate the buyer's blockchain; the newly generated settled seller block and the seller's starting block are connected in series through hash transformation to generate the seller's blockchain;

[0042] The hash transformation formula is: H(x, t)=y(t), where x represents an original input value of any length, and y represents a value of a specific length formed after the hash algorithm operation.

[0043] Specifically, the hash value obtained after hash transformation is the result of hash transformation of the buyer or seller data matrix in the previous block; each hash value contains the transformed information of the buyer data matrix of the previous buyer block.

[0044] Step 4: Blockchain expansion after the establishment of multi-network transaction contracts;

[0045] When the buyer ID in the settled buyer block and other buyer IDs are identified to establish a new network transaction contract, the settled buyer block is converted into a buyer start block, and steps 2 and 3 are repeated to perform blockchain expansion and transaction settlement;

[0046] When the buyer ID and other seller IDs in the settled seller block are identified to establish a new network transaction contract, the settled seller block is converted to the buyer's starting block, and steps 2 and 3 are repeated to perform blockchain expansion and transaction settlement. The new blocks obtained by expanding each buyer blockchain and seller blockchain are recorded as block (t+1), block (t+2), block (t+3), .... Then the newly generated blocks are added to the end of the respective blockchains according to the buyer or seller ID.

[0047] Step 5: Multi-blockchain collaboration;

[0048] When each network transaction contract is settled, a multi-blockchain collaborative consensus network is established.

[0049] As a preferred method of the present invention, collaborative blockchain 1 and collaborative blockchain 2 are established according to random number monitoring in the blockchain, specifically:

[0050] Data is extracted from all blockchains except the blockchains corresponding to the buyer and seller involved in the online transaction contract, and the random numbers in the block header at the end of each blockchain are extracted. The blockchains corresponding to the first 2U bits are extracted and recorded as collaborative blockchains, where 2U is a preset collaborative number, 2U is a positive even number greater than 0, and 2U is less than the total number of blockchains.

[0051] The collaborative blockchain is divided into two parts according to the random principle, namely collaborative blockchain one and collaborative blockchain two.

[0052] For the buyer blockchain involved in the same transaction contract, the buyer's to-be-settled data matrix and the post-settlement data matrix are sent to the collaborative blockchain one, and the to-be-settled data matrix is ​​hashed to obtain the collaborative hash value y11(t), and the post-settlement data matrix is ​​hashed to obtain the collaborative hash value y12(t). The collaborative hash values ​​y11(t) and y12(t) are stored in the block headers of all collaborative blockchains one.

[0053] For the seller blockchain involved in the same transaction contract, the seller's to-be-settled data matrix and the post-settlement data matrix are sent to the collaborative blockchain 2, and the to-be-settled data matrix is ​​hashed to obtain the collaborative hash value y21(t), and the post-settlement data matrix is ​​hashed to obtain the collaborative hash value y22(t). The collaborative hash values ​​y21(t) and y22(t) are stored in the block headers of all collaborative blockchains 2.

[0054] The platform commission, that is, the x16(t)×x15(t) part of the funds allocated from the buyer's settlement account x22(t) is equally divided into the accounts in Collaborative Blockchain 1 and Collaborative Blockchain 2.

[0055] Perform collaborative data self-check at preset time intervals, specifically:

[0056] All buyer IDx21(t) are uniquely numbered, and the unique number is i1, i1=1,2,3,...,n1; n1 is the total number of buyers; all seller IDx31(t) are uniquely numbered, and the unique number is i2, i2=1,2,3,...,n2; n2 is the total number of sellers; further, the accounts in collaborative blockchain one and collaborative blockchain two are uniquely numbered, and the unique number is j, j=1,2,3,...,U.

[0057] For buyer i1, the data matrix to be settled is hashed at preset time intervals to obtain hash value y11, and the data matrix after settlement is hashed to obtain hash value y12. Calculate the hash feature index δ(i1) of buyer i1.

[0058] When the hash feature index is greater than the preset threshold, it is determined that there is abnormal settlement data, and buyer i1 is determined to be involved in data tampering before and after settlement, and the preset violation fine is deducted from buyer i1's settlement account x22 (t).

[0059] For seller i2, hash transformation is performed on the data matrix to be settled at preset time intervals to obtain hash value y21, and hash transformation is performed on the data matrix after settlement to obtain hash value y22. Calculate the hash characteristic index δ(i2) of the seller i2. When the hash characteristic index is greater than the preset threshold, it is determined that there is abnormal settlement data, and the seller i2 is judged to be involved in data tampering before and after settlement, and the preset violation fine is deducted from the settlement account x32(t) of the buyer i2.

[0060] (1) The present invention combines the core characteristics of blockchain technology with the unique requirements of transaction settlement services, and reconstructs the existing transaction settlement process. This reconstruction aims to achieve real-time settlement in the transaction process through the introduction of blockchain technology, thereby significantly improving transaction efficiency and transparency. Specifically, the present invention uses the decentralized, tamper-proof and smart contract characteristics of blockchain to ensure that transaction data is recorded and verified at the same time it is generated, thereby triggering the settlement process at the moment the transaction is completed, achieving the goal of real-time settlement. This innovation not only simplifies the complexity of the traditional settlement process, but also enhances the security and credibility of transactions.

[0061] (2) The present invention builds a decentralized settlement and accounting system to prevent risks such as information leakage. At the same time, the decentralized system will not cause the collapse of the entire system due to a single point of failure. Hash encryption is used to prevent data from being maliciously tampered with, thereby improving system reliability;

[0062] (3) The present invention performs data calculations through a multi-blockchain collaborative mechanism, makes numerical judgments on the hash characteristic index obtained by the calculation, analyzes whether there is a transaction default or abnormal account funds between the buyer and the seller, and makes targeted penalties, thereby enhancing the security and reliability of transaction settlement. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] In order to facilitate understanding by those skilled in the art, the present invention is further described below with reference to the accompanying drawings:

[0064] Figure 1 is a flow chart of the method of the present invention;

[0065] Figure 2 It is a logic judgment flow chart of the present invention;

[0066] Figure 3 It is a schematic diagram of the block structure of the present invention;

[0067] Figure 4 This is a schematic diagram of the blockchain structure of the present invention;

[0068] Figure 5 It is a schematic diagram of extending the blockchain of the present invention;

[0069] Figure 6 This is a schematic diagram of multi-blockchain collaboration of the present invention. DETAILED DESCRIPTION

[0070] The technical solution of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0071] See also Figure 1 As shown, a network transaction settlement optimization method based on blockchain and big data specifically includes the following steps:

[0072] Step 1: Record pre-settlement transaction data;

[0073] Every other trading day, obtain the contracts that will reach the settlement time after the preset trading day from all online trading contracts and record them as pending settlement contracts. Obtain the transaction data of the buyer and seller in the pending settlement contracts, including public transaction data, buyer data and seller data, specifically:

[0074] Public transaction data: order number at the current time t x11(t), order time x12(t), product ID x13(t), latest settlement time x14(t) and platform commission rate x15(t), actual settlement amount x16(t)

[0075] Buyer data: buyer ID x21(t), buyer settlement account x22(t) and buyer settlement account balance x23(t) at the current time t.

[0076] Seller data: seller ID x31(t), seller settlement account x32(t) and seller settlement account balance x33(t) at the current time t.

[0077] Generate the initial data matrix for this transaction, including the buyer's initial data matrix and the seller's starting data matrix .

[0078] Further, for the buyer's starting data matrix, a buyer's starting block is generated. The buyer's starting block includes a block header and a block body;

[0079] The block header includes a timestamp, a signature key and a random number Y1; the timestamp refers to the total number of seconds from January 1, 1970 to the current time; the signature key refers to the blockchain private key registered by the buyer; the random number Y1 refers to a random number generated between 0 and 1024 at every preset time interval t;

[0080] Further, for the seller's starting data matrix, a seller's starting block is generated. The seller's starting block includes a block header and a block body;

[0081] The block header includes a timestamp, a signature key and a random number Y2; the timestamp refers to the total number of seconds from January 1, 1970 to the current time; the signature key refers to the blockchain private key registered by the seller; the random number Y2 refers to a random number generated between 0 and 1024 at every preset time interval t;

[0082] Step 2: Transaction settlement based on blockchain;

[0083] Extract the latest settlement time x14(t) from each buyer data matrix and seller data matrix, where the latest settlement time includes the settlement year Year, settlement month Month, settlement date Day and settlement hour Hour.

[0084] The timestamp is converted into a datetime object, wherein the datetime object includes: year information dt_year, month information dt_month, day information dt_day, and hour information dt_hour.

[0085] See also Figure 2 As shown, the latest settlement time x14(t), timestamp, settlement account balances x23(t) and x33(t) of the buyer and seller, and the signature key are numerically judged through logical judgment, specifically:

[0086] The first judgment is to determine whether the information dt_year is equal to the settlement year Year. If so, enter the second judgment; if not, output False;

[0087] Second judgment: judge whether the information dt_month is equal to the settlement month Month. If yes, enter the third judgment; if not, output False;

[0088] The third judgment: judge whether the information dt_day is equal to the settlement date Day. If yes, enter the fourth judgment; if not, output False;

[0089] Fourth judgment: judge whether the information dt_hour is equal to the settlement hour Hour. If so, enter the value initialization stage, set the buyer's evaluation factor A and the seller's evaluation factor B to 0, and then enter the fifth judgment; if not, output False;

[0090] Fifth judgment: judge whether the balance of the buyer's settlement account x23(t) is greater than x16(t)×[1+x15(t)]. If so, set the value of the buyer's evaluation factor A to 1; judge whether the balance of the seller's settlement account x33(t) is greater than 0. If so, set the value of the seller's evaluation factor B to 1; then enter the sixth numerical judgment;

[0091] The sixth judgment: If the value of buyer evaluation factor A is 1 and the value of buyer evaluation factor B is 1, then enter the seventh judgment, otherwise output False;

[0092] The seventh judgment: judge whether the private keys of the buyer and seller are correct; if so, output True; if not, output False.

[0093] When the output result is True, the buyer data matrix and the seller data matrix involved in data judgment are numerically transformed, and the buyer data matrix is ​​set to , let the seller data matrix be .

[0094] The settlement funds of x23(t+1)=x16(t)×[1+x15(t)] are transferred from the buyer's settlement account x22(t); the settlement funds of x33(t+1)=x16(t) are transferred to the seller's settlement account x32(t). The data matrix of the buyer and seller is then marked as the settled data matrix.

[0095] The x16(t)×x15(t) part of the funds transferred from the buyer’s settlement account x22(t) will be used as the platform’s commission.

[0096] Step 3: Record and encrypt transaction data after settlement;

[0097] See also Figure 3 As shown, whenever a buyer and seller complete the settlement, that is, after the settled data matrix of the buyer and seller is generated, a new buyer block is generated based on the buyer's starting block that has completed the settlement and is connected in series to generate the buyer's blockchain. A new seller block is generated based on the seller's starting block that has completed the settlement and is connected in series to generate the seller's blockchain. Specifically:

[0098] Generate buyer blockchain: Generate a new settled buyer block for each settled buyer starting block. Each settled buyer block contains a block header and a block body.

[0099] Generate seller blockchain: Generate a new settled seller block for each settled seller starting block. Each settled seller block contains a block header and a block body.

[0100] The block header includes a timestamp, a random number Y, a hash value, etc.; the timestamp refers to the total number of seconds from January 1, 1970 to the current time, and the random number Y refers to a random number Y generated between 0 and 1024 at every preset time interval t; the hash value specifically refers to the result of hashing the last starting buyer data matrix or the starting seller data matrix in the contract;

[0101] The block body includes a settled buyer data matrix and a settled seller data matrix.

[0102] See also Figure 4 As shown, the newly generated settled buyer block and the buyer's starting block are connected in series through hash transformation to generate the buyer's blockchain; the newly generated settled seller block and the seller's starting block are connected in series through hash transformation to generate the seller's blockchain;

[0103] The hash transformation formula is: H(x, t)=y(t), where x represents an original input value of any length, and y represents a value of a specific length formed after the hash algorithm operation.

[0104] Specifically, the hash value obtained after hash transformation is the result of hash transformation of the buyer or seller data matrix in the previous block; each hash value contains the transformed information of the buyer data matrix of the previous buyer block.

[0105] It should be noted that the hash value in each block is a condensed version of the data in the previous block, ensuring that each block in the blockchain stores a copy of the previous block.

[0106] It should be further explained that this hash function has the following characteristics: First, its processing flow exhibits irreversible unidirectionality, that is, it can uniquely map input x to output y, but the reverse process - tracing back from y to x, is theoretically impossible. This feature builds a security barrier for the original data. Secondly, the hash algorithm is consistent. No matter how the length of the input value changes, its calculation time and the length of the final output result remain constant, ensuring the stability and efficiency of the processing process. Furthermore, the algorithm is extremely sensitive to slight changes in the input data. Even a negligible single character difference in the original value will cause a significant change in the output result. This high sensitivity effectively prevents any form of subtle tampering or forgery, further enhancing the integrity and credibility of the data.

[0107] Step 4: Blockchain expansion after the establishment of multi-network transaction contracts;

[0108] See also Figure 5As shown, when the buyer ID in the settled buyer block and other buyer IDs are identified to establish a new network transaction contract, the settled buyer block is converted into a buyer start block, and steps 2 and 3 are repeated to perform blockchain expansion and transaction settlement;

[0109] When the buyer ID and other seller IDs in the settled seller block are identified to establish a new network transaction contract, the settled seller block is converted to the buyer's starting block, and steps 2 and 3 are repeated to perform blockchain expansion and transaction settlement. The new blocks obtained by expanding each buyer blockchain and seller blockchain are recorded as block (t+1), block (t+2), block (t+3), .... Then the newly generated blocks are added to the end of the respective blockchains according to the buyer or seller ID.

[0110] Step 5: Multi-blockchain collaboration;

[0111] See also Figure 6 As shown, when each network transaction contract is settled, a multi-blockchain collaborative consensus network is established.

[0112] Furthermore, collaborative blockchain 1 and collaborative blockchain 2 are established based on random number monitoring in the blockchain, specifically:

[0113] Data is extracted from all blockchains except the blockchains corresponding to the buyer and seller involved in the online transaction contract, and the random numbers in the block header at the end of each blockchain are extracted. The blockchains corresponding to the first 2U bits are extracted and recorded as collaborative blockchains, where 2U is a preset collaborative number, 2U is a positive even number greater than 0, and 2U is less than the total number of blockchains.

[0114] The collaborative blockchain is divided into two parts according to the random principle, namely collaborative blockchain one and collaborative blockchain two.

[0115] For the buyer blockchain involved in the same transaction contract, the buyer's to-be-settled data matrix and the post-settlement data matrix are sent to the collaborative blockchain one, and the to-be-settled data matrix is ​​hashed to obtain the collaborative hash value y11(t), and the post-settlement data matrix is ​​hashed to obtain the collaborative hash value y12(t). The collaborative hash values ​​y11(t) and y12(t) are stored in the block headers of all collaborative blockchains one.

[0116] For the seller blockchain involved in the same transaction contract, the seller's to-be-settled data matrix and the post-settlement data matrix are sent to the collaborative blockchain 2, and the to-be-settled data matrix is ​​hashed to obtain the collaborative hash value y21(t), and the post-settlement data matrix is ​​hashed to obtain the collaborative hash value y22(t). The collaborative hash values ​​y21(t) and y22(t) are stored in the block headers of all collaborative blockchains 2.

[0117] The platform commission, that is, the x16(t)×x15(t) part of the funds allocated from the buyer's settlement account x22(t) is equally divided into the accounts in Collaborative Blockchain 1 and Collaborative Blockchain 2.

[0118] Perform collaborative data self-check at preset time intervals, specifically:

[0119] All buyer IDx21(t) are uniquely numbered, and the unique number is i1, i1=1,2,3,...,n1; n1 is the total number of buyers; all seller IDx31(t) are uniquely numbered, and the unique number is i2, i2=1,2,3,...,n2; n2 is the total number of sellers; further, the accounts in collaborative blockchain one and collaborative blockchain two are uniquely numbered, and the unique number is j, j=1,2,3,...,U.

[0120] For buyer i1, the data matrix to be settled is hashed at preset time intervals to obtain hash value y11, and the data matrix after settlement is hashed to obtain hash value y12. Calculate the hash characteristic index δ(i1) of buyer i1. When the hash characteristic index is greater than the preset threshold, it is determined that there is abnormal settlement data, and buyer i1 is determined to be involved in data tampering before and after settlement, and the preset violation fine is deducted from buyer i1's settlement account x22(t).

[0121] For seller i2, hash transformation is performed on the data matrix to be settled at preset time intervals to obtain hash value y21, and hash transformation is performed on the data matrix after settlement to obtain hash value y22. Calculate the hash characteristic index δ(i2) of the seller i2. When the hash characteristic index is greater than the preset threshold, it is determined that there is abnormal settlement data, and the seller i2 is judged to be involved in data tampering before and after settlement, and the preset violation fine is deducted from the settlement account x32(t) of the buyer i2.

[0122] It should be understood that the terms "include" and "comprising" used in the specification and claims of the present disclosure indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or collections thereof.

[0123] It should also be understood that the terms used in this disclosure are only for the purpose of describing specific embodiments and are not intended to limit the disclosure. As used in this disclosure and claims, the singular forms "a", "an", and "the" are intended to include plural forms unless the context clearly indicates otherwise. It should also be further understood that the term "and / or" used in this disclosure and claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes these combinations;

[0124] The preferred embodiments of the present invention disclosed above are only used to help explain the present invention. The preferred embodiments do not describe all the details in detail, nor do they limit the invention to only specific implementation methods. Obviously, many modifications and changes can be made according to the content of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present invention, so that those skilled in the art can understand and use the present invention well. The present invention is limited only by the claims and their full scope and equivalents.

Claims

1. A network transaction settlement optimization method based on blockchain and big data, characterized in that: The following steps are involved: Step 1: Record transaction data before settlement; extract data and generate a buyer's starting data matrix and a seller's starting data matrix, and generate a buyer's starting block and a seller's starting block; Every other trading day, obtain the contracts that will reach the settlement time after the preset trading day from all network trading contracts and record them as pending settlement contracts; obtain the transaction data of the buyer and seller in the pending settlement contracts, including public transaction data, buyer data and seller data, specifically: Public transaction data: order number x11(t), order time x12(t), product ID x13(t), latest settlement time x14(t), platform commission rate x15(t), actual settlement amount x16(t) at the current time t; Buyer data: buyer ID x21(t), buyer settlement account x22(t) and buyer settlement account balance x23(t) at the current time t; Seller data: seller ID x31(t), seller settlement account x32(t) and seller settlement account balance x33(t) at the current time t; Generate the initial data matrix for this transaction, including the buyer's initial data matrix and the seller's starting data matrix ; Generate a buyer's starting block for the buyer's starting data matrix; the buyer's starting block includes a block header and a block body; The block header of the buyer's starting block includes a timestamp, a signature key and a random number Y1; the timestamp refers to the total number of seconds from January 1, 1970 to the current time; the signature key refers to the blockchain private key registered by the buyer; the random number Y1 refers to a random number generated between 0 and 1024 at every preset time interval t; The block body of the buyer's starting block includes a buyer's starting data matrix; Generate a seller's starting block for the seller's starting data matrix; the seller's starting block includes a block header and a block body; The block header of the seller's starting block includes a timestamp, a signature key and a random number Y2; the timestamp refers to the total number of seconds from January 1, 1970 to the current time; the signature key refers to the blockchain private key registered by the seller; the random number Y2 refers to a random number generated between 0 and 1024 at every preset time interval t; The block body of the seller's starting block includes the seller's starting data matrix; Step 2: Transaction settlement based on blockchain; extract the latest settlement time from each buyer data matrix and seller data matrix, make numerical judgments on the latest settlement time, timestamp, settlement account balances of both parties and signature keys through logical judgment, and execute transaction settlement and transfer according to the numerical judgment results; Step 3: Record and encrypt transaction data after settlement; Whenever a buyer and seller complete the settlement, that is, after the settled data matrix of the buyer and seller is generated, a new buyer block is generated based on the buyer's starting block that has completed the settlement, and the buyer's blockchain is generated in series; a new seller block is generated based on the seller's starting block that has completed the settlement, and the seller's blockchain is generated in series; Step 4: Blockchain expansion after the establishment of multi-network transaction contracts; when the buyer ID in the settled buyer block and other buyer IDs are identified to establish a new network transaction contract, the settled buyer block is converted to the buyer start block, and steps 2 and 3 are repeated to perform blockchain expansion and transaction settlement; Step 5: Multi-blockchain collaboration: When each network transaction contract is settled, a multi-blockchain collaborative consensus network is established, and collaborative blockchain 1 and collaborative blockchain 2 are established based on the random number monitoring in the blockchain; data sharing and extraction operations are performed between blockchains to manage the settlement of each transaction.

2. According to claim 1, a network transaction settlement optimization method based on blockchain and big data is characterized in that: The specific process of making numerical judgments on the latest settlement time, timestamp, settlement account balances of both parties and signature keys through logical judgment is as follows: Extract the latest settlement time x14(t) from each buyer data matrix and seller data matrix, where the latest settlement time includes the settlement year Year, settlement month Month, settlement date Day and settlement hour Hour; Convert the timestamp to a datetime object, wherein the datetime object includes: year information dt_year, month information dt_month, day information dt_day, and hour information dt_hour; Through logical judgment, numerical judgment is made on the latest settlement time x14(t), timestamp, settlement account balances x23(t) and x33(t) of the buyer and seller, and the signature key, specifically: The first judgment is to determine whether the information dt_year is equal to the settlement year Year; if so, enter the second judgment; if not, output False; Second judgment: judge whether the information dt_month is equal to the settlement month Month; if so, enter the third judgment; if not, output False; The third judgment: judge whether the information dt_day is equal to the settlement date Day; if so, enter the fourth judgment; if not, output False; Fourth judgment: judge whether the information dt_hour is equal to the settlement hour Hour; if so, enter the value initialization stage, set the buyer's evaluation factor A and the seller's evaluation factor B to 0, and then enter the fifth judgment; if not, output False; Fifth judgment: judge whether the balance of the buyer's settlement account x23(t) is greater than x16(t)×[1+x15(t)]. If so, set the value of the buyer's evaluation factor A to 1; judge whether the balance of the seller's settlement account x33(t) is greater than 0. If so, set the value of the seller's evaluation factor B to 1; then enter the sixth numerical judgment; The sixth judgment: If the value of buyer evaluation factor A is 1 and the value of buyer evaluation factor B is 1, then enter the seventh judgment, otherwise output False; The seventh judgment: judge whether the private keys of the buyer and seller are correct; if so, output True; if not, output False.

3. According to claim 2, a network transaction settlement optimization method based on blockchain and big data is characterized in that: The specific process of executing transaction settlement and transfer according to the numerical judgment results is as follows: When the output result is True, the buyer data matrix and the seller data matrix involved in data judgment are numerically transformed, and the buyer data matrix is ​​set to , let the seller data matrix be ; Transfer x23(t+1)=x16(t)×[1+x15(t)] in the amount of settlement funds from the buyer's settlement account x22(t); transfer x33(t+1)=x16(t) in the amount of settlement funds to the seller's settlement account x32(t); then mark the data matrix of the buyer and seller as the settled data matrix; The x16(t)×x15(t) part of the funds transferred from the buyer’s settlement account x22(t) will be used as the platform’s commission.

4. According to claim 1, a network transaction settlement optimization method based on blockchain and big data is characterized in that: The specific process of generating new buy and sell blocks and connecting them in series to generate buy and sell blockchains is as follows: Generate buyer blockchain: Generate a new settled buyer block for each settled buyer starting block. Each settled buyer block contains a block header and a block body. Generate seller blockchain: Generate a new settled seller block for each settled seller starting block. Each settled seller block contains a block header and a block body. The block header includes a timestamp, a random number Y, a hash value, etc.; the timestamp refers to the total number of seconds from January 1, 1970 to the current time, and the random number Y refers to a random number Y generated between 0 and 1024 at every preset time interval t; the hash value specifically refers to the result of hashing the last starting buyer data matrix or the starting seller data matrix in the contract; The block body includes a settled buyer data matrix and a settled seller data matrix; The newly generated settled buyer block and the buyer's starting block are connected in series through hash transformation to generate the buyer's blockchain; the newly generated settled seller block and the seller's starting block are connected in series through hash transformation to generate the seller's blockchain; The hash transformation formula is: H(x, t)=y(t); where x represents the original input value of any length, and y represents the value of a specific length formed after the hash algorithm operation; The hash value obtained after hash transformation is the result of hash transformation of the buyer or seller data matrix in the previous block; each hash value contains the transformed information of the buyer data matrix of the previous buyer block.

5. According to claim 1, a network transaction settlement optimization method based on blockchain and big data is characterized in that: The multi-blockchain collaborative consensus network is specifically: The collaborative blockchain is divided into two parts according to the random principle, namely collaborative blockchain 1 and collaborative blockchain 2; For the buyer blockchain involved in the same transaction contract, the buyer's pending settlement data matrix and the post-settlement data matrix are sent to the collaborative blockchain 1, and the pending settlement data matrix is ​​hashed to obtain the collaborative hash value y11(t), and the post-settlement data matrix is ​​hashed to obtain the collaborative hash value y12(t), and the collaborative hash values ​​y11(t) and y12(t) are stored in the block headers of all collaborative blockchains 1; For the seller blockchain involved in the same transaction contract, the seller's to-be-settled data matrix and the post-settlement data matrix are sent to the collaborative blockchain 2, and the to-be-settled data matrix is ​​hashed to obtain the collaborative hash value y21(t), and the post-settlement data matrix is ​​hashed to obtain the collaborative hash value y22(t), and the collaborative hash values ​​y21(t) and y22(t) are stored in the block headers of all collaborative blockchains 2; The platform commission, that is, the x16(t)×x15(t) part of the funds allocated from the buyer's settlement account x22(t) is equally divided into the accounts in the collaborative blockchain one and the collaborative blockchain two; data sharing and extraction operations are performed between the blockchains.

6. A network transaction settlement optimization method based on blockchain and big data according to claim 5, characterized in that: The specific process of data sharing and extraction operations between blockchains is as follows: All buyer IDx21(t) are uniquely numbered, and the unique number is i1, i1=1,2,3,...,n1; n1 is the total number of buyers; all seller IDx31(t) are uniquely numbered, and the unique number is i2, i2=1,2,3,...,n2; n2 is the total number of sellers; the accounts in collaborative blockchain 1 and collaborative blockchain 2 are uniquely numbered, and the unique number is j, j=1,2,3,...,U; For buyer i1, the data matrix to be settled is hashed at preset time intervals to obtain hash value y11, and the data matrix after settlement is hashed to obtain hash value y12. Calculate the hash characteristic index δ(i1) of buyer i1; For seller i2, hash transformation is performed on the data matrix to be settled at preset time intervals to obtain hash value y21, and hash transformation is performed on the data matrix after settlement to obtain hash value y22. Calculate the hash characteristic index δ(i2) of seller i2 and manage transaction settlement based on the numerical calculation results.

7. The method for optimizing network transaction settlement based on blockchain and big data according to claim 6 is characterized in that: The specific process of managing transaction settlement is as follows: When the hash characteristic index δ(i1) is greater than the preset threshold, it is determined that there is abnormal settlement data, and it is determined that buyer i1 is involved in data tampering before and after settlement, and the preset violation fine is deducted from buyer i1's settlement account x22(t); When the hash feature index δ(i2) is greater than the preset threshold, it is determined that there is abnormal settlement data, and the seller i2 is determined to be involved in data tampering before and after settlement, and the preset violation fine is deducted from the settlement account x32(t) of the buyer i2.

Citation Information

Patent Citations

  • Multi-Agent transaction information protection method based on block chain technology

    CN110569675A

  • Method for realizing cross-account-book DVP financial settlement based on block chain interoperation

    CN117557368A