CN116703389A - Prepaid card transaction method based on blockchain, prepaid card transaction device based on blockchain and electronic equipment - Google Patents

Prepaid card transaction method based on blockchain, prepaid card transaction device based on blockchain and electronic equipment Download PDF

Info

Publication number
CN116703389A
CN116703389A CN202310652931.9A CN202310652931A CN116703389A CN 116703389 A CN116703389 A CN 116703389A CN 202310652931 A CN202310652931 A CN 202310652931A CN 116703389 A CN116703389 A CN 116703389A
Authority
CN
China
Prior art keywords
prepaid card
contract
target
intelligent contract
prepaid
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
CN202310652931.9A
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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202310652931.9A priority Critical patent/CN116703389A/en
Publication of CN116703389A publication Critical patent/CN116703389A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/22Payment schemes or models
    • G06Q20/28Pre-payment schemes, e.g. "pay before"
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor

Abstract

The invention discloses a prepaid card transaction method based on a blockchain, a device and electronic equipment thereof, and relates to the technical field of blockchains, wherein the prepaid card transaction method comprises the following steps: receiving a payment request initiated by a target user terminal, calling a target intelligent contract from a preset intelligent contract warehouse, executing the target intelligent contract based on payment data to obtain an execution result, transferring preset funds carried by the execution result from a storage account corresponding to a target prepaid card indicated by a prepaid card identifier to a target account under the condition that a funds transfer state is a confirmed transfer state, and updating prepaid card information of the target prepaid card under the condition that the preset funds transfer is successful. The invention solves the technical problem that the fund safety can not be effectively ensured when the prepaid card is used for carrying out transactions in the related technology.

Description

