Resource transfer processing method and device based on block chain and computer equipment
By introducing a confirmation period and verification mechanism into the blockchain resource transfer system, the problem of poor resource security in traditional technologies is solved and higher resource transfer security is achieved.
Patent Information
- Application Number
- CN202311763309.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-19
- Publication Date
- 2025-06-20
AI Technical Summary
Traditional blockchain resource transfer technology has the problem of poor resource security, and it is difficult to trace and correct after performing resource transfer operations in smart contracts.
During the response process of resource transfer request, the delayed response time is introduced as the confirmation period, and a verification request is sent to the responder of the resource transfer request to ensure that the resource transfer party verifies the resource transfer information and confirms it before performing the resource transfer operation.
Through the checksum confirmation mechanism, the security of the resource transfer party can be improved, and the initiator can be identified and prevented from misoperation or malicious operations, thereby enhancing the security of resource transfer.
Smart Images

Figure CN120181850A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technologies, and particularly to a resource transfer processing method, apparatus, computer device, computer-readable storage medium, and computer program product based on a blockchain. Background Art
[0002] As a decentralized multi-node network system, a blockchain system can achieve secure storage of data and is widely applied to resource management scenarios such as resource leasing, resource donation, and resource transfer.
[0003] Taking the resource transfer scenario as an example, in the traditional technology, by pre-deploying a smart contract carrying the authorization information of the responder to which the resource account belongs, the initiator can call the smart contract to implement the resource transfer operation for the resource account. However, adopting the traditional technology, the resource transfer operation will be executed after the smart contract is called, resulting in a problem of poor resource security. Summary of the Invention
[0004] Based on this, in view of the above technical problems, it is necessary to provide a resource transfer processing method, apparatus, computer device, computer-readable storage medium, and computer program product based on a blockchain that can improve resource security.
[0005] In a first aspect, the present application provides a resource transfer processing method based on a blockchain. The method includes:
[0006] Obtaining a resource transfer request initiated by an initiator by calling a resource transfer smart contract for a resource transfer-out account; the resource transfer smart contract carries the authorization information of the resource transfer-out party to which the resource transfer-out account belongs;
[0007] Extracting the resource transfer information carried in the resource transfer request;
[0008] Determining a deferred response duration matching the resource transfer request, and within the confirmation period characterized by the deferred response duration, sending a verification request for the resource transfer information to the responder of the resource transfer request; the responder includes the resource transfer-out party;
[0009] If a verification result indicating verification passed is received from the responder, then when the confirmation period ends, performing the resource transfer operation indicated by the resource transfer information.
[0010] In a second aspect, the present application provides a resource transfer processing apparatus based on a blockchain. The apparatus includes:
[0011] A request acquisition module, configured to acquire a resource transfer request initiated by an initiator for a resource transfer out account by invoking a resource transfer smart contract; the resource transfer smart contract carries authorization information of a resource transfer out party to which the resource transfer out account belongs;
[0012] An information extraction module, configured to extract resource transfer information carried in the resource transfer request;
[0013] A verification request sending module, configured to determine a deferred response duration matching the resource transfer request, and within a confirmation period characterized by the deferred response duration, send a verification request for the resource transfer information to a responder of the resource transfer request; the responder includes the resource transfer out party;
[0014] A resource transfer module, configured to, if a verification passed verification result feedback by the responder is received, perform a resource transfer operation indicated by the resource transfer information when the confirmation period ends.
[0015] Thirdly, the present application provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0016] Acquire a resource transfer request initiated by an initiator for a resource transfer out account by invoking a resource transfer smart contract; the resource transfer smart contract carries authorization information of a resource transfer out party to which the resource transfer out account belongs;
[0017] Extract resource transfer information carried in the resource transfer request;
[0018] Determine a deferred response duration matching the resource transfer request, and within a confirmation period characterized by the deferred response duration, send a verification request for the resource transfer information to a responder of the resource transfer request; the responder includes the resource transfer out party;
[0019] If a verification passed verification result feedback by the responder is received, perform a resource transfer operation indicated by the resource transfer information when the confirmation period ends.
[0020] Fourthly, the present application provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0021] Acquire a resource transfer request initiated by an initiator for a resource transfer out account by invoking a resource transfer smart contract; the resource transfer smart contract carries authorization information of a resource transfer out party to which the resource transfer out account belongs;
[0022] Extract the resource transfer information carried in the resource transfer request;
[0023] Determine the deferred response duration matching the resource transfer request, and within the confirmation period represented by the deferred response duration, send a verification request for the resource transfer information to the responder of the resource transfer request; the responder includes the resource transferor;
[0024] If a verification result indicating verification passed is received from the responder, then when the confirmation period ends, perform the resource transfer operation indicated by the resource transfer information.
[0025] In a fifth aspect, the present application provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0026] Obtain a resource transfer request initiated by an initiator for a resource transfer account by invoking a resource transfer smart contract; the resource transfer smart contract carries the authorization information of the resource transferor to which the resource transfer account belongs;
[0027] Extract the resource transfer information carried in the resource transfer request;
[0028] Determine the deferred response duration matching the resource transfer request, and within the confirmation period represented by the deferred response duration, send a verification request for the resource transfer information to the responder of the resource transfer request; the responder includes the resource transferor;
[0029] If a verification result indicating verification passed is received from the responder, then when the confirmation period ends, perform the resource transfer operation indicated by the resource transfer information.
[0030] The above blockchain-based resource transfer processing method, device, computer device, computer-readable storage medium, and computer program product enable the initiator to initiate a resource transfer request for the resource transfer account by invoking a resource transfer smart contract carrying the authorization information of the resource transfer party to which the resource transfer account belongs. During the response process of the resource transfer request, a confirmation period matching the resource transfer request is added, and within the confirmation period, the responder to the resource transfer request is guided to verify the resource transfer information carried in the resource transfer request. Since the responder includes the resource transfer party, the resource transfer party can be aware of and complete the verification of the resource transfer information before transferring digital resources, ensuring that the resource transfer operation is only executed after the resource transfer party has verified without errors, which can identify cases of incorrect or malicious operations by the initiator and is beneficial to improving resource security. Moreover, when the verification result is passed and the confirmation period ends, the resource transfer operation indicated by the resource transfer information is executed, which provides a consideration period for the resource transfer party regarding the resource transfer request and is further beneficial to improving resource security. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 FIG. is a schematic diagram of the composition of a distributed system in an embodiment;
[0032] Figure 2 FIG. is an application environment diagram of a blockchain-based resource transfer processing method in an embodiment;
[0033] Figure 3 FIG. is a flowchart of a blockchain-based resource transfer processing method in an embodiment;
[0034] Figure 4 FIG. is a schematic diagram of the determination process of the extended response duration in an embodiment;
[0035] Figure 5 FIG. is a schematic diagram of the confirmation periods of multiple resource transfer requests in an embodiment;
[0036] Figure 6 FIG. is a schematic diagram of the secondary verification processing process for a resource transfer request that fails verification in an embodiment;
[0037] Figure 7 FIG. is a flowchart of a blockchain-based resource transfer processing method in another embodiment;
[0038] Figure 8 FIG. is a schematic diagram of the interaction process of resource transfer processing in an embodiment;
[0039] Figure 9 FIG. is a structural block diagram of a blockchain-based resource transfer processing system in an embodiment;
[0040] Figure 10Internal structure diagram of a computer device in an embodiment;
[0041] Figure 11 Internal structure diagram of a computer device in another embodiment. Detailed implementation manners
[0042] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0043] Before the detailed description, some terms related to the present application will be described.
[0044] Blockchain is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, and encryption algorithms. Blockchain, in essence, is a decentralized database, a string of data blocks generated by using cryptographic methods, and each data block contains information of a batch of network transactions, which is used to verify the validity (anti-counterfeiting) of the information and generate the next block. A blockchain can include a blockchain underlying platform, a platform product service layer, and an application service layer.
[0045] A smart contract is code developed by a business party to execute business logic, developed using a programming language, and deployed on a blockchain. When a user wants to call a smart contract, a blockchain transaction is generated and sent to the chain. Each blockchain node can consensus and package this transaction, execute the same code logic, and produce the same result. The code is publicly visible and transparent on the chain, which can ensure that it cannot be tampered with. Once a smart contract is successfully deployed, it cannot be modified and exists on the chain permanently.
[0046] The blockchain-based resource transfer processing method provided by the embodiments of the present application can be applied to an application environment including multiple nodes. This application environment can be a data sharing system including multiple nodes, or a distributed system formed by connecting a client and multiple nodes (any form of computing device accessing the network, such as a server, a user terminal) through network communication. Taking the distributed system as a blockchain system as an example, as Figure 1 shown, the distributed system can include multiple nodes 101 and a client 102. A peer-to-peer network is formed among the nodes 101. The peer-to-peer protocol is an application layer protocol running on top of the Transmission Control Protocol (TCP). In a distributed system, any machine such as a server or a terminal can join and become a node. A node includes a hardware layer, an intermediate layer, an operating system layer, and an application layer. As Figure 1As shown, the functions involved in each node 101 in the blockchain system may include routing, applications, and the blockchain, etc. Among them, routing is the basic function of the node, which is used to support communication between nodes. The application is deployed in the blockchain and is used to implement specific services according to actual business requirements, record the data related to the implemented functions to form record data, carry a digital signature in the record data to indicate the source of the task data, and send the record data to other nodes in the blockchain system. When other nodes verify the source and integrity of the record data successfully, they add the record data to the temporary block. The services implemented by the application may include a shared ledger and smart contracts, etc. The shared ledger is used to provide functions such as storage, query, and modification of account data, send the record data of the operations on the account data to other nodes in the blockchain system, and after other nodes verify its validity, as a response to acknowledging the validity of the account data, deposit the record data into the temporary block, and may also send a confirmation to the node that initiated the operation. The blockchain includes a series of blocks that are sequentially connected in the order of generation. Once a new block is added to the blockchain, it will not be removed again. The block records the record data submitted by the nodes in the blockchain system.
[0047] Furthermore, each node 101 can receive input information during operation and maintain the shared data within the blockchain system based on the received input information. For each node in the blockchain system, there is a corresponding node identifier, and each node in the blockchain system can store the node identifiers of other nodes in the blockchain system, so that subsequently, according to the node identifiers of other nodes, the generated block can be broadcast to other nodes in the blockchain system. A node identifier list can be maintained in each node, and the node name and node identifier are stored in the node identifier list correspondingly. Among them, the node identifier can be an IP (Internet Protocol) address and any other information that can be used to identify the node.
[0048] Among them, the client 102 can be a resource management client, which is used to realize the circulation of digital resources on the blockchain. The specific process of resource circulation includes initiating a resource transfer transaction, storing the record data of the transaction in the temporary block of the blockchain, and querying the remaining digital resources in the digital resource account, etc. On the blockchain, there are mainly two types of digital resources on the chain. One is the native digital resources generated by the on-chain processing nodes through block packaging, and the other is the data uploaded to the chain through smart contracts, and this data can be called the digital resources on the blockchain, that is, non-native digital resources. Specifically, the resource management client can implement the resource management business function and realize the communication connection with the decentralized application client based on this resource management business function. The resource management client is a tool for managing and storing users' digital resources. For example, digital resources can be transferred to other accounts based on the resource management client, and for another example, digital resources transferred from other accounts can be received based on the resource management client. The resource management client can be a hardware device or a software program. In this application, the application resource management client manages the digital resources obtained by the resource user from the resource provider.
[0049] The resource transfer processing method based on the blockchain provided by this application can be applied to an application environment such as Figure 2 shown. In this application environment, it includes an initiator 201, a responder 202, and a resource management client 203. The three can communicate with each other over the network and implement functions such as consensus, data recording, and on-chain in blockchain technology based on smart contracts. The responder 202 can include a resource transferor, and can also include a resource transferor and a resource transferee. Among them, in the process of the resource management client 203 implementing the resource transfer processing method based on the blockchain: obtaining a resource transfer request initiated by the initiator 201 by calling a resource transfer smart contract for a resource transfer-out account; extracting the resource transfer information carried in the resource transfer request; determining a deferred response duration matching the resource transfer request, and within the confirmation period represented by the deferred response duration, sending a verification request for the resource transfer information to the responder 202 of the resource transfer request; if receiving a verification result of verification passed feedback by the responder 202, then at the end of the confirmation period, performing the resource transfer operation indicated by the resource transfer information. Among them, the resource transfer smart contract carries the authorization information of the resource transferor to whom the resource transfer-out account belongs, and the responder 202 includes the resource transferor.
[0050] Further, the initiator 201, the responder 202, and the resource management client 203 can all be implemented through a terminal or a server. Among them, the terminal includes, but is not limited to, mobile phones, computers, intelligent voice interaction devices, smart home appliances, vehicle-mounted terminals, aircraft, etc., and the server can be implemented by an independent server or a server cluster composed of multiple servers. The embodiments of the present invention can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, intelligent transportation, assisted driving, etc.
[0051] In one embodiment, the blockchain-based resource transfer processing method provided by this application can be applied to the application scenario of resource prepayment. In this application scenario, the resource transferor can store the prepaid digital resources in the resource transfer account and provide the contract address of the resource transfer smart contract for the resource transfer account to the initiator. Thus, the initiator can initiate a resource transfer request for the resource transfer account by invoking the resource transfer smart contract. The resource management client can obtain the resource transfer request, extract the resource transfer information carried in the resource transfer request, and determine the deferred response duration matching the resource transfer request. Then, within the confirmation period represented by the deferred response duration, a verification request for the resource transfer information is sent to the resource transferor. This verification request is used to instruct the resource transferor to verify the resource transfer information and obtain and feedback the verification result to the resource management client. If the verification result is verification passed, the resource management client executes the resource transfer operation indicated by the resource transfer information when the confirmation period ends; otherwise, if the verification result is verification failed, the resource management client does not execute the resource transfer operation indicated by the resource transfer information.
[0052] In one embodiment, the blockchain-based resource transfer processing method provided by the present application can be applied to the application scenario of resource custody. In this application scenario, the resource transferor can deploy a resource transfer smart contract for the resource transfer account on the blockchain and entrust the initiator to manage the resource transfer account by providing the contract address of the resource transfer smart contract to the initiator. Thus, the initiator can initiate a resource transfer request for the resource transfer account by invoking the resource transfer smart contract. The resource management client can obtain the resource transfer request, extract the resource transfer information carried in the resource transfer request, and determine the deferred response duration matching the resource transfer request. Then, within the confirmation period represented by the deferred response duration, a verification request for the resource transfer information is sent to the resource transferor. This verification request is used to instruct the resource transferor to verify the resource transfer information, obtain the verification result, and feedback it to the resource management client. If the verification result is that the verification passes, the resource management client executes the resource transfer operation indicated by the resource transfer information when the confirmation period ends; otherwise, if the verification result is that the verification fails, the resource management client does not execute the resource transfer operation indicated by the resource transfer information.
[0053] Adopting the above resource transfer processing method is equivalent to adding a confirmation period after initiating a resource transfer request and guiding the responder to verify the resource transfer information within this confirmation period. On the one hand, since the responder includes the resource transferor, the resource transferor can know and complete the verification of the resource transfer information before transferring digital resources, which can ensure that the resource transfer operation is only executed after the resource transferor has verified without errors, and can identify the situation of incorrect or malicious operations by the initiator, which is beneficial to improving resource security. On the other hand, when the verification result is that the verification passes and the confirmation period ends, executing the resource transfer operation indicated by the resource transfer information is equivalent to providing a consideration period for the resource transferor for the resource transfer request, which is beneficial to further improving resource security.
[0054] In one embodiment, as Figure 3 shown, a blockchain-based resource transfer processing method is provided. In this embodiment, taking the application of this method to the Figure 2 resource management client 203 as an example, the method includes the following steps:
[0055] Step S302: Obtain the resource transfer request initiated by the initiator for the resource transfer account by invoking the resource transfer smart contract.
[0056] Among them, the resource transfer smart contract carries the authorization information of the resource transferor to whom the resource transfer-out account belongs. The resource account refers to the blockchain account used for digital resources. Digital resources refer to virtual resources circulating on the blockchain, which can also be called on-chain resources, including native digital resources generated by the upper-chain processing nodes through block packaging, and on-chain data published through smart contracts. Such on-chain data may include, for example, game props, digital goods, commodity coupons, and so on. The resource transfer-out account refers to the resource account from which the resources are transferred during the resource transfer process. The initiator refers to the party that initiates the resource transfer request. The initiator may be, for example, the party that provides digital resources, that is, the resource transferor; the initiator may also be the party that receives digital resources, that is, the resource transferee; the initiator may also be a third party different from the resource transferor and the resource transferee.
[0057] A smart contract is a contract written in the form of code that can be automatically executed on the blockchain; it can achieve various functions, such as transferring funds, verifying identities, creating digital identities, etc. The smart contract is a protocol defined in digital form and needs to run in a trusted environment, such as a blockchain platform. The smart contract relies on a computer to run in the cyberspace, is spread, verified or executed in an informatized manner, is read and executed by a computer, and has the characteristics of self-service. The decentralization of the blockchain and the anti-tampering of data determine that smart contracts are more suitable to be implemented on the blockchain. Therefore, the development of blockchain technology has given smart contracts a broader development prospect. That is to say, a smart contract is actually a program composed of computer code, and its conclusion process is as follows: First step, the two or more user parties participating in the conclusion agree to formulate a smart contract through joint agreement; Second step, the smart contract is broadcast and stored to the fulcrums of each blockchain in the world through the blockchain network; Third step, the successfully constructed smart contract waits for the conditions to be met and then automatically executes the contract content.
[0058] Specifically in this application, the resource transferor can, through authorization, deploy a resource transfer smart contract on the blockchain for performing resource transfer operations on the resource transfer-out account held by itself, and by providing the contract address of the resource transfer smart contract to the initiator, enable the initiator to, based on the obtained contract address, initiate a resource transfer request for the resource transfer-out account to the resource management client by calling the resource transfer smart contract corresponding to the contract address. Thus, the resource management client can obtain the resource transfer request.
[0059] Step S304, extract the resource transfer information carried in the resource transfer request.
[0060] Among them, the resource transfer request carries resource transfer information. The resource transfer information may include, for example, the type of resource to be transferred, the amount of the resource, the transferee information, and so on. Specifically, the resource management client can extract the resource transfer information carried by the resource transfer request from the resource transfer request. Optionally, the resource management client can determine the field position of the resource transfer information in the resource transfer request according to the field composition of the resource transfer request, and extract the resource transfer information from the resource transfer request based on this field position. Optionally, the resource management client can extract the resource transfer information from the resource transfer request according to the data form of the resource transfer information. The data form may be, for example, numbers, characters, and so on.
[0061] Step S306: Determine the deferred response duration that matches the resource transfer request, and within the confirmation period represented by this deferred response duration, send a verification request for the resource transfer information to the responder of the resource transfer request.
[0062] Among them, the responder of the resource transfer request refers to the interested party related to the resource transfer request. The responder may only include the resource transferor, or may include both the resource transferor and the resource transferee. It can be understood that in the case where the responder only includes the resource transferor, only a verification request for the resource transfer information needs to be sent to the resource transferor. In the case where the responder includes both the resource transferor and the resource transferee, verification requests for the resource transfer information need to be sent to the resource transferor and the resource transferee respectively.
[0063] Deferred response means that after receiving the resource transfer request, the resource management client will not immediately execute or reject the resource transfer operation requested by the resource transfer request, but will defer for a period of time and then determine whether to execute the corresponding resource transfer operation. The deferred response duration refers to the duration between the receiving moment of the resource transfer request and the decision moment of whether to execute the resource transfer operation. In this application, the time interval represented by the deferred response duration is called the confirmation period.
[0064] Specifically, the resource management client determines the deferred response duration that matches the resource transfer request, and within the confirmation period represented by this deferred response duration, sends a verification request for the resource transfer information to the responder of the resource transfer request. The method for determining the deferred response duration is not unique.
[0065] In a specific embodiment, the resource management client can determine the deferred response duration that matches the resource transfer request based on the resource transfer information. Optionally, a correspondence between the resource type requested to be transferred and the deferred response duration can be established, and the deferred response duration that matches the resource transfer request can be determined based on the resource type in the resource transfer information and the correspondence between the resource type and the deferred response duration. Optionally, the deferred response duration that matches the resource transfer request can be determined based on the amount of resources requested to be transferred in the resource transfer information, and the deferred response duration can be positively correlated with the amount of resources. Among them, positive correlation means that, when other conditions remain unchanged, the two variables change in the same direction, and when one variable changes from large to small, the other variable also changes from large to small. It can be understood that the positive correlation here means that the direction of change is consistent, but it does not require that when one variable changes a little, the other variable must also change.
[0066] In a specific embodiment, the resource management client can determine the deferred response time matching the resource transfer request according to at least one of the initiator information and the responder information. The initiator information can include the initiator credit, the qualifications of the initiator, etc. Correspondingly, the responder information can include the responder credit, the qualifications of the responder, etc. It can be understood that the initiator credit and the qualifications of the initiator can characterize the credit of the initiator to a certain extent, and thus can reflect the possibility of misoperation or malicious operation of the initiator to a certain extent. Based on this, the resource management client can determine a relatively short deferred response time for the initiator with better credit to ensure the timeliness of the resource transfer operation; for the initiator with poor credit, determine a relatively long deferred response time to ensure the security of the resource transfer operation. Similarly, for the responder, a longer deferred response time means that the responder has a longer consideration period for the resource transfer request. Based on this, the resource management client can determine a relatively long deferred response time for the responder with better credit, and determine a relatively short deferred response time for the responder with poor credit.
[0067] Furthermore, the specific time node at which the resource management client sends a verification request for the resource transfer information to the responder of the resource transfer request is not unique. For example, it can be the start time or the middle time of the confirmation period represented by the extended response duration. In a specific embodiment, to ensure that the responder has sufficient time to verify the resource transfer information, the resource management client may send a verification request for the resource transfer information to the responder of the resource transfer request when the remaining duration of the confirmation period is greater than or equal to a duration threshold. This duration threshold can be preset and can be obtained by statistically analyzing the historical verification durations of the responder for historical verification requests after determining the responder of the resource transfer request. Exemplarily, a safety margin can be added to the maximum value of the historical verification duration to obtain the duration threshold.
[0068] Step S308, if a verification result indicating verification passed is received from the responder, then when the confirmation period ends, perform the resource transfer operation indicated by the resource transfer information.
[0069] Specifically, after receiving the verification request, the responder of the resource transfer request can verify the resource transfer information, determine and feedback the verification result of the resource transfer information to the resource management client. This verification result can include verification passed and verification failed. If a verification result indicating verification passed is received from the responder, then the resource management client can perform the resource transfer operation indicated by the resource transfer information when the confirmation period ends; if a verification result indicating verification failed is received from the responder, then the resource management client does not perform the resource transfer operation indicated by the resource transfer information.
[0070] It should be noted that to improve information security, an encrypted transmission information transmission method can be adopted during the interaction between the resource management client and the initiator, as well as between the resource management client and the responder. For example, the resource management client can encrypt the resource transfer information and then generate and send a verification request for the resource transfer information to the responder. Another example is that the responder can encrypt the verification result and then send the encrypted verification result to the resource management client.
[0071] The above blockchain-based resource transfer processing method obtains a resource transfer request for the resource transfer account initiated by the initiator by calling a resource transfer smart contract carried with the authorization information of the resource transfer party to which the resource transfer account belongs. During the response process of the resource transfer request, a confirmation period matching the resource transfer request is added, and within the confirmation period, the responder to the resource transfer request is guided to verify the resource transfer information carried in the resource transfer request. Since the responder includes the resource transfer party, the resource transfer party can know and complete the verification of the resource transfer information before transferring digital resources, which can ensure that the resource transfer operation is executed only after the resource transfer party passes the verification, can distinguish the cases of incorrect or malicious operations by the initiator, and is beneficial to improving resource security. Moreover, when the verification result is passed and the confirmation period ends, the resource transfer operation indicated by the resource transfer information is executed, which is equivalent to providing a consideration period for the resource transfer party for the resource transfer request and is beneficial to further improving resource security.
[0072] In one embodiment, determining the deferred response duration matching the resource transfer request includes: determining the initiator's credibility; and determining the deferred response duration matching the resource transfer request according to the initiator's credibility.
[0073] Among them, the initiator's credibility is used to represent the credibility of the initiator. The deferred response duration is inversely correlated with the initiator's credibility. Inversely correlated means that, under other unchanged conditions, the change directions of two variables are opposite. When one variable changes from large to small, the other variable changes from small to large. It can be understood that the inversely correlated here means that the change directions are opposite, but it does not require that when one variable changes a little, the other variable must also change.
[0074] Specifically, the resource management client can determine the initiator's credibility of the initiator by combining the initiator's credit and the qualifications possessed by the initiator. Then, according to the initiator's credibility, the deferred response duration matching the resource transfer request is determined. Among them, the initiator's credit and the qualifications possessed by the initiator can be stored on the blockchain to avoid being tampered with. The specific data form of the initiator's credit can be a numerical value or a grade. The initiator's credit can be determined according to the execution situation of the resource transfer operations of the historical resource transfer requests initiated by the initiator. For example, the more the number of resource transfer operations executed and the higher the proportion, the better the initiator's credit. It can be understood that the better the initiator's credit, the higher the initiator's credibility, and the more qualifications the initiator has and the higher the qualification level, the higher the initiator's credibility.
[0075] In the above embodiments, the deferred response duration matching the resource transfer request is determined according to the initiator's credibility, and the deferred response duration is inversely related to the initiator's credibility, so that the response speed of the resource transfer request initiated by the initiator with higher credibility is faster, which can improve the resource security while ensuring the timeliness of the resource transfer operation.
[0076] In one embodiment, the resource transfer processing method further includes: determining the responder's credibility of the responder to the resource transfer request. In the case of this embodiment, determining the deferred response duration matching the resource transfer request according to the initiator's credibility includes: combining the initiator's credibility and the responder's credibility to determine the deferred response duration matching the resource transfer request.
[0077] Among them, the responder's credibility is used to characterize the trustworthiness of the responder. The deferred response duration is positively correlated with the responder's credibility. Positive correlation means that, under other unchanged conditions, the change directions of two variables are the same. When one variable changes from large to small, the other variable also changes from large to small. It can be understood that the positive correlation here means that the change directions are the same, but it is not required that when one variable changes a little, the other variable must also change. It can be understood that for the responder, the longer the deferred response duration, the longer the available verification time for the responder for the resource transfer information, which is equivalent to the responder having more time to consider whether to agree to execute the resource transfer operation indicated by the resource transfer information. Therefore, the deferred response duration can be positively correlated with the responder's credibility.
[0078] Specifically, the resource management client can combine the responder's credit and the qualifications possessed by the responder to determine the responder's credibility of the responder. Then, combining the initiator's credibility and the responder's credibility, determine the deferred response duration matching the resource transfer request. Optionally, the resource management client can determine a first candidate duration matching the initiator's credibility and a second candidate duration matching the responder's credibility, and then determine the average value of the first candidate duration and the second candidate duration as the deferred response duration matching the resource transfer request. It should be noted that in the case where the initiator is the resource transferee and the responders include the resource transferee and the resource transferor, the initiator's credibility is the credibility of the resource transferee, and the responder's credibility is the credibility of the resource transferor.
[0079] In the above embodiments, determining the deferred response duration by combining the initiator's credibility and the responder's credibility associates the deferred response duration with the historical transaction situations of the initiator and the responder, which is beneficial to further improving the resource security.
[0080] In a specific embodiment, combining the initiator credibility and the responder credibility to determine the deferred response duration matching the resource transfer request includes: determining the respective weight coefficients of the initiator credibility and the responder credibility; based on each weight coefficient, performing statistical calculations on the initiator credibility and the responder credibility to determine the deferred response duration matching the resource transfer request.
[0081] Among them, the weight coefficient of the initiator credibility is greater than the weight coefficient of the responder credibility. This weight coefficient can be preset, or can be adjusted by the resource management client based on the set coefficient in combination with the resource transfer information to obtain the weight coefficient corresponding to the current resource transfer request. Exemplarily, for a resource transfer request with a relatively large amount of resources requested to be transferred, the resource management client can appropriately increase the weight coefficient of the responder credibility to ensure that the responder has sufficient time to verify information; for a resource transfer request carrying time limit requirement information, the resource management client can appropriately increase the weight coefficient of the initiator credibility to ensure that the resource transfer operation can be executed as soon as possible to match the time limit requirement characterized by the time limit requirement information. Specifically, the resource management client can determine the respective weight coefficients of the initiator credibility and the responder credibility, and then, based on each weight coefficient, perform statistical calculations on the initiator credibility and the responder credibility to determine the deferred response duration matching the resource transfer request.
[0082] Exemplarily, as Figure 4 shown, after the resource management client obtains the resource transfer request, it can determine the initiator and the responder of the resource transfer request. Then, the resource management client obtains the initiator credibility of the initiator and the responder credibility of the responder from the blockchain system. Next, the resource management client determines the respective weight coefficients of the initiator credibility and the responder credibility, and finally performs statistical calculations on the initiator credibility and the responder credibility based on each weight coefficient to determine the deferred response duration matching the resource transfer request. In a specific example, the expression of the deferred response duration can be: deferred response duration = -a * initiator credibility + b * responder credibility, where a > b.
[0083] In the above embodiment, statistical calculations are performed on the credibility based on the weight coefficient to determine the deferred response duration. Since the weight coefficient of the initiator credibility is greater than the weight coefficient of the responder credibility, it can reduce the malicious risk of the initiator and further ensure the security of the resources.
[0084] In one embodiment, the resource transfer processing method further includes: determining an associated request of a resource transfer request from multiple historical resource transfer requests to be confirmed. In the case of this embodiment, a verification request for the resource transfer information is sent to the responder of the resource transfer request, including: during the overlapping interval of the confirmation periods, a verification request for the resource transfer information of the resource transfer request and the associated request is sent to the target responder.
[0085] Wherein, the associated request and the resource transfer request are for the same target responder, and there is an overlapping interval of the confirmation periods between the associated request and the resource transfer request. Exemplarily, as Figure 5 shown, the confirmation periods of multiple resource transfer requests are shown. It can be seen from the figure that resource transfer requests A1 - A4 are resource transfer requests initiated at four different times, and there is an overlapping interval in the confirmation periods of these four resource transfer requests, that is, the time interval between time t4 and time t5. Further, when the responders include the resource transferor and the resource transferee, the fact that the associated request and the resource transfer request are for the same target responder means that among the multiple responders respectively targeted by the associated request and the resource transfer request, at least one responder is the same. For example, the resource transferors targeted by the associated request and the resource transfer request are the same, or the resource transferor targeted by the associated request is the same as the resource transferee targeted by the resource transfer request.
[0086] Specifically, the resource management client can obtain multiple resource transfer requests, and these multiple resource transfer requests can be initiated by the same initiator or by different initiators. For each obtained resource transfer request, the resource management client can extract the resource transfer information carried in the resource transfer request, determine the resource transfer - out account and the resource transfer - in account according to the resource transfer information, and then determine the responder of the resource transfer request. Thus, the resource management client can determine an associated request from multiple historical resource transfer requests to be confirmed that is for the same target responder as the resource transfer request and has an overlapping interval in the confirmation period, and during the overlapping interval of the confirmation periods, send a verification request for the resource transfer information of the resource transfer request and the associated request to this target responder.
[0087] In the above - mentioned embodiment, for an associated request that is for the same responder as the resource transfer request and has an overlapping interval in the confirmation period, merging the associated request and the resource transfer request for processing can improve the working efficiency of the resource transfer processing process.
[0088] In one embodiment, the duration of the confirmation period overlap interval is greater than or equal to a duration threshold. In the case of this embodiment, during the confirmation period overlap interval, a verification request for the resource transfer information of each of the resource transfer request and the association request is sent to the target responder, including: during the confirmation period overlap interval, determining the remaining duration of the confirmation period for each of the association request and the resource transfer request; and when the minimum value among the remaining durations of each confirmation period reaches the duration threshold, sending a verification request for the resource transfer information of each of the resource transfer request and the association request to the target responder.
[0089] Among them, the duration threshold can be preset and can be obtained by statistically analyzing the historical verification duration of the responder for historical verification requests after determining the responder of the resource transfer request. Exemplarily, a safety margin can be added to the maximum value of the historical verification duration of the responder to obtain the duration threshold.
[0090] Specifically, the resource management client can determine the remaining duration of the confirmation period for each of the association request and the resource transfer request during the confirmation period overlap interval, and when the minimum value among the remaining durations of each confirmation period reaches the duration threshold, send a verification request for the resource transfer information of each of the resource transfer request and the association request to the target responder. It should be noted that during the process of waiting to send the verification request, the resource management client can synchronously obtain new resource transfer requests and determine the association between the new resource transfer requests and other historical resource transfer requests waiting to be confirmed, so as to ensure that as many association requests as possible can be merged and processed.
[0091] Exemplarily, for multiple resource transfer requests for the same target responder, the case where the duration threshold is T is taken as an example for illustration. Specifically, as Figure 5 shown, the start time of the confirmation period of the resource transfer request A1 is t1. Since the remaining duration of the confirmation period of the resource transfer request A1 at time t1 is much greater than T, the resource management client can not send a verification request for the resource transfer request A1 at this time, and the resource transfer request A1 is in a pending confirmation state. As time goes by, the resource management client sequentially obtains the resource transfer request A2 and the resource transfer request A3. Among them, the start time of the confirmation period of the resource transfer request A2 is t2, and the start time of the confirmation period of the resource transfer request A3 is t3. Then, for the last obtained resource transfer request A3, the resource transfer requests A1 and A2 are both association requests of the resource transfer request A1. When the time reaches t0, since the remaining duration of the confirmation period of the resource transfer request A2 reaches the duration threshold T, the resource management client merges and processes the resource transfer requests A1 - A3 and sends a verification request for these three resource transfer requests to the target responder. For the resource transfer request A4 that enters the confirmation period after time t0, it will wait for the next round of merging and processing.
[0092] In the above embodiments, when the minimum value of the remaining duration of the confirmation period for each of the association request and the resource transfer request reaches the duration threshold, a verification request for multiple resource transfer information is sent to the target responder. This can improve work efficiency while ensuring sufficient verification time is reserved for the target responder, and complete the resource transfer based on sufficient verification, which is beneficial to further improve resource security.
[0093] In one embodiment, the resource transfer processing method further includes: receiving the verification result feedback by the target responder for the verification request. In the case of this embodiment, step S308 includes: for the first sub-verification result that passes the verification, when the confirmation period corresponding to the first sub-verification result ends, performing the resource transfer operation indicated by the first resource transfer information corresponding to the first sub-verification result.
[0094] Among them, the verification result includes the sub-verification results of the resource transfer request and the association request respectively. Each sub-verification result may include a first sub-verification result that passes the verification and a second sub-verification result that fails the verification. The target responder can verify each resource transfer information separately, obtain the sub-verification results of each resource transfer information and feedback them to the resource management client. Thus, the resource management client can perform targeted operations according to each sub-verification result. Specifically, for the first sub-verification result that passes the verification, the resource management client can perform the resource transfer operation indicated by the first resource transfer information corresponding to the first sub-verification result when the confirmation period corresponding to the first sub-verification result ends. Exemplarily, as Figure 5 shown, if the sub-verification result corresponding to the resource transfer request A1 passes the verification, the resource management client can perform the corresponding resource transfer operation when the confirmation period of the resource transfer request A1 ends.
[0095] Furthermore, for the second sub-verification result that fails the verification, the resource management client does not perform the corresponding resource transfer operation. Exemplarily, the resource transfer client can call the suspend transaction interface of the resource transfer smart contract and transmit the request identifier of the second resource transfer request corresponding to the first sub-verification result to the suspend transaction interface, so that the resource transfer smart contract does not perform the corresponding resource transfer operation after the confirmation period of the second resource transfer request ends.
[0096] In a specific embodiment, the resource transfer processing method further includes: for the second sub-verification result that fails the verification, adding a suspend identifier to the second resource transfer request corresponding to the second sub-verification result.
[0097] Among them, the suspension flag is used to indicate that, when the confirmation period of the second resource transfer request ends, the resource transfer operation requested by the second resource transfer request is not executed. Specifically, for the second sub-verification result that fails the verification, the resource management client can add a suspension flag to the second resource transfer request corresponding to the second sub-verification result, so that when the confirmation period ends, the resource transfer operation requested by the second resource transfer request is not executed.
[0098] In the above embodiment, for multiple resource transfer requests with combined verification, subsequent processing is performed according to the verification results of each resource transfer request respectively, which can ensure that each resource transfer request is correctly processed, and thus ensure the security of resources.
[0099] In one embodiment, the resource transfer processing method further includes: when receiving the verification result that fails the verification feedback by the responder, obtaining the update information of the responder for the resource transfer request; feeding back the update information to the initiator, and obtaining the updated transfer information obtained by the initiator to update the resource transfer information based on the update information; sending an update verification request for the updated transfer information to the responder; if receiving the verification result that passes the verification feedback by the responder, then when the confirmation period ends, execute the resource transfer operation indicated by the updated transfer information.
[0100] In practical applications, it is possible that due to the misoperation of the initiator, the resource transfer information carried in the resource transfer request does not match the actual expected resource transfer information. Based on this, when the verification fails, the responder can also feedback the update information for the resource transfer request, so that the initiator can update the resource transfer information of the resource transfer request. Specifically, as Figure 6 shown, when receiving the verification result that fails the verification feedback by the responder, the resource management client obtains the update information of the responder for the resource transfer request, and then the resource management client feeds back the update information to the initiator. Thus, the initiator can update and process the resource transfer information based on the update information, obtain the updated transfer information and send it to the resource management client. Then, the resource management client generates and sends an update verification request for the updated transfer information to the responder. If receiving the verification result that passes the verification feedback by the responder, then when the confirmation period ends, execute the resource transfer operation indicated by the updated transfer information; if receiving the verification result that fails the verification feedback by the responder, then the next round of verification information feedback can be performed. If the verification result that passes the verification feedback by the responder is still not obtained when the confirmation period ends, the resource management client can close the resource transfer request.
[0101] In this embodiment, when receiving the verification result of non - passing feedback from the responder, the update of resource transfer information is supported, which can, to a certain extent, avoid the number of times of initiating resource transfer requests and is beneficial to improving the working efficiency of resource transfer processing.
[0102] In one embodiment, the responder further includes the resource transferee. In this case of this embodiment, when receiving the verification result of non - passing feedback from the responder, obtain the update information of the responder for the resource transfer request, including: when receiving the verification result of non - passing feedback from at least one of the resource transferor and the resource transferee, obtain the objection information negotiated and determined by the resource transferor and the resource transferee for the objection point; determine the objection information as the update information for the resource transfer request.
[0103] Among them, when the responder includes the resource transferee and the resource transferor, receiving the verification result of passing feedback from the responder means receiving the verification results of passing feedback from the resource transferor and the resource transferee respectively; receiving the verification result of non - passing feedback from the responder means receiving the verification result of non - passing feedback from at least one of the resource transferor and the resource transferee. When receiving the verification result of non - passing feedback from the responder, the update information for the resource transfer request can be determined through negotiation between the resource transferor and the resource transferee. Specifically, the resource management client can obtain the objection information negotiated and determined by the resource transferor and the resource transferee for the objection point, and determine the objection information as the update information for the resource transfer request. The objection point can be, for example, the type of resource requested to be transferred, the amount of resources, etc.
[0104] In this embodiment, by negotiating and determining the update information between the resource transferor and the resource transferee, the verification passing probability of the update verification request based on the update information can be improved, which is beneficial to further improving the working efficiency of resource transfer processing.
[0105] In one embodiment, the resource transfer processing method further includes: when receiving the verification result of non - passing feedback from at least one of the resource transferor and the resource transferee, perform a delay process on the confirmation period to obtain an updated confirmation period; if no objection information negotiated and determined by the resource transferor and the resource transferee for the objection point is obtained when the updated confirmation period ends, then close the resource transfer request.
[0106] Specifically, since it takes a certain amount of time for the resource transferor and the resource transferee to negotiate and determine the objection information for the objection points, the resource management client can, when receiving the verification result of non-passback feedback from at least one of the resource transferor and the resource transferee, delay the confirmation period to obtain an updated confirmation period. If the updated confirmation period ends and the objection information negotiated and determined by the resource transferor and the resource transferee for the objection points is still not obtained, the resource management client can close the resource transfer request.
[0107] In practical applications, deferral management can be performed based on at least one of the deferral parameters such as the deferral duration or the number of deferral times. Exemplarily, the resource management client can, during the process of waiting for the objection negotiation, calculate the remaining duration of the confirmation period of the resource transfer request, and when the remaining duration of the confirmation period reaches the set duration, perform a deferral process on the confirmation period, and superimpose the deferral duration on the basis of the set duration to obtain the updated confirmation period of the resource transfer request. If the updated confirmation period obtains the objection information negotiated and determined by the resource transferor and the resource transferee for the objection points, the resource management client can determine whether a secondary deferral process needs to be performed on the resource transfer request according to the relationship between the current remaining duration of the confirmation period and the duration threshold: if the current remaining duration of the confirmation period is greater than or equal to the duration threshold, no secondary deferral process is required; if the current remaining duration of the confirmation period is less than the duration threshold, the resource management client can perform a secondary deferral process on the resource transfer request to ensure that the remaining duration of the confirmation period after the deferral is greater than or equal to the duration threshold.
[0108] In the above embodiment, deferring the resource transfer request that requires objection negotiation can ensure that the resource transferor and the resource transferee can fully discuss and determine the objection information, thereby ensuring the smooth progress of subsequent resource transfer processing.
[0109] In a specific embodiment, as Figure 7 shown, the resource transfer processing method based on the blockchain includes the following steps:
[0110] Step S701, obtaining a resource transfer request initiated by the initiator for the resource transfer account by invoking the resource transfer smart contract;
[0111] Among them, the resource transfer smart contract carries the authorization information of the resource transferor to which the resource transfer account belongs;
[0112] Step S702, extracting the resource transfer information carried in the resource transfer request;
[0113] Step S703, determining the initiator credibility of the initiator and the responder credibility of the responder of the resource transfer request;
[0114] Step S704, determine the respective weight coefficients of the initiator credibility and the responder credibility;
[0115] Among them, the weight coefficient of the initiator credibility is greater than the weight coefficient of the responder credibility;
[0116] Step S705, perform statistical calculations on the initiator credibility and the responder credibility based on the respective weight coefficients, and determine the deferred response duration matching the resource transfer request;
[0117] Step S706, determine the associated request of the resource transfer request from multiple historical resource transfer requests to be confirmed;
[0118] Among them, the associated request and the resource transfer request target the same responder, and there is a confirmation period overlap interval between the confirmation periods of the associated request and the resource transfer request; the duration of the confirmation period overlap interval is greater than or equal to the duration threshold;
[0119] Step S707, determine the remaining durations of the confirmation periods of the associated request and the resource transfer request respectively within the confirmation period overlap interval;
[0120] Step S708, when the minimum value among the remaining durations of each confirmation period reaches the duration threshold, send a verification request for the resource transfer information corresponding to the resource transfer request and the associated request respectively to the responder;
[0121] Step S709, receive the verification result feedback by the responder for the verification request;
[0122] Among them, the verification result includes the respective sub-verification results of the resource transfer request and the associated request;
[0123] Step S710, for the first sub-verification result that passes the verification, when the confirmation period corresponding to the first sub-verification result ends, perform the resource transfer operation indicated by the first resource transfer information corresponding to the first sub-verification result;
[0124] Step S711, for the second sub-verification result that fails the verification, obtain the update information of the responder for the second resource transfer request corresponding to the second sub-verification result;
[0125] Step S712, feedback the update information to the initiator, and obtain the updated transfer information obtained by the initiator based on the update information to update the second resource transfer information;
[0126] Step S713, send an updated verification request for the updated transfer information to the responder;
[0127] Step S714, if receiving the verification result feedback by the responder that passes the verification, when the confirmation period ends, perform the resource transfer operation indicated by the updated transfer information;
[0128] Step S715: If the verification result indicating that the verification has passed is not received from the responder after the confirmation period ends, the second resource transfer request is closed.
[0129] The above-mentioned blockchain-based resource transfer processing method, in the process of responding to the resource transfer request, adds a confirmation period that matches the resource transfer request, and during the confirmation period, guides the responder of the resource transfer request to verify the resource transfer information carried in the resource transfer request. Since the responder includes the resource transferor, the resource transferor can know and complete the verification of the resource transfer information before transferring the digital resources, which can ensure that the resource transferor performs the resource transfer operation after the verification is correct, and can identify the situation of erroneous operation or malicious operation by the initiator, which is conducive to improving resource security. In addition, when the verification result is that the verification is passed and the confirmation period ends, executing the resource transfer operation indicated by the resource transfer information is equivalent to providing the resource transferor with a consideration period for the resource transfer request, which is conducive to further improving resource security.
[0130] In one embodiment, the resource transfer processing method based on blockchain in this application is described by taking the case where the initiator is the resource transferee and the responder is the resource transferor as an example. Specifically, the resource processing process involves the initiator, the resource transferor and the resource management client. The resource management client is responsible for managing the resource accounts on the blockchain, including the respective resource accounts of the initiator and the resource transferor.
[0131] like Figure 8 As shown, the initiator first initiates a resource transfer request to the resource management client by calling the resource transfer smart contract. The resource transfer smart contract carries the authorization information of the resource transferor. The resource transfer request may carry the initiator information, the resource transferor information, and the resource information requested to be transferred. The initiator information and the resource transferor information may be the resource account addresses of the initiator and the resource transferor, or the identification information of the initiator and the resource transferor. Next, the resource management client determines the deferred response duration that matches the resource transfer request, and then determines the transaction confirmation period represented by the deferred response duration.
[0132] Optionally, the resource management client can extract the initiator information from the resource transfer request, query the initiator credibility stored on the blockchain based on the initiator information, and then determine the transaction confirmation period that matches the initiator credibility. Optionally, the resource management client can extract the initiator information and the resource transferor information from the resource transfer request, query the initiator credibility and the resource transferor credibility from the blockchain respectively, and then combine the initiator credibility and the resource transferor credibility to determine the transaction confirmation period that matches the resource transfer request. Among them, the higher the initiator credibility, the shorter the transaction confirmation period; the higher the resource transferor credibility, the longer the transaction confirmation period. Further, the transaction confirmation period can be determined by weighted summation, where the weight of the initiator credibility can be greater than the weight of the resource transferor credibility. Further, the credibility of both parties to the transaction can be determined according to the historical transaction situation. For example, in the historical transfer process, the more the number or proportion of transfer records with disputes, the worse the credibility.
[0133] During the transaction confirmation period, the resource management client can send the verification information for the resource transfer request to the initiator and the resource transferor respectively, and obtain the verification results feedback by both parties to the transaction. Optionally, the verification information can be sent by means of email, application, applet or text message, etc.
[0134] Optionally, for resource transfer requests with overlapping transaction confirmation periods initiated on the blockchain, the resource management client can centrally process each resource transfer request during the overlapping reconciliation period. For example, if there are 3 resource transfer requests involving the same transaction party, the resource management client can send the verification information of these 3 resource transfer requests to this transaction party at one time during the overlapping reconciliation period of these 3 resource transfer requests. Further, the time difference between the sending time of the verification information and the end time of the transaction confirmation period is the actual review duration of the transaction party, and this time difference can be controlled (for example, greater than or equal to the duration threshold) to ensure that sufficient review time is reserved for the transaction party. As Figure 5 shown, resource transfer request A1 - resource transfer request A4 are 4 transaction requests with overlapping transaction confirmation periods, and the set time difference threshold is T. Then the resource management client can combine and process resource transfer request A1, resource transfer request A2 and resource transfer request A3. For resource transfer request A4, it can be combined and processed with the resource transfer requests initiated later.
[0135] After the transaction confirmation period ends, when both the initiator and the resource transferor pass the verification, the resource management client can respond to the resource transfer request and perform the corresponding resource transfer operation. When at least one of the initiator or the resource transferor fails the verification, the resource management client does not perform the corresponding resource transfer operation. Optionally, when the transaction confirmation period has not ended, the two parties to the transaction can negotiate on the points of disagreement. If they reach an agreement, they can resend the verification result of passing the verification to the resource management client so that the resource management client can perform the resource transfer operation after the transaction confirmation period ends. Optionally, for a resource transfer request that fails the verification, the resource management client can add a suspension flag, so that the resource transfer smart contract will skip this resource transfer request and not process it after the transaction confirmation period ends. Optionally, for a resource transfer request that fails the verification, the resource management client can extend the transaction confirmation period (for example, extend it to one week) and wait for the two parties to the transaction to negotiate. If no agreement is reached after the new transaction confirmation period ends, the resource transfer request will be closed.
[0136] By adopting the above resource transfer processing method, a transaction confirmation process is introduced after the resource transfer request is initiated, which can ensure that the transaction is executed after the accounts are reconciled correctly, and is beneficial to improving resource security. Moreover, the duration of the transaction confirmation period can be determined according to the historical transaction situation of the two parties to the transaction, which is beneficial to improving the flexibility of the method. At the same time, when the transaction confirmation periods of multiple resource transfer requests overlap, multiple resource transfer requests can be processed centrally during the overlapping transaction confirmation periods, which is beneficial to improving efficiency.
[0137] It should be understood that although the steps in the flowcharts involved in the above embodiments are shown in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear indication in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or in turn with at least a part of other steps or steps or stages in other steps.
[0138] Based on the same inventive concept, an embodiment of the present application further provides a blockchain-based resource transfer processing device for implementing the above-mentioned blockchain-based resource transfer processing method. The solution provided by this device for solving problems is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the blockchain-based resource transfer processing device provided below can refer to the limitations on the blockchain-based resource transfer processing method in the foregoing, and will not be elaborated here.
[0139] In some embodiments, as Figure 9 shown, a blockchain-based resource transfer processing device is provided, including: a request acquisition module 902, an information extraction module 904, a verification request sending module 906, and a resource transfer module 908, where:
[0140] The request acquisition module 902 is configured to acquire a resource transfer request initiated by an initiator for a resource transfer-out account by invoking a resource transfer smart contract; the resource transfer smart contract carries the authorization information of the resource transfer-out party to which the resource transfer-out account belongs;
[0141] The information extraction module 904 is configured to extract the resource transfer information carried in the resource transfer request;
[0142] The verification request sending module 906 is configured to determine a deferred response duration matching the resource transfer request, and within the confirmation period represented by the deferred response duration, send a verification request for the resource transfer information to the responder of the resource transfer request; the responder includes the resource transfer-out party;
[0143] The resource transfer module 908 is configured to, if a verification result indicating verification passed is received from the responder, perform the resource transfer operation indicated by the resource transfer information when the confirmation period ends.
[0144] In one embodiment, the verification request sending module 906 includes: a credibility determination unit configured to determine the initiator credibility of the initiator; a deferred response duration determination unit configured to determine a deferred response duration matching the resource transfer request according to the initiator credibility; the deferred response duration is inversely correlated with the initiator credibility.
[0145] In one embodiment, the credibility determination unit is further configured to determine the responder credibility of the responder of the resource transfer request. In the case of this embodiment, the deferred response duration determination unit is specifically configured to: combine the initiator credibility and the responder credibility to determine a deferred response duration matching the resource transfer request; the deferred response duration is positively correlated with the responder credibility.
[0146] In one embodiment, the deferred response duration determination unit is specifically configured to: determine the respective weight coefficients of the initiator credibility and the responder credibility; the weight coefficient of the initiator credibility is greater than the weight coefficient of the responder credibility; based on the respective weight coefficients, perform statistical calculations on the initiator credibility and the responder credibility to determine the deferred response duration matching the resource transfer request.
[0147] In one embodiment, the blockchain-based resource transfer processing apparatus further includes an associated request determination module, configured to: determine an associated request of the resource transfer request from multiple historical resource transfer requests to be confirmed; the associated request and the resource transfer request are directed to the same target responder, and there is a confirmation period overlap interval between the respective confirmation periods of the associated request and the resource transfer request. In the case of this embodiment, the verification request sending module 906 is specifically configured to: during the confirmation period overlap interval, send a verification request for the respective resource transfer information of the resource transfer request and the associated request to the target responder.
[0148] In one embodiment, the duration of the confirmation period overlap interval is greater than or equal to a duration threshold; in the case of this embodiment, the verification request sending module 906 is specifically configured to: during the confirmation period overlap interval, determine the remaining duration of the respective confirmation periods of the associated request and the resource transfer request; when the minimum value among the respective remaining durations of the confirmation periods reaches the duration threshold, send a verification request for the respective resource transfer information of the resource transfer request and the associated request to the target responder.
[0149] In one embodiment, the blockchain-based resource transfer processing apparatus further includes a verification result acquisition module, configured to receive the verification result feedback by the target responder for the verification request; the verification result includes the respective sub-verification results of the resource transfer request and the associated request. In the case of this embodiment, the resource transfer module 908 is specifically configured to: for the first sub-verification result that passes the verification, when the confirmation period corresponding to the first sub-verification result ends, perform the resource transfer operation indicated by the first resource transfer information corresponding to the first sub-verification result.
[0150] In one embodiment, the blockchain-based resource transfer processing apparatus further includes a suspension module, configured to: for the second sub-verification result that fails the verification, add a suspension flag to the second resource transfer request corresponding to the second sub-verification result; the suspension flag is used to indicate that when the confirmation period of the second resource transfer request ends, the resource transfer operation requested by the second resource transfer request is not performed.
[0151] In one embodiment, the blockchain-based resource transfer processing device further includes: an update information acquisition module, configured to acquire, when receiving a verification result indicating non-passing feedback from the responder, the update information of the responder for the resource transfer request; an updated transfer information acquisition module, configured to feedback the update information to the initiator and acquire the updated transfer information obtained by the initiator based on the update information to update the resource transfer information; a verification request sending module 906, further configured to send an updated verification request for the updated transfer information to the responder; a resource transfer module 908, further configured to, if receiving a verification result indicating passing feedback from the responder, perform the resource transfer operation indicated by the updated transfer information when the confirmation period ends.
[0152] In one embodiment, the responder further includes a resource transferee. In this embodiment, the update information acquisition module is specifically configured to: acquire, when receiving a verification result indicating non-passing feedback from at least one of the resource transferor and the resource transferee, the objection information negotiated and determined by the resource transferor and the resource transferee for the objection point; and determine the objection information as the update information for the resource transfer request.
[0153] In one embodiment, the blockchain-based resource transfer processing device further includes: a confirmation period update module, configured to perform a delay process on the confirmation period to obtain an updated confirmation period when receiving a verification result indicating non-passing feedback from at least one of the resource transferor and the resource transferee; a closing module, configured to close the resource transfer request if no objection information negotiated and determined by the resource transferor and the resource transferee for the objection point is obtained when the updated confirmation period ends.
[0154] Each module in the above blockchain-based resource transfer processing device can be implemented in whole or in part by software, hardware, and their combination. The above modules can be embedded in the processor of the computer device in the form of hardware or independent of it, or stored in the memory of the computer device in the form of software, so as to facilitate the processor to call and execute the operations corresponding to the above respective modules.
[0155] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as Figure 10As shown in the figure. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O), and a communication interface. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store the data involved in the resource transfer processing method based on the blockchain. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals through a network connection. When the computer program is executed by the processor, it implements a resource transfer processing method based on the blockchain.
[0156] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as Figure 11 shown in the figure. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface, the display unit, and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals in a wired or wireless manner. The wireless manner can be achieved through WIFI, a mobile cellular network, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a resource transfer processing method based on the blockchain. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covering the display screen, or a button, a trackball, or a touchpad set on the computer device housing, or an external keyboard, touchpad, or mouse, etc.
[0157] Those skilled in the art can understand that Figure 10 and Figure 11The structure shown is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have a different component layout.
[0158] In one embodiment, a computer device is provided, including a memory and a processor. A computer program is stored in the memory, and when the processor executes the computer program, the steps in the above-mentioned resource transfer processing method based on blockchain are implemented.
[0159] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned resource transfer processing method based on blockchain are implemented.
[0160] In one embodiment, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the steps in the above-mentioned resource transfer processing method based on blockchain are implemented.
[0161] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with the relevant laws, regulations, and standards in the relevant regions and areas.
[0162] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memories. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in the present application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in the present application can be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, data processing logics based on quantum computing, etc., without limitation.
[0163] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope recorded in this specification.
[0164] The above-described embodiments only represent several implementation manners of the present application. The description is relatively specific and detailed, but it should not be construed as a limitation on the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.
Claims
1. A method for processing resource transfer based on blockchain, characterized in that, The method includes: Obtaining a resource transfer request initiated by an initiator for a resource transfer out account by invoking a resource transfer smart contract; the resource transfer smart contract carries authorization information of a resource transferor to which the resource transfer out account belongs; Extracting the resource transfer information carried in the resource transfer request; Determining a deferred response duration matching the resource transfer request, and within the confirmation period represented by the deferred response duration, sending a verification request for the resource transfer information to a responder of the resource transfer request; the responder includes the resource transferor; If a verification result indicating verification passed feedback by the responder is received, then when the confirmation period ends, performing the resource transfer operation indicated by the resource transfer information.
2. The method according to claim 1, characterized in that, The determining a deferred response duration matching the resource transfer request includes: Determining the initiator credibility of the initiator; According to the initiator credibility, determining a deferred response duration matching the resource transfer request; the deferred response duration is inversely related to the initiator credibility.
3. The method according to claim 2, characterized in that, The method further includes: Determining the responder credibility of the responder of the resource transfer request; The according to the initiator credibility, determining a deferred response duration matching the resource transfer request includes: Combining the initiator credibility and the responder credibility to determine a deferred response duration matching the resource transfer request; the deferred response duration is positively related to the responder credibility.
4. The method according to claim 3, characterized in that, The combining the initiator credibility and the responder credibility to determine a deferred response duration matching the resource transfer request includes: Determining respective weight coefficients of the initiator credibility and the responder credibility; the weight coefficient of the initiator credibility is greater than the weight coefficient of the responder credibility; Based on each of the weight coefficients, performing statistical calculation on the initiator credibility and the responder credibility to determine a deferred response duration matching the resource transfer request.
5. The method according to claim 1, characterized in that, The method further includes: Determining an associated request of the resource transfer request from multiple historical resource transfer requests to be confirmed; the associated request and the resource transfer request are for the same target responder, and there is a confirmation period overlapping interval between the confirmation periods of the associated request and the resource transfer request; The sending a verification request for the resource transfer information to the responder of the resource transfer request includes: Within the confirmation period overlapping interval, sending a verification request for the resource transfer information of each of the resource transfer request and the associated request to the target responder.
6. The method according to claim 5, characterized in that, The duration of the confirmation period overlapping interval is greater than or equal to a duration threshold; the within the confirmation period overlapping interval, sending a verification request for the resource transfer information of each of the resource transfer request and the associated request to the target responder includes: Within the confirmation period overlapping interval, determining the remaining duration of the confirmation period of each of the associated request and the resource transfer request; When the minimum value of each of the remaining durations of the confirmation period reaches the duration threshold, sending a verification request for the resource transfer information of each of the resource transfer request and the associated request to the target responder.
7. The method according to claim 5, characterized in that, The method further includes: Receiving a verification result feedback by the target responder for the verification request; the verification result includes sub-verification results of the resource transfer request and the association request respectively; If receiving a verification passed result feedback by the responder, then when the confirmation period ends, performing the resource transfer operation indicated by the resource transfer information, including: For the first sub-verification result with verification passed, when the confirmation period corresponding to the first sub-verification result ends, performing the resource transfer operation indicated by the first resource transfer information corresponding to the first sub-verification result.
8. The method according to claim 7, characterized in that, The method further includes: For the second sub-verification result with verification not passed, adding a suspension flag to the second resource transfer request corresponding to the second sub-verification result; The suspension flag is used to indicate that when the confirmation period of the second resource transfer request ends, the resource transfer operation requested by the second resource transfer request is not performed.
9. The method according to claim 1, characterized in that, The method further includes: When receiving a verification not passed result feedback by the responder, obtaining update information of the responder for the resource transfer request; Feeding back the update information to the initiator and obtaining updated transfer information obtained by the initiator based on the update information to update the resource transfer information; Sending an updated verification request for the updated transfer information to the responder; If receiving a verification passed result feedback by the responder, then when the confirmation period ends, performing the resource transfer operation indicated by the updated transfer information.
10. The method according to claim 9, wherein, The responder further includes a resource receiving party; When receiving a verification not passed result feedback by the responder, obtaining the update information of the responder for the resource transfer request includes: When receiving a verification not passed result feedback by at least one of the resource sending party and the resource receiving party, obtaining objection information negotiated and determined by the resource sending party and the resource receiving party for the objection points; Determining the objection information as the update information for the resource transfer request.
11. The method according to claim 10, wherein, The method further includes: When receiving a verification not passed result feedback by at least one of the resource sending party and the resource receiving party, performing a time delay process on the confirmation period to obtain an updated confirmation period; If when the updated confirmation period ends, the objection information negotiated and determined by the resource sending party and the resource receiving party for the objection points is still not obtained, then closing the resource transfer request.
12. A resource transfer processing device based on a blockchain, wherein, The device includes: A request acquisition module, configured to acquire a resource transfer request initiated by an initiator by invoking a resource transfer smart contract for a resource sending account; the resource transfer smart contract carries authorization information of the resource sending party to which the resource sending account belongs; An information extraction module, configured to extract the resource transfer information carried in the resource transfer request; A verification request sending module, configured to determine a deferred response duration matching the resource transfer request, and within the confirmation period characterized by the deferred response duration, send a verification request for the resource transfer information to the responder of the resource transfer request; the responder includes the resource transferor. A resource transfer module, configured to, if receiving a verification result of verification passed feedback by the responder, perform the resource transfer operation indicated by the resource transfer information when the confirmation period ends.
13. A computer device, comprising a memory and a processor, the memory storing a computer program, wherein, When the processor executes the computer program, the steps of the method according to any one of claims 1 to 11 are implemented.
14. A computer-readable storage medium, having a computer program stored thereon, wherein, When the computer program is executed by the processor, the steps of the method according to any one of claims 1 to 11 are implemented.
15. A computer program product, comprising a computer program, wherein, When the computer program is executed by the processor, the steps of the method according to any one of claims 1 to 11 are implemented.