Block chain-based separate account settlement method
By using smart contracts on the blockchain for risk auditing and split settlement, the traditional split method is solved, and the efficient, secure and transparent split settlement process is achieved.
Patent Information
- Application Number
- CN202411821826.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-04-04
AI Technical Summary
When handling dynamic and complex transactions, the traditional accounting method is inefficient, poor transparency and insufficient security, resulting in lower transaction efficiency and trust among participants.
The blockchain-based split settlement method is adopted to conduct risk and compliance review through pre-deployed smart contracts, and optimize the settlement form. Then, the second smart contract is called for split settlement, and the result data is encrypted and stored in the blockchain.
It significantly improves the efficiency of account sharing processing, ensures the accuracy and security of transactions, realizes a high degree of transparency and traceability of the settlement process, and enhances the trust of all parties in the transaction and the operation reliability of the platform.
Smart Images

Figure CN119762250A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information technology, and more specifically, to a blockchain-based account splitting and settlement method. Background Art
[0002] With the increasing complexity of multi-party collaborative transaction scenarios and the continuous growth of transaction volumes, the efficiency, transparency and security of account splitting and settlement have become core issues of concern to all parties. Traditional account splitting methods often face challenges when dealing with dynamic and complex transactions due to cumbersome processes, rigid rules and insufficient risk control. The lagging flow of funds and lack of transparency in the settlement process not only weaken transaction efficiency, but also to a certain extent cause trust issues among the participants.
[0003] Although some existing improvement methods have partially solved the problems of fund custody and transfer efficiency, there are still deficiencies in compliance and risk control, dynamic rule adaptation, and transparent traceability of settlement results. The lack of dynamic review and real-time optimization capabilities for transaction data makes it impossible to effectively handle the complex needs of non-compliant transactions, potential risks and special scenarios. At the same time, the lack of complete and tamper-proof records of the settlement process also makes subsequent tracing and verification difficult, increasing the complexity of dispute resolution. Summary of the invention
[0004] In order to overcome the above-mentioned defects of the prior art, an embodiment of the present invention provides a split-account settlement method based on blockchain.
[0005] To achieve the above object, the present invention provides the following technical solutions:
[0006] A split-account settlement method based on blockchain, wherein the blockchain includes a pre-deployed first smart contract and a second smart contract, and the method is applied to a split-account server, and the method includes:
[0007] Obtaining a split-account settlement request within the current time period, wherein the split-account settlement request includes a pending settlement form consisting of multiple pending transactions, and the multiple pending transactions come from different merchant nodes in the blockchain;
[0008] Call the first smart contract to conduct a risk and compliance review on each pending transaction in the pending settlement form, and adjust and optimize the pending settlement form according to the risk and compliance review results to obtain an optimized pending settlement form;
[0009] Call the second smart contract to perform split-account settlement on the optimized pending settlement form, and record the split-account settlement data generated during the split-account settlement process;
[0010] After completing the split-account settlement, the optimized pending settlement form and split-account settlement data are encrypted and stored in the blockchain, and the above process is repeated to execute the split-account settlement request for the next time period.
[0011] Furthermore, each transaction to be settled includes at least a buyer ID, a merchant node ID, a commodity type, a payment method, a transaction amount and a transaction time.
[0012] Furthermore, the risk and compliance review result includes one of non-compliance, compliance but with risk, and compliance and no risk;
[0013] The risk and compliance review of each pending transaction in the pending settlement form and the adjustment and optimization of the pending settlement form according to the risk and compliance review results include:
[0014] a1: Get the i-th pending transaction in the pending settlement list, where the pending settlement list contains M pending transactions, and i and M are integers greater than zero;
[0015] a2: retrieve the compliance review conditions agreed in advance in the first smart contract, and determine whether the i-th pending transaction is compliant based on the compliance review conditions. If not, use the non-compliance as the risk and compliance review result of the i-th pending transaction, remove the i-th pending transaction from the original form to be settled, set i=i+1, and return to step a1. If compliant, jump to step a3;
[0016] The compliance review conditions include, but are not limited to, restricted commodity types and restricted payment methods;
[0017] a3: retrieve the risk review conditions agreed in advance in the first smart contract, and determine whether the i-th pending transaction has risks according to the risk review conditions. If there is a risk, mark the i-th pending transaction as compliant but with risks, and use compliance but with risks as the risk and compliance review result of the i-th pending transaction, remove the i-th pending transaction from the original form to be settled, set i=i+1, and return to step a1; if there is no risk, mark the i-th pending transaction as compliant and without risks, and use compliance and without risks as the risk and compliance review result of the i-th pending transaction, set i=i+1, and return to step a1;
[0018] The risk review condition is specifically a risk level scoring threshold;
[0019] a4: Repeat the above steps a1 to a3 until i=M, then end the loop, complete the adjustment and optimization of the form to be settled, and obtain the optimized form to be settled.
[0020] Furthermore, the determining whether the i-th transaction to be processed is compliant includes:
[0021] Get the merchant node ID in the i-th pending transaction;
[0022] According to the mapping relationship between the merchant node ID and the compliance review condition, obtain the corresponding compliance review condition of the corresponding merchant node ID;
[0023] Compare the corresponding compliance review conditions with the information of the i-th pending transaction. If the corresponding compliance review conditions are completely consistent with the information of the i-th pending transaction, the i-th pending transaction is judged to be compliant; if the corresponding compliance review conditions are not completely consistent with the information of the i-th pending transaction, the i-th pending transaction is judged to be non-compliant.
[0024] Furthermore, the determining whether the i-th pending transaction has a risk includes:
[0025] Get the merchant node ID, transaction amount and transaction time in the i-th pending transaction;
[0026] According to the mapping relationship between the merchant node ID and the risk analysis data, the corresponding risk analysis data of the corresponding merchant node ID is extracted;
[0027] The risk analysis data includes the average value of the transaction amount, the standard deviation of the transaction amount, the average value of the transaction time, and the standard deviation of the transaction time belonging to the corresponding merchant node ID;
[0028] Input the transaction amount, the average value of the transaction amount, and the standard deviation of the transaction amount into a predefined amount risk scoring function f(x) to obtain the amount risk score of the i-th transaction to be processed;
[0029] The expression of the predefined amount risk scoring function f(x) is as follows:
[0030]
[0031] Where: x i is the transaction amount in the i-th pending transaction; μ is the average transaction amount of the corresponding merchant node ID, and σ is the standard deviation of the transaction amount of the corresponding merchant node ID;
[0032] Input the transaction time, the average transaction time and the standard deviation of the transaction time into a predefined time risk scoring function f(t) to obtain the time risk score of the i-th pending transaction;
[0033] The expression of the predefined time risk score function f(t) is as follows:
[0034]
[0035] Where: t i is the transaction time of the i-th pending transaction; τ is the average transaction time of the corresponding merchant node ID, and θ is the standard deviation of the transaction time of the corresponding merchant node ID;
[0036] Calculate the risk level score of the i-th pending transaction based on the amount risk score and the time risk score;
[0037] The calculation formula of the risk level score is as follows:
[0038] R i =f(x)×λ1+f(t)×λ2;
[0039] Where: R i Score the risk level of the i-th pending transaction, λ1 and λ2 are risk weights greater than λ1>λ2;
[0040] The risk level score is compared with the risk level score threshold in the risk review conditions. If the risk level score is greater than or equal to the risk level score threshold, the i-th pending transaction is determined to be risky; if the risk level score is less than the risk level score threshold, the i-th pending transaction is determined to be risk-free.
[0041] Furthermore, performing account-by-account settlement on the optimized to-be-settled form includes:
[0042] b1: Get the jth pending transaction in the optimized pending settlement list, where the optimized pending settlement list contains N pending transactions, where j and N are integers greater than zero, and N≤M;
[0043] b2: Obtain the merchant node ID in the jth pending transaction, and retrieve the corresponding account splitting rule in the second smart contract according to the mapping relationship between the merchant node ID and the account splitting rule; the account splitting rule at least includes the account splitting amount ratio and the account splitting participant node;
[0044] The account splitting participant nodes include merchant nodes, e-commerce platform nodes and bank nodes;
[0045] b3: Calculate the multiple split amounts of the jth pending transaction according to the corresponding splitting rules, and transfer the transaction amount of the jth pending transaction to the private wallet address of each splitting participant node according to the splitting amounts, and set j=j+1, and return to step b1;
[0046] b4: Repeat the above steps b1 to b3 until j=N, then end the loop and complete the account splitting settlement of the optimized form to be settled.
[0047] Furthermore, the split-account settlement data includes at least a plurality of pending transactions that have completed split-account settlement, a plurality of split-account amounts that have completed split-account settlement, a corresponding split-account participant node for each split-account amount, and a private wallet address of each split-account participant node.
[0048] Furthermore, the optimized to-be-settled form and the split-account settlement data are encrypted and stored in the blockchain, including:
[0049] Merge the pending settlement form and the sub-account settlement data to generate the sub-account settlement result data;
[0050] The account-settlement result data is sharded to obtain multiple data shards;
[0051] Each data shard is staggered and merged to obtain multiple merged shards;
[0052] Hash calculation is performed on each merged shard to form multiple blocks and a hash index for each block, and blockchain storage is performed on each block based on the hash index.
[0053] A split-account server comprises a memory, a processor, and a computer program stored in the memory and running on the processor, wherein when the processor executes the computer program, any of the above-mentioned blockchain-based split-account settlement methods is implemented.
[0054] A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed, implements any of the above-mentioned blockchain-based account splitting and settlement methods.
[0055] Compared with the prior art, the present invention has the following beneficial effects:
[0056] The present application discloses a blockchain-based account-splitting settlement method, comprising: obtaining an account-splitting settlement request within the current time period; calling a first smart contract to perform a risk and compliance review on each pending transaction in a pending settlement form, and adjusting and optimizing the pending settlement form according to the risk and compliance review results to obtain an optimized pending settlement form; calling a second smart contract to perform account-splitting settlement on the optimized pending settlement form, and recording the account-splitting settlement data generated during the account-splitting settlement process; after completing the account-splitting settlement, encrypting and storing the optimized pending settlement form and the account-splitting settlement data in the blockchain, and repeating the above process to execute the account-splitting settlement request for the next time period; based on the above content, the present invention can effectively alleviate the system in high-concurrency transaction scenarios. It reduces system pressure, optimizes resource utilization, and significantly improves the efficiency of account splitting processing; in addition, smart contracts realize dynamic compliance review and risk assessment of transactions, ensure the accuracy and security of the account splitting process, effectively adapt to the diversified needs of complex transaction scenarios, and solve the problems of rigid rules and insufficient risk control capabilities of traditional methods; at the same time, the blockchain technology is used to encrypt and store the account splitting settlement results, ensure the non-tamperability of the data, achieve a high degree of transparency and traceability of the settlement process, and reduce transaction disputes caused by data disputes; compared with the traditional account splitting method, the present invention optimizes the fund custody and circulation mode, speeds up the fund turnover speed, and reduces the fund retention time, thereby enhancing the trust of all parties to the transaction and the operational reliability of the platform. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 A flowchart of a blockchain-based account splitting and settlement method provided by the present invention;
[0058] Figure 2 A schematic diagram of the structure of an account splitting server provided by the present invention. DETAILED DESCRIPTION
[0059] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments 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.
[0060] Example 1
[0061] See also Figure 1 As shown, this embodiment discloses a split-account settlement method based on blockchain, wherein the blockchain includes a pre-deployed first smart contract and a second smart contract, and the method is applied to a split-account server, and the method includes:
[0062] S101: Acquire a split-account settlement request within the current time period, wherein the split-account settlement request includes a pending settlement form consisting of multiple pending transactions, and the multiple pending transactions come from different merchant nodes in the blockchain;
[0063] Each transaction to be settled contains at least the buyer ID, merchant node ID, product type, payment method, transaction amount and transaction time;
[0064] It should be understood that: at the end of a preset time period (such as daily, hourly or other agreed periods), the blockchain will package all unsettled transaction records within that period into a pending settlement form and upload it to the sub-ledger server through the network interface (API); by centrally packaging unsettled transaction records within a certain period and then processing them uniformly, the sub-ledger system can optimize resource scheduling, reduce real-time high concurrency pressure, and improve overall processing efficiency and maintainability; in the face of traffic peaks, it can not only improve the robustness and throughput of the system, but also reduce the burden of delays and error handling, thereby significantly improving the efficiency of sub-ledger and user experience.
[0065] S102: calling the first smart contract to conduct a risk and compliance review on each pending transaction in the pending settlement form, and adjusting and optimizing the pending settlement form according to the risk and compliance review results to obtain an optimized pending settlement form;
[0066] The risk and compliance review results include one of non-compliance, compliance but with risk, and compliance without risk;
[0067] In implementation, each pending transaction in the pending settlement form is subject to risk and compliance review, and the pending settlement form is adjusted and optimized according to the risk and compliance review results, including:
[0068] a1: Get the i-th pending transaction in the pending settlement list, where the pending settlement list contains M pending transactions, and i and M are integers greater than zero;
[0069] a2: retrieve the compliance review conditions agreed in advance in the first smart contract, and determine whether the i-th pending transaction is compliant based on the compliance review conditions. If not, use the non-compliance as the risk and compliance review result of the i-th pending transaction, remove the i-th pending transaction from the original form to be settled, set i=i+1, and return to step a1. If compliant, jump to step a3;
[0070] The compliance review conditions include, but are not limited to, restricted commodity types, restricted payment methods, etc.;
[0071] Specifically, the determining whether the i-th transaction to be processed is compliant includes:
[0072] Get the merchant node ID in the i-th pending transaction;
[0073] According to the mapping relationship between the merchant node ID and the compliance review condition, obtain the corresponding compliance review condition of the corresponding merchant node ID;
[0074] It should be noted that: a number of mapping relationships between merchant node IDs and compliance review conditions are pre-stored in the system database. Each mapping relationship has a merchant node ID and a corresponding compliance review condition. The merchant node ID and the corresponding compliance review condition in each mapping relationship are manually associated and bound by technical personnel in advance, and the compliance review condition corresponding to each merchant node ID is agreed upon in advance by the merchant node and reviewed and confirmed by the e-commerce platform;
[0075] Compare the corresponding compliance review conditions with the information of the i-th pending transaction. If the corresponding compliance review conditions are completely consistent with the information of the i-th pending transaction, the i-th pending transaction is judged to be compliant; if the corresponding compliance review conditions are not completely consistent with the information of the i-th pending transaction, the i-th pending transaction is judged to be non-compliant;
[0076] For example, suppose that the commodity type in the i-th pending transaction is sports shoes, and there are no sports shoes in the commodity types restricted by the merchant node ID. Therefore, if there is a violation in the pending transaction, settlement of the pending transaction is likely to cause a settlement dispute. Further explanation is that the merchant node may replace transactions of unequal commodity types in order to reduce the account splitting commission or to avoid tax;
[0077] a3: retrieve the risk review conditions agreed in advance in the first smart contract, and determine whether the i-th pending transaction has risks according to the risk review conditions. If there is a risk, mark the i-th pending transaction as compliant but with risks, and use compliance but with risks as the risk and compliance review result of the i-th pending transaction, remove the i-th pending transaction from the original form to be settled, set i=i+1, and return to step a1; if there is no risk, mark the i-th pending transaction as compliant and without risks, and use compliance and without risks as the risk and compliance review result of the i-th pending transaction, set i=i+1, and return to step a1;
[0078] The risk review condition is specifically a risk level scoring threshold;
[0079] Specifically, determining whether the i-th pending transaction has a risk includes:
[0080] Get the merchant node ID, transaction amount and transaction time in the i-th pending transaction;
[0081] According to the mapping relationship between the merchant node ID and the risk analysis data, the corresponding risk analysis data of the corresponding merchant node ID is extracted;
[0082] The risk analysis data includes the average value of the transaction amount, the standard deviation of the transaction amount, the average value of the transaction time, and the standard deviation of the transaction time belonging to the corresponding merchant node ID;
[0083] It should be noted that: a number of mapping relationships between merchant node IDs and risk analysis data are pre-stored in the system database. Each mapping relationship has a merchant node ID and the corresponding risk analysis data. The merchant node ID and the corresponding risk analysis data in each mapping relationship are manually associated and bound by technical personnel in advance, and the risk analysis data corresponding to each merchant node ID is generated based on the historical compliance transaction behavior of the merchant node;
[0084] It is worth noting that: since the risk analysis data is generated based on the historical compliance transaction behavior of the corresponding merchant node, the average transaction amount, the standard deviation of the transaction amount, the average transaction time and the standard deviation of the transaction time in the risk analysis data are dynamically changing, rather than being static; dynamically limiting the risk analysis data of the merchant node based on the normal transaction behavior is conducive to the first smart contract dynamically reviewing the compliance and risk of pending transactions, thereby improving the efficiency of split account settlement;
[0085] Input the transaction amount, the average value of the transaction amount, and the standard deviation of the transaction amount into a predefined amount risk scoring function f(x) to obtain the amount risk score of the i-th transaction to be processed;
[0086] The expression of the predefined amount risk scoring function f(x) is as follows:
[0087]
[0088] Where: x i is the transaction amount in the i-th pending transaction; μ is the average transaction amount of the corresponding merchant node ID, and σ is the standard deviation of the transaction amount of the corresponding merchant node ID;
[0089] Input the transaction time, the average transaction time and the standard deviation of the transaction time into a predefined time risk scoring function f(t) to obtain the time risk score of the i-th pending transaction;
[0090] The expression of the predefined time risk score function f(t) is as follows:
[0091]
[0092] Where: t i is the transaction time of the i-th pending transaction; τ is the average transaction time of the corresponding merchant node ID, and θ is the standard deviation of the transaction time of the corresponding merchant node ID;
[0093] Calculate the risk level score of the i-th pending transaction based on the amount risk score and the time risk score;
[0094] The calculation formula of the risk level score is as follows:
[0095] R i =f(x)×λ1+f(t)×λ2;
[0096] Where: R i Score the risk level of the i-th pending transaction, λ1 and λ2 are risk weights greater than λ1>λ2;
[0097] The risk level score is compared with the risk level score threshold in the risk review condition. If the risk level score is greater than or equal to the risk level score threshold, the i-th pending transaction is determined to have risk; if the risk level score is less than the risk level score threshold, the i-th pending transaction is determined to have no risk;
[0098] a4: Repeat the above steps a1 to a3 until i=M, then end the loop, complete the adjustment and optimization of the form to be settled, and obtain the optimized form to be settled;
[0099] It should be understood that pending transactions that are non-compliant or compliant but risky will be submitted to manual review, which not only reduces the pressure of manual review, but also ensures the efficiency of account splitting and settlement of some transactions.
[0100] S103: Calling the second smart contract to perform split-account settlement on the optimized pending settlement form, and recording the split-account settlement data generated during the split-account settlement process;
[0101] In implementation, the account-by-account settlement of the optimized to-be-settled form includes:
[0102] b1: Get the jth pending transaction in the optimized pending settlement list, where the optimized pending settlement list contains N pending transactions, where j and N are integers greater than zero, and N≤M;
[0103] b2: Obtain the merchant node ID in the jth pending transaction, and retrieve the corresponding account splitting rule in the second smart contract according to the mapping relationship between the merchant node ID and the account splitting rule; the account splitting rule at least includes the account splitting amount ratio and the account splitting participant node;
[0104] It should be noted that: a number of mapping relationships between merchant node IDs and account splitting rules are pre-stored in the system database. Each mapping relationship has a merchant node ID and a corresponding account splitting rule. The merchant node ID and the corresponding account splitting rule in each mapping relationship are manually associated and bound by technical personnel in advance, and the account splitting rule corresponding to each merchant node ID is formed in advance based on the mutual agreement of the nodes of the account splitting participants;
[0105] The nodes of the account splitting participants include but are not limited to merchant nodes, e-commerce platform nodes, and bank nodes;
[0106] b3: Calculate the multiple split amounts of the jth pending transaction according to the corresponding splitting rules, and transfer the transaction amount of the jth pending transaction to the private wallet address of each splitting participant node according to the splitting amounts, and set j=j+1, and return to step b1;
[0107] b4: Repeat the above steps b1 to b3 until j=N, then end the loop and complete the account splitting settlement of the optimized form to be settled;
[0108] It should be noted that the transaction amount of the jth pending transaction is stored in a virtual account in advance in the mode of "air splitting", that is, the e-commerce platform applies to a bank institution for a virtual account for fund custody, so the fund turnover no longer passes through the e-commerce platform;
[0109] Further understanding is that traditional e-commerce platforms mostly use the "two-clearing" method for account splitting and settlement. The "two-clearing" method is an extension of the "one-clearing" method. Among them, "one-clearing" means that after the payment transaction is completed, the funds paid by the user are directly cleared and settled through a payment institution with compliance qualifications (such as a licensed third-party payment company or bank), and the funds are cleared to the account of the payee (such as a merchant) at one time; while "two-clearing" means that the funds paid by the user are not directly cleared from the licensed payment institution to the payee, but are first redistributed by an unlicensed intermediary or unlicensed entity. Then it is transferred to the final recipient's account; that is to say, the funds paid by the user go through one or more intermediary links before reaching the final recipient from the payment institution; however, this will form an informal secondary clearing process, which is often unregulated or non-compliant. Therefore, "secondary clearing" is often regarded as a violation by regulators, because unlicensed institutions or individuals handle funds as intermediaries, which not only increases the risk of misappropriation of funds, delayed clearing or money laundering, but also damages the rights and interests of users and merchants; therefore, the "air split account" settlement model is applied to existing e-commerce platforms;
[0110] It is worth noting that: although the "air splitting" method improves the security of funds by bypassing the e-commerce platform, it still has shortcomings in terms of splitting efficiency and security, which can easily cause funds to remain in the escrow account for a long time, and there is a lack of traceability of splitting settlement results;
[0111] The sub-account settlement data includes at least a plurality of pending transactions that have completed the sub-account settlement, a plurality of sub-account amounts that have completed the sub-account settlement, a corresponding sub-account participant node for each sub-account amount, and a private wallet address of each sub-account participant node.
[0112] S104: After completing the split-account settlement, the optimized pending settlement form and split-account settlement data are encrypted and stored in the blockchain, and the above process is repeated to execute the split-account settlement request for the next time period;
[0113] In implementation, the optimized pending settlement form and account-by-account settlement data are encrypted and stored in the blockchain, including:
[0114] Merge the pending settlement form and the sub-account settlement data to generate the sub-account settlement result data;
[0115] The account-settlement result data is sharded to obtain multiple data shards;
[0116] It should be noted that: the slicing process includes but is not limited to a specific one of horizontal slicing, vertical slicing or mixed slicing;
[0117] Each data shard is staggered and merged to obtain multiple merged shards;
[0118] It should be noted that: performing staggered merging of each data shard means performing non-corresponding associative binding on each data shard. For example, assuming that the account settlement result data is sharded, three data shards are obtained, namely A1, B1 and C1. In the staggered merging, A1 and B1 are merged to obtain merged shard A1 B1, A1 and C1 are merged to obtain merged shard A1 C1, and B1 and C1 are merged to obtain B1 C1.
[0119] It should be understood that: through staggered merging, during the data restoration process, as long as any two (limited to the above example scenarios) merged blocks are obtained and the duplicate parts in the merged blocks are compared and removed, the complete account settlement result data can be restored, which greatly enhances the traceability and restorability of the account settlement result data;
[0120] Perform hash calculation on each merged shard to form multiple blocks and hash index of each block, and store each block in blockchain according to the hash index;
[0121] It should be noted that: the hash calculation is implemented using one of the SHA-256 or SHA-3 hash algorithms;
[0122] Through the centralized processing mechanism of preset time periods, the system pressure in high-concurrency transaction scenarios is effectively alleviated, resource utilization is optimized, and the efficiency of account splitting processing is significantly improved; in addition, the smart contract realizes dynamic compliance review and risk assessment of transactions, ensures the accuracy and security of the account splitting process, effectively adapts to the diversified needs of complex transaction scenarios, and solves the problems of rigid rules and insufficient risk control capabilities of traditional methods; at the same time, the account splitting settlement results are encrypted and stored through blockchain technology, which ensures the non-tamperability of the data, realizes the high transparency and traceability of the settlement process, and reduces transaction disputes caused by data disputes; compared with the traditional account splitting method, the present invention optimizes the fund custody and circulation mode, speeds up the capital turnover speed, and reduces the capital retention time, thereby enhancing the trust of all parties to the transaction and the operational reliability of the platform.
[0123] Example 2
[0124] See also Figure 2 As shown, this embodiment discloses a ledger server, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, any one of the blockchain-based ledger settlement methods provided by the above methods is implemented.
[0125] Since the account server introduced in the content of this embodiment is an account server used to implement a blockchain-based account settlement method in the embodiment of this application, based on the blockchain-based account settlement method introduced in the embodiment of this application, the technical personnel of this field can understand the specific implementation method and various variations of the account server of this embodiment, so how the account server implements the method in the embodiment of this application is not described in detail here. As long as the technical personnel of this field implement the account server used in the blockchain-based account settlement method in the embodiment of this application, it belongs to the scope of protection of this application.
[0126] Example 3
[0127] This embodiment discloses a computer-readable storage medium, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, the blockchain-based account splitting and settlement method provided by any one of the above methods is implemented.
[0128] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters, weights and thresholds in the formula are set by technicians in this field according to actual conditions.
[0129] The above embodiments can be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented by software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center through a wired network or a wireless network. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a tape), an optical medium (for example, a DVD) or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.
[0130] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in the present invention can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0131] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0132] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the units is only one, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0133] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0134] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0135] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
[0136] Finally: The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A blockchain-based account splitting and settlement method, characterized in that: The blockchain includes a first smart contract and a second smart contract that are pre-deployed. The method is applied to an account distribution server. The method includes: Obtaining a split-account settlement request within the current time period, wherein the split-account settlement request includes a pending settlement form consisting of multiple pending transactions, and the multiple pending transactions come from different merchant nodes in the blockchain; Call the first smart contract to conduct a risk and compliance review on each pending transaction in the pending settlement form, and adjust and optimize the pending settlement form according to the risk and compliance review results to obtain an optimized pending settlement form; Call the second smart contract to perform split-account settlement on the optimized pending settlement form, and record the split-account settlement data generated during the split-account settlement process; After completing the split-account settlement, the optimized pending settlement form and split-account settlement data are encrypted and stored in the blockchain, and the above process is repeated to execute the split-account settlement request for the next time period.
2. The blockchain-based account splitting and settlement method according to claim 1, characterized in that: Each transaction to be settled contains at least the buyer ID, merchant node ID, product type, payment method, transaction amount and transaction time.
3. The blockchain-based account splitting and settlement method according to claim 2, characterized in that: The risk and compliance review results include one of the following situations: non-compliance, compliance but with risks, and compliance without risks; The risk and compliance review of each pending transaction in the pending settlement form and the adjustment and optimization of the pending settlement form according to the risk and compliance review results include: a1: Get the i-th pending transaction in the pending settlement list, where the pending settlement list contains M pending transactions, and i and M are integers greater than zero; a2: retrieve the compliance review conditions agreed in advance in the first smart contract, and determine whether the i-th pending transaction is compliant based on the compliance review conditions. If not, use the non-compliance as the risk and compliance review result of the i-th pending transaction, remove the i-th pending transaction from the original form to be settled, set i=i+1, and return to step a1. If compliant, jump to step a3; The compliance review conditions include, but are not limited to, restricted commodity types and restricted payment methods; a3: retrieve the risk review conditions agreed in advance in the first smart contract, and determine whether the i-th pending transaction has risks according to the risk review conditions. If there is a risk, mark the i-th pending transaction as compliant but with risks, and use compliance but with risks as the risk and compliance review result of the i-th pending transaction, remove the i-th pending transaction from the original form to be settled, set i=i+1, and return to step a1; if there is no risk, mark the i-th pending transaction as compliant and without risks, and use compliance and without risks as the risk and compliance review result of the i-th pending transaction, set i=i+1, and return to step a1; The risk review condition is specifically a risk level scoring threshold; a4: Repeat the above steps a1 to a3 until i=M, then end the loop, complete the adjustment and optimization of the form to be settled, and obtain the optimized form to be settled.
4. The blockchain-based account splitting and settlement method according to claim 3 is characterized in that: The determining whether the i-th pending transaction is compliant includes: Get the merchant node ID in the i-th pending transaction; According to the mapping relationship between the merchant node ID and the compliance review condition, obtain the corresponding compliance review condition of the corresponding merchant node ID; Compare the corresponding compliance review conditions with the information of the i-th pending transaction. If the corresponding compliance review conditions are completely consistent with the information of the i-th pending transaction, the i-th pending transaction is judged to be compliant; if the corresponding compliance review conditions are not completely consistent with the information of the i-th pending transaction, the i-th pending transaction is judged to be non-compliant.
5. The blockchain-based account splitting and settlement method according to claim 4 is characterized in that: The determining whether the i-th pending transaction has a risk includes: Get the merchant node ID, transaction amount and transaction time in the i-th pending transaction; According to the mapping relationship between the merchant node ID and the risk analysis data, the corresponding risk analysis data of the corresponding merchant node ID is extracted; The risk analysis data includes the average value of the transaction amount, the standard deviation of the transaction amount, the average value of the transaction time, and the standard deviation of the transaction time belonging to the corresponding merchant node ID; Input the transaction amount, the average value of the transaction amount, and the standard deviation of the transaction amount into a predefined amount risk scoring function f(x) to obtain the amount risk score of the i-th transaction to be processed; The expression of the predefined amount risk scoring function f(x) is as follows: Where: x i is the transaction amount in the i-th pending transaction; μ is the average transaction amount of the corresponding merchant node ID, and σ is the standard deviation of the transaction amount of the corresponding merchant node ID; Input the transaction time, the average transaction time and the standard deviation of the transaction time into a predefined time risk scoring function f(t) to obtain the time risk score of the i-th pending transaction; The expression of the predefined time risk score function f(t) is as follows: Where: t i is the transaction time of the i-th pending transaction; τ is the average transaction time of the corresponding merchant node ID, and θ is the standard deviation of the transaction time of the corresponding merchant node ID; Calculate the risk level score of the i-th pending transaction based on the amount risk score and the time risk score; The calculation formula of the risk level score is as follows: R i =f(x)×λ1+f(t)×λ2; Where: R i Score the risk level of the i-th pending transaction, λ1 and λ2 are risk weights greater than λ1>λ2; The risk level score is compared with the risk level score threshold in the risk review conditions. If the risk level score is greater than or equal to the risk level score threshold, the i-th pending transaction is determined to be risky; if the risk level score is less than the risk level score threshold, the i-th pending transaction is determined to be risk-free.
6. The blockchain-based account splitting and settlement method according to claim 5, characterized in that: The performing account-by-account settlement on the optimized to-be-settled form includes: b1: Get the jth pending transaction in the optimized pending settlement list, where the optimized pending settlement list contains N pending transactions, where j and N are integers greater than zero, and N≤M; b2: Obtain the merchant node ID in the jth pending transaction, and retrieve the corresponding account splitting rule in the second smart contract according to the mapping relationship between the merchant node ID and the account splitting rule; the account splitting rule at least includes the account splitting amount ratio and the account splitting participant node; The account splitting participant nodes include merchant nodes, e-commerce platform nodes and bank nodes; b3: Calculate the multiple split amounts of the jth pending transaction according to the corresponding splitting rules, and transfer the transaction amount of the jth pending transaction to the private wallet address of each splitting participant node according to the splitting amounts, and set j=j+1, and return to step b1; b4: Repeat the above steps b1 to b3 until j=N, then end the loop and complete the account splitting settlement of the optimized form to be settled.
7. The blockchain-based account splitting and settlement method according to claim 6, characterized in that: The split-account settlement data at least includes a plurality of pending transactions that have completed split-account settlement, a plurality of split-account amounts that have completed split-account settlement, a corresponding split-account participant node for each split-account amount, and a private wallet address of each split-account participant node.
8. The blockchain-based account splitting and settlement method according to claim 7, characterized in that: The encrypted storage of the optimized pending settlement form and account-by-account settlement data in the blockchain includes: Merge the pending settlement form and the sub-account settlement data to generate the sub-account settlement result data; The account-settlement result data is sharded to obtain multiple data shards; Each data shard is staggered and merged to obtain multiple merged shards; Hash calculation is performed on each merged shard to form multiple blocks and a hash index for each block, and blockchain storage is performed on each block based on the hash index.
9. A ledger server, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the blockchain-based account splitting and settlement method described in any one of claims 1 to 8 is implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed, the blockchain-based account splitting and settlement method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Agricultural product e-commerce platform real-time payment sub-account method and system based on block chain
CN118278933A
General digital management and control system based on block chain and artificial intelligence
CN118313674A
Virtual account transaction verification and recording system based on block chain
CN118941288A
Cited By
Intelligent contract-driven APP automatic accounting system and method
CN121280021A