Prepaid card transaction method based on blockchain, prepaid card transaction device based on blockchain and electronic equipment
Technical Field
The invention relates to the technical field of blockchain, in particular to a prepaid card transaction method based on blockchain, a device and electronic equipment thereof.
Background
At present, the prepaid card is widely applied in the fields of consumption, education and training, beauty and fitness, and the like, and along with the rapid increase of the amount of prepaid card issuing, the problems of inconsistent merchant service standards, unreasonable clauses set by card issuing institutions, and the like appear. Aiming at the situation, most financial institutions freeze the prepaid funds by setting up a supervision account or paying a guarantee fee and other modes, and then transfer the funds to a merchant account according to actual consumption conditions to prevent the merchant from rolling money and running.
In the related art, a financial institution often adopts an asset hosting mode for prepaid funds, and through setting up a supervision account, the separation of ownership, use right and custody right of the funds is realized, so that the safety of the funds is ensured. However, the above method needs to open a special account and sign a contract on site, lacks technical means to ensure forced performance or automatic execution of the contract, cannot realize transparent traceability of transaction data, and has the problem of lack of trust of both buyers and sellers.
In view of the above problems, no effective solution has been proposed at present.
Disclosure of Invention
The embodiment of the invention provides a prepaid card transaction method based on a blockchain, a prepaid card transaction device based on the blockchain and electronic equipment, which at least solve the technical problem that funds cannot be effectively ensured to be safe when a prepaid card is used for transaction in the related art.
According to an aspect of an embodiment of the present invention, there is provided a prepaid card transaction method based on a blockchain, including: receiving a payment request initiated by a target user terminal, wherein the payment request at least comprises: prepaid card identification, smart contract identification, payment data, the payment data comprising: a target account, the target intelligent contract indicated by the intelligent contract identification being pre-deployed on a blockchain network; invoking the target intelligent contract from a preset intelligent contract warehouse, and executing the target intelligent contract based on the payment data to obtain an execution result, wherein the execution result at least comprises: a money transfer state; under the condition that the money transfer state is the determined transfer state, transferring the preset money carried by the execution result from a storage management account corresponding to a target prepaid card indicated by the prepaid card identification to the target account; updating prepaid card information of the target prepaid card under the condition that the preset money transfer is successful, wherein the prepaid card information at least comprises: prepaid card equity balance, prepaid card funds balance.
Optionally, before receiving the payment request initiated by the target user terminal, the method further includes: characterizing a participating mechanism as a participating node on a blockchain network; determining contract text signed by the participating institution with the financial institution and storing the contract text to the participating node when the participating institution signs a contract with the financial institution; controlling the financial institution to open a deposit account associated with the participating institution.
Optionally, after controlling the financial institution to open a deposit account associated with the participating institution, further comprising: under the condition that a user terminal purchases a prepaid card of any participation mechanism, constructing an intelligent contract corresponding to the prepaid card based on the contract text corresponding to the participation mechanism, wherein the prepaid card corresponds to the deposit management account associated with the participation mechanism, prepaid funds corresponding to the prepaid card are deposited into the deposit management account, the prepaid card corresponds to a prepaid card identifier, and the intelligent contract corresponds to an intelligent contract identifier; auditing the intelligent contract to obtain an auditing result; and uploading the intelligent contract to the preset intelligent contract warehouse and deploying the intelligent contract to the blockchain network under the condition that the auditing result indicates that the auditing is passed.
Optionally, the step of constructing a smart contract corresponding to the prepaid card based on the contract text corresponding to the participating institution includes: determining a service type of the prepaid card, and selecting a contract template matched with the service type, wherein the contract template is a pre-created template, and the template content of the contract template comprises: business type, contract name, contract information, amount, start time and end time; and configuring the contract template based on the contract text to obtain the intelligent contract.
Optionally, the step of executing the target smart contract based on the payment data includes: determining a currently paid consumption amount and a consumption equity based on the payment data, wherein the consumption equity is an equity used by the target user terminal in the current payment; judging whether the consumption amount and the consumption rights and interests accord with the amount and rights and interests set by the contract text corresponding to the target intelligent contract or not, and obtaining a judging result; judging whether the target account carried by the payment data is in a transaction state or not under the condition that the judgment result indicates that the consumption amount and the consumption equity accord with the amount and equity set by the contract text corresponding to the target intelligent contract; and under the condition that the target account is in a transaction state, loading a contract code of the target intelligent contract to obtain the preset funds, and updating the funds transfer state into the determined transfer state.
Optionally, the payment data further includes: the transaction product name, the transaction voucher identification, after updating the prepaid card information of the target prepaid card, further comprises: and returning a prepaid funds processing result to a target participating mechanism, wherein the prepaid funds processing result is generated after the prepaid card information of the target prepaid card is updated, the target participating mechanism configures the order state of the target user terminal into a successful state when the prepaid funds processing result indicates that the processing is successful, and generates transaction information based on the target account, the prepaid card identifier, the transaction product name and the transaction voucher identifier, and displays the transaction information.
Optionally, the prepaid card transaction method further includes: receiving a card withdrawal request initiated by the target user terminal, wherein the card withdrawal request at least comprises: prepaid card identification, smart contract identification; invoking an intelligent contract corresponding to the intelligent contract identifier to test the prepaid card information of the prepaid card indicated by the prepaid card identifier, and obtaining a test result; determining a prepaid card funds balance in the prepaid card information if the test result indicates that the prepaid card is in a card withdrawal state; and returning the fund balance of the prepaid card to the target user terminal according to the fund source path carried by the prepaid card information.
According to another aspect of the embodiments of the present invention, there is also provided a prepaid card transaction apparatus based on a blockchain, including: the receiving unit is used for receiving a payment request initiated by the target user terminal, wherein the payment request at least comprises: prepaid card identification, smart contract identification, payment data, the payment data comprising: a target account, the target intelligent contract indicated by the intelligent contract identification being pre-deployed on a blockchain network; the execution unit is used for calling the target intelligent contract from a preset intelligent contract warehouse, executing the target intelligent contract based on the payment data and obtaining an execution result, wherein the execution result at least comprises: a money transfer state; a transfer unit, configured to transfer, when the money transfer state is a determined transfer state, a preset money carried by the execution result from a storage account corresponding to a target prepaid card indicated by the prepaid card identifier to the target account; an updating unit, configured to update prepaid card information of the target prepaid card in case that the preset money allocation is successful, where the prepaid card information includes at least: prepaid card equity balance, prepaid card funds balance.
Optionally, the prepaid card transaction device further includes: the first characterization module is used for characterizing the participation mechanism as a participation node on the blockchain network before receiving a payment request initiated by the target user terminal; a first determining module, configured to determine, when the participating institution makes a contract with a financial institution, a contract text made by the participating institution with the financial institution, and store the contract text to the participating node; and the first opening module is used for controlling the financial institution to open a deposit account associated with the participating institution.
Optionally, the prepaid card transaction device further includes: a first construction module, configured to construct an intelligent contract corresponding to a prepaid card based on the contract text corresponding to the participating institution in a case where a user terminal purchases a prepaid card of any of the participating institutions after controlling the financial institution to open a deposit account associated with the participating institution, wherein the prepaid card corresponds to the deposit account associated with the participating institution, prepaid funds corresponding to the prepaid card are deposited into the deposit account, the prepaid card corresponds to a prepaid card identifier, and the intelligent contract corresponds to an intelligent contract identifier; the first auditing module is used for auditing the intelligent contract to obtain an auditing result; and the first uploading module is used for uploading the intelligent contract to the preset intelligent contract warehouse and deploying the intelligent contract to the blockchain network under the condition that the auditing result indicates that the auditing is passed.
Optionally, the first building module includes: a first determining submodule, configured to determine a service type of the prepaid card, and select a contract template matched with the service type, where the contract template is a pre-created template, and template content of the contract template includes: business type, contract name, contract information, amount, start time and end time; and the first configuration stator module is used for configuring the contract template based on the contract text to obtain the intelligent contract.
Optionally, the execution unit includes: a second determining module, configured to determine, based on the payment data, a consumption amount and a consumption right of the current payment, where the consumption right is a right used by the target user terminal in the current payment; the first judging module is used for judging whether the consumption amount and the consumption equity accord with the amount and equity set by the contract text corresponding to the target intelligent contract or not, and obtaining a judging result; the second judging module is used for judging whether the target account carried by the payment data is in a transaction state or not under the condition that the judging result indicates that the consumption amount and the consumption equity accord with the amount and equity set by the contract text corresponding to the target intelligent contract; and the first loading module is used for loading the contract code of the target intelligent contract to obtain the preset funds under the condition that the target account is in a transaction state, and updating the funds transfer state to the determined transfer state.
Optionally, the payment data further includes: transaction product name, transaction voucher identification, said prepaid card transaction device further comprising: and a first return module for returning a prepaid funds processing result to a target participating institution after updating prepaid card information of the target prepaid card, wherein the prepaid funds processing result is generated after the prepaid card information of the target prepaid card is updated, the target participating institution configures an order state of the target user terminal to a successful state if the prepaid funds processing result indicates that the processing is successful, and generates transaction information based on the target account, the prepaid card identification, the transaction product name, the transaction voucher identification, and displays the transaction information.
Optionally, the prepaid card transaction device further includes: the first receiving module is configured to receive a card withdrawal request initiated by the target user terminal, where the card withdrawal request at least includes: prepaid card identification, smart contract identification; the first calling module is used for calling the intelligent contract corresponding to the intelligent contract identifier to test the prepaid card information of the prepaid card indicated by the prepaid card identifier, so as to obtain a test result; a third determining module for determining a prepaid card funds balance in the prepaid card information if the test result indicates that the prepaid card is in a card withdrawal state; and the first returning module is used for returning the fund balance of the prepaid card to the target user terminal according to the fund source path carried by the prepaid card information.
According to another aspect of the embodiment of the present invention, there is also provided a computer readable storage medium, including a stored computer program, where the computer program when executed controls a device in which the computer readable storage medium is located to perform the above-mentioned prepaid card transaction method based on blockchain.
According to another aspect of the embodiments of the present invention, there is also provided an electronic device including one or more processors and a memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the blockchain-based prepaid card transaction method described above.
In the method, a payment request initiated by a target user terminal is received, a target intelligent contract is called from a preset intelligent contract warehouse, the target intelligent contract is executed based on payment data, an execution result is obtained, when a money transfer state is a confirmed transfer state, preset money carried by the execution result is transferred from a storage account corresponding to a target prepaid card indicated by a prepaid card identification to a target account, and when the preset money transfer is successful, prepaid card information of the target prepaid card is updated. In the method, the corresponding target intelligent contract can be called from the preset intelligent contract warehouse according to the intelligent contract identifier carried in the received payment request, then the target intelligent contract is executed according to the payment data carried in the payment request, if the obtained execution result indicates that the money transfer state is the confirmed transfer state, the preset funds carried in the execution result can be transferred from the storage management account corresponding to the target prepaid card to the target account of the participating mechanism, after the preset money transfer is successful, the prepaid card equity balance of the target prepaid card and the prepaid card money balance are updated, the automatic supervision of the prepaid card funds can be realized, the client funds are effectively prevented from being stolen, the funds safety is effectively ensured, and the technical problem that the funds safety cannot be effectively ensured when the prepaid card is used for carrying out transactions in the related technology is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute a limitation on the application. In the drawings:
FIG. 1 is a flow chart of an alternative blockchain-based prepaid card transaction method in accordance with embodiments of the present application;
FIG. 2 is a schematic diagram of an alternative blockchain-based prepaid card transaction system architecture in accordance with embodiments of the present application;
FIG. 3 is a schematic diagram of an alternative smart contract management unit architecture, in accordance with an embodiment of the present application;
FIG. 4 is a flow chart of an alternative deployment of a smart contract according to an embodiment of the present application;
FIG. 5 is a schematic diagram of an alternative prepaid card service flow according to an embodiment of the present application;
FIG. 6 is a schematic diagram of an alternative prepaid card consumption process in accordance with an embodiment of the present application;
FIG. 7 is a schematic diagram of an alternative blockchain-based prepaid card transaction device in accordance with embodiments of the present application;
fig. 8 is a block diagram of a hardware architecture of an electronic device (or mobile device) for a blockchain-based prepaid card transaction method according to an embodiment of the present application.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
To facilitate an understanding of the invention by those skilled in the art, some terms or nouns involved in the various embodiments of the invention are explained below:
blockchain: a common billing solution which guarantees access security by cryptography, achieves peer-to-peer communication by P2P (point-to-point technology) communication technology, achieves billing legitimacy by a common knowledge mechanism and achieves non-falsifiability by storing data in a chained structure.
Intelligent contract: the system is a specific executable logic code corresponding to business activities, is a technical means provided for guaranteeing business contracts such as about execution, and in reality, is expressed as specific service clauses for a merchant to serve clients, which are formulated based on a financial institution-side intelligent contract technical system.
Prepaid card: the card issuing institution is aimed at paying for the purpose of purchasing prepaid vouchers of consumer goods or services at a specific institution through a specific carrier and form, such as various stored value cards, membership cards and the like issued by merchants facing customers.
It should be noted that, the prepaid card transaction method based on the blockchain and the apparatus thereof in the present disclosure may be used in the case of performing prepaid card transactions based on the blockchain in the blockchain technical field, and may also be used in any field other than the blockchain technical field in the case of performing prepaid card transactions based on the blockchain, and the application fields of the prepaid card transaction method based on the blockchain and the apparatus thereof in the present disclosure are not limited.
It should be noted that, related information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, presented data, etc.) related to the present disclosure are information and data authorized by a user or sufficiently authorized by each party, and the collection, use and processing of related data need to comply with related laws and regulations and standards of related countries and regions, and be provided with corresponding operation entries for the user to select authorization or rejection. For example, an interface is provided between the system and the relevant user or institution, before acquiring the relevant information, the system needs to send an acquisition request to the user or institution through the interface, and acquire the relevant information after receiving the consent information fed back by the user or institution.
The invention provides a prepaid card transaction method based on a blockchain intelligent contract, which aims to solve the problem of mutual trust of buyers and sellers in a prepaid consumption scene in the related technology, and changes the problems of difficult consumption refund, difficult business stopping and compensation, difficult consumption maintenance and evidence holding and the like in the current prepaid consumption, so as to ensure legal rights and interests of consumers and property safety. The prepaid card funds transaction safety is ensured through the blockchain intelligent contract, a safe and reliable prepaid consumption solution is provided for card-issuing merchants (namely participating institutions) and consumers, the prepaid card is operated according to actual order consumption by utilizing the characteristics of intelligent contract consistency assurance, customization, self-strengthening property, verifiability and the like, and if the constraint is not met, an executing mechanism can not execute, so that the problem of client funds moving in client transactions is controlled from the source, and the problem of funds supervision is effectively solved.
The present invention will be described in detail with reference to the following examples.
Example 1
In accordance with an embodiment of the present invention, there is provided an embodiment of a blockchain-based prepaid card transaction method, it being noted that the steps illustrated in the flowchart of the figures may be performed in a computer system, such as a set of computer-executable instructions, and, although a logical order is illustrated in the flowchart, in some cases, the steps illustrated or described may be performed in an order other than that illustrated herein.
FIG. 1 is a flow chart of an alternative blockchain-based prepaid card transaction method, as shown in FIG. 1, according to an embodiment of the present invention, the method including the steps of:
step S101, receiving a payment request initiated by a target user terminal, wherein the payment request at least comprises: prepaid card identification, smart contract identification, payment data, the payment data including: the target account, the target intelligent contract indicated by the intelligent contract identification is pre-deployed on the blockchain network.
Step S102, a target intelligent contract is called from a preset intelligent contract warehouse, and the target intelligent contract is executed based on payment data, so that an execution result is obtained, wherein the execution result at least comprises: and (5) money transfer state.
Step S103, in the case that the money transfer state is the determined transfer state, transferring the preset money carried by the execution result from the deposit management account corresponding to the target prepaid card indicated by the prepaid card identification to the target account.
Step S104, in the case that the preset money transfer is successful, the prepaid card information of the target prepaid card is updated, wherein the prepaid card information at least comprises: prepaid card equity balance, prepaid card funds balance.
Through the steps, a payment request initiated by a target user terminal can be received, a target intelligent contract is called from a preset intelligent contract warehouse, the target intelligent contract is executed based on payment data, an execution result is obtained, when the money transfer state is the confirmed transfer state, preset money carried by the execution result is transferred from a storage account corresponding to a target prepaid card indicated by a prepaid card identification to a target account, and when the preset money transfer is successful, prepaid card information of the target prepaid card is updated. In the embodiment of the invention, the corresponding target intelligent contract can be called from the preset intelligent contract warehouse according to the intelligent contract identifier carried in the received payment request, then the target intelligent contract is executed according to the payment data carried in the payment request, if the obtained execution result indicates that the money transfer state is a confirmed transfer state, the preset funds carried in the execution result can be transferred from the storage account corresponding to the target prepaid card to the target account of the participating mechanism, and after the preset money transfer is successful, the prepaid card equity balance of the target prepaid card and the prepaid card money balance are updated, so that the automatic supervision of the prepaid card funds can be realized, the client funds are effectively prevented from being stolen, the fund safety is effectively ensured, and the technical problem that the fund safety cannot be effectively ensured when the prepaid card is used for carrying out transactions in the related technology is solved.
Embodiments of the present invention will be described in detail with reference to the following steps.
In the embodiment of the invention, a prepaid card transaction system based on a blockchain is provided, information such as rights and interests, balance and the like of a prepaid card can be written into contracts, links such as purchasing, consuming and withdrawing the card of the prepaid card are controlled by technical means, business account entry is ensured to be completed after each consumption confirmation, and the preferential is executed according to the agreed discount, so that the risk of prepaid fund stealing is avoided, and the trust problem between a consumer and the business in the transaction process is effectively solved.
FIG. 2 is a schematic diagram of an alternative blockchain-based prepaid card transaction system architecture, as shown in FIG. 2, including: the system comprises a merchant unit 210, an intelligent contract management unit 220, a blockchain network 230 and a financial institution unit 240, wherein the financial institution unit 240 can further comprise an accounting system 241, the blockchain network 230 can be implemented based on federated chain technology, different merchants can be used as nodes of the blockchain network 230, and the blockchain network 230 comprises a plurality of different nodes. When a consumer (i.e., user, customer) initiates a request to the merchant unit 210 to purchase, consume, withdraw, etc., the merchant unit 210 may send corresponding transaction instructions to the financial institution unit 240, after which execution of the transaction instructions is performed through the blockchain network 230 and the blockchain network 230.
In the embodiment of the present invention, the blockchain network 230 provides data services such as intelligent contract trusted storage, transaction verification, multiparty consensus and the like for each participating institution (i.e., merchant), uses decentralised file storage, deploys a plurality of service nodes, all of which are responsible for receiving and forwarding information, and each service node on the blockchain network uses a consensus algorithm (e.g., an algorithm such as a workload proof POW, a share proof POS, an authorized share proof DPOS, a practical barker fault tolerance PBFT, and Proof of Participation (i.e., one of the consensus algorithms in the blockchain protocol) as a consensus mechanism to realize transaction consensus, and each billing node performs deployment according to a predetermined rule, completes rule judgment, and performs corresponding processing.
In the embodiment of the invention, for a service node, a contract issuing control unit, a contract key generation unit, a contract trusted storage unit, a contract information inquiry unit and a contract transaction consensus unit can be included. The contract issuing control unit is responsible for controlling the contract issuing and uplink, supporting the issuing of single contracts and batch contracts, and ensuring the consistency of contract codes and contract texts. The contract key generation unit configures all symmetric keys and contract identifications of the contracts based on the homomorphic encryption algorithm, and generates a contract private key and a corresponding contract public key. The contract trusted storage unit is responsible for storing encrypted contract codes and storing contract code identifiers for completing the whole intelligent contract registration function. The contract information inquiry unit is responsible for inquiring contract content and state according to conditions and controlling inquiry scope. The contract transaction consensus unit is responsible for carrying out business logic verification on the intelligent contract execution result, ensuring contract consistency, broadcasting the intelligent contract to all nodes, and uploading after consensus is achieved.
In an embodiment of the present invention, intelligent contract management unit 220 serves as a channel for financial institution unit 240 and blockchain network 230 to communicate, isolating blockchain network 230 from accounting system 241. The intelligent contract management unit 220 may receive transaction requests, contract execution and contract verification requests submitted by financial institutions, and internally implement logical processes such as user information management, access and access management, contract configuration management, contract operation management, and the like.
FIG. 3 is a schematic diagram of an alternative smart contract management unit architecture, according to an embodiment of the present invention, as shown in FIG. 3, smart contract management unit 220 includes: an access and exit unit 221, a user information management unit 222, a contract configuration auditing unit 223, a contract operation unit 224, and a contract repository 225, wherein the contract operation unit 224 includes: contract loader, business condition trigger. The specific functions of each module are as follows:
the access unit 221 is responsible for interfacing with each participating entity and performing validity check on the received data.
The user information management unit 222 is responsible for managing user roles, distinguishing execution from audit rights. When maintaining the roles, different functional modules and menus such as system management, developers, business auditing, merchants, users, monitoring centers and verification centers are respectively selected for maintenance.
The contract configuration auditing unit 223 is responsible for providing functions such as contract template creation, contract template auditing, contract parameter configuration, contract template query, parameter contract submission, and the like. The contract template content includes: industry, contract name, contract description, amount, start and end times, etc. The developer can query the contract template according to the information of the prepaid card product selection industry, the start date, the expiration date and the like, and can submit the contract template to the intelligent contract platform configuration center for auditing. Different contract templates can be selected according to marketing requirements, and the prepaid card products can be customized by configuring personalized parameters.
The contract operation processing unit 224 includes a contract loader, a business condition trigger, and other functional modules, and provides services such as contract signing, contract execution or termination, contract condition registration, and contract release for customers. The customer can conveniently select different prepaid card services through merchant application, personal terminal bank and the like, and the business processes and fund operations of card purchasing, consumption, card returning and the like are completed according to contract agreements. If the smart contract expires, the system automatically sets the contract status to terminate to control that the customer cannot perform contract consumption.
The contract loader is responsible for monitoring an external intelligent contract calling request, pulling the intelligent contract statement from the intelligent contract warehouse according to the intelligent contract identifier in the request, pulling a corresponding contract execution body and loading after verifying the intelligent contract statement, and transmitting the service data required for execution.
The service condition trigger provides various events triggered by external trusted data, such as timed events, events containing service logic such as expiration of a prepaid card, etc. Event monitoring is carried out in a batch scanning mode, and specified intelligent contract execution is driven according to the conventions in registration.
Optionally, before receiving the payment request initiated by the target user terminal, the method further includes: characterizing a participating mechanism as a participating node on a blockchain network; determining contract text signed by the participating institution and the financial institution and storing the contract text to the participating node under the condition that the participating institution and the financial institution sign contracts; the financial institution is controlled to open a deposit account associated with the participating institution.
In the embodiment of the present invention, a merchant (i.e., a participating institution) needs to issue a card and open a deposit management account, i.e., the merchant needs to contract with a financial institution and agree on a prepaid card equity (for example, the consumption reaches a preset amount (such as one thousand) and eight folds, or a recharge preset amount (such as three hundred) is added by a certain amount (such as 50), or the recharge preset amount (such as three hundred) is given three folds, etc.), apply for issuing a prepaid card to the subscribing financial institution, the financial institution may open a merchant sub-account as a deposit management account, specifically, may first access the participating institution to a blockchain network (i.e., the participating institution is characterized as a participating node on the blockchain network), after the participating institution contracts with the financial institution, may first determine a contract text contracted with the financial institution, then store the contract text to the participating node, and then enable the financial institution to open a deposit management account associated with the participating institution (i.e., the financial institution may open the merchant sub-account for depositing funds for the participating institution).
Optionally, after controlling the financial institution to open the deposit account associated with the participating institution, further comprising: under the condition that the user terminal purchases the prepaid card of any participating mechanism, an intelligent contract corresponding to the prepaid card is constructed based on contract text corresponding to the participating mechanism, wherein the prepaid card corresponds to a deposit management account associated with the participating mechanism, prepaid funds corresponding to the prepaid card are deposited into the deposit management account, the prepaid card corresponds to a prepaid card identifier, and the intelligent contract corresponds to an intelligent contract identifier; auditing the intelligent contract to obtain an auditing result; and uploading the intelligent contract to a preset intelligent contract warehouse and deploying the intelligent contract to the blockchain network under the condition that the auditing result indicates that the auditing is passed.
In the embodiment of the invention, when a consumer (i.e. a user) purchases a prepaid card through a merchant channel (such as a merchant application, a terminal personal bank and the like), an agreement (i.e. an intelligent contract) is signed with a merchant and a financial institution, and the prepaid funds of the user are agreed to be delivered to the financial institution for hosting, and the business process and the fund process are triggered to be executed according to the intelligent contract. And after successful card purchase, the prepaid funds are deposited into the deposit management account opened by the merchant, and the financial institution notifies the merchant to inform the user. If the card purchasing fails, the financial institution informs the merchant of the card purchasing failure and returns funds to the user.
In the embodiment of the present invention, if a user terminal (i.e., a terminal used when a user purchases a card) purchases a prepaid card of any participating institution, a smart contract corresponding to the prepaid card (i.e., one smart contract for each prepaid card) may be constructed according to a contract text corresponding to the participating institution, and the prepaid card corresponds to a deposit account associated with the participating institution, so that prepaid funds corresponding to the prepaid card are deposited into the deposit account, and the prepaid card corresponds to a prepaid card identifier (i.e., a unique identifier of the prepaid card), and the smart contract corresponds to a smart contract identifier (i.e., a unique identifier of the smart contract). The constructed smart contract may then be audited (e.g., to audit whether the contract code of the smart contract remains consistent with the contract text (i.e., whether the process performed by the contract code complies with the specification of the contract text)) to obtain audit results. If the audit result indicates that the audit is passed (i.e., the contract code of the smart contract remains consistent with the contract text), the smart contract is uploaded to a preset smart contract repository and the smart contract is deployed to the blockchain network.
FIG. 4 is a flowchart of an alternative deployment of a smart contract, as shown in FIG. 4, including the following:
S401, determining N intelligent contracts corresponding to N prepaid card products, wherein N is an integer greater than or equal to 1.
S402, submitting the N intelligent contracts to a financial institution end for auditing. First, the contract developer may create N prepaid card product contracts at the contract configuration audit unit 223 and submit the audits, and the contract contents may be formulated based on the prepaid card products, such as information including industry, contract name, contract description, amount, start and end times, and the like. The financial institution side then selects the contract for auditing. After the audit is passed, the contract is uploaded to the contract repository 225, ensuring that the contract code is consistent with the contract text.
S403, deploying N intelligent contracts to the blockchain network under the condition that the auditing is passed.
In the embodiment of the invention, the audited contracts can be directly deployed to the blockchain network. In other embodiments, the N prepaid card product contracts may be contract templates. After the template verification is passed, the verification unit 223 can be configured by logging in the contract according to the role of the merchant, the contract template configuration personalized parameters of the prepaid card product are selected from the contract warehouse 225, the contract template can be queried according to the industry, the start date and the end date, and the input of the merchant number is also supported for query. The parameters are then uploaded to the contract repository 225 by the contract configuration audit unit 223, and the contract code is published to the blockchain network by the access export unit 221. If the audit is not passed, the audit is not deployed to the blockchain network, so that the resource waste caused by deploying unqualified intelligent contract content can be avoided, and even the conditions of fund loss and the like caused by executing unqualified contracts can be avoided. Therefore, the consistency and the legality of the intelligent contract content can be improved and the fund supervision effect can be enhanced through the audit of the financial institution terminal before the contract deployment.
In an embodiment of the present invention, deploying N intelligent contracts to a blockchain network includes: an intelligent contract deployment transaction is initiated and N intelligent contracts are broadcast to the blockchain network. Wherein the blockchain network includes M consensus nodes, M being an integer greater than or equal to 1, the blockchain network configured to: and under the condition that the verification results of the M consensus nodes meet the deployment consensus condition, storing the N intelligent contracts into the blockchain. For example, the M consensus nodes may perform transaction consensus according to a consensus mechanism (such as workload proof POW, equity proof POS, authorized equity proof DPOS, practical barking fault tolerance PBFT and Proof of Participation, etc.), and reach a post-consensus uplink.
Optionally, the step of constructing the smart contract corresponding to the prepaid card based on the contract text corresponding to the participating institution includes: determining the service type of the prepaid card, and selecting a contract template matched with the service type, wherein the contract template is a pre-created template, and the template content of the contract template comprises: business type, contract name, contract information, amount, start time and end time; and configuring a contract template based on the contract text to obtain the intelligent contract.
In the embodiment of the invention, the service type of the prepaid card for constructing the intelligent contract can be determined first, and a contract template matched with the service type is selected (the contract template is a pre-created template, and the template content of the contract template comprises the service type, the contract name, the contract information, the amount, the starting time, the ending time and the like). The contract template is then configured (i.e., via the parameter information in the contract text) according to the contract text (i.e., the contract text that the participating institution to which the prepaid card belongs and the financial institution sign) to obtain the corresponding smart contract.
Step S101, receiving a payment request initiated by a target user terminal, wherein the payment request at least comprises: prepaid card identification, smart contract identification, payment data, the payment data including: the target account, the target intelligent contract indicated by the intelligent contract identification is pre-deployed on the blockchain network.
In the embodiment of the invention, a user can initiate a payment request in a merchant channel by using a user terminal, for example, the user logs in a merchant side application, selects a purchased prepaid card to initiate online payment or presents a prepaid service payment two-dimensional code, and the merchant side application can display prepaid card rights information (including information of discount consumption, full consumption and the like). The user pays by using the funds in the selected prepaid card, and after the merchant end completes the user's right (for example, confirms whether the account number and the password input by the user are correct), the merchant end requests the financial institution end to execute the fund transfer (namely, receives a payment request initiated by the target user terminal, wherein the payment request at least comprises a prepaid card identifier, an intelligent contract identifier and payment data, the payment data comprises a target account, and the target intelligent contract indicated by the intelligent contract identifier is pre-deployed on the blockchain network).
Step S102, a target intelligent contract is called from a preset intelligent contract warehouse, and the target intelligent contract is executed based on payment data, so that an execution result is obtained, wherein the execution result at least comprises: and (5) money transfer state.
Optionally, the step of executing the target smart contract based on the payment data includes: determining a currently paid consumption amount and a consumption equity based on the payment data, wherein the consumption equity is equity used by the target user terminal in the current payment; judging whether the consumption amount and the consumption rights and interests accord with the amount and rights and interests set by the contract text corresponding to the target intelligent contract or not, and obtaining a judging result; judging whether the target account carried by the payment data is in a transaction state or not under the condition that the judgment result indicates that the consumption amount and the consumption interest accord with the amount and the interest set by the contract text corresponding to the target intelligent contract; and under the condition that the target account is in a transaction state, loading a contract code of the target intelligent contract to obtain preset funds, and updating the funds transfer state to be a determined transfer state.
In the embodiment of the invention, after receiving the payment request, a corresponding target intelligent contract can be called from a preset intelligent contract warehouse (i.e. contract warehouse) according to the intelligent contract identifier carried by the payment request, and the target intelligent contract can be executed according to the payment data (such as the consumption amount, the consumption rights and the like) carried by the payment request, so as to obtain an execution result (the execution result comprises a fund transfer state and the like) (i.e. after the merchant terminal receives a user consumption instruction, the prepaid card transaction instruction can be sent to the financial institution terminal in real time, and the financial institution terminal can determine whether funds are transferred according to the transaction instruction and the execution result of the corresponding intelligent contract). The method comprises the following steps:
The amount of consumption currently paid and the consumption right (which is the right the target user terminal uses in the current payment, e.g., the eighth-fold right is selected for use) may be determined first based on the payment data. And then judging whether the consumption amount and the consumption equity accord with the amount and equity set by the contract text corresponding to the target intelligent contract (namely judging whether the consumption amount and the consumption equity selected by the user in the current payment accord with the usable amount and equity set by the contract text) so as to obtain a judging result. If the judgment result indicates that the consumption amount and the consumption equity accord with the amount and equity set by the contract text corresponding to the target intelligent contract, whether the target account carried by the payment data is in a transaction state (namely, whether the merchant account (namely, the target account) needing to be paid by the user is in a tradable state) can be judged, if the target account is in the transaction state, the contract code of the target intelligent contract can be loaded to obtain preset funds (namely, the funds needing to be transferred), the funds transfer state is updated to be determined as the transfer state (determining that the current payment can be transferred) (namely, the financial institution end checks the current consumption according to the intelligent contract, and checks whether the consumption equity and the consumption equity accord with the appointment, whether the merchant account waiting to be transferred can be transacted, and the like).
Step S103, in the case that the money transfer state is the determined transfer state, transferring the preset money carried by the execution result from the deposit management account corresponding to the target prepaid card indicated by the prepaid card identification to the target account.
In the embodiment of the invention, if the execution result of the intelligent contract indicates that the money transfer state is the determined transfer state, money can be transferred from the prepaid card deposit management account to the public account (namely the target account of the participating mechanism) of the merchant (namely, when the money transfer state is the determined transfer state, the preset money carried by the execution result is transferred from the deposit management account corresponding to the target prepaid card indicated by the prepaid card identifier to the target account), and retry or manual processing is supported for the abnormal money transfer condition.
Step S104, in the case that the preset money transfer is successful, the prepaid card information of the target prepaid card is updated, wherein the prepaid card information at least comprises: prepaid card equity balance, prepaid card funds balance.
In the embodiment of the invention, after funds are transferred from a prepaid card storage management account to a merchant to a public account, the balance of the rights of the prepaid card is deducted (namely, the rights used in the current consumption are deducted), meanwhile, the merchant terminal credits the public account into a cash, and deducts the available balance of the prepaid card (namely, the amount paid in the current consumption is deducted) (namely, in the case of successful preset funds transfer, the prepaid card information of the target prepaid card is updated, the prepaid card information comprises the balance of the rights of the prepaid card, the balance of the funds of the prepaid card and the like), and the whole funds are controlled by an intelligent contract.
Optionally, the payment data further comprises: the transaction product name, the transaction voucher identification, after updating the prepaid card information of the target prepaid card, further include: and returning the prepaid funds processing result to the target participating mechanism, wherein the prepaid funds processing result is generated after the prepaid card information of the target prepaid card is updated, and the target participating mechanism configures the order state of the target user terminal to be a successful state and generates transaction information and displays the transaction information based on the target account, the prepaid card identifier, the transaction product name and the transaction voucher identifier under the condition that the prepaid funds processing result indicates that the processing is successful.
In an embodiment of the present invention, the financial institution terminal may return the prepaid funds processing result (which is generated after the prepaid card information of the target prepaid card is updated, including processing success or processing failure) to the target participating institution. The merchant end (i.e. the participating mechanism) receives the prepaid fund processing result returned by the financial mechanism end, if the result is successful, the order state of the user is set to be successful (i.e. the target participating mechanism configures the order state of the target user terminal to be successful if the prepaid fund processing result indicates that the processing is successful), otherwise, the order state of the client is set to be failed. If the result is successful, but the merchant terminal does not receive funds, the merchant terminal can be contacted with the financial institution terminal for processing according to the account-setting processing; if the result is failure, but the business logic check is successful, but the contract execution is failed due to the system reason, the merchant end needs to retry or execute business intervention to ensure the successful consumption.
In the embodiment of the invention, the merchant side can use the deposit management account, the target account, the account of the payer (namely the account of the prepaid card corresponding to the prepaid card identifier), the merchant name (namely the transaction product name), the transaction voucher number (namely the transaction voucher identifier) of the transaction as message display, display the information such as the transaction voucher number in the transaction details (namely the participating institution generates transaction information based on the target account, the prepaid card identifier, the transaction product name and the transaction voucher identifier, and display the transaction information, wherein the payment data carries the transaction product name, the transaction voucher identifier and the like). The consumption completed at the merchant end may also inform the financial institution end to register the transaction details.
In the embodiment of the invention, when the merchant initiates deduction of a single fund, the deduction of the equity is not earlier than the deduction of the equity, so that the merchant is ensured not to deduct the prepaid fund first and then deduct the equity.
Optionally, the prepaid card transaction method further comprises: receiving a card withdrawal request initiated by a target user terminal, wherein the card withdrawal request at least comprises: prepaid card identification, smart contract identification; invoking an intelligent contract corresponding to the intelligent contract identifier to test the prepaid card information of the prepaid card indicated by the prepaid card identifier, and obtaining a test result; determining a prepaid card funds balance in the prepaid card information if the test result indicates that the prepaid card is in a card withdrawal state; and returning the fund balance of the prepaid card to the target user terminal according to the fund source path carried by the prepaid card information.
In the embodiment of the invention, a consumer can apply for card withdrawal in a merchant channel, after the merchant side confirms card withdrawal information, the merchant side submits the card withdrawal application to a financial institution side, the financial institution side judges and calculates the card withdrawal according to an intelligent contract, the current refundable amount and a refund account are determined, the card withdrawal information is informed to a user through the merchant side (namely, a card withdrawal request initiated by a target user terminal is received (the card withdrawal request comprises a prepaid card identifier, an intelligent contract identifier and the like), then the intelligent contract corresponding to the intelligent contract identifier is called to test prepaid card information of the prepaid card indicated by the prepaid card identifier, and if the obtained test result indicates that the prepaid card is in a card withdrawal state, the prepaid card fund balance in the prepaid card information can be determined. And then returning the fund balance of the prepaid card to the target user terminal according to the fund source path carried by the prepaid card information (namely, returning the withdrawal amount to the payment account of the purchase card). If the card is abnormal, the support user modifies the wallet again and applies for the application, and if the card is failed due to other reasons, the merchant terminal is informed to apply for manual processing.
The following detailed description is directed to alternative embodiments.
In the embodiment of the invention, the information such as the rights and interests of the prepaid card, the balance and the like can be written into the contract, the links such as card purchasing, consumption, card returning and the like of the prepaid card are controlled by technical means, the business account entering is ensured to be completed after each consumption confirmation, and the preferential is executed according to the agreed discount, so that the risk of prepaid fund stealing is avoided, and the trust problem between a consumer and the business in the transaction process is effectively solved.
Fig. 5 is a schematic diagram of an alternative prepaid card service flow according to an embodiment of the present invention, as shown in fig. 5, including: the business flow of the prepaid card is as follows for merchants (to public accounts), financial institutions (deposit accounts), consumers (payment accounts):
(1) Issuing a card and opening a deposit management account: the merchant makes contracts with the financial institution and agrees with the rights and interests of the prepaid card, the prepaid card is applied to the contracted financial institution, and the financial institution opens the merchant sub-account as the deposit management account of the merchant.
(2) The consumer purchases a prepaid card: the user purchases the prepaid card in the merchant channel, signs a three-way agreement with the merchant and the financial institution, agrees that the user prepaid funds are delivered to the financial institution for hosting, and triggers and executes the business process and the funds process according to the intelligent contract.
(3) Card purchase funds are prepaid into the deposit management account: after successful card purchase, the prepaid funds are deposited into the deposit management account opened by the merchant, and the financial institution notifies the merchant to inform the user. If the card purchasing fails, the financial institution informs the merchant of the card purchasing failure and returns funds to the user.
(4) Consumer initiated card consumption: and the user initiates a payment request in the merchant channel, and the merchant end requests the financial institution to execute fund transfer after finishing user authorization.
(5) Consumption order validation: the financial institution checks the consumption according to the intelligent contract, checks whether the consumption rights and interests and the consumption amount accord with the contract agreement, whether the deposit management account can be transacted, and the like.
(6) Accounting according to the consumption instruction: the intelligent contract is successfully executed, the money is transferred to the public account of the merchant according to the consumption amount, the abnormal situation is supported for retry or manual processing, and the financial institution ensures that the merchant cannot deduct the prepaid funds first and then deduct the rights and interests.
(7) The consumer applies for card withdrawal: the user may initiate a card withdrawal at the merchant channel.
(8) The merchant confirms card withdrawal information: the merchant submits a card returning application to a financial institution, the financial institution judges and calculates the card returning according to the intelligent contract, the refundable amount and the refund account of the time are determined, and the card returning information is informed to the user through the merchant.
(9) Original way refunds to payer: the card withdrawal amount returns the original way to the payment account of the purchase card, if the card withdrawal is abnormal, the user can be supported to modify the collection wallet again and lift the application, and if the card withdrawal is failed due to other reasons, the merchant is informed to apply for manual processing.
In the embodiment of the invention, after a user initiates a payment request through a merchant channel, the merchant requests a financial institution terminal to execute fund transfer after finishing user authorization. The financial institution terminal executes money transfer according to the transaction instruction, and transfers the money of the prepaid card to the public account of the merchant and deducts the balance of the rights and interests of the prepaid card if the execution result accords with the rights and interests rules, wherein the payment request comprises: transaction credentials number, amount consumed, rights consumed, etc. The method comprises the following specific steps:
and 1, logging in a merchant terminal by a user, selecting a purchased prepaid card to initiate online payment or showing a prepaid service payment two-dimensional code, and displaying prepaid card rights and interests information including information such as a discount and a full consumption.
And 2, the user pays by using the selected prepaid card.
And 3, the merchant terminal receives the user consumption instruction, invokes the corresponding intelligent contract and sends the consumption instruction to the financial institution in real time, and the financial institution can determine whether funds are transferred according to the consumption instruction and the execution result of the intelligent contract.
And 4, the financial institution transfers funds from the prepaid card storage management account to the public account of the merchant according to the prepaid card consumption instruction and the execution result of the intelligent contract on the blockchain network, deducts the rights and interests balance of the prepaid card, and simultaneously, the merchant terminal credits the public account into the collection, deducts the available balance of the prepaid card, and the whole funds processing is controlled by the intelligent contract.
And step 5, the merchant terminal receives a prepaid fund processing result returned by the financial institution, if the prepaid fund processing result is successful, the order state of the user is set to be successful, and otherwise, the order state of the client is set to be failed. If the merchant does not receive the money, the financial institution terminal contacts the merchant for processing according to the account-setting processing; if the business logic check is successful, but the contract execution fails due to the system reasons, the merchant end needs to retry or execute business intervention to ensure the successful consumption.
And 6, the merchant end needs to use the deposit management account, the payer account, the merchant name and the transaction voucher number of the transaction as message display, display the information such as the transaction voucher number in the transaction details, and the consumption completed at the merchant end can also inform the financial institution end to register the transaction details.
Step 7: when the merchant initiates deduction of the single funds, the deduction of the rights and interests is not earlier than the deduction of the rights and interests, so that the merchant cannot deduct the prepaid funds first and then deduct the rights and interests.
FIG. 6 is a schematic diagram of an alternative prepaid card consumption process, as shown in FIG. 6, including the following processes according to embodiments of the present invention:
s601, the user completes contract signing in the contract operation unit 224 and downloads specified contract data from the contract warehouse 225;
s602, the contract operation unit 224 stores business data, registers contract forced executing conditions (such as timing and quota) with a business condition trigger when signing the contract;
S603, a user initiates a transaction request at a merchant terminal or triggers according to expected conditions, and a contract loader invokes the blockchain network 230 to pull a corresponding intelligent contract and drive the contract to execute;
s604, if the execution result meets the preset condition, executing money transfer according to the prepaid card transaction instruction.
In the embodiment of the invention, a prepaid card transaction method based on a blockchain intelligent contract is provided, and automatic supervision of prepaid card funds is realized through preset contract rules, so that the problems of difficult withdrawal, decommissioning, repayment, maintenance and evidence holding of consumption and the like of the current prepaid consumption are solved, and legal rights and interests of consumers and property safety are ensured. And the blockchain intelligent contract technology is applied to the financial institution fund escrow service, so that the method has the characteristics of strong applicability, wide expandability, safety and reliability, and meets the convenient access requirements of all merchants.
The following describes in detail another embodiment.
Example two
The prepaid card transaction device based on the blockchain provided in the present embodiment includes a plurality of implementation units, each of which corresponds to each implementation step in the first embodiment.
FIG. 7 is a schematic diagram of an alternative blockchain-based prepaid card transaction device, as shown in FIG. 7, in accordance with embodiments of the present invention, which may include: a receiving unit 70, an executing unit 71, an allocation unit 72, an updating unit 73, wherein,
A receiving unit 70, configured to receive a payment request initiated by a target user terminal, where the payment request at least includes: prepaid card identification, smart contract identification, payment data, the payment data including: a target account, wherein a target intelligent contract indicated by the intelligent contract identification is pre-deployed on the blockchain network;
the execution unit 71 is configured to call a target smart contract from a preset smart contract repository, and execute the target smart contract based on the payment data, so as to obtain an execution result, where the execution result at least includes: a money transfer state;
a transfer unit 72, configured to transfer, in a case where the money transfer state is the determined transfer state, the preset money carried by the execution result from the deposit management account corresponding to the target prepaid card indicated by the prepaid card identifier to the target account;
an updating unit 73 for updating prepaid card information of the target prepaid card in case that the preset money transfer is successful, wherein the prepaid card information at least includes: prepaid card equity balance, prepaid card funds balance.
In the prepaid card transaction device, the receiving unit 70 may receive a payment request initiated by the target user terminal, the executing unit 71 may invoke the target smart contract from the preset smart contract repository, and execute the target smart contract based on the payment data, so as to obtain an execution result, the transferring unit 72 may transfer the preset funds carried by the execution result from the storage account corresponding to the target prepaid card indicated by the prepaid card identifier to the target account when the money transfer state is determined, and the updating unit 73 may update the prepaid card information of the target prepaid card when the money transfer is successful. In the embodiment of the invention, the corresponding target intelligent contract can be called from the preset intelligent contract warehouse according to the intelligent contract identifier carried in the received payment request, then the target intelligent contract is executed according to the payment data carried in the payment request, if the obtained execution result indicates that the money transfer state is a confirmed transfer state, the preset funds carried in the execution result can be transferred from the storage account corresponding to the target prepaid card to the target account of the participating mechanism, and after the preset money transfer is successful, the prepaid card equity balance of the target prepaid card and the prepaid card money balance are updated, so that the automatic supervision of the prepaid card funds can be realized, the client funds are effectively prevented from being stolen, the fund safety is effectively ensured, and the technical problem that the fund safety cannot be effectively ensured when the prepaid card is used for carrying out transactions in the related technology is solved.
Optionally, the prepaid card transaction device further includes: the first characterization module is used for characterizing the participation mechanism as a participation node on the blockchain network before receiving a payment request initiated by the target user terminal; the first determining module is used for determining contract text signed by the participating institution and the financial institution under the condition that the participating institution and the financial institution sign contracts, and storing the contract text to the participating node; and the first opening module is used for controlling the financial institution to open the deposit management account associated with the participating institution.
Optionally, the prepaid card transaction device further includes: a first construction module, configured to construct an intelligent contract corresponding to a prepaid card based on contract text corresponding to a participating institution after controlling a financial institution to open a deposit management account associated with the participating institution, in a case where a user terminal purchases the prepaid card of any participating institution, wherein the prepaid card corresponds to the deposit management account associated with the participating institution, prepaid funds corresponding to the prepaid card are deposited into the deposit management account, the prepaid card corresponds to a prepaid card identifier, and the intelligent contract corresponds to the intelligent contract identifier; the first auditing module is used for auditing the intelligent contract to obtain an auditing result; and the first uploading module is used for uploading the intelligent contract to a preset intelligent contract warehouse and deploying the intelligent contract to the blockchain network under the condition that the auditing result indicates that the auditing is passed.
Optionally, the first building module includes: a first determining submodule, configured to determine a service type of the prepaid card, and select a contract template matched with the service type, where the contract template is a pre-created template, and the template content of the contract template includes: business type, contract name, contract information, amount, start time and end time; the first configuration stator module is used for configuring a contract template based on contract text to obtain an intelligent contract.
Optionally, the execution unit includes: the second determining module is used for determining the consumption amount and the consumption rights of the current payment based on the payment data, wherein the consumption rights are rights used by the target user terminal in the current payment; the first judging module is used for judging whether the consumption amount and the consumption rights and interests accord with the amount and the rights and interests set by the contract text corresponding to the target intelligent contract or not, and obtaining a judging result; the second judging module is used for judging whether the target account carried by the payment data is in a transaction state or not under the condition that the judging result indicates that the consumption amount and the consumption rights and interests meet the amount and the rights and interests set by the contract text corresponding to the target intelligent contract; and the first loading module is used for loading the contract code of the target intelligent contract to obtain the preset funds and updating the money transfer state into the determined money transfer state under the condition that the target account is in the transaction state.
Optionally, the payment data further comprises: the transaction product name, the transaction voucher identification, the prepaid card transaction device further comprises: and the first return module is used for returning the prepaid fund processing result to the target participating mechanism after updating the prepaid card information of the target prepaid card, wherein the prepaid fund processing result is generated after the prepaid card information of the target prepaid card is updated, and the target participating mechanism configures the order state of the target user terminal into a successful state and generates transaction information and displays the transaction information based on the target account, the prepaid card identifier, the transaction product name and the transaction voucher identifier under the condition that the prepaid fund processing result indicates that the processing is successful.
Optionally, the prepaid card transaction device further includes: the first receiving module is configured to receive a card withdrawal request initiated by a target user terminal, where the card withdrawal request at least includes: prepaid card identification, smart contract identification; the first calling module is used for calling the intelligent contract corresponding to the intelligent contract identifier to test the prepaid card information of the prepaid card indicated by the prepaid card identifier, so as to obtain a test result; a third determining module for determining a prepaid card funds balance in prepaid card information in case the check result indicates that the prepaid card is in a card withdrawal state; and the first returning module is used for returning the fund balance of the prepaid card to the target user terminal according to the fund source path carried by the prepaid card information.
The prepaid card transaction device may further include a processor and a memory, wherein the receiving unit 70, the executing unit 71, the allocating unit 72, the updating unit 73, and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor includes a kernel, and the kernel fetches a corresponding program unit from the memory. The kernel may set one or more, and update prepaid card information of the target prepaid card by adjusting kernel parameters in case of successful preset money transfer.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM), which includes at least one memory chip.
The application also provides a computer program product adapted to perform, when executed on a data processing device, a program initialized with the method steps of: receiving a payment request initiated by a target user terminal, calling a target intelligent contract from a preset intelligent contract warehouse, executing the target intelligent contract based on payment data to obtain an execution result, transferring preset funds carried by the execution result from a storage account corresponding to a target prepaid card indicated by a prepaid card identifier to a target account under the condition that a funds transfer state is a confirmed transfer state, and updating prepaid card information of the target prepaid card under the condition that the preset funds transfer is successful.
According to another aspect of the embodiment of the present invention, there is also provided a computer readable storage medium, including a stored computer program, wherein the computer readable storage medium is controlled to execute the above-mentioned blockchain-based prepaid card transaction method by a device in which the computer program is located when the computer program is run.
According to another aspect of embodiments of the present invention, there is also provided an electronic device including one or more processors and a memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the blockchain-based prepaid card transaction method described above.
Fig. 8 is a block diagram of a hardware architecture of an electronic device (or mobile device) for a blockchain-based prepaid card transaction method according to an embodiment of the present invention. As shown in fig. 8, the electronic device may include one or more processors 802 (shown in fig. 8 as 802a, 802b, … …,802 n) (the processor 802 may include, but is not limited to, a microprocessor MCU, a programmable logic device FPGA, etc.) a memory 804 for storing data. In addition, the method may further include: a display, an input/output interface (I/O interface), a Universal Serial Bus (USB) port (which may be included as one of the ports of the I/O interface), a network interface, a keyboard, a power supply, and/or a camera. It will be appreciated by those of ordinary skill in the art that the configuration shown in fig. 8 is merely illustrative and is not intended to limit the configuration of the electronic device described above. For example, the electronic device may also include more or fewer components than shown in FIG. 8, or have a different configuration than shown in FIG. 8.
The foregoing embodiment numbers of the present application are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
In the foregoing embodiments of the present application, the descriptions of the embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed technology may be implemented in other manners. The above-described embodiments of the apparatus are merely exemplary, and the division of the units, for example, may be a logic function division, and may be implemented in another manner, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, units or modules, or may be in electrical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium, including instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely a preferred embodiment of the present invention and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present invention, which are intended to be comprehended within the scope of the present invention.

Claims (10)

1. A blockchain-based prepaid card transaction method, comprising:
receiving a payment request initiated by a target user terminal, wherein the payment request at least comprises: prepaid card identification, smart contract identification, payment data, the payment data comprising: a target account, the target intelligent contract indicated by the intelligent contract identification being pre-deployed on a blockchain network;
invoking the target intelligent contract from a preset intelligent contract warehouse, and executing the target intelligent contract based on the payment data to obtain an execution result, wherein the execution result at least comprises: a money transfer state;
under the condition that the money transfer state is the determined transfer state, transferring the preset money carried by the execution result from a storage management account corresponding to a target prepaid card indicated by the prepaid card identification to the target account;
Updating prepaid card information of the target prepaid card under the condition that the preset money transfer is successful, wherein the prepaid card information at least comprises: prepaid card equity balance, prepaid card funds balance.
2. The prepaid card transaction method according to claim 1, characterized in that prior to receiving the payment request initiated by the target user terminal, further comprising:
characterizing a participating mechanism as a participating node on a blockchain network;
determining contract text signed by the participating institution with the financial institution and storing the contract text to the participating node when the participating institution signs a contract with the financial institution;
controlling the financial institution to open a deposit account associated with the participating institution.
3. The prepaid card transaction method according to claim 2, further comprising, after controlling the financial institution to open a deposit account associated with the participating institution:
under the condition that a user terminal purchases a prepaid card of any participation mechanism, constructing an intelligent contract corresponding to the prepaid card based on the contract text corresponding to the participation mechanism, wherein the prepaid card corresponds to the deposit management account associated with the participation mechanism, prepaid funds corresponding to the prepaid card are deposited into the deposit management account, the prepaid card corresponds to a prepaid card identifier, and the intelligent contract corresponds to an intelligent contract identifier;
Auditing the intelligent contract to obtain an auditing result;
and uploading the intelligent contract to the preset intelligent contract warehouse and deploying the intelligent contract to the blockchain network under the condition that the auditing result indicates that the auditing is passed.
4. A prepaid card transaction method according to claim 3, wherein the step of constructing a smart contract corresponding to the prepaid card based on the contract text corresponding to the participating institution comprises:
determining a service type of the prepaid card, and selecting a contract template matched with the service type, wherein the contract template is a pre-created template, and the template content of the contract template comprises: business type, contract name, contract information, amount, start time and end time;
and configuring the contract template based on the contract text to obtain the intelligent contract.
5. The prepaid card transaction method according to claim 1, wherein the step of executing the target smart contract based on the payment data comprises:
determining a currently paid consumption amount and a consumption equity based on the payment data, wherein the consumption equity is an equity used by the target user terminal in the current payment;
Judging whether the consumption amount and the consumption rights and interests accord with the amount and rights and interests set by the contract text corresponding to the target intelligent contract or not, and obtaining a judging result;
judging whether the target account carried by the payment data is in a transaction state or not under the condition that the judgment result indicates that the consumption amount and the consumption equity accord with the amount and equity set by the contract text corresponding to the target intelligent contract;
and under the condition that the target account is in a transaction state, loading a contract code of the target intelligent contract to obtain the preset funds, and updating the funds transfer state into the determined transfer state.
6. The prepaid card transaction method according to claim 1, wherein the payment data further comprises: the transaction product name, the transaction voucher identification, after updating the prepaid card information of the target prepaid card, further comprises:
and returning a prepaid funds processing result to a target participating mechanism, wherein the prepaid funds processing result is generated after the prepaid card information of the target prepaid card is updated, the target participating mechanism configures the order state of the target user terminal into a successful state when the prepaid funds processing result indicates that the processing is successful, and generates transaction information based on the target account, the prepaid card identifier, the transaction product name and the transaction voucher identifier, and displays the transaction information.
7. The prepaid card transaction method according to claim 1, wherein the prepaid card transaction method further comprises:
receiving a card withdrawal request initiated by the target user terminal, wherein the card withdrawal request at least comprises: prepaid card identification, smart contract identification;
invoking an intelligent contract corresponding to the intelligent contract identifier to test the prepaid card information of the prepaid card indicated by the prepaid card identifier, and obtaining a test result;
determining a prepaid card funds balance in the prepaid card information if the test result indicates that the prepaid card is in a card withdrawal state;
and returning the fund balance of the prepaid card to the target user terminal according to the fund source path carried by the prepaid card information.
8. A blockchain-based prepaid card transaction device, comprising:
the receiving unit is used for receiving a payment request initiated by the target user terminal, wherein the payment request at least comprises: prepaid card identification, smart contract identification, payment data, the payment data comprising: a target account, the target intelligent contract indicated by the intelligent contract identification being pre-deployed on a blockchain network;
The execution unit is used for calling the target intelligent contract from a preset intelligent contract warehouse, executing the target intelligent contract based on the payment data and obtaining an execution result, wherein the execution result at least comprises: a money transfer state;
a transfer unit, configured to transfer, when the money transfer state is a determined transfer state, a preset money carried by the execution result from a storage account corresponding to a target prepaid card indicated by the prepaid card identifier to the target account;
an updating unit, configured to update prepaid card information of the target prepaid card in case that the preset money allocation is successful, where the prepaid card information includes at least: prepaid card equity balance, prepaid card funds balance.
9. A computer readable storage medium, characterized in that the computer readable storage medium comprises a stored computer program, wherein the computer program, when run, controls a device in which the computer readable storage medium is located to perform the blockchain-based prepaid card transaction method according to any of claims 1 to 7.
10. An electronic device comprising one or more processors and memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the blockchain-based prepaid card transaction method of any of claims 1-7.
CN202310652931.9A 2023-06-02 2023-06-02 Prepaid card transaction method based on blockchain, prepaid card transaction device based on blockchain and electronic equipment Pending CN116703389A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310652931.9A CN116703389A (en) 2023-06-02 2023-06-02 Prepaid card transaction method based on blockchain, prepaid card transaction device based on blockchain and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310652931.9A CN116703389A (en) 2023-06-02 2023-06-02 Prepaid card transaction method based on blockchain, prepaid card transaction device based on blockchain and electronic equipment

Publications (1)

Publication Number Publication Date
CN116703389A true CN116703389A (en) 2023-09-05

Family

ID=87840385

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310652931.9A Pending CN116703389A (en) 2023-06-02 2023-06-02 Prepaid card transaction method based on blockchain, prepaid card transaction device based on blockchain and electronic equipment

Country Status (1)

Country Link
CN (1) CN116703389A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116911844A (en) * 2023-09-13 2023-10-20 深圳市深圳通有限公司 Public transport hardware wallet payment method, device, equipment and storage medium
CN117372050A (en) * 2023-12-07 2024-01-09 成都天府通数字科技有限公司 Method and system for verifying order verification of multiple platforms

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116911844A (en) * 2023-09-13 2023-10-20 深圳市深圳通有限公司 Public transport hardware wallet payment method, device, equipment and storage medium
CN117372050A (en) * 2023-12-07 2024-01-09 成都天府通数字科技有限公司 Method and system for verifying order verification of multiple platforms
CN117372050B (en) * 2023-12-07 2024-02-20 成都天府通数字科技有限公司 Method and system for verifying order verification of multiple platforms

Similar Documents

Publication Publication Date Title
JP7316392B2 (en) Methods and systems in which blockchain is realized
US11961072B2 (en) Techniques for conducting transactions utilizing cryptocurrency
CN110992028B (en) Data processing method and device of sink-changing platform based on block chain network
EP3485448B1 (en) Digital asset distribution by transaction device
TWI324866B (en) Method,apparatus and system of wireless subscriber billing and distribution and machine-readable medium
US20090327133A1 (en) Secure mechanism and system for processing financial transactions
US20020103753A1 (en) Charge splitter application
CN116703389A (en) Prepaid card transaction method based on blockchain, prepaid card transaction device based on blockchain and electronic equipment
CN110458700A (en) The logical card generation method of one kind, supply chain financial system and electronic equipment
JP6775590B2 (en) Systems and methods to promote secure electronic commerce
CN109426955B (en) Target object providing method, device and system
CN108846661A (en) Mobile device and the method that realization is used for mobile payment between two mobile devices
CN105550871A (en) Mobile internet based mobile phone bank transaction system
CN110443607B (en) Method for creating public digital wallet, transaction method and device
KR20190142653A (en) Method for Providing Service by using Blockchain based on POS
US10776782B2 (en) System and method for making and tracking charitable contributions
Lu et al. Patterns for blockchain-based payment applications
KR102011034B1 (en) Method for providing shopping mall service providing margin as sale to customer
KR20130083050A (en) Banking payment agency system using a virtual account and controlling method therefor
KR102294623B1 (en) Purchasing goods relay system and method based on blockchain
JP2006040249A (en) System and method for operating prepaid card service
Mayer et al. BatPay: a gas efficient protocol for the recurrent micropayment of ERC20 tokens
CN107274170B (en) Consumption loan management method, storage medium, and system
EP2357597A1 (en) Method and system for carrying out electronic payment transactions
KR101685281B1 (en) Method and apparatus for selling goods of vending machine using mobile messenger

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