A digital currency cascading debt settlement method, system, device and storage medium based on a smart contract
By automatically constructing and executing debt chains through smart contracts, the problems of low efficiency in clearing chain debts and easy misappropriation of funds in existing technologies are solved, and efficient, secure digital currency circulation and transparent supervision are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-13
- Publication Date
- 2026-06-12
AI Technical Summary
Current technologies rely on manual intervention to settle chain debts, which is inefficient, makes it difficult to sort out multi-level debt relationships, makes digital currencies easy to be misappropriated during circulation, lacks transparency, and is difficult to regulate.
By automatically acquiring target contracts through smart contracts, constructing multi-level debt chains, generating and executing payment instruction sequences, and realizing the step-by-step transfer and risk detection of digital currency, the transparency and security of the repayment process are ensured.
It automates the repayment of chain debts, improves efficiency, reduces human intervention, ensures the safe circulation and regulatory transparency of digital currencies, and avoids misappropriation of funds and operational errors.
Smart Images

Figure CN122198977A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of blockchain data processing technology, and in particular to a method, system, device and storage medium for settling digital currency chain debts based on smart contracts. Background Technology
[0002] In the modern financial system, the rapid growth of SMEs has become a vital source of market vitality, and their diversified financing needs are driving innovation in inclusive finance and supply chain finance products. However, with the expansion of the economy and the increase in transaction complexity, SME debt problems are giving rise to systemic risks: cash flow disruptions in some enterprises trigger a domino effect, and localized defaults spread rapidly through guarantee chains and supply chains, creating a risk resonance; information silos lead to the misappropriation of digital currencies and frequent defaults in related-party transactions. These problems directly affect the balance of interests among multiple parties, and a single debt crisis can evolve into a systemic liquidity crisis, exacerbating financial market volatility.
[0003] Current debt resolution mechanisms primarily rely on the flow of digital currency to heavily regulated entrusted payments. Financial institutions use contractual agreements and manual verification to directly pay digital currency to designated parties, ensuring that funds are used for their intended purpose. While this approach can address the issue of cascading debt to some extent, it is cumbersome, time-consuming, and highly dependent on manual intervention and manpower. Specifically, existing technologies suffer from the following shortcomings: They rely on manual intervention, resulting in low efficiency. They depend on financial institutions for digital currency supervision and payment operations, and the process requires manual review and approval, leading to low efficiency and susceptibility to human intervention. The repayment of a multi-tiered debt may take days or even weeks. The rules are rigid and lack flexibility, failing to adapt to dynamic business scenarios such as debt restructuring and extensions. Risk identification capabilities are insufficient: third-party institutions cannot automatically identify multilateral cascading debt. If an institution experiences a credit crisis or operational errors, it may lead to duplicate payments or resource misallocation, causing payment interruptions or digital currency losses. Information is opaque, making supervision difficult: the debt repayment process lacks full-process transparent tracking, making it difficult for regulatory agencies to conduct thorough audits, and posing a high risk of digital currency misappropriation.
[0004] Therefore, how to improve the automation, flexibility, and transparency of debt settlement while reducing the risks of human intervention and misappropriation of digital currencies has become an urgent technical problem to be solved in this field. Summary of the Invention
[0005] This invention automatically acquires the target smart contract in response to a triggering event, replacing the manual process; it automatically identifies the source debtor and constructs a chain of debts by pre-setting debt repayment rules, simulating the judgment logic of manually sorting out debt relationships; and it improves the transparency and security of digital currency circulation by automatically transferring digital currency based on debt chain information and rules, effectively solving the problems of relying on manual intervention for chain debt repayment, difficulty in sorting out multi-level debt relationships, and easy misappropriation of digital currency in existing technologies.
[0006] The purpose of this invention is to provide a method for settling digital currency cascading debts based on smart contracts; The technical solution provided by this invention is as follows: A method for settling digital currency chain debt based on smart contracts includes: In response to a triggering event, retrieve the target smart contract from the blockchain; Based on the debt repayment rules preset in the target smart contract, the source debt subject associated with the triggering event is determined, and multi-level debt relationship information related to the source debt subject is obtained from the blockchain to construct a chain of debts containing multiple debt levels. Based on the debt relationship information contained in the chain of debts and the debt repayment rules, a sequence of payment instructions is generated to be executed level by level along the debt hierarchy of the chain of debts. The payment instruction sequence is executed so that the digital currency corresponding to the triggering event is transferred from the source debtor to the target debtors at each level along the chain of debts until all debts in the chain of debts are settled.
[0007] Preferably, the debt repayment rules include debt relationship identification rules, debt repayment triggering conditions, and debt repayment priority; Based on the pre-set debt repayment rules in the target smart contract, the source debtor associated with the triggering event is determined, and multi-level debt relationship information related to the source debtor is obtained from the blockchain to construct a chain of debts containing multiple debt levels, including: Based on the debt relationship identification rules, the triggering event is analyzed to determine the source debtor involved in the triggering event; According to the debt repayment triggering conditions, at least one target debtor is queried from the blockchain that has a debt relationship with the source debtor and meets the debt repayment triggering conditions, and the debt relationship information between the source debtor and the at least one target debtor is obtained, including the debt amount; Based on the source debtor, the at least one target debtor, and the debt relationship information, the secondary debt relationship information related to the at least one target debtor is obtained through recursive querying to construct a chain of debts containing multiple debt levels.
[0008] Preferably, the debt repayment rules also include a debt repayment ratio; The step of generating a sequence of payment instructions to be executed level by level along the debt hierarchy of the chain of debts, based on the debt relationship information contained in the chain of debts and the debt repayment rules, includes: Analyze the triggering event to determine the available repayment amount corresponding to the triggering event; Based on the debt repayment priority, the debt repayment ratio, and the debt amount of each level in the chain of debts, a hierarchical allocation scheme for the available repayment amount in the chain of debts is determined. According to the hierarchical allocation scheme, at least one payment instruction corresponding to each debt level is generated sequentially according to the debt hierarchy of the chain of debts, forming the payment instruction sequence.
[0009] Preferably, the execution of the payment instruction sequence, causing the digital currency corresponding to the triggering event to be transferred step-by-step from the source debtor to each target debtor along the chain of debts until all debts in the chain of debts are repaid, includes: Obtain the current level payment instruction from the payment instruction sequence, execute the current level payment instruction, and transfer the corresponding amount of digital currency from the digital currency account of the current source debtor to the digital currency account of the corresponding current level target debtor. The target debtor who receives digital currency and belongs to a non-terminal node in the chain of debts will be used as a new source debtor at the next level, and the next level of payment instructions will be obtained from the payment instruction sequence. The process involves iterating through each target debtor in the chain of debts that has received digital currency and is a non-terminal node in the chain, executing the corresponding payment instruction to transfer the digital currency, until all debts in the chain of debts are repaid.
[0010] Preferably, before generating a sequence of payment instructions to be executed level by level along the debt hierarchy of the chain of debts, the method further includes: Risk detection is performed on the triggering event and the chain of debts to obtain risk detection results. The risk detection includes at least one of transaction anomaly detection, debtor credit risk assessment and debt chain closed-loop detection. If the detection result exceeds the preset risk threshold, the subsequent transfer operation of the method is terminated.
[0011] Preferably, the triggering event includes at least one of the following: The source debtor's digital currency wallet receives external payment funds; The blockchain system reaches the preset repayment time point in the debt repayment rules; Receive a repayment instruction from a regulatory agency or the debtor.
[0012] Preferably, after executing the payment instruction sequence, causing the digital currency corresponding to the triggering event to be transferred step by step from the source debtor to each level of the target debtor along the chain of debts until all debts in the chain of debts are repaid, the method further includes: The transaction data in the transfer operation is encrypted by calling a zero-knowledge proof protocol to generate encrypted debt data and store it in the blockchain. In response to an audit request from a regulatory node, a verification key is provided to the regulatory node; The regulatory node verifies the encrypted debt data using the verification key, and confirms that the chain of debts has been settled in accordance with the debt settlement rules without disclosing specific debt details and transaction amounts.
[0013] The second objective of this invention is to provide a digital currency chain debt repayment system based on smart contracts; The technical solution provided by this invention is as follows: A smart contract-based digital currency chain debt repayment system includes: The acquisition module is used to retrieve the target smart contract from the blockchain in response to a triggering event; The debt chain construction module is used to determine the source debt subject associated with the triggering event based on the debt repayment rules preset in the target smart contract, and to obtain multi-level debt relationship information related to the source debt subject from the blockchain, so as to construct a chain of debts containing multiple debt levels. The instruction generation module is used to generate a sequence of payment instructions that are executed level by level along the debt hierarchy of the chain of debts, based on the debt relationship information contained in the chain of debts and the debt repayment rules. The instruction execution module is used to execute the payment instruction sequence, so that the digital currency corresponding to the triggering event is transferred from the source debtor to the target debtors at each level along the chain of debts until all debts in the chain of debts are repaid.
[0014] The third objective of this invention is to provide a computer device; The technical solution provided by this invention is as follows: A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of any one of the digital currency chain debt repayment methods.
[0015] A fourth objective of this invention is to provide a computer-readable storage medium; The technical solution provided by this invention is as follows: A computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of any of the digital currency chain debt repayment methods described above.
[0016] This invention provides a method for settling a chain of digital currency debts based on smart contracts, comprising: responding to a triggering event by obtaining a target smart contract from the blockchain; determining the source debtor associated with the triggering event based on the debt settlement rules preset in the target smart contract, and obtaining multi-level debt relationship information related to the source debtor from the blockchain to construct a chain of debts containing multiple debt levels; generating a sequence of payment instructions to be executed level by level along the debt levels of the chain of debts according to the debt relationship information and debt settlement rules contained in the chain of debts; executing the sequence of payment instructions to transfer the digital currency corresponding to the triggering event from the source debtor to each level of the target debtor along the chain of debts until all debts in the chain of debts are settled. This invention solves the technical problems of low efficiency due to reliance on manual intervention, difficulty in sorting out multi-level debts, and susceptibility to misappropriation during the circulation of digital currency in the prior art.
[0017] The present invention also provides a digital currency chain debt repayment system based on smart contracts. Since this system and the digital currency chain debt repayment method based on smart contracts solve the same technical problem and belong to the same technical concept, they should have the same beneficial effects, and will not be described in detail here. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is a flowchart illustrating a method for settling a series of digital currency debts based on smart contracts, as described in an embodiment of the present invention. Figure 2 This is a schematic diagram of the structure of a digital currency chain debt repayment system based on smart contracts in an embodiment of the present invention; Figure 3 This is an internal structural diagram of a computer device according to an embodiment of the present invention. Detailed Implementation
[0020] To enable those skilled in the art to better understand the technical solutions in this application, the technical solutions in the embodiments of this application will be clearly and completely described below. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0021] like Figure 1 As shown, this embodiment of the invention provides a method for settling digital currency cascading debt based on smart contracts, including: S1. In response to the triggering event, retrieve the target smart contract from the blockchain; It should be noted that a smart contract is an automated protocol based on blockchain technology that can automatically execute contract terms when preset conditions are met, without relying on third-party intermediaries. Essentially, it is a computer program stored on the blockchain that defines rules, enforces transactions, and ensures transparency and immutability through code. The target smart contract in this application is a personalized smart contract pre-signed by multiple parties involved in a chain of debt with a bank, based on their specific needs. The digital currency can be digital RMB or online banking, etc.
[0022] Preferably, the triggering event includes at least one of the following: The source debtor's digital currency wallet receives external payments; The blockchain system reaches the preset repayment time point in the debt repayment rules; Receive a repayment instruction from a regulatory agency or the debtor.
[0023] In this embodiment, a triggering event is the initial condition for initiating the entire debt repayment process. Triggering events can take various forms, such as: the source debtor's digital currency wallet receiving external payments, the blockchain system reaching a preset time point, or receiving a repayment instruction from an external entity (such as a regulatory body or the debtor). When the system detects a triggering event, it immediately responds and retrieves the target smart contract associated with that event from the blockchain. This target smart contract is a computer program pre-deployed on the blockchain, which encodes the various rules and logic required for debt repayment.
[0024] In practical applications, the blockchain's event listening mechanism monitors the on-chain state or external inputs in real time. Once a triggering event that meets preset conditions is detected, the corresponding smart contract address is automatically invoked, the contract code is read from the blockchain, and loaded into the execution environment. This process is completely automated and requires no manual intervention. By automatically responding to triggering events and obtaining the smart contract, the settlement process is initiated, avoiding the time lag and operational costs associated with manually initiating processes in traditional methods. Simultaneously, it ensures that each execution is based on the latest smart contract version on the blockchain.
[0025] S2. Based on the debt repayment rules preset in the target smart contract, determine the source debt subject associated with the triggering event, and obtain multi-level debt relationship information related to the source debt subject from the blockchain to construct a chain of debts containing multiple debt levels. It should be noted that the "chain debt" in this application refers to a network of debt relationships among multiple economic entities that exhibits characteristics of transmission and chain reactions. Specifically, chain debt refers to one or more interconnected debt chains formed by three or more debtors through direct creditor-debtor relationships. Changes in the digital currency repayment capacity of any entity may be transmitted along the debt chain, triggering a chain reaction.
[0026] In this embodiment, the target smart contract has pre-set debt repayment rules. These rules define how to identify the entity that needs to fulfill its repayment obligations, i.e., the source debtor, based on a triggering event, and how to obtain other entities with debt relationships with this entity and their corresponding debt information from the blockchain. Specifically, the smart contract parses the information carried by the triggering event and determines the source debtor based on the identification logic in the repayment rules. Subsequently, according to the debt relationship query method defined in the rules, it retrieves multi-level debtors with direct or indirect debt relationships with the source debtor from the debt relationship data stored on the blockchain and extracts relationship information such as debt amount and maturity status. Finally, this information is integrated into a chain of debts.
[0027] In practical applications, smart contracts, as automatically executing code, begin running their internal logic immediately upon acquisition. They determine the source debtor by parsing the context data of the triggering event (such as transaction hashes, timestamps, and involved account addresses) and combining this information with a pattern matching algorithm defined in the rules. Then, the smart contract traverses the debt relationship ledger on the blockchain (usually stored as a mapping table or linked list), searching for all records where the source debtor is the debtor, and recursively retrieves related debts level by level according to the rules until a complete debt chain is formed. The entire process is executed atomically within the blockchain virtual machine, ensuring the accuracy and immutability of the query results.
[0028] Compared to existing technologies, smart contracts automatically identify the source debtor and dynamically construct the debt chain, completely replacing the tedious work of manually sorting out multi-level debt relationships and eliminating the risk of human omissions and errors. Simultaneously, debt relationship information is obtained directly from the blockchain, ensuring data authenticity and consistency, laying a reliable foundation for accurate repayment. This step compresses the traditional manual reconciliation process, which takes days or even weeks, to seconds, significantly improving debt processing efficiency. Furthermore, when repayment rules change, the smart contract rules, modified programmatically, are more flexible and can better adapt to dynamically changing business needs such as debt restructuring and extensions.
[0029] S3. Based on the debt relationship information and debt repayment rules contained in the chain of debts, generate a sequence of payment instructions to be executed level by level along the debt hierarchy of the chain of debts; In this embodiment, after constructing a multi-tiered debt chain, the debt repayment rules need to be transformed into an executable sequence of payment operations. The debt repayment rules are pre-defined logic within the smart contract, defining how digital currency should be allocated among debtors at different levels. The smart contract analyzes the structure of the multi-tiered debt chain, identifying the complete path from the source debtor, through intermediate debtors, to the final creditor, and the corresponding debt amount at each level. Then, based on this information and the rules, a set of ordered payment instructions is generated. These instructions are arranged according to the hierarchical order of the debt chain, forming a payment instruction sequence. Each payment instruction corresponds to a specific payment step, clearly defining the payer, payee, and payment amount at the current level.
[0030] By generating a sequence of payment instructions executed hierarchically along the debt hierarchy, smart contracts transform the complex multi-level debt repayment problem into a series of ordered, automated payment operations. This serialization process ensures that the logical order of digital currency flow is completely consistent with the debt relationship, avoiding digital currency mismatch or double payment problems that may occur due to parallel or disordered payments. Furthermore, the generation of the payment instruction sequence requires no manual intervention, significantly improving the efficiency and accuracy of debt processing.
[0031] S4. Execute the payment instruction sequence to transfer the digital currency corresponding to the triggering event from the source debtor to the target debtors at each level along the chain of debts until all debts in the chain of debts are repaid.
[0032] In this embodiment, after the payment instruction sequence is generated, the target smart contract begins to execute these instructions sequentially. The execution process starts with the first instruction in the sequence, which corresponds to a payment from the source debtor to the first-level target debtor. The smart contract calls the underlying blockchain's digital currency transfer interface to transfer a specified amount of digital currency from the source debtor's account to the wallet of the first-level target debtor. After the first payment is completed, it is determined whether the debtor receiving the digital currency is at the end of the chain of debts. If it is not at the end of the chain, it will become the source debtor for the next level of payment. The smart contract then executes the next instruction in the sequence, transferring digital currency from that entity's account to the next-next-level target debtor. This process continues level by level until all instructions in the sequence have been executed. At this point, the digital currency injected by the source debtor has been transferred along the debt chain to the accounts of every creditor who is entitled to receive it, and all debts have been settled.
[0033] In practical applications, smart contracts traverse the payment instruction sequence through loops or iterations. In each iteration, the smart contract obtains the current instruction, verifies whether the source debtor's balance is sufficient (if insufficient, it triggers pre-defined exception handling), and if the debtor's balance meets the amount required to pay the target bondholder, it makes payment to the target bondholder. Subsequently, the smart contract updates its internal state, marks the current instruction as completed, and moves to the next instruction. The entire process is executed atomically on the blockchain, and the result of each step is immutable. If a payment fails at any level due to insufficient balance or other reasons, the smart contract can decide, according to rules, whether to suspend the entire process or skip that instruction and continue executing subsequent instructions. For multi-level debt, the smart contract uses a loop or recursive approach, using the amount of digital currency received at each level as the available amount for the next level, automatically triggering a new round of repayment logic, forming a through-payment of digital currency. Throughout the process, the smart contract automatically distributes the funds, ensuring that the digital currency flows strictly according to the repayment rules.
[0034] Compared to existing technologies, this method automates the entire debt repayment process by automatically executing digital currency transfers via smart contracts, eliminating the need for manual payment instructions and preventing human delays and errors. Simultaneously, direct, penetrating payment of digital currency prevents misappropriation in intermediate stages, ensuring that funds are used for their intended purpose. Furthermore, the transfer records are permanently stored on the blockchain, providing immutable audit trails. This application simplifies complex, multi-level debt repayment into a single, automatically completed closed-loop process, significantly improving the efficiency and security of digital currency turnover.
[0035] Preferably, the debt repayment rules include debt relationship identification rules, debt repayment triggering conditions, and debt repayment priority; Step S2 includes: A1. Based on the debt relationship identification rules, analyze the triggering event to determine the source debt subject involved in the triggering event; In this embodiment, the smart contract decomposes and analyzes the data structure of the triggering event according to the parsing logic defined in the debt relationship identification rules, and extracts the subject that needs to fulfill the debt repayment obligation, namely the source debt subject.
[0036] A2. Based on the debt repayment triggering conditions, query the blockchain for at least one target debtor that has a debt relationship with the source debtor and meets the debt repayment triggering conditions, and obtain the debt relationship information between the source debtor and at least one target debtor, including the debt amount; In this embodiment, after identifying the source debtor, the smart contract needs to find all other entities with debt relationships to the source debtor from the debt relationship data stored on the blockchain. However, not all of these debts need to be processed at the current moment—only debts that meet the debt repayment trigger conditions are selected. Debt repayment trigger conditions may include, but are not limited to, whether the debt is due or in dispute. The smart contract filters the queried debt relationships one by one based on these conditions, retaining only those that meet the conditions and obtaining key information such as the debt amount contained within them. After filtering based on the conditions, the remaining debt relationships are the target debts that need to be processed in this repayment process. The smart contract extracts creditor information (i.e., target debtor information) and debt amounts from these debt relationships to prepare for subsequent repayment.
[0037] By employing a screening mechanism for debt repayment trigger conditions, the risks of premature or erroneous payments are avoided, ensuring the compliance and rationality of repayment actions. Simultaneously, obtaining debt relationship information directly from the blockchain guarantees the authenticity and immutability of the data, providing a reliable basis for accurate repayment.
[0038] A3. Based on the source debt entity, at least one target debt entity, and debt relationship information, obtain the sub-debt relationship information related to at least one target debt entity through recursive querying, so as to construct a chain of debts containing multiple debt levels.
[0039] In this embodiment, after identifying the source debtor and screening eligible debt relationships, the smart contract integrates this information to construct a structured data model—a chain of debts. This debt chain includes the source debtor, the destination debtor, and specific information about each debt, such as the amount. If the screened debt relationships involve multiple target debtors, the debt chain presents a "one-to-many" radial structure; if these target debtors also owe debts to others, the debt chain can be further expanded into a multi-level chain structure. By constructing a structured chain of debts, the smart contract integrates scattered debt relationships stored on the blockchain into an organic whole, providing a directly traversable data structure for subsequent digital currency transfers, making the complex multi-debt repayment process orderly, controllable, and traceable.
[0040] Preferably, the debt repayment rules also include a debt repayment ratio; Step S3 includes: B1. Analyze the triggering event and determine the available repayment amount corresponding to the triggering event; In this embodiment, the triggering event itself carries digital currency amount information. For example, when the source debtor's account receives external payment, the amount of that payment is the available repayment amount. The smart contract automatically extracts this value by parsing the event data structure. For time-triggered or instruction-triggered events, the available repayment amount may come from a fixed amount preset by the rules, an amount specified in the instruction, or be obtained by querying the real-time balance of the source debtor's account.
[0041] B2. Based on the debt repayment priority, debt repayment ratio, and the debt amount of each level in the chain of debts, determine the hierarchical allocation plan of the available repayment amount in the chain of debts; In this embodiment, debt repayment priority is used to determine the processing order among multiple debts, such as priority for debts with earlier due dates or those with collateral; debt repayment ratio is used to specify the allocation ratio of each debt when digital currency is insufficient, such as equal allocation or full allocation for debts with higher priority. The smart contract combines these rules and calculates the actual repayment amount due for each level and each debt based on the amount of debt at each level in the debt chain, forming a hierarchical allocation scheme.
[0042] B3. According to the hierarchical allocation scheme, at least one payment instruction corresponding to each debt level is generated sequentially according to the debt hierarchy of the chain of debts, forming a sequence of payment instructions.
[0043] In this embodiment, the smart contract transforms the hierarchical allocation scheme generated in step B2 into executable payment instructions, which are then arranged according to the natural hierarchical order of the debt chain. Each level may correspond to one or more payment instructions. These instructions are organized into an ordered sequence, starting from the source debtor and proceeding downwards, ensuring that the digital currency can flow correctly along the debt chain during subsequent execution.
[0044] Step S4 includes: C1. Obtain the payment instruction at the current level from the payment instruction sequence, execute the payment instruction at the current level, and transfer the corresponding amount of digital currency from the digital currency account of the current source debtor to the digital currency account of the corresponding target debtor at the current level. In this embodiment, the smart contract begins executing a sequence of payment instructions, starting with the first instruction, corresponding to the first level. It invokes the underlying blockchain's digital currency transfer interface to transfer a specified amount of digital currency from the account of the current source debtor (initially the source debtor) to the wallet of the target debtor at the current level. This transaction is then verified by the blockchain network and packaged into a block, completing the digital currency transfer.
[0045] C2. The target debtor who has received digital currency and is not a terminal node in the chain of debts is taken as the new source debtor at the next level, and the payment instructions at the next level are obtained from the payment instruction sequence. In this embodiment, once a cryptocurrency payment is completed, if the debtor receiving the cryptocurrency is not at the end of the debt chain, it will automatically become the payer in the next round of payments, i.e., a new source debtor at the next level. The smart contract recognizes this role change and retrieves the corresponding next-level instruction from the payment instruction sequence, preparing to execute the next payment.
[0046] By automatically switching eligible target debtors to new source debtors, smart contracts enable the automatic transfer of funds within the debt chain, completing multi-level flows without human intervention. This mechanism ensures that funds can naturally extend along the debt chain, reaching the ultimate creditor, demonstrating the core advantage of transparent payment.
[0047] C3. Traverse each target debtor in the chain of debts that has received digital currency and is not a terminal node in the chain of debts, execute the corresponding level of payment instructions to transfer the digital currency, until all debts in the chain of debts are settled.
[0048] In this embodiment, the smart contract repeatedly executes steps C1 and C2, processing each level of the payment instruction sequence sequentially. Upon completion of each level of payment, the non-end node among the payees is designated as the new source debtor, and the next level of payment continues. This process continues level by level until all instructions in the sequence have been executed. At this point, the funds transferred to the source debtor's account have been passed along the debt chain to each deserving creditor, and all debts have been settled.
[0049] Preferably, before step S4, the method further includes: D1. Conduct risk detection on triggering events and chain debts to obtain risk detection results. Risk detection includes at least one of the following: abnormal transaction detection, credit risk assessment of debtors, and closed-loop detection of debt chains. In this embodiment, before the formal transfer payment operation is executed, the smart contract first activates a risk detection mechanism to comprehensively evaluate the triggering event and the constructed debt chain. Transaction anomaly detection is used to identify situations such as duplicate payments and abnormal amounts; the debtor's credit risk assessment is based on on-chain or off-chain data to determine the debtor's repayment ability and creditworthiness; debt chain closed-loop detection is used to discover whether there is circular debt (such as A→B→C→A), which may lead to idle funds or risk accumulation.
[0050] In practical applications, smart contracts invoke dedicated risk detection modules to acquire relevant data and perform calculations. For example, they analyze historical transaction records to determine if the current triggering event is abnormal; they assess the creditworthiness of debtors by querying on-chain credentials from credit rating agencies; and they use graph theory algorithms to detect loops in the debt chain. The results of each detection are quantified as risk scores and compared with preset thresholds.
[0051] D2. If the test result exceeds the preset risk threshold, the subsequent transfer operation of the method shall be terminated.
[0052] In this embodiment, if any risk detection result in step D1 exceeds a preset threshold, the smart contract will immediately suspend the entire settlement process and cease executing subsequent payment instructions. Simultaneously, an alarm message can be generated and sent to the regulatory node and relevant debtor entities, indicating the risk details. This application, through a circuit breaker mechanism, achieves proactive risk control and immediate response, preventing the risk from escalating.
[0053] This application achieves zero-delay initiation of repayment by automatically acquiring smart contracts in response to triggering events, replacing manual initiation; it automatically sorts out scattered debt relationships by constructing a multi-level, interconnected debt chain based on preset repayment rules, replacing manual reconciliation and avoiding omissions; it generates and executes a sequence of payment instructions that are executed level by level according to debt relationship information and rules, achieving transparent fund transfer and preventing misappropriation of funds in intermediate links; it establishes a circuit breaker mechanism by performing risk detection before generating the payment instruction sequence and terminating the operation when a threshold is exceeded, improving risk control capabilities; and it verifies the authenticity and compliance of repayment without disclosing specific debt details by encrypting transaction data using zero-knowledge proofs and providing verification keys to regulatory nodes. This invention effectively solves the technical problems of existing technologies, such as inefficiency due to reliance on manual labor, difficulty in sorting out multi-level debts, susceptibility to fund misappropriation, lagging risk control, and the difficulty in balancing privacy and regulation.
[0054] like Figure 2 As shown, this embodiment of the invention provides a digital currency cascading debt repayment system based on smart contracts, comprising: The acquisition module is used to retrieve the target smart contract from the blockchain in response to a triggering event; The debt chain construction module is used to determine the source debt subject associated with the triggering event based on the debt repayment rules preset in the target smart contract, and to obtain multi-level debt relationship information related to the source debt subject from the blockchain in order to construct a chain of debts containing multiple debt levels. The instruction generation module is used to generate a sequence of payment instructions that are executed level by level along the debt hierarchy of the chain of debts, based on the debt relationship information and debt repayment rules contained in the chain of debts. The instruction execution module is used to execute the payment instruction sequence, so that the digital currency corresponding to the triggering event is transferred from the source debtor to the target debtors at each level along the chain of debts, until all debts in the chain of debts are repaid.
[0055] Specific limitations regarding a smart contract-based digital currency chain debt settlement system can be found in the above description of a smart contract-based digital currency chain debt settlement method, and will not be repeated here. Each module in the aforementioned smart contract-based digital currency chain debt settlement system can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.
[0056] like Figure 3As shown, in one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it performs the following steps: In response to a triggering event, retrieve the target smart contract from the blockchain; Based on the debt repayment rules preset in the target smart contract, the source debt subject associated with the triggering event is identified, and multi-level debt relationship information related to the source debt subject is obtained from the blockchain to construct a chain of debts containing multiple debt levels. Based on the debt relationship information and debt repayment rules contained in the chain of debts, a sequence of payment instructions is generated to be executed level by level along the debt hierarchy of the chain of debts; The sequence of payment instructions is executed, causing the digital currency corresponding to the triggering event to be transferred from the source debtor to the target debtors at each level along the chain of debts, until all debts in the chain of debts are repaid.
[0057] Those skilled in the art will understand that Figure 3 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0058] In one embodiment, a computer-readable storage medium is provided, storing a computer program that, when executed by a processor, performs the following steps: In response to a triggering event, retrieve the target smart contract from the blockchain; Based on the debt repayment rules preset in the target smart contract, the source debt subject associated with the triggering event is identified, and multi-level debt relationship information related to the source debt subject is obtained from the blockchain to construct a chain of debts containing multiple debt levels. Based on the debt relationship information and debt repayment rules contained in the chain of debts, a sequence of payment instructions is generated to be executed level by level along the debt hierarchy of the chain of debts; The sequence of payment instructions is executed, causing the digital currency corresponding to the triggering event to be transferred from the source debtor to the target debtors at each level along the chain of debts, until all debts in the chain of debts are repaid.
[0059] In the embodiments provided in this application, it should be understood that the disclosed methods and systems can be implemented in other ways. The system embodiments described above are merely illustrative. For example, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple modules or components can be combined, or integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, and can be electrical, mechanical, or other forms.
[0060] Furthermore, in the various embodiments of the present invention, each functional module can be fully integrated into a processor, or each module can be a separate device, or two or more modules can be integrated into a device; each functional module in the various embodiments of the present invention can be implemented in hardware or in the form of hardware plus software functional units.
[0061] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by program instructions and related hardware. The aforementioned program instructions can be stored in a computer-readable storage medium. When the program instructions are executed, they perform the steps of the above method embodiments. The aforementioned storage medium includes various media that can store program code, such as mobile storage devices, read-only memory (ROM), magnetic disks, or optical disks.
[0062] It should be understood that the use of terms such as "system," "apparatus," "unit," and / or "module" in this application is only applicable to distinguishing different components, elements, parts, sections, or assemblies at different levels. However, if other terms can achieve the same purpose, they may be replaced by other expressions.
[0063] As indicated in this application and claims, unless the context clearly indicates otherwise, the words "a," "an," "a," and / or "the" are not specifically singular and may include the plural. Generally, the terms "comprising" and "including" only indicate the inclusion of expressly identified steps and elements, which do not constitute an exclusive list, and the method or apparatus may also include other steps or elements. An element defined by the phrase "comprising an..." does not exclude the presence of other identical elements in the process, method, product, or apparatus that includes the element.
[0064] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, "a plurality of" or "several" means two or more, unless otherwise explicitly specified.
[0065] If a flowchart is used in this application, it is used to illustrate the operations performed by the system according to embodiments of this application. It should be understood that the preceding or following operations are not necessarily performed in exact order. Instead, the steps can be processed in reverse order or simultaneously. Furthermore, other operations can be added to these processes, or one or more steps can be removed from them.
[0066] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for settling digital currency chain debts based on smart contracts, characterized in that, include: In response to a triggering event, retrieve the target smart contract from the blockchain; Based on the debt repayment rules preset in the target smart contract, the source debt subject associated with the triggering event is determined, and multi-level debt relationship information related to the source debt subject is obtained from the blockchain to construct a chain of debts containing multiple debt levels. Based on the debt relationship information contained in the chain of debts and the debt repayment rules, a sequence of payment instructions is generated to be executed level by level along the debt hierarchy of the chain of debts. The payment instruction sequence is executed so that the digital currency corresponding to the triggering event is transferred from the source debtor to the target debtors at each level along the chain of debts until all debts in the chain of debts are settled.
2. The method for settling digital currency cascading debts according to claim 1, characterized in that, The debt repayment rules include debt relationship identification rules, debt repayment triggering conditions, and debt repayment priority. Based on the pre-set debt repayment rules in the target smart contract, the source debtor associated with the triggering event is determined, and multi-level debt relationship information related to the source debtor is obtained from the blockchain to construct a chain of debts containing multiple debt levels, including: Based on the debt relationship identification rules, the triggering event is analyzed to determine the source debtor involved in the triggering event; According to the debt repayment triggering conditions, at least one target debtor is queried from the blockchain that has a debt relationship with the source debtor and meets the debt repayment triggering conditions, and the debt relationship information between the source debtor and the at least one target debtor is obtained, including the debt amount; Based on the source debtor, the at least one target debtor, and the debt relationship information, the secondary debt relationship information related to the at least one target debtor is obtained through recursive querying to construct a chain of debts containing multiple debt levels.
3. The method for settling digital currency cascading debts according to claim 2, characterized in that, The debt repayment rules also include the debt repayment ratio; The step of generating a sequence of payment instructions to be executed level by level along the debt hierarchy of the chain of debts, based on the debt relationship information contained in the chain of debts and the debt repayment rules, includes: Analyze the triggering event to determine the available repayment amount corresponding to the triggering event; Based on the debt repayment priority, the debt repayment ratio, and the debt amount of each level in the chain of debts, a hierarchical allocation scheme for the available repayment amount in the chain of debts is determined. According to the hierarchical allocation scheme, at least one payment instruction corresponding to each debt level is generated sequentially according to the debt hierarchy of the chain of debts, forming the payment instruction sequence.
4. The method for settling digital currency cascading debts according to claim 3, characterized in that, The execution of the payment instruction sequence causes the digital currency corresponding to the triggering event to be transferred from the source debtor to each level of the chain of debts, until all debts in the chain of debts are repaid, including: Obtain the current level payment instruction from the payment instruction sequence, execute the current level payment instruction, and transfer the corresponding amount of digital currency from the digital currency account of the current source debtor to the digital currency account of the corresponding current level target debtor. The target debtor who receives digital currency and belongs to a non-terminal node in the chain of debts will be used as a new source debtor at the next level, and the next level of payment instructions will be obtained from the payment instruction sequence. The process involves iterating through each target debtor in the chain of debts that has received digital currency and is a non-terminal node in the chain, executing the corresponding payment instruction to transfer the digital currency, until all debts in the chain of debts are repaid.
5. The method for settling digital currency cascading debts according to claim 1, characterized in that, Before generating a sequence of payment instructions to be executed level by level along the chain of debts, the process also includes: Risk detection is performed on the triggering event and the chain of debts to obtain risk detection results. The risk detection includes at least one of transaction anomaly detection, debtor credit risk assessment and debt chain closed-loop detection. If the detection result exceeds the preset risk threshold, the subsequent transfer operation of the method is terminated.
6. The method for settling digital currency cascading debts according to any one of claims 1-5, characterized in that, The triggering event includes at least one of the following: The source debtor's digital currency wallet receives external payment funds; The blockchain system reaches the preset repayment time point in the debt repayment rules; Receive a repayment instruction from a regulatory agency or the debtor.
7. The method for settling digital currency cascading debts according to claim 1, characterized in that, The execution of the payment instruction sequence, which transfers the digital currency corresponding to the triggering event from the source debtor to each target debtor along the chain of debts until all debts in the chain of debts are repaid, also includes: The transaction data in the transfer operation is encrypted by calling a zero-knowledge proof protocol to generate encrypted debt data and store it in the blockchain. In response to an audit request from a regulatory node, a verification key is provided to the regulatory node; The regulatory node verifies the encrypted debt data using the verification key, and confirms that the chain of debts has been settled in accordance with the debt settlement rules without disclosing specific debt details and transaction amounts.
8. A digital currency chain debt repayment system based on smart contracts, characterized in that, include: The acquisition module is used to retrieve the target smart contract from the blockchain in response to a triggering event; The debt chain construction module is used to determine the source debt subject associated with the triggering event based on the debt repayment rules preset in the target smart contract, and to obtain multi-level debt relationship information related to the source debt subject from the blockchain, so as to construct a chain of debts containing multiple debt levels. The instruction generation module is used to generate a sequence of payment instructions that are executed level by level along the debt hierarchy of the chain of debts, based on the debt relationship information contained in the chain of debts and the debt repayment rules. The instruction execution module is used to execute the payment instruction sequence, so that the digital currency corresponding to the triggering event is transferred from the source debtor to the target debtors at each level along the chain of debts until all debts in the chain of debts are repaid.
9. A computer device, characterized in that, The method includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the digital currency chain debt repayment method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the digital currency cascade debt repayment method as described in any one of claims 1-7.