CN112685185A - Resource transfer method, device, system, computer equipment and storage medium - Google Patents

Resource transfer method, device, system, computer equipment and storage medium Download PDF

Info

Publication number
CN112685185A
CN112685185A CN202011644155.0A CN202011644155A CN112685185A CN 112685185 A CN112685185 A CN 112685185A CN 202011644155 A CN202011644155 A CN 202011644155A CN 112685185 A CN112685185 A CN 112685185A
Authority
CN
China
Prior art keywords
resource transfer
server node
target server
resource
data packet
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011644155.0A
Other languages
Chinese (zh)
Inventor
黄文琦
李鹏
赵继光
衡星辰
林志达
曾群生
王鹏凯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Southern Power Grid Digital Grid Research Institute Co Ltd
Original Assignee
Southern Power Grid Digital Grid Research Institute Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Southern Power Grid Digital Grid Research Institute Co Ltd filed Critical Southern Power Grid Digital Grid Research Institute Co Ltd
Priority to CN202011644155.0A priority Critical patent/CN112685185A/en
Publication of CN112685185A publication Critical patent/CN112685185A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application relates to a resource transfer method, a device, a system, a computer device and a storage medium. The method comprises the following steps: receiving a resource transfer data packet sent by a user terminal; the resource transfer data packet comprises a resource transfer permit, the validity of the resource transfer permit is verified, when the resource transfer permit passes, the network state of the target server node is detected, when the target server node is detected to be in an off-line state, an intelligent contract is generated according to the resource transfer data packet, and the intelligent contract is issued to any server node in the block chain system; and the intelligent contract is used for sending a reminding message to the target server node and triggering the target server node to transfer the resources corresponding to the resource transfer data packet when detecting that the target server node is converted from the offline state to the online state. By adopting the method, the safety and the credibility of asset transfer when the target server node is in an offline state can be ensured.

Description

Resource transfer method, device, system, computer equipment and storage medium
Technical Field
The present application relates to the field of block chain technology, and in particular, to a method, an apparatus, a system, a computer device, and a storage medium for resource transfer.
Background
Credit loan refers to the act of a business or an individual applying for a loan from a bank with his or her own credit. Nowadays, credit consumption concepts are gradually accepted by more and more people and become the trend of current social consumption, such as credit card transaction, payment by stages after goods purchase of loan, and the like. After the user consumes, the bank checks the transaction bill, pays the transaction resources responded for the user, and completes resource transfer.
However, in the resource transfer process, when the bank is in an online state, the transaction of the user can be checked and the resource transfer can be carried out in time, so that the security of the resource transfer is ensured; however, if the user transfers the resources when the bank is in an offline state, the resource transfer is easily tampered illegally, so that the rights and interests of the bank and the user are difficult to guarantee.
Disclosure of Invention
Therefore, it is necessary to provide a resource transfer method, device, system, computer device, and storage medium for solving the technical problems that when a bank is in an offline state, a resource transfer record is easily tampered with illegally, and it is difficult to guarantee the rights and interests of the bank and the user.
A method of resource transfer, the method comprising:
receiving a resource transfer data packet sent by a user terminal; the resource transfer data packet comprises a resource transfer license which is a certificate used for transferring the resource and sent to the user terminal by a target server node in the block chain system;
verifying the validity of the resource transfer permit, and detecting the network state of the target server node when the resource transfer permit passes the verification;
when the target server node is detected to be in an off-line state, generating an intelligent contract according to the resource transfer data packet, and issuing the intelligent contract to any server node in the block chain system; and the intelligent contract is used for sending a reminding message to the target server node and triggering the target server node to transfer the resources corresponding to the resource transfer data packet when detecting that the target server node is converted from an offline state to an online state.
In one embodiment, the resource transfer license includes a private key signature of the target server node and an original public key address of the user terminal;
the verifying the validity of the resource transfer license includes:
and verifying the validity of the resource transfer license through the private key signature of the target server node and the original public key address of the user terminal.
In one embodiment, the resource transfer license further includes a resource transfer private public key address of the user terminal;
before detecting the network state of the target server node, the method further comprises:
when the resource transfer license is judged to be valid, searching a historical resource transfer record corresponding to the resource transfer private public key address of the user terminal in the block chain system;
determining the validity of the residual resources in the resource transfer license according to the latest transfer record corresponding to the resource transfer private public key address and the latest transfer record in the resource transfer license;
and if the latest transfer record corresponding to the resource transfer private public key address is consistent with the latest transfer record in the resource transfer license, judging that the residual resources in the resource transfer license are valid, and detecting the network state of the target server node.
In one embodiment, after detecting that the target server node is in an offline state, the method further includes:
and verifying the user credit degree corresponding to the user terminal, and when the user credit degree corresponding to the user terminal meets a preset condition, generating an intelligent contract according to the resource transfer data packet, and/or broadcasting the resource transfer data packet to the target server node in the block chain system.
In one embodiment, the verifying the user credit corresponding to the user terminal includes:
sending the resource transfer data packet to a plurality of third-party merchant terminals so that each third-party merchant terminal searches a historical resource transfer record of the user terminal according to the resource transfer special public key address of the user terminal in the resource transfer data packet;
receiving the historical resource transfer records returned by the third-party merchant terminals, and determining the resource delinquent times of the user terminal from the historical resource transfer records;
determining the resource delinquent ratio of the user terminal according to the resource delinquent times and the historical resource transfer record;
and if the resource default ratio is smaller than a preset ratio threshold, judging that the user credit meets a preset condition.
In one embodiment, after detecting the network status of the target server node, the method further includes:
when the target server node is detected to be in an online state, forwarding the resource transfer data packet to the target server node so that the target server node verifies whether current resource transfer in a resource transfer license in the resource transfer data packet is effective or not, and when the current resource transfer is judged to be effective, determining the effectiveness of the residual resources in the resource transfer license; and if the value of the residual resource in the resource transfer license is larger than the value of the current transfer resource, judging that the residual resource is effective, and performing resource transfer corresponding to the resource transfer data packet.
An apparatus for resource transfer, the apparatus comprising:
the data packet receiving module is used for receiving a resource transfer data packet sent by the user terminal; the resource transfer data packet comprises a resource transfer license which is a certificate used for transferring the resource and sent to the user terminal by a target server node in the block chain system;
the verification module is used for verifying the validity of the resource transfer license and detecting the network state of the target server node when the resource transfer license passes the verification;
the intelligent contract generating module is used for generating an intelligent contract according to the resource transfer data packet and issuing the intelligent contract to any server node in the block chain system when the target server node is detected to be in an offline state; and the intelligent contract is used for sending a reminding message to the target server node and triggering the target server node to transfer the resources corresponding to the resource transfer data packet when detecting that the target server node is converted from an offline state to an online state.
A resource transfer system, the system comprising a user terminal, a target server node and a merchant terminal, wherein,
the user terminal is used for generating a resource transfer data packet and sending the resource transfer data packet to the merchant terminal; the resource transfer data packet comprises a resource transfer license which is a certificate used for transferring the resource and sent to the user terminal by a target server node in the block chain system;
the merchant terminal is used for receiving the resource transfer data packet sent by the user terminal; verifying the validity of the resource transfer permit, and detecting the network state of the target server node when the resource transfer permit passes the verification; when the target server node is detected to be in an off-line state, generating an intelligent contract according to the resource transfer data packet, and issuing the intelligent contract to any server node in the block chain system; the intelligent contract is used for sending a reminding message to the target server node when detecting that the target server node is converted from an offline state to an online state;
and the target server node is used for receiving the reminding message and transferring the resources corresponding to the resource transfer data packet.
A computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
receiving a resource transfer data packet sent by a user terminal; the resource transfer data packet comprises a resource transfer license which is a certificate used for transferring the resource and sent to the user terminal by a target server node in the block chain system;
verifying the validity of the resource transfer permit, and detecting the network state of the target server node when the resource transfer permit passes the verification;
when the target server node is detected to be in an off-line state, generating an intelligent contract according to the resource transfer data packet, and issuing the intelligent contract to any server node in the block chain system; and the intelligent contract is used for sending a reminding message to the target server node and triggering the target server node to transfer the resources corresponding to the resource transfer data packet when detecting that the target server node is converted from an offline state to an online state.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
receiving a resource transfer data packet sent by a user terminal; the resource transfer data packet comprises a resource transfer license which is a certificate used for transferring the resource and sent to the user terminal by a target server node in the block chain system;
verifying the validity of the resource transfer permit, and detecting the network state of the target server node when the resource transfer permit passes the verification;
when the target server node is detected to be in an off-line state, generating an intelligent contract according to the resource transfer data packet, and issuing the intelligent contract to any server node in the block chain system; and the intelligent contract is used for sending a reminding message to the target server node and triggering the target server node to transfer the resources corresponding to the resource transfer data packet when detecting that the target server node is converted from an offline state to an online state.
According to the resource transfer method, the device, the system, the computer equipment and the storage medium, the merchant terminal receives the resource transfer data packet sent by the user terminal; and when the target server node is detected to be in an off-line state, an intelligent contract is generated according to the resource transfer data packet and is issued to any server node in the block chain system, so that when the target server node is detected to be converted from the off-line state to the on-line state, the intelligent contract sends a reminding message to the target server node to trigger the target server node to perform resource transfer corresponding to the resource transfer data packet. When a user terminal needs to transfer resources, the method verifies the validity of a resource transfer license held by the user terminal, reduces the risk of resource transfer of a merchant terminal, generates an intelligent contract according to a resource transfer data packet when a target server node is in an offline state, and issues the intelligent contract into a block chain system, when the target server node is detected to be converted from the offline state to an online state, the target server node is triggered by the intelligent contract to complete resource transfer corresponding to the resource transfer data packet, the intelligent contract is utilized to realize automatic asset transfer reminding when the target server node is in the offline state, and the non-tamper property of the block chain system is utilized to ensure the safety and credibility of an asset transfer record when the target server node is in the offline state.
Drawings
FIG. 1 is a diagram of an application scenario of a resource transfer method in one embodiment;
FIG. 2 is a flow diagram illustrating a method for resource transfer in one embodiment;
FIG. 3 is a flowchart illustrating the steps of determining the validity of the remaining resources in the resource transfer license in one embodiment;
FIG. 4 is a flow chart illustrating a resource transfer method in an application example;
FIG. 5 is a block diagram of an apparatus for transferring resources according to an embodiment;
FIG. 6 is a block diagram of the architecture of a resource transfer system in one embodiment;
FIG. 7 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The resource transfer method provided by the application can be applied to the application environment shown in fig. 1. The merchant terminal 102 receives a resource transfer data packet sent by the user terminal 106, where the resource transfer data packet includes a resource transfer license, and the resource transfer license is a credential sent by a target server node in the block chain system 104 to the user terminal 106 for transferring resources; the validity of the resource transfer permit is verified, and when the resource transfer permit passes the verification, the network state of the target server node is detected; when the target server node is detected to be in an off-line state, generating an intelligent contract according to the resource transfer data packet; and the intelligent contract is used for sending a reminding message to the target server node and triggering the target server node to transfer the resources corresponding to the resource transfer data packet when detecting that the target server node is converted from the offline state to the online state. The merchant terminal 102 communicates with the target server node in the blockchain system 104 and the user terminal 106 through a network, and the target server node in the blockchain system 104 communicates with the user terminal 106 through a network. The merchant terminal 102 and the user terminal 106 may be, but are not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices, and the target server node may be implemented by an independent server node in the blockchain system 104 or a server cluster composed of a plurality of server nodes.
In one embodiment, as shown in fig. 2, a resource transfer method is provided, which is described by taking the method as an example applied to the merchant terminal 102 in fig. 1, and includes the following steps:
step S202, receiving a resource transfer data packet sent by a user terminal; the resource transfer data packet comprises a resource transfer license, and the resource transfer license is a certificate which is sent to the user terminal by the target server node in the blockchain system and is used for transferring the resource.
The resource transfer data packet includes information related to the currently transferred resource, such as information about a resource transfer value, a resource transfer time, and an address of a merchant for receiving the resource.
The resource transfer license comprises a Private key signature of a target server node, an Original public key Address (Original Address) of a user terminal, a Private public key Address (Private Address) for resource transfer, a resource transfer limit (Amount), a validity period (Duration), a resource repayment Buffer period (Buffer), a Timestamp (Timestamp), and a resource repayment record (P (a, b), wherein a represents the successful repayment times, and b represents the overdue unreturned times).
In a specific implementation, before the merchant terminal 102 receives the resource transfer data packet sent by the user terminal 106, the user terminal 106 first submits a resource application request to a target server node in the blockchain system 104, and simultaneously sends its original public key address and identity information to the target server node. After receiving the resource application request, the target server node traverses the resource application record and the resource transfer record associated with the original public key address of the user terminal 106 from the blockchain system 104, calculates the total resource amount and the resource flow condition of the original public key address according to the acquired resource application record and resource transfer record, and queries the credit condition of the original public key address from other server nodes in the federation chain. If the total amount of resources, the resource flow condition, and the credit status of the user terminal 106 meet the preset resource application conditions, the target server node may provide the user terminal 106 with a corresponding resource amount, specifically, the target server node may generate a private-public key pair for resource transfer, send the public key to the user terminal 106, and simultaneously generate and send a resource transfer license to the user terminal 106, so that the user terminal 106 may perform resource transfer at the merchant terminal 102 through the resource transfer license.
Further, when the merchant terminal 102 performs resource transfer, the user terminal 106 generates a resource transfer data packet corresponding to the currently transferred resource, and sends the resource transfer data packet to the merchant terminal 102, and the merchant terminal 102 receives the resource transfer data packet, so as to determine whether to approve the current resource transfer according to the resource transfer data packet.
And step S204, carrying out validity verification on the resource transfer license, and detecting the network state of the target server node when the resource transfer license passes the verification.
In a specific implementation, after receiving the resource transfer data packet sent by the user terminal 106, the merchant terminal 102 may verify the validity of the resource transfer license in the resource transfer data packet by using the private key signature of the target server node in the resource transfer license and the original public key address of the user terminal, that is, verify whether the user terminal 106 falsely uses the resource transfer license of another person or forges the private key signature of the target server node. If the resource transfer license is valid, the network state of the target server node is further detected after the verification is passed, so that a corresponding processing flow is executed according to the detection result.
Step S206, when the target server node is detected to be in an off-line state, generating an intelligent contract according to the resource transfer data packet, and issuing the intelligent contract to any server node in the block chain system; and the intelligent contract is used for sending a reminding message to the target server node and triggering the target server node to transfer the resources corresponding to the resource transfer data packet when detecting that the target server node is converted from the offline state to the online state.
Wherein the intelligent contract is program code running on a server node in the blockchain system.
In a specific implementation, when the merchant terminal 102 detects that the target server node is in an offline state, the process enters an offline state processing flow, generates an intelligent contract according to the resource transfer data packet, and issues the intelligent contract to any server node in the block chain system, so that when the target server node is detected to be converted from the offline state to the online state, the intelligent contract sends a reminding message to the target server node, and the target server node is triggered to perform resource transfer corresponding to the current resource in the resource transfer data packet.
In the resource transfer method, a merchant terminal receives a resource transfer data packet sent by a user terminal; and when the target server node is detected to be in an off-line state, an intelligent contract is generated according to the resource transfer data packet and is issued to any server node in the block chain system, so that when the target server node is detected to be converted from the off-line state to the on-line state, the intelligent contract sends a reminding message to the target server node to trigger the target server node to perform resource transfer corresponding to the resource transfer data packet. When a user terminal needs to transfer resources, the method verifies the validity of a resource transfer license held by the user terminal, reduces the risk of resource transfer of a merchant terminal, generates an intelligent contract according to a resource transfer data packet when a target server node is in an offline state, and issues the intelligent contract into a block chain system, when the target server node is detected to be converted from the offline state to an online state, the target server node is triggered by the intelligent contract to complete resource transfer corresponding to the resource transfer data packet, the intelligent contract is utilized to realize automatic asset transfer reminding when the target server node is in the offline state, and the non-tamper property of the block chain system is utilized to ensure the safety and credibility of an asset transfer record when the target server node is in the offline state.
In an embodiment, the step of verifying the validity of the resource transfer license in step S204 includes: and verifying the validity of the resource transfer license through the private key signature of the target server node and the original public key address of the user terminal.
In a specific implementation, after the target server node completes the check of the resource transfer packet of the user terminal 106 and the resource transfer, the resource transfer record is signed in the resource transfer license, so as to obtain an updated resource transfer license, and the updated resource transfer license is returned to the user terminal 106. Therefore, the merchant terminal 102 may verify the authenticity and validity of the resource transfer license through the historical private key signature in the resource transfer license, and verify whether the resource transfer license is falsely used through the original public key address in the resource transfer license, and if the verification result is that the private key signature in the resource transfer license is the private key signature of the target server node and the resource transfer license indeed corresponds to the original public key address of the user, determine that the resource transfer license is valid.
In the embodiment, the validity of the resource transfer license is verified through the private key signature of the target server node and the original public key address of the user terminal, so that the resource license can be prevented from being illegally used, and the rights and interests of the user are ensured.
In one embodiment, as shown in fig. 3, before the step of detecting the network status of the target server node in step S204, the method further includes:
step S302, when the resource transfer license is judged to be valid, searching a historical resource transfer record corresponding to the resource transfer private public key address of the user terminal in the block chain system;
step S304, determining the validity of the residual resource in the resource transfer license according to the latest transfer record corresponding to the special public key address for resource transfer and the latest transfer record in the resource transfer license;
step S306, if the last transfer record corresponding to the resource transfer private public key address is consistent with the last transfer record in the resource transfer license, determining that the residual resource in the resource transfer license is valid, and detecting the network state of the target server node.
In a specific implementation, when the merchant terminal 102 determines that the resource transfer license sent by the user terminal 106 is valid, the latest transfer record corresponding to the resource transfer private public key address of the user terminal 102 may be further recursively searched in the blockchain system 104, and according to whether the latest transfer record corresponding to the resource transfer private public key address is consistent with the latest transfer record in the resource transfer license, the validity of the remaining resource included in the resource transfer license is determined, and if the latest transfer record corresponding to the resource transfer private public key address is consistent with the latest transfer record in the resource transfer license, the remaining resource in the resource transfer license is determined to be valid, and the network state of the target server node may be further detected.
Preferably, when it is determined that the latest transfer record corresponding to the resource transfer private public key address is consistent with the latest transfer record in the resource transfer license, the value of the current transfer resource in the resource transfer data packet may be compared with the value of the remaining resource in the resource transfer license, and if the value of the remaining resource is greater than the value of the current transfer resource, it is determined that the remaining resource in the resource transfer license is valid, so as to avoid resource transfer failure due to excess of the user terminal.
In this embodiment, the validity of the remaining resources in the resource transfer license is determined by comparing the latest transfer record corresponding to the resource-specific address of the user terminal with the latest transfer record in the resource transfer license, and the network state of the target server node is further detected only when the determination result is valid, so that it is possible to avoid that the remaining resource value in the resource transfer license is inaccurate and property risks are brought to a merchant due to the fact that the recording is not performed in the resource transfer license after the user terminal performs resource transfer.
In one embodiment, after the step of detecting that the target server node is in the offline state in step S206, the method further includes: and verifying the user credit degree corresponding to the user terminal, and when the user credit degree corresponding to the user terminal meets a preset condition, generating an intelligent contract according to the resource transfer data packet, and/or broadcasting the resource transfer data packet to a target server node in the block chain system.
In a specific implementation, when the merchant terminal 102 detects that the target server node is in an offline state, in order to prevent the user terminal 106 from carrying out an over-payment attack when the resource transfer Amount (Amount) is about to be used up, it may determine whether to accept the current transaction of resource transfer by verifying the user credit degree corresponding to the user terminal, and when the user credit degree satisfies a preset condition, for example, the credit degree is greater than a preset credit degree threshold, it is determined that the user credit degree satisfies the preset condition, an intelligent contract may be generated according to the resource transfer data packet, and at the same time, the resource transfer data packet may be broadcast to the target server node in the block chain system 104.
In the embodiment, the credit rating of the user is verified, and when the verification is passed, the intelligent contract is generated according to the resource transfer data packet, so that the risk of resource transfer transaction of a merchant is reduced, the rights and interests of the merchant are guaranteed, meanwhile, the resource transfer data packet is broadcasted to the block chain system, so that the resource transfer transaction is found every time, and the resource transfer record is guaranteed not to be tampered.
In an embodiment, the step of verifying the user credit corresponding to the user terminal includes: sending the resource transfer data packet to a plurality of third-party merchant terminals so that each third-party merchant terminal searches the historical resource transfer record of the user terminal according to the resource transfer special public key address of the user terminal in the resource transfer data packet; receiving historical resource transfer records returned by each third-party merchant terminal, and determining the resource delinquent times of the user terminal from the historical resource transfer records; determining the resource delinquent ratio of the user terminal according to the resource delinquent times and the historical resource transfer record; and if the resource default ratio is smaller than a preset ratio threshold value, judging that the user credit meets a preset condition.
In a specific implementation, the merchant terminal 102 may send the resource transfer data packet of the currently transferred resource to a plurality of third-party merchant terminals, and the third-party merchant terminals search historical resource transfer records related to the resource transfer private public key address of the user and return the historical resource transfer records to the merchant terminal 102. After receiving the historical resource transfer record of the user, the merchant terminal 102 determines the resource delinquent number of the resource transfer private public key address from the historical resource transfer record, calculates the ratio of the resource delinquent number to the total number of the historical resource transfer record to obtain a resource delinquent ratio, compares the resource delinquent ratio with a preset ratio threshold, and determines that the user credit corresponding to the user terminal 106 meets a preset condition if the resource delinquent ratio of the user terminal 106 is smaller than the preset ratio threshold.
In this embodiment, the resource delinquent times are determined from the historical resource transfer records by receiving the historical resource transfer records of the user terminal sent by each third-party merchant terminal, and then the resource delinquent ratio is calculated, so that the resource delinquent ratio is compared with a preset ratio threshold value, and thus whether the user credit meets a preset condition is judged, and a basis is provided for determining whether to accept the current transaction of resource transfer.
In one embodiment, after detecting the network status of the target server node, the method further includes: when the target server node is detected to be in an online state, forwarding the resource transfer data packet to the target server node so that the target server node verifies whether current resource transfer in a resource transfer license in the resource transfer data packet is effective or not, and when the current resource transfer is judged to be effective, determining the effectiveness of the residual resources in the resource transfer license; if the value of the residual resource in the resource transfer license is larger than the value of the current transfer resource, the residual resource is judged to be effective, and the resource transfer corresponding to the resource transfer data packet is carried out.
In a specific implementation, if the merchant terminal 102 detects that the target server node is in an online state, the online state processing flow is entered, and the resource transfer data packet corresponding to the currently transferred resource is sent to the target server node and is checked by the target server node. More specifically, after receiving the resource transfer data packet, the target server node first determines whether a resource transfer record of the resource transfer license in the resource transfer data packet is consistent with a resource transfer record recorded by the target server node, if so, further determines validity of a remaining resource in the resource transfer license, and if the value of the remaining resource in the resource transfer license is greater than the value of the current transfer resource, determines that the remaining resource in the resource transfer license is valid, and can perform resource transfer corresponding to the resource transfer data packet, and add the current resource transfer record and re-signature to the resource transfer license, and return the obtained modified resource transfer license to the user terminal 106.
If the resource transfer record of the resource transfer license is inconsistent with the resource transfer record recorded by the target server node, it indicates that the user terminal 106 has performed offline resource transfer before the current resource transfer, the target server node may send a ticket checking instruction to the user terminal 106, instruct the user terminal 106 to provide a credential for performing offline resource transfer, check the authenticity of the credential, and if the credential is checked to be authentic, return to the step of determining the validity of the remaining resources in the resource transfer license.
In this embodiment, when it is detected that the target server node is in an online state, the resource transfer data packet may be directly sent to the target server node, so that the target server node checks the current resource transfer information to complete the transaction of the current resource transfer.
In one embodiment, when the user makes a resource repayment, the resource is paid within the validity period (Duration), if not, the resource is paid in time. The user must be within the Buffer period (Buffer)The full amount reimburses the resources owed to the target server node and pays a service fee to the target server node. The length of the Buffer period (Buffer) is related to the resource transfer limit (Amount) applied by the user, the larger the limit is, the larger the required Buffer time is, and the relation between the Buffer period and the resource transfer limit can be expressed as follows:
Figure BDA0002874818900000121
wherein, the unit of the Buffer period (Buffer) is day, and the unit of the resource transfer limit (Amount) is element. When the buffer term arrives, if the user is overdue and is not available or no redundant resources exist in the user account at the moment, the target server node increases the number of overdue and unavailable times in the credit record of the user. The record will not be erased but may have a reduced impact over time and the record of successful payments increases. When the user clears the debt, a late fund needs to be paid to the target server node as an overdue outstanding penalty, and the Amount of the penalty can be combined with the credit condition of the user, the value (Amount) of the owed resource and the Delay time (Delay). The Penalty amount (Penalty) may be expressed by the relationship: penalty is β × Delay × r × Amount, where β is a direct proportionality coefficient and r is interest rate. The calculated relationship for β can be expressed as:
Figure BDA0002874818900000131
wherein a represents the number of times that the user successfully tenders the resource, b represents the number of times that the user has not yet expired, and c and d are represented as direct proportionality coefficients. If the resource is still owed after the buffer period is exceeded, the target server node can declare the owed charge as a bad account, the account or the original public key address used when the user applies is broadcast in the blockchain system, and the user can not apply for the credit limit of any server node.
In order to more clearly explain the technical solution provided by the embodiment of the present application, the solution will be described below with reference to fig. 4, where fig. 4 is a schematic flow chart of a resource transfer method in an application example, in the embodiment, a bank is used as a target server node, when a user applies for a certain credit line to the bank and needs to purchase goods from a merchant, a payment process is divided into two cases, namely online and offline, of the bank, an upper half part in fig. 4 is a payment process when a bank server node is online, and a lower half part is a payment process when the bank server node is offline.
(1) The payment process under the online condition of the bank is as follows:
a. when a user purchases a commodity, a resource transfer data packet containing a resource transfer license, a payment amount, a merchant collection address and a bank private key signature is generated at a user terminal and sent to a merchant.
b. The merchant verifies the validity of the resource transfer license through the bank private key signature, and verifies whether the resource transfer license is falsely used or not through the original public key address in the resource transfer license. And when the validity of the resource transfer license is verified, recursively searching whether the latest transaction in the resource transfer private public key address of the user in the blockchain system is consistent with the record in the resource transfer license, thereby verifying the authenticity of the value of the residual resource in the resource transfer license.
c. And when the bank is detected to be online, the merchant sends the received resource transfer data packet sent by the user to the bank.
d. After receiving the resource transfer data packet, the bank firstly detects whether the resource transfer record in the resource transfer permit is consistent with the record of the bank, if not, the user performs off-line payment since last payment, and the bank can require the payment bill before the user shows to check. And then checking whether the amount of the residual resources in the resource transfer license is enough to pay a resource bill of the current transaction, if so, transferring the resources required by the current transaction to a resource transfer special public key address of the user by the bank, then paying the resources required by the current transaction to the merchant from the resource transfer special public key address, simultaneously adding the transaction information in the resource transfer license, re-signing, and returning the re-signed resource transfer license to the user.
(2) The payment process when the bank is not on line is as follows:
the steps a and b are the same as the flow when the bank is on line, and are not described in detail here.
c. If the merchant detects that the bank is not on line, the credibility of the bank and the credibility of the user can be comprehensively considered at the moment to determine whether to accept the transaction, and if the merchant is willing to accept the transaction, a confirmation message is returned to the user.
In order to prevent the user from paying the price of the resource when the applied resource limit is about to be used up, the merchants can send the resource transfer data packet of the transaction to a plurality of third-party merchants, so that the third-party merchants can search the consumption records (namely the resource transfer records) of the user according to the resource transfer special public key address of the user in the resource transfer data packet, receive the historical consumption records returned by the third-party merchants, and determine the credibility of the user according to the historical consumption records.
d. Meanwhile, the merchant broadcasts the resource transfer data packet of the transaction to the blockchain network, the resource transfer data packet is collected by the miner node and added into the blockchain, and the merchant generates the intelligent contract according to the resource transfer data packet.
e. After the bank is on line, the intelligent contract informs the bank to complete the resource transfer corresponding to the transaction, meanwhile, the bank can also inquire the block chain, find out the un-cashed historical transaction, transfer the corresponding resources to the merchant according to the transaction time sequence, and after the bank completes the resource transfer once, record the resource transfer in the resource transfer permit and carry out signature.
f. After the user completes one transaction, the transaction can be recorded into the resource transfer license and signed.
It should be understood that although the various steps in the flow charts of fig. 2-4 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-4 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 5, there is provided a resource transfer apparatus, including: a data packet receiving module 502, a verification module 504, and an intelligent contract generating module 506, wherein:
a data packet receiving module 502, configured to receive a resource transfer data packet sent by a user equipment; the resource transfer data packet comprises a resource transfer license which is a certificate used for transferring the resource and sent to the user terminal by the target server node in the block chain system;
the verification module 504 is configured to perform validity verification on the resource transfer license, and detect a network state of the target server node when the resource transfer license passes the verification;
an intelligent contract generating module 506, configured to generate an intelligent contract according to the resource transfer data packet when it is detected that the target server node is in an offline state, and issue the intelligent contract to any server node in the block chain system; and the intelligent contract is used for sending a reminding message to the target server node and triggering the target server node to transfer the resources corresponding to the resource transfer data packet when detecting that the target server node is converted from the offline state to the online state.
In one embodiment, the resource transfer license includes a private key signature of the target server node and an original public key address of the user terminal; the verification module 504 is further configured to verify the validity of the resource transfer license through the private key signature of the target server node and the original public key address of the user terminal.
In one embodiment, the resource transfer license further includes a resource transfer private public key address of the user terminal; the verification module 504 is further configured to search, when it is determined that the resource transfer license is valid, a historical resource transfer record corresponding to a resource transfer private public key address of the user terminal in the blockchain system; determining the validity of the residual resources in the resource transfer license according to the latest transfer record corresponding to the resource transfer private public key address and the latest transfer record in the resource transfer license; and if the last transfer record corresponding to the resource transfer private public key address is consistent with the last transfer record in the resource transfer license, judging that the residual resources in the resource transfer license are valid, and detecting the network state of the target server node.
In an embodiment, the intelligent contract generating module 506 is further configured to verify the user credit degree corresponding to the user terminal, and when the user credit degree corresponding to the user terminal meets a preset condition, generate an intelligent contract according to the resource transfer data packet, and/or broadcast the resource transfer data packet to a target server node in the blockchain system.
In an embodiment, the intelligent contract generating module 506 is further configured to send the resource transfer data packet to a plurality of third-party merchant terminals, so that each third-party merchant terminal searches a historical resource transfer record of the user terminal according to a resource transfer private public key address of the user terminal in the resource transfer data packet; receiving historical resource transfer records returned by each third-party merchant terminal, and determining the resource delinquent times of the user terminal from the historical resource transfer records; determining the resource delinquent ratio of the user terminal according to the resource delinquent times and the historical resource transfer record; and if the resource default ratio is smaller than a preset ratio threshold value, judging that the user credit meets a preset condition.
In one embodiment, the above apparatus further comprises:
the data packet sending module is used for forwarding the resource transfer data packet to the target server node when the target server node is detected to be in an online state, so that the target server node verifies whether the current resource transfer in the resource transfer license in the resource transfer data packet is effective or not, and when the current resource transfer is judged to be effective, the effectiveness of the residual resources in the resource transfer license is determined; if the value of the residual resource in the resource transfer license is larger than the value of the current transfer resource, the residual resource is judged to be effective, and the resource transfer corresponding to the resource transfer data packet is carried out.
It should be noted that, the resource transfer apparatus of the present application corresponds to the resource transfer method of the present application one to one, and the technical features and the beneficial effects described in the embodiments of the resource transfer method are all applicable to the embodiments of the resource transfer apparatus, and specific contents may refer to the descriptions in the embodiments of the method of the present application, which are not described herein again, and thus, the disclosure is hereby made.
Furthermore, all or part of the modules in the resource transfer device may be implemented by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, as shown in fig. 6, a resource transfer system is provided that includes a user terminal 602, a merchant terminal 604, and a target server node 606, wherein,
the user terminal 602 is configured to generate a resource transfer data packet, and send the resource transfer data packet to a merchant terminal; the resource transfer data packet comprises a resource transfer license which is a certificate used for transferring the resource and sent to the user terminal by the target server node in the block chain system;
the merchant terminal 604 is configured to receive a resource transfer data packet sent by a user terminal; the validity of the resource transfer permit is verified, and when the resource transfer permit passes the verification, the network state of the target server node is detected; when the target server node is detected to be in an off-line state, generating an intelligent contract according to the resource transfer data packet, and issuing the intelligent contract to any server node in the block chain system; the intelligent contract is used for sending a reminding message to the target server node when detecting that the target server node is converted from an offline state to an online state;
the target server node 606 is configured to receive the alert message, and perform resource transfer corresponding to the resource transfer data packet.
The resource transfer system provided by the above can be used to execute the resource transfer method provided by any of the above embodiments, and has corresponding functions and advantages.
For the specific limitation of the resource transfer system, reference may be made to the above limitation on the resource transfer method, which is not described herein again.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 7. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile 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 an operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless communication can be realized through WIFI, an operator network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a resource transfer method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 7 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, there is provided a computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
receiving a resource transfer data packet sent by a user terminal; the resource transfer data packet comprises a resource transfer license which is a certificate used for transferring the resource and sent to the user terminal by the target server node in the block chain system;
the validity of the resource transfer permit is verified, and when the resource transfer permit passes the verification, the network state of the target server node is detected;
when the target server node is detected to be in an off-line state, generating an intelligent contract according to the resource transfer data packet, and issuing the intelligent contract to any server node in the block chain system; and the intelligent contract is used for sending a reminding message to the target server node and triggering the target server node to transfer the resources corresponding to the resource transfer data packet when detecting that the target server node is converted from the offline state to the online state.
In one embodiment, a computer device is further provided, which includes a memory and a processor, the memory stores a computer program, and the processor implements the steps of the above method embodiments when executing the computer program.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
receiving a resource transfer data packet sent by a user terminal; the resource transfer data packet comprises a resource transfer license which is a certificate used for transferring the resource and sent to the user terminal by the target server node in the block chain system;
the validity of the resource transfer permit is verified, and when the resource transfer permit passes the verification, the network state of the target server node is detected;
when the target server node is detected to be in an off-line state, generating an intelligent contract according to the resource transfer data packet, and issuing the intelligent contract to any server node in the block chain system; and the intelligent contract is used for sending a reminding message to the target server node and triggering the target server node to transfer the resources corresponding to the resource transfer data packet when detecting that the target server node is converted from the offline state to the online state.
In an embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when being executed by a processor, carries out the steps of the above-mentioned method embodiments.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium transferred in the embodiments provided herein may include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A method of resource transfer, the method comprising:
receiving a resource transfer data packet sent by a user terminal; the resource transfer data packet comprises a resource transfer license which is a certificate used for transferring the resource and sent to the user terminal by a target server node in the block chain system;
verifying the validity of the resource transfer permit, and detecting the network state of the target server node when the resource transfer permit passes the verification;
when the target server node is detected to be in an off-line state, generating an intelligent contract according to the resource transfer data packet, and issuing the intelligent contract to any server node in the block chain system; and the intelligent contract is used for sending a reminding message to the target server node and triggering the target server node to transfer the resources corresponding to the resource transfer data packet when detecting that the target server node is converted from an offline state to an online state.
2. The method of claim 1, wherein the resource transfer license comprises a private key signature of the target server node and an original public key address of the user terminal;
the verifying the validity of the resource transfer license includes:
and verifying the validity of the resource transfer license through the private key signature of the target server node and the original public key address of the user terminal.
3. The method according to claim 2, wherein the resource transfer license further comprises a resource transfer private public key address of the user terminal;
before detecting the network state of the target server node, the method further comprises:
when the resource transfer license is judged to be valid, searching a historical resource transfer record corresponding to the resource transfer private public key address of the user terminal in the block chain system;
determining the validity of the residual resources in the resource transfer license according to the latest transfer record corresponding to the resource transfer private public key address and the latest transfer record in the resource transfer license;
and if the latest transfer record corresponding to the resource transfer private public key address is consistent with the latest transfer record in the resource transfer license, judging that the residual resources in the resource transfer license are valid, and detecting the network state of the target server node.
4. The method of claim 1, after detecting that the target server node is in an offline state, further comprising:
and verifying the user credit degree corresponding to the user terminal, and when the user credit degree corresponding to the user terminal meets a preset condition, generating an intelligent contract according to the resource transfer data packet, and/or broadcasting the resource transfer data packet to the target server node in the block chain system.
5. The method of claim 4, wherein the verifying the user credit corresponding to the user terminal comprises:
sending the resource transfer data packet to a plurality of third-party merchant terminals so that each third-party merchant terminal searches a historical resource transfer record of the user terminal according to the resource transfer special public key address of the user terminal in the resource transfer data packet;
receiving the historical resource transfer records returned by the third-party merchant terminals, and determining the resource delinquent times of the user terminal from the historical resource transfer records;
determining the resource delinquent ratio of the user terminal according to the resource delinquent times and the historical resource transfer record;
and if the resource default ratio is smaller than a preset ratio threshold, judging that the user credit meets a preset condition.
6. The method according to any one of claims 1 to 5, further comprising, after detecting the network status of the target server node:
when the target server node is detected to be in an online state, forwarding the resource transfer data packet to the target server node so that the target server node verifies whether current resource transfer in a resource transfer license in the resource transfer data packet is effective or not, and when the current resource transfer is judged to be effective, determining the effectiveness of the residual resources in the resource transfer license; and if the value of the residual resource in the resource transfer license is larger than the value of the current transfer resource, judging that the residual resource is effective, and performing resource transfer corresponding to the resource transfer data packet.
7. An apparatus for resource transfer, the apparatus comprising:
the data packet receiving module is used for receiving a resource transfer data packet sent by the user terminal; the resource transfer data packet comprises a resource transfer license which is a certificate used for transferring the resource and sent to the user terminal by a target server node in the block chain system;
the verification module is used for verifying the validity of the resource transfer license and detecting the network state of the target server node when the resource transfer license passes the verification;
the intelligent contract generating module is used for generating an intelligent contract according to the resource transfer data packet and issuing the intelligent contract to any server node in the block chain system when the target server node is detected to be in an offline state; and the intelligent contract is used for sending a reminding message to the target server node and triggering the target server node to transfer the resources corresponding to the resource transfer data packet when detecting that the target server node is converted from an offline state to an online state.
8. A resource transfer system, characterized in that the system comprises a user terminal, a target server node and a merchant terminal, wherein,
the user terminal is used for generating a resource transfer data packet and sending the resource transfer data packet to the merchant terminal; the resource transfer data packet comprises a resource transfer license which is a certificate used for transferring the resource and sent to the user terminal by a target server node in the block chain system;
the merchant terminal is used for receiving the resource transfer data packet sent by the user terminal; verifying the validity of the resource transfer permit, and detecting the network state of the target server node when the resource transfer permit passes the verification; when the target server node is detected to be in an off-line state, generating an intelligent contract according to the resource transfer data packet, and issuing the intelligent contract to any server node in the block chain system; the intelligent contract is used for sending a reminding message to the target server node when detecting that the target server node is converted from an offline state to an online state;
and the target server node is used for receiving the reminding message and transferring the resources corresponding to the resource transfer data packet.
9. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 6 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 6.
CN202011644155.0A 2020-12-30 2020-12-30 Resource transfer method, device, system, computer equipment and storage medium Pending CN112685185A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011644155.0A CN112685185A (en) 2020-12-30 2020-12-30 Resource transfer method, device, system, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011644155.0A CN112685185A (en) 2020-12-30 2020-12-30 Resource transfer method, device, system, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112685185A true CN112685185A (en) 2021-04-20

Family

ID=75456947

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011644155.0A Pending CN112685185A (en) 2020-12-30 2020-12-30 Resource transfer method, device, system, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112685185A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113283893A (en) * 2021-05-28 2021-08-20 深圳Tcl新技术有限公司 Resource transfer processing method, device, storage medium and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108335371A (en) * 2018-02-11 2018-07-27 深圳市图灵奇点智能科技有限公司 A kind of parking charging method and device
CN111507839A (en) * 2020-04-15 2020-08-07 腾讯科技(深圳)有限公司 Data processing method and device based on block chain, storage medium and equipment
CN111784514A (en) * 2020-09-03 2020-10-16 浙江网商银行股份有限公司 Service processing method and device based on block chain

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108335371A (en) * 2018-02-11 2018-07-27 深圳市图灵奇点智能科技有限公司 A kind of parking charging method and device
CN111507839A (en) * 2020-04-15 2020-08-07 腾讯科技(深圳)有限公司 Data processing method and device based on block chain, storage medium and equipment
CN111784514A (en) * 2020-09-03 2020-10-16 浙江网商银行股份有限公司 Service processing method and device based on block chain

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113283893A (en) * 2021-05-28 2021-08-20 深圳Tcl新技术有限公司 Resource transfer processing method, device, storage medium and electronic equipment

Similar Documents

Publication Publication Date Title
US11488143B2 (en) Resource transaction method, node, device and storage medium
US20190392511A1 (en) Bid matching for blockchain-based goods/assets systems and methods
US20190295085A1 (en) Identifying fraudulent transactions
US11734760B1 (en) Systems and methods for operating a math-based currency exchange
WO2018035024A1 (en) Systems and methods for enhanced authorization response
CN109544335B (en) Transaction data processing method, device, equipment and storage medium based on blockchain
US20230306387A1 (en) Contingent payments for virtual currencies
JP2023509573A (en) Cryptocurrency acceptance system
US11914732B2 (en) Systems and methods for hard deletion of data across systems
CN112862587A (en) Block chain-based credit data processing method, block chain-based credit data processing device, computer and medium
CN111641655A (en) Block chain-based guarantee fund service processing method, device and system
US11823536B1 (en) Gesture flagging for advanced security
US11074569B2 (en) Method and apparatus to limit fraud in credit card transactions
CN117592992B (en) Method, equipment and medium for cross-border junction rendering
CN111242603A (en) Riding settlement method and device based on block chain
CN112685185A (en) Resource transfer method, device, system, computer equipment and storage medium
CN113837763A (en) Payment request processing method and device, computer equipment and readable storage medium
US11979402B2 (en) Method, apparatus and computer program product for exchanging messages across a network
CA2998543C (en) Processing method for obtaining target data, server, and online financing method
CN111105304B (en) Data processing method and device, storage medium and electronic terminal
CN116739596A (en) Blockchain-based transaction supervision method, device, equipment, medium and product
CN110599176A (en) Data processing method and device based on block chain, storage medium and node equipment
CA2998517C (en) Processing method for acquiring target data, server, and online funding method
CN115099800A (en) Block chain based method and device for transferring poor asset data
CN110633969B (en) Resource data transfer method, device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20210420