A transaction management method and device based on related transaction rules
By managing fund transactions based on related transaction rules in the blockchain system, the problem of opaque capital placement and use is solved, and transparent and secure management of fund transactions is achieved.
Patent Information
- Application Number
- CN202080029741.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2019-03-01
- Filing Date
- 2020-01-19
- Publication Date
- 2025-05-23
- Estimated Expiration
- 2040-01-19
AI Technical Summary
In the scenarios of targeted poverty alleviation and social welfare, the investment of funds is opaque, the information is not disclosed, and the use of unreasonable results in difficulties in fund management and the historical path of funding is not tracked.
By implementing a transaction management method based on related transaction rules in the blockchain system, a fund transaction request is obtained and a related transaction set related to the fund transaction request is determined from the blocks of the blockchain system based on the fund ID. According to the transaction rules carried by each fund transaction in the related transaction set, whether the fund transaction request is valid and the corresponding processing is carried out.
It realizes transparent management of fund transactions, ensures the effectiveness and security of fund transactions, facilitates traceability of fund transactions, and ensures the rational use of funds.
Smart Images

Figure CN113711264B_ABST
Abstract
Description
[0001] This application claims the priority of the Chinese patent application filed with the China Patent Office on March 1, 2019, with application number 201910158377.2 and application name “A transaction management method and device based on related transaction rules”, the entire contents of which are incorporated by reference in this application. Technical Field
[0002] The embodiments of the present invention relate to the field of blockchain technology, and in particular to a transaction management method and device based on associated transaction rules. Background Art
[0003] In the existing application scenarios of targeted poverty alleviation, there are problems such as opaque funding, non-disclosure of information, and unreasonable use of funds. In social welfare scenarios, it involves complex management such as targeted donations, allocated donations, and conditional donations. The management of fund information in these scenarios is a relatively difficult problem, and it is impossible to track the historical path of fund investment or use, which makes fund management inconvenient. Summary of the invention
[0004] The embodiment of the present invention provides a transaction management method and device based on associated transaction rules, which are used to solve the problems of improper investment and use of funds in related scenarios.
[0005] An embodiment of the present invention provides a transaction management method based on associated transaction rules, comprising:
[0006] Obtaining a fund transaction request, wherein the fund transaction request includes a fund transaction carrying transaction rules and a fund identity (IDentity, ID);
[0007] Determine, from the block of the blockchain system according to the fund ID, a set of associated transactions related to the fund transaction request; the set of associated transactions includes all fund transactions related to the fund ID;
[0008] Determining whether the fund transaction request is valid according to the transaction rules carried by each fund transaction in the associated transaction set;
[0009] If so, the financial transaction carrying the transaction rules is processed and written into the block of the blockchain system.
[0010] In the above technical solution, when a fund transaction request is received, its associated fund transaction set can be traced back from the block of the chain structure of the blockchain, and whether the current fund transaction request is valid can be determined according to the transaction rules contained in the associated fund transaction set, thereby determining whether the current fund transaction is successful, so that the fund transaction is easy to manage, the fund transaction situation can be traced, and the fund security can be determined.
[0011] Optionally, the processing of the fund transaction carrying the transaction rules and writing the same into the block of the blockchain system includes:
[0012] If the source of the fund transaction request is a blockchain system, the fund transaction request operation is executed, and the fund transaction carrying the transaction rules is written into the block of the blockchain system;
[0013] If the source of the fund transaction request is a bank system, the transaction flag is set to success so that the bank system executes the transfer operation and writes the fund transaction carrying the transaction rules into the block of the blockchain system.
[0014] Optionally, the fund transaction request is a fund injection transaction request; the transaction rules carried by each fund transaction in the associated transaction set include rules restricting fund recipients or targeted and quantitative injection rules or batch injection rules.
[0015] Optionally, the fund transaction request is a fund usage transaction request; the transaction rules carried by each fund transaction in the associated transaction set include rules restricting merchants that accept funds or rules restricting the amount of funds used.
[0016] Accordingly, an embodiment of the present invention further provides a transaction management device based on associated transaction rules, comprising:
[0017] An acquisition unit, used to acquire a fund transaction request, wherein the fund transaction request includes a fund transaction carrying a transaction rule and a fund ID;
[0018] A processing unit is used to determine, from the block of the blockchain system, a set of associated transactions related to the fund transaction request according to the fund ID; the associated transaction set includes all fund transactions related to the fund ID; and determine whether the fund transaction request is valid according to the transaction rules carried by each fund transaction in the associated transaction set; if so, process the fund transaction carrying the transaction rules and write it into the block of the blockchain system.
[0019] Optionally, the processing unit is specifically used for:
[0020] If the source of the fund transaction request is a blockchain system, the fund transaction request operation is executed, and the fund transaction carrying the transaction rules is written into the block of the blockchain system;
[0021] If the source of the fund transaction request is a bank system, the transaction flag is set to success so that the bank system executes the transfer operation and writes the fund transaction carrying the transaction rules into the block of the blockchain system.
[0022] Optionally, the fund transaction request is a fund injection transaction request; the transaction rules carried by each fund transaction in the associated transaction set include rules restricting fund recipients or targeted and quantitative injection rules or batch injection rules.
[0023] Optionally, the fund transaction request is a fund usage transaction request; the transaction rules carried by each fund transaction in the associated transaction set include rules restricting merchants that accept funds or rules restricting the amount of funds used.
[0024] Correspondingly, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable the computer to execute the above-mentioned transaction management method based on associated transaction rules.
[0025] Accordingly, an embodiment of the present invention further provides a computing device, including:
[0026] A memory for storing program instructions;
[0027] The processor is used to call the program instructions stored in the memory and execute the transaction management method based on the associated transaction rules according to the obtained program. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0029] Figure 1 A schematic diagram of a system architecture provided for an embodiment of the present invention;
[0030] Figure 2 A flowchart of a transaction management method based on associated transaction rules provided by an embodiment of the present invention;
[0031] Figure 3 A flowchart of a transaction management method based on associated transaction rules provided by an embodiment of the present invention;
[0032] Figure 4 A schematic diagram of the structure of a transaction management device based on associated transaction rules provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0033] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all 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.
[0034] Figure 1 This is a system architecture applicable to the embodiments of the present invention. Figure 1 As shown, the system architecture may include multiple clients 100 and a blockchain system 200. The client 100 may be connected to the blockchain system 200 via a network.
[0035] The multiple clients 100 may be clients used by different merchants, different banking institutions, and different users, and the blockchain system 200 may be accessed through the clients 100.
[0036] It should be noted that the above Figure 1 The structure shown is only an example and is not limited to this embodiment of the present invention.
[0037] Based on the above description, Figure 2 The process of a transaction management method based on associated transaction rules provided by an embodiment of the present invention is exemplarily shown. The process can be executed by a transaction management device based on associated transaction rules.
[0038] like Figure 2 As shown in the figure, the process specifically includes:
[0039] Step 201, obtaining a fund transaction request.
[0040] The fund transaction request may include a fund transaction and a fund ID with a transaction rule. Each fund transaction carries a transaction rule to verify whether the subsequent fund transaction is valid.
[0041] Step 202: Determine a set of associated transactions related to the fund transaction request from a block in the blockchain system according to the fund ID.
[0042] Specifically, since each fund transaction is stored in a chain-structured block of the blockchain system, the associated transaction set related to the fund transaction request can be determined from the block through the fund ID. The associated transaction set includes all fund transactions related to the fund ID, that is, the transaction path from the source to the current transaction. Each fund transaction in the associated transaction set carries its own transaction rules.
[0043] Step 203, determining whether the fund transaction request is valid according to the transaction rules carried by each fund transaction in the associated transaction set; if so, processing the fund transaction carrying the transaction rules and writing it into the block of the blockchain system.
[0044] When the associated transaction set related to the capital transaction request is obtained, it is possible to determine whether the capital transaction request is valid according to the transaction rules carried by each capital transaction in the associated transaction set. If it is valid, the capital transaction can be processed. When determining whether the capital transaction request is valid, it is mainly to determine whether the capital transaction request complies with the transaction rules carried by each capital transaction in the associated transaction set. If it complies, the capital transaction request is determined to be valid. If it does not comply, the capital transaction request is determined to be invalid.
[0045] When the current confirmation fund transaction request is valid, the fund transaction carrying the transaction rules can be processed according to the source of the fund transaction request.
[0046] Specifically, the fund transaction carrying the transaction rules is processed according to the source of the fund transaction request. If the source of the fund transaction request is the blockchain system, the fund transaction request operation is executed, and the fund transaction carrying the transaction rules is written into the block of the blockchain system. If the source of the fund transaction request is the bank system, the transaction flag is set to success, so that the bank system executes the transfer operation and writes the fund transaction carrying the transaction rules into the block of the blockchain system. The bank system can query the transaction flag through the smart contract query interface. When the transaction flag is queried as successful, the transfer operation continues, otherwise the transfer operation is terminated.
[0047] After the financial transaction carrying the transaction rules is processed, the processed financial transaction can be written into the block of the blockchain system.
[0048] It should be noted that the above-mentioned fund management can be divided into two parts: fund injection and fund use. When the fund transaction request is a fund injection transaction request, the transaction rules carried by each fund transaction in the above-mentioned related transaction set may include rules restricting fund recipients or targeted quantitative injection rules or batch injection rules.
[0049] For example, a request for funds injection in a blockchain system or a bank system is sent to the fund management blockchain system. The fund injection smart contract determines whether the fund injection request is valid through preset conditions (transaction rules). For a request for funds injection in the blockchain system, if the request is valid, the fund transfer request in the system will continue to be executed; otherwise, the fund injection will fail. For a request for funds injection in the bank system, the bank system requests the smart contract query interface, and if the transaction mark is successful, the transfer operation will continue; otherwise, the transfer operation will be terminated.
[0050] The above preset condition judgment can be divided into the following situations:
[0051] 1. Restrictions on recipients of funds
[0052] Regarding the restriction of fund recipients, one method is that the address of the recipient who meets the fund acceptance conditions is first registered in the smart contract, and then the recipient of the fund injection request is determined to be registered in the contract. Another method is that the smart contract requests an external system to obtain whether the recipient of the fund injection request meets the fund acceptance conditions from the external system.
[0053] 2. Targeted and quantitative delivery
[0054] For targeted and quantitative capital injection. First, for each capital injection, the capital injection conditions must be preset. When making a capital injection request, trace back the injection transactions from the initial injection to the current injection, and judge according to the preset injection range and injection quantity of the injection request in the path. If the injection request meets all the conditions on the path, it means that the injection request is successful; otherwise, it is marked as failed.
[0055] 3. Release in batches
[0056] For batch funding, first register the funding batch, time and quantity in the contract, and set the batch timer in the contract. When the timer of the current batch arrives, the funding request flag for this batch will be valid.
[0057] When the fund transaction request is a fund use transaction request, the transaction rules carried by each fund transaction in the associated transaction set may include rules restricting merchants that accept funds or rules restricting the amount of funds used.
[0058] For example, a request for the use of funds in a blockchain system or a bank system is sent to the fund management blockchain. The fund use smart contract traces the transaction from the initial release of funds to the final recipient of the funds based on the source of the fund use request. It determines whether the fund use request is valid based on the restrictions on the use of the release transaction. For the release request in the blockchain system, if the fund use request is valid, the fund transfer request in the system will continue to be executed; otherwise, the fund use request will fail. For the fund use request through the bank system, the bank system requests the smart contract query interface, and if the transaction mark is successful, the transfer operation will continue; otherwise, the transfer operation will be terminated.
[0059] Regarding restrictions on the use of trading pairs, they can be divided into the following situations:
[0060] 1. Restricting merchants who accept funds
[0061] Regarding restrictions on merchants accepting funds, one method is to first register the address and type of the merchant accepting funds in the smart contract, and the fund use contract makes a judgment based on the registered information. The second method is that the fund use contract requests the external system contract to obtain whether the merchant accepting funds is valid from the external system.
[0062] 2. Limit the amount of funds used
[0063] For limiting the amount of funds used, determine whether the amount of funds used matches the amount restricted in the conditions or the amount of accumulated use. If they match, the fund use record is valid.
[0064] In order to better explain the embodiment of the present invention, the process of transaction management based on associated transaction rules will be described below through a specific implementation scenario.
[0065] like Figure 3 As shown, this embodiment is based on the digital currency system to achieve targeted placement and targeted use of agricultural subsidy funds. A sum of money goes through two intermediary institutions from the initial placement institution to the terminal recipient. The restriction condition is to limit the terminal recipient to certain fixed farmers and limit the acceptance merchants to designated agricultural tool sales merchants.
[0066] The specific steps are as follows:
[0067] 1. According to the subsidy policy, the digital currency wallet address and subsidy amount information of the subsidized farmers are imported from the external system into the fund placement smart contract.
[0068] 2. Import the digital wallet address and merchant type of the designated merchant from the external system into the fund placement smart contract.
[0069] 3. The first-level placement agency creates an initial placement request A, and the receiving agency is the second-level placement agency. The placement request A contains the rules: <list of third-level placement agencies, list of merchants using funds>.
[0070] 4. The initial release request is sent to the digital currency system. The fund release smart contract verifies the releaser, recipient, and quantity of the release request. If the verification is successful, the transaction request A is stored in the underlying digital currency blockchain and the transfer transaction continues.
[0071] 5. The secondary distribution institution sends a secondary distribution request B to the digital currency system. The recipient of the distribution request B is the tertiary distribution institution. The rules contained in the distribution request B are: <list of assisted farmers, list of merchants using funds>.
[0072] 6. The capital release smart contract obtains the initial release request A on the transaction path according to the release request B, obtains the list of third-level release institutions from the conditions of the release request A, and determines whether the recipient of the second-level release request B is in the list of third-level release institutions. If so, the transaction request B is stored in the bottom layer of the digital currency blockchain and the transfer transaction continues; otherwise, the release is terminated and an alarm is sent to the upper-level audit system.
[0073] 7. The third-level release institution sends the final release request C to the digital currency system. The recipient of the release request is the assisted farmers, and the conditions included in the release request C are the <list of merchants using funds>.
[0074] 8. The capital injection smart contract obtains transactions A and B on the path from the initial injector A to C based on the injection request C.
[0075] 9. Determine whether the recipient of the release request C meets the conditions of request B - the list of assisted farmers; determine whether the sender of the release request C meets the conditions of request A, the list of three-level release institutions. If all meet, store the release request C at the bottom layer of the digital currency blockchain and continue the transfer transaction; otherwise, terminate the release and alert the upper-level audit system.
[0076] 10. After the release request C is successful, the subsidy funds finally reach the digital currency wallet of the assisted farmer. After receiving the digital currency of the subsidy, the assisted farmer can use the digital currency to purchase agricultural tools at designated agricultural tool sales merchants.
[0077] 11. The farmer's digital currency wallet sends funds using request X to the digital currency system, and the recipient of request X is the merchant.
[0078] 12. The fund usage smart contract obtains the release transaction paths A, B, and C involved in the usage request X from the underlying digital currency blockchain.
[0079] 13. Determine whether the merchant receiving the fund use request X meets the conditions for placing transaction A - the fund use merchant list; determine whether the merchant receiving the fund use request X meets the conditions for placing transaction B - the fund use merchant list; determine whether the merchant receiving the fund use request X meets the conditions for placing transaction C - the fund use merchant list. If all conditions are met, the transfer transaction is executed and the purchase of agricultural tools is successful; otherwise, the transaction is terminated and an alarm is sent to the upper-level audit system.
[0080] 14. The agricultural implement sales merchants can use their digital currency wallets to convert the accepted digital currencies into electronic currencies. This process ends.
[0081] It should be noted that the embodiments of the present invention can also be applied to scenarios such as poverty alleviation, public welfare and charity, and special funds.
[0082] The above embodiment shows that by obtaining a capital transaction request, the capital transaction request includes a capital transaction carrying transaction rules and a capital ID, and according to the capital ID, a set of associated transactions related to the capital transaction request is determined from the block of the blockchain system, and according to the transaction rules carried by each capital transaction in the associated transaction set, whether the capital transaction request is valid is determined; if so, the capital transaction carrying the transaction rules is processed according to the source of the capital transaction request. When a capital transaction request is received, its associated capital transaction set can be traced from the chain-structured block of the blockchain, and according to the transaction rules contained in the associated capital transaction set, whether the current capital transaction request is valid is determined, thereby determining whether the current capital transaction is successful, so that the capital transaction is easy to manage, the capital transaction situation can be traced, and the capital security is determined.
[0083] Based on the same technical concept, Figure 4 A transaction management device based on associated transaction rules provided by an embodiment of the present invention is exemplarily shown, and the device can execute a transaction management process based on associated transaction rules.
[0084] like Figure 4 As shown, the device specifically includes:
[0085] An acquisition unit 401 is used to acquire a fund transaction request, wherein the fund transaction request includes a fund transaction carrying a transaction rule and a fund ID;
[0086] The processing unit 402 is used to determine a set of associated transactions related to the fund transaction request from the block of the blockchain system according to the fund ID; the associated transaction set includes all fund transactions related to the fund ID; according to the transaction rules carried by each fund transaction in the associated transaction set, determine whether the fund transaction request is valid; if so, process the fund transaction carrying the transaction rules and write it into the block of the blockchain system.
[0087] Optionally, the processing unit 402 is specifically configured to:
[0088] If the source of the fund transaction request is a blockchain system, the fund transaction request operation is executed, and the fund transaction carrying the transaction rules is written into the block of the blockchain system;
[0089] If the source of the fund transaction request is a bank system, the transaction flag is set to success so that the bank system executes the transfer operation and writes the fund transaction carrying the transaction rules into the block of the blockchain system.
[0090] Optionally, the fund transaction request is a fund injection transaction request; the transaction rules carried by each fund transaction in the associated transaction set include rules restricting fund recipients or targeted and quantitative injection rules or batch injection rules.
[0091] Optionally, the fund transaction request is a fund usage transaction request; the transaction rules carried by each fund transaction in the associated transaction set include rules restricting merchants that accept funds or rules restricting the amount of funds used.
[0092] Based on the same technical concept, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable the computer to execute the above-mentioned transaction management method based on associated transaction rules.
[0093] Based on the same technical concept, an embodiment of the present invention further provides a computing device, including:
[0094] A memory for storing program instructions;
[0095] The processor is used to call the program instructions stored in the memory and execute the transaction management method based on the associated transaction rules according to the obtained program.
[0096] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0097] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0098] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0099] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0100] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A transaction management method based on related transaction rules, It is characterized in that include: Obtaining a fund transaction request, wherein the fund transaction request includes a fund transaction carrying transaction rules and a fund ID, and each fund transaction is stored in a block of a chain structure of a blockchain system; Determine, from the blocks of the blockchain system according to the fund ID, a set of associated transactions related to the fund transaction request; The associated transaction set includes: all fund transactions related to the fund ID, and all fund transactions related to the fund ID constitute a transaction path from the source to the current transaction, and each fund transaction on the transaction path carries its own transaction rules; When the fund transaction request satisfies the transaction rules carried by each fund transaction on the transaction path, determining that the fund transaction request is valid; If the source of the fund transaction request is a blockchain system, the fund transaction request operation is executed, and the fund transaction carrying the transaction rules is written into the block of the blockchain system; If the source of the fund transaction request is a bank system, the transaction identifier is set to success, so that the bank system queries the transaction identifier through the smart contract query interface. When the transaction identifier is found to be successful, the transfer operation is executed, and the fund transaction carrying the transaction rules is written into the block of the blockchain system.
2. The method according to claim 1, It is characterized in that The fund transaction request is a fund injection transaction request; the transaction rules carried by each fund transaction in the associated transaction set include rules restricting fund recipients or directional and quantitative injection rules or batch injection rules.
3. The method according to claim 1, It is characterized in that The fund transaction request is a fund use transaction request; the transaction rules carried by each fund transaction in the associated transaction set include rules restricting merchants that accept funds or rules restricting the amount of funds used.
4. A transaction management device based on associated transaction rules, It is characterized in that include: An acquisition unit, used to acquire a fund transaction request, wherein the fund transaction request includes a fund transaction carrying a transaction rule and a fund ID, and each fund transaction is stored in a block of a chain structure of a blockchain system; A processing unit, configured to determine, from a block of a blockchain system according to the fund ID, a set of associated transactions related to the fund transaction request; The associated transaction set includes: all fund transactions related to the fund ID, and all fund transactions related to the fund ID constitute a transaction path from the source to the current transaction, and each fund transaction on the transaction path carries its own transaction rules; When the fund transaction request satisfies the transaction rules carried by each fund transaction on the transaction path, determining that the fund transaction request is valid; If the source of the fund transaction request is a blockchain system, the fund transaction request operation is executed, and the fund transaction carrying the transaction rules is written into the block of the blockchain system; If the source of the fund transaction request is a bank system, the transaction identifier is set to success, so that the bank system queries the transaction identifier through the smart contract query interface. When the transaction identifier is found to be successful, the transfer operation is executed, and the fund transaction carrying the transaction rules is written into the block of the blockchain system.
5. The device as claimed in claim 4, It is characterized in that The fund transaction request is a fund injection transaction request; the transaction rules carried by each fund transaction in the associated transaction set include rules restricting fund recipients or directional and quantitative injection rules or batch injection rules.
6. The device as claimed in claim 4, It is characterized in that The fund transaction request is a fund use transaction request; the transaction rules carried by each fund transaction in the associated transaction set include rules restricting merchants that accept funds or rules restricting the amount of funds used.
7. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to cause the computer to execute the method according to any one of claims 1 to 3.
8. A computing device, It is characterized in that include: A memory for storing program instructions; A processor is used to call the program instructions stored in the memory and execute the method according to any one of claims 1 to 3 according to the obtained program.
Citation Information
Patent Citations
Transaction method and system of digital asset
CN107240001A