CN114331460A - Method, device, equipment and storage medium for confirming fund transaction based on block chain - Google Patents

Method, device, equipment and storage medium for confirming fund transaction based on block chain Download PDF

Info

Publication number
CN114331460A
CN114331460A CN202111602610.5A CN202111602610A CN114331460A CN 114331460 A CN114331460 A CN 114331460A CN 202111602610 A CN202111602610 A CN 202111602610A CN 114331460 A CN114331460 A CN 114331460A
Authority
CN
China
Prior art keywords
transaction
state
data
encrypted
intelligent contract
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
CN202111602610.5A
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.)
Ping An Fund Management Co ltd
Original Assignee
Ping An Fund Management Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Fund Management Co ltd filed Critical Ping An Fund Management Co ltd
Priority to CN202111602610.5A priority Critical patent/CN114331460A/en
Publication of CN114331460A publication Critical patent/CN114331460A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The invention relates to a block chain technology, and discloses a fund transaction confirmation method based on a block chain, which comprises the following steps: encrypting transaction data and state data in a transaction application issued by a client, writing the encrypted transaction data, the encrypted state data and a corresponding decryption private key into a preset transaction book, and monitoring the transaction state of the encrypted transaction data in the transaction book; manually confirming the transaction data corresponding to the overtime state; converting the transaction ledger into an intelligent contract; and when the encryption state data in the intelligent contract is in a success or failure state, sending the intelligent contract to a preset transaction system, and storing the intelligent contract into a node of a pre-constructed alliance chain. The invention also provides a fund transaction confirmation device based on the block chain, electronic equipment and a storage medium. The invention can improve the transaction confirmation timeliness in the fund sale transaction process.

Description

Method, device, equipment and storage medium for confirming fund transaction based on block chain
Technical Field
The present invention relates to the field of blockchain technologies, and in particular, to a method and an apparatus for confirming a fund transaction based on a blockchain, an electronic device, and a computer-readable storage medium.
Background
The parties typically involved in the fund-seller transaction include: sales channel parties, transaction processing systems, bank paying parties, ta (transfer agent) share registrars.
The current fund sale transaction flow generally means that after a fund investor initiates a transaction (purchase, redemption and the like) on a sale channel side, the sale channel side sends the transaction to a transaction processing system, the transaction processing system processes the transaction, checks and verifies the validity of the transaction, and then sends the transaction to a bank payer to perform corresponding payment processing (deduction during purchase and payment during redemption); and when the day is over, the selling channel party sends the transaction data to the transaction processing system through a file, the bank paying party sends the paid transaction data to the transaction processing system through a file, the transaction processing system checks the daily and over transaction data according to the result of the selling channel party and the result of bank payment, then sends the transaction to the TA share registration party for share registration, and sends the confirmed share to the fund selling end the next day after the share registration.
The current fund sale transaction flow has the following two defects: (1) for investors, when partial system states in a multi-party system do not inform other participant systems in time, the front end of the investor cannot see the final state of the transaction in time, and the final state of the transaction can be updated only after the system of the transaction participant is checked at the end of the day. (2) For system clearing personnel, if more transactions needing intervention processing occur when account checking is finished at the end of the day, the clearing personnel need to coordinate corresponding personnel for processing, more time is spent for processing, clearing time delay is caused, and the timeliness of clearing of a downstream system is influenced by the delay of the clearing time.
In summary, the timeliness of the current fund sales transaction process needs to be improved.
Disclosure of Invention
The invention provides a fund transaction confirmation method and device based on a block chain and a computer readable storage medium, and mainly aims to solve the problem that the transaction confirmation timeliness in the fund sale transaction process is low.
In order to achieve the above object, the present invention provides a method for confirming a fund transaction based on a blockchain, comprising:
generating transaction data and state data according to a transaction application issued by a client;
carrying out encryption operation on the transaction data and the state data to obtain encrypted transaction data, encrypted state data and a decryption private key corresponding to the encrypted transaction data and the encrypted state data;
writing the encrypted transaction data, the encrypted state data and the corresponding decryption private key into a preset transaction book, and monitoring the transaction state of the encrypted transaction data in the transaction book;
when the overtime state exists in the transaction states, sending prompt information needing to be confirmed, returning to the step of processing the transaction instruction issued by the client by using the fund transaction system, and manually confirming transaction data corresponding to the overtime state;
when the transaction state is not in the overtime state, converting the transaction ledger into an intelligent contract;
and when the encryption state data in the intelligent contract is in a success or failure state, sending the intelligent contract to a preset transaction system, and storing the intelligent contract into a node of a pre-constructed alliance chain.
Alternatively,
the generating of transaction data and state data according to the transaction application issued by the client comprises the following steps:
executing the transaction application by using a channel side system in a preset transaction system, and outputting channel result data, channel state and transaction instructions;
processing the transaction instruction by using a transaction processing system in the transaction system, and outputting transaction result data, transaction processing state and bank payment instruction;
executing the bank payment instruction by using a bank payment system in the transaction system, and outputting payment result data and a bank payment state;
combining the channel result data, the transaction result data and the payment result data to obtain transaction data;
and combining the channel state, the transaction processing state and the bank payment state to obtain state data. Alternatively,
the encrypting operation of the transaction data and the state data to obtain encrypted transaction data, encrypted state data, and a decryption private key corresponding to the encrypted transaction data and the encrypted state data includes:
randomly obtaining two different prime numbers, and respectively carrying out asymmetric calculation processing on the prime numbers to obtain an encryption key and a decryption private key;
and encrypting the transaction data and the state data by using the encryption key to obtain encrypted transaction data and encrypted state data, and determining the decryption private key as a decryption private key corresponding to the encrypted transaction data and the encrypted state data. Alternatively,
the monitoring of the transaction state of the encrypted transaction data in the transaction ledger includes:
inquiring the transaction state of the encrypted transaction data in the transaction book;
when the transaction state is an intermediate state, acquiring the intermediate state stay time of the encrypted transaction data;
judging the stay time of the intermediate state and a preset time threshold value;
when the stay time of the intermediate state is less than a preset time threshold, the encrypted transaction data is in a non-overtime state;
when the stay time of the intermediate state is greater than or equal to a preset time threshold, the encrypted transaction data is in an overtime state;
and when the transaction state is the completion state, marking the encrypted transaction data as the completion state. Alternatively,
when the transaction state is not in the overtime state, the transaction ledger is converted into an intelligent contract, and the method comprises the following steps:
acquiring the encrypted transaction data, the encrypted state data and a preset rule corresponding to the encrypted transaction data and the encrypted state data;
and generating the intelligent contract by using the encrypted transaction data and the encrypted state data according to the preset rule and the encoding rule of the intelligent contract. Alternatively,
before sending the intelligent contract to a preset transaction system when the encryption status data in the intelligent contract is in a success or failure status, the method further comprises:
acquiring encryption state data of each subsystem in the encryption state data in the intelligent contract;
judging whether the encryption state data of each subsystem are all in a success or failure state;
when all the encryption state data of each subsystem are in a success state or a failure state, defining the encryption state data as the success state or the failure state;
and when the encryption state data of each subsystem are not all in a success state or a failure state, defining the encryption state data as an abnormal state, sending prompt information needing to be confirmed, and manually confirming the transaction data corresponding to the abnormal state. Alternatively,
before the logging the intelligent contracts into nodes of a pre-constructed federation chain, the method further comprises:
acquiring an identity certificate information set preset by each subsystem in the preset transaction system;
and storing the identity certificate information set to a node of a standard alliance chain, and constructing the alliance chain. In order to solve the above problems, the present invention also provides a block chain-based fund transaction confirmation apparatus, comprising:
the data generation module is used for generating transaction data and state data according to a transaction application issued by a client;
the encryption module is used for carrying out encryption operation on the transaction data and the state data to obtain encrypted transaction data, encrypted state data and decryption private keys corresponding to the encrypted transaction data and the encrypted state data;
a write-in transaction book module, configured to write the encrypted transaction data, the encrypted state data, and the corresponding decryption private key into a preset transaction book, and monitor a transaction state of the encrypted transaction data in the transaction book;
the intelligent contract conversion module is used for sending prompt information to be confirmed when the overtime state exists in the transaction state, returning to the step of processing the transaction instruction issued by the client by using the fund transaction system, and manually confirming the transaction data corresponding to the overtime state; when the transaction state is not in the overtime state, converting the transaction ledger into an intelligent contract;
and the intelligent contract storage module is used for sending the intelligent contract to a preset transaction system and storing the intelligent contract into a node of a pre-constructed alliance chain when the encryption state data in the intelligent contract is in a success or failure state.
In order to solve the above problem, the present invention also provides an electronic device, including:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the blockchain based fund transaction validation method described above.
In order to solve the above problem, the present invention also provides a computer-readable storage medium, in which at least one computer program is stored, the at least one computer program being executed by a processor in an electronic device to implement the above block chain based fund transaction confirmation method.
The transaction data and the state data in the transaction application issued by the client are encrypted, the encrypted transaction data, the encrypted state data and the corresponding decryption private key are written into a preset transaction book, the overtime state of the encrypted transaction data in the transaction book is monitored, when the overtime encrypted transaction data exist in the transaction book, prompt information needing to be confirmed is sent to carry out manual confirmation, the transaction data state is monitored, overtime exception is processed in advance, and timeliness of settlement of sales transactions such as funds is guaranteed; converting the transaction ledger into an intelligent contract; when the encryption state data in the intelligent contract is in a success or failure state, sending the intelligent contract to a preset transaction system, and storing the intelligent contract into a node of a pre-constructed alliance chain; whether the transaction is successful or not is confirmed in advance by using the intelligent contract, so that the pressure of daily and final account checking and clearing is reduced, and the timeliness of the fund sale transaction process is improved. Therefore, the fund transaction confirmation method and device based on the block chain, the electronic equipment and the computer readable storage medium provided by the invention can solve the problem of low timeliness of transaction confirmation in the fund sale transaction process.
Drawings
Fig. 1 is a schematic flow chart illustrating a method for confirming a fund transaction based on a blockchain according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a detailed implementation of one step of the method for confirming fund transactions based on blockchains shown in FIG. 1;
FIG. 3 is a flowchart illustrating another step in the method for confirming fund transactions based on blockchains shown in FIG. 1;
FIG. 4 is a functional block diagram of a blockchain-based fund transaction validation apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device for implementing the method for confirming a fund transaction based on a blockchain according to an embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The embodiment of the application provides a fund transaction confirmation method based on a block chain. The execution subject of the block chain-based fund transaction confirmation method includes, but is not limited to, at least one of the electronic devices of a server, a terminal and the like that can be configured to execute the method provided by the embodiments of the present application. In other words, the method for confirming the transaction of the fund based on the block chain can be executed by software or hardware installed in the terminal device or the server device, and the software can be a block chain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, and the like. The server may be an independent server, or may be a cloud server that provides basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a Network service, cloud communication, a middleware service, a domain name service, a security service, a Content Delivery Network (CDN), a big data and artificial intelligence platform, and the like.
Referring to fig. 1, a flow chart of a method for confirming a fund transaction based on a blockchain according to an embodiment of the present invention is shown. In this embodiment, the method for confirming the fund transaction based on the blockchain includes:
and S1, generating transaction data and state data according to the transaction application issued by the client.
In the embodiment of the invention, a preset transaction system can be utilized to process the transaction application issued by the client, and transaction data and state data are generated. The preset transaction system can be a fund transaction system, is a system for realizing the transaction business of fund sales organizations, supports subsequent services such as fund clearance, account checking inquiry, error processing and the like by relying on the cross-bank payment clearing channels of China people's banks, China Unionpay and the like, and controls and guarantees the transaction risk of the fund sales organizations and the fund safety of the banks.
In the embodiment of the invention, the preset transaction system comprises subsystems such as a channel side system, a transaction processing system, a bank payment system and the like. After the investor initiates a transaction (purchase, redemption and the like) in the channel side system, the channel side system sends the transaction to the transaction processing system for transaction processing, checks and verifies the validity of the transaction, and then sends the transaction to the bank payment system for corresponding payment processing (deduction in purchase, payment in redemption and the like).
In an embodiment of the present invention, the transaction data includes information such as an account name, an account number, purchase or redemption fund information, an amount, and the like, and the status data is a result status of processing by each subsystem, including success or failure, for example, the result status of processing by the channel side system is success.
In detail, the S1 includes:
executing the transaction application by using a channel side system in a preset transaction system, and outputting channel result data, channel state and transaction instructions;
processing the transaction instruction by using a transaction processing system in the transaction system, and outputting transaction result data, transaction processing state and bank payment instruction;
executing the bank payment instruction by using a bank payment system in the transaction system, and outputting payment result data and a bank payment state;
combining the channel result data, the transaction result data and the payment result data to obtain transaction data;
and combining the channel state, the transaction processing state and the bank payment state to obtain state data.
S2, carrying out encryption operation on the transaction data and the state data to obtain encrypted transaction data, encrypted state data and a decryption private key corresponding to the encrypted transaction data and the encrypted state data.
The embodiment of the invention can adopt an asymmetric encryption algorithm to carry out encryption operation on the transaction data and the state data.
In detail, the S2 includes:
randomly obtaining two different prime numbers, and respectively carrying out asymmetric calculation processing on the prime numbers to obtain an encryption key and a decryption private key;
and encrypting the transaction data and the state data by using the encryption key to obtain encrypted transaction data and encrypted state data, and determining the decryption private key as a decryption private key corresponding to the encrypted transaction data and the encrypted state data.
Further, the randomly obtaining two different prime numbers, and respectively performing asymmetric computation on the prime numbers to obtain an encryption key and a decryption private key includes:
calculating a product n ═ pq, phi (n) ═ p-1 (q-1) for two different prime numbers p and q obtained at random;
selecting a number which is prime to phi (n) from [0, phi (n) -1] as a public encryption index e, and calculating a decryption index d by using a formula of ed as 1mod phi (n);
the encryption key and decryption private key are calculated using the following formula:
encryption key: PK ═ e, n }
Decrypting the private key: SK ═ d, n.
In the embodiment of the invention, the encryption key and the decryption private key are key pairs obtained through an algorithm, the encryption key is a part which is open to the outside, the decryption private key is a non-public part, and the key pairs obtained through the algorithm can ensure the uniqueness. When using this key pair, if one of the keys is used to encrypt a piece of data, the other key must be used to decrypt the piece of data. For example, encrypting data with an encryption key would necessitate decryption with a decryption private key or decryption would not be successful.
In the embodiment of the invention, the transaction data and the state data are subjected to encryption operation, the data are transmitted in a form of ciphertext, and the plaintext information corresponding to the ciphertext can be acquired only by using the corresponding decryption private key, so that the security of the transaction data and the state data is ensured.
S3, writing the encrypted transaction data, the encrypted state data and the corresponding decryption private key into a preset transaction book, and monitoring the transaction state of the encrypted transaction data in the transaction book.
In an embodiment of the present invention, the transaction ledger is an ledger recorded in a blockchain format, and the transaction ledger is not added to a link of the blockchain.
Further, the transaction state of the encrypted transaction data includes a completion state and an intermediate state, and the intermediate state includes a timeout state and a non-timeout state.
In detail, referring to fig. 2, the monitoring of the transaction status of the encrypted transaction data in the transaction book in S3 includes:
s31, inquiring the transaction state of the encrypted transaction data in the transaction book, and judging the transaction state;
s32, when the transaction state is the intermediate state, acquiring the intermediate state stay time of the encrypted transaction data;
s33, judging whether the stay time of the intermediate state is less than a preset time threshold;
when the stay time of the intermediate state is less than a preset time threshold, S34 indicating that the encrypted transaction data is in a non-overtime state;
when the stay time of the intermediate state is greater than or equal to a preset time threshold, S35, the encrypted transaction data is in an overtime state;
and S36, when the transaction state is the completion state, marking the encrypted transaction data as the completion state.
In the embodiment of the invention, the intermediate state is a state of processing, a server is busy and the like, when the time of the intermediate state exceeds a preset time threshold value, the encrypted transaction data is represented as an overtime state, and the processing overtime of a corresponding system is further represented. For example: and the payment result data in the encrypted transaction data are account name XXX, account number XXXXXXX, subscription fund XXX fund 1 part, amount: XXXXXXX element, the bank payment state is success, indicating that the encrypted transaction data is non-intermediate state. For example: the preset time threshold is 10 minutes, the payment result data in the encrypted transaction data is in processing, the stay time in the processing state is 12 minutes, and the time is overtime when the bank payment system processes the payment instruction.
In the real-time embodiment of the invention, the encrypted transaction data in the transaction book is inquired at a preset time, and the encrypted transaction data is monitored, so that the data in an overtime state can be prevented from being discovered only when the data is cleared at the end of the day.
S4, judging whether the transaction state has a timeout state;
and when the overtime state exists in the transaction states, S5, sending prompt information needing to be confirmed, and manually confirming the transaction data corresponding to the overtime state.
In the embodiment of the invention, when the overtime state exists in the transaction state, the prompt information needing to be confirmed is sent to carry out manual confirmation, the processing flow corresponding to the overtime encrypted transaction data is confirmed in time, the overtime abnormal data is prevented from being left to be cleared at the end of the day, and the timeliness of the fund sale transaction process is improved.
And when the transaction state is not in the overtime state, S6, converting the transaction ledger into an intelligent contract.
The Smart contract (Smart contract) in embodiments of the present invention is a computer protocol intended to propagate, verify or execute contracts in an informative manner, allowing trusted transactions to be conducted without third parties, which transactions are traceable and irreversible.
In detail, the S5 includes:
acquiring the encrypted transaction data, the encrypted state data and a preset rule corresponding to the encrypted transaction data and the encrypted state data;
and generating the intelligent contract by using the encrypted transaction data and the encrypted state data according to the preset rule and the encoding rule of the intelligent contract.
Specifically, in the embodiment of the present invention, the encoding rule is that mathematical variables in the encrypted transaction data and the encrypted state data are defined by program variables, and logical relationships in the encrypted transaction data and the encrypted state data are represented by program statements and code segments. And the preset rule is that the transaction ledger is automatically converted into an intelligent contract when the encrypted state data is in a definite state.
And S7, when the encryption state data in the intelligent contract is in a success or failure state, sending the intelligent contract to a preset transaction system, and storing the intelligent contract into a node of a pre-constructed alliance chain.
In the embodiment of the present invention, the preset transaction system may be a fund transaction system.
In the embodiment of the invention, the alliance chain is a block chain which is managed by a plurality of organizations together, each organization or organization manages one or more nodes, and the data of the alliance chain only allows different organizations in the system to read, write and send. Each node of the federation chain usually has a corresponding entity organization, and can join and leave the network only after authorization. Organizations form interest-related alliances that collectively maintain healthy operation of blockchains.
Specifically, referring to fig. 3, before sending the intelligent contract to a preset transaction system when the encryption status data in the intelligent contract is in a success or failure status, the method further includes:
s71, acquiring encryption state data of each subsystem in the encryption state data in the intelligent contract;
s72, judging whether all the encryption state data of each subsystem are in a success or failure state;
when all the encryption state data of each subsystem are in a success state or a failure state, S73, defining the encryption state data as a success state or a failure state;
and when the encryption state data of each subsystem are not all in a success state or a failure state, S74, defining the encryption state data as an abnormal state, and sending prompt information to be confirmed to manually confirm the transaction data corresponding to the abnormal state.
Further, before the logging the intelligent contracts into nodes of a pre-constructed federation chain, the method further includes:
acquiring an identity certificate information set preset by each subsystem in the preset transaction system;
and storing the identity certificate information set to a node of a standard alliance chain, and constructing the alliance chain.
In detail, as described above, in the embodiment of the present invention, the preset transaction system includes subsystems such as a channel side system, a transaction processing system, and a bank payment system. The embodiment of the invention stores the identity certificate information of the channel party system, the transaction processing system and the bank payment system to the nodes of a standard alliance chain to obtain the alliance chain constructed by the channel party system, the transaction processing system and the bank payment system.
Further, the intelligent contracts are stored in the nodes of the alliance chain, transaction messages are generated according to the intelligent contracts, the transaction messages are stored in the nodes of the alliance chain, and the intelligent contracts are enabled to have the characteristics of non-tampering and automatic operation by the aid of the characteristic that block chain data cannot be tampered. And automatically determining the final state of the transaction according to the channel state, the transaction processing state and the bank payment state by an intelligent contract in the block chain.
In the embodiment of the invention, whether the state data is in an abnormal state is judged in advance according to the encrypted state data of each subsystem in the transaction system, and manual processing is carried out when the state data is in the abnormal state without batch confirmation when the final daily settlement is reached, so that the pressure of the final daily settlement is reduced, and the timeliness of the settlement is also ensured.
The transaction data and the state data in the transaction application issued by the client are encrypted, the encrypted transaction data, the encrypted state data and the corresponding decryption private key are written into a preset transaction book, the overtime state of the encrypted transaction data in the transaction book is monitored, when the overtime encrypted transaction data exist in the transaction book, prompt information needing to be confirmed is sent to carry out manual confirmation, the transaction data state is monitored, overtime exception is processed in advance, and timeliness of settlement of sales transactions such as funds is guaranteed; converting the transaction ledger into an intelligent contract; when the encryption state data in the intelligent contract is in a success or failure state, sending the intelligent contract to a preset transaction system, and storing the intelligent contract into a node of a pre-constructed alliance chain; whether the transaction is successful or not is confirmed in advance by using the intelligent contract, so that the pressure of daily and final account checking and clearing is reduced, and the timeliness of the fund sale transaction process is improved. Therefore, the fund transaction confirmation method based on the block chain can solve the problem of low transaction confirmation timeliness in the fund sale transaction process.
Fig. 4 is a functional block diagram of a device for confirming fund transaction based on block chains according to an embodiment of the present invention.
The block chain based fund transaction confirmation apparatus 100 according to the present invention may be installed in an electronic device. According to the implemented functions, the block chain-based fund transaction confirmation apparatus 100 may include a data generation module 101, an encryption module 102, a write transaction ledger module 103, an intelligent contract conversion module 104, and an intelligent contract storage module 105. The module of the present invention, which may also be referred to as a unit, refers to a series of computer program segments that can be executed by a processor of an electronic device and that can perform a fixed function, and that are stored in a memory of the electronic device.
In the present embodiment, the functions regarding the respective modules/units are as follows:
the data generation module 101 is configured to generate transaction data and state data according to a transaction application issued by a client; the encryption module 102 is configured to perform encryption operation on the transaction data and the state data to obtain encrypted transaction data, encrypted state data, and a decryption private key corresponding to the encrypted transaction data and the encrypted state data; the write-in transaction ledger module 103 is configured to write the encrypted transaction data, the encrypted state data, and the corresponding decryption private key into a preset transaction ledger, and monitor a transaction state of the encrypted transaction data in the transaction ledger; the intelligent contract conversion module 104 is configured to send prompt information to be confirmed when an overtime state exists in the transaction states, and return to the step of processing the transaction instruction issued by the client by using the fund transaction system, where the transaction data corresponding to the overtime state is manually confirmed; when the transaction state is not in the overtime state, converting the transaction ledger into an intelligent contract; the intelligent contract storage module 105 is configured to send the intelligent contract to a preset transaction system and store the intelligent contract into a node of a pre-constructed federation chain when the encryption status data in the intelligent contract is in a success or failure status. In detail, in the embodiment of the present invention, when the modules in the device 100 for confirming fund transaction based on a block chain are used, the same technical means as the method for confirming fund transaction based on a block chain described in fig. 1 to fig. 3 are used, and the same technical effects can be produced, which is not described herein again.
Fig. 5 is a schematic structural diagram of an electronic device implementing a method for confirming a fund transaction based on a blockchain according to an embodiment of the present invention.
The electronic device 1 may include a processor 10, a memory 11, a communication bus 12, and a communication interface 13, and may further include a computer program, such as a blockchain-based fund transaction confirmation program, stored in the memory 11 and executable on the processor 10.
In some embodiments, the processor 10 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or may be composed of a plurality of integrated circuits packaged with the same function or different functions, and includes one or more Central Processing Units (CPUs), a microprocessor, a digital Processing chip, a graphics processor, a combination of various control chips, and the like. The processor 10 is a Control Unit (Control Unit) of the electronic device, connects various components of the whole electronic device by using various interfaces and lines, and executes various functions and processes data of the electronic device by running or executing programs or modules stored in the memory 11 (for example, executing a fund transaction confirmation program based on a block chain, etc.), and calling data stored in the memory 11.
The memory 11 includes at least one type of readable storage medium including flash memory, removable hard disks, multimedia cards, card-type memory (e.g., SD or DX memory, etc.), magnetic memory, magnetic disks, optical disks, etc. The memory 11 may in some embodiments be an internal storage unit of the electronic device, for example a removable hard disk of the electronic device. The memory 11 may also be an external storage device of the electronic device in other embodiments, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the electronic device. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic device. The memory 11 may be used not only to store application software installed in the electronic device and various types of data, such as codes of a fund transaction confirmation program based on a block chain, etc., but also to temporarily store data that has been output or will be output.
The communication bus 12 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is arranged to enable connection communication between the memory 11 and at least one processor 10 or the like.
The communication interface 13 is used for communication between the electronic device and other devices, and includes a network interface and a user interface. Optionally, the network interface may include a wired interface and/or a wireless interface (e.g., WI-FI interface, bluetooth interface, etc.), which are typically used to establish a communication connection between the electronic device and other electronic devices. The user interface may be a Display (Display), an input unit such as a Keyboard (Keyboard), and optionally a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable, among other things, for displaying information processed in the electronic device and for displaying a visualized user interface.
Fig. 5 only shows an electronic device with components, and it will be understood by a person skilled in the art that the structure shown in fig. 5 does not constitute a limitation of the electronic device 1, and may comprise fewer or more components than shown, or a combination of certain components, or a different arrangement of components.
For example, although not shown, the electronic device may further include a power supply (such as a battery) for supplying power to each component, and preferably, the power supply may be logically connected to the at least one processor 10 through a power management device, so that functions of charge management, discharge management, power consumption management and the like are realized through the power management device. The power supply may also include any component of one or more dc or ac power sources, recharging devices, power failure detection circuitry, power converters or inverters, power status indicators, and the like. The electronic device may further include various sensors, a bluetooth module, a Wi-Fi module, and the like, which are not described herein again.
It is to be understood that the described embodiments are for purposes of illustration only and that the scope of the appended claims is not limited to such structures.
The block chain based fund transaction confirmation program stored in the memory 11 of the electronic device 1 is a combination of instructions which, when executed in the processor 10, may enable:
generating transaction data and state data according to a transaction application issued by a client;
carrying out encryption operation on the transaction data and the state data to obtain encrypted transaction data, encrypted state data and a decryption private key corresponding to the encrypted transaction data and the encrypted state data;
writing the encrypted transaction data, the encrypted state data and the corresponding decryption private key into a preset transaction book, and monitoring the transaction state of the encrypted transaction data in the transaction book;
when the overtime state exists in the transaction states, sending prompt information needing to be confirmed, returning to the step of processing the transaction instruction issued by the client by using the fund transaction system, and manually confirming transaction data corresponding to the overtime state;
when the transaction state is not in the overtime state, converting the transaction ledger into an intelligent contract;
and when the encryption state data in the intelligent contract is in a success or failure state, sending the intelligent contract to a preset transaction system, and storing the intelligent contract into a node of a pre-constructed alliance chain.
Specifically, the specific implementation method of the instruction by the processor 10 may refer to the description of the relevant steps in the embodiment corresponding to the drawings, which is not described herein again.
Further, the integrated modules/units of the electronic device 1, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. The computer readable storage medium may be volatile or non-volatile. For example, the computer-readable medium may include: any entity or device capable of carrying said computer program code, recording medium, U-disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM).
The present invention also provides a computer-readable storage medium, storing a computer program which, when executed by a processor of an electronic device, may implement:
generating transaction data and state data according to a transaction application issued by a client;
carrying out encryption operation on the transaction data and the state data to obtain encrypted transaction data, encrypted state data and a decryption private key corresponding to the encrypted transaction data and the encrypted state data;
writing the encrypted transaction data, the encrypted state data and the corresponding decryption private key into a preset transaction book, and monitoring the transaction state of the encrypted transaction data in the transaction book;
when the overtime state exists in the transaction states, sending prompt information needing to be confirmed, returning to the step of processing the transaction instruction issued by the client by using the fund transaction system, and manually confirming transaction data corresponding to the overtime state;
when the transaction state is not in the overtime state, converting the transaction ledger into an intelligent contract;
and when the encryption state data in the intelligent contract is in a success or failure state, sending the intelligent contract to a preset transaction system, and storing the intelligent contract into a node of a pre-constructed alliance chain.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus, device and method can be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional module.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof.
The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
The block chain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
The embodiment of the application can acquire and process related data based on an artificial intelligence technology. Among them, Artificial Intelligence (AI) is a theory, method, technique and application system that simulates, extends and expands human Intelligence using a digital computer or a machine controlled by a digital computer, senses the environment, acquires knowledge and uses the knowledge to obtain the best result.
Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the system claims may also be implemented by one unit or means in software or hardware. The terms first, second, etc. are used to denote names, but not any particular order.
Finally, it should be noted that the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting, and although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims (10)

1. A method for confirming a fund transaction based on a blockchain, the method comprising:
generating transaction data and state data according to a transaction application issued by a client;
carrying out encryption operation on the transaction data and the state data to obtain encrypted transaction data, encrypted state data and a decryption private key corresponding to the encrypted transaction data and the encrypted state data;
writing the encrypted transaction data, the encrypted state data and the corresponding decryption private key into a preset transaction book, and monitoring the transaction state of the encrypted transaction data in the transaction book;
when the overtime state exists in the transaction states, sending prompt information needing to be confirmed, returning to the step of processing the transaction instruction issued by the client by using the fund transaction system, and manually confirming transaction data corresponding to the overtime state;
when the transaction state is not in the overtime state, converting the transaction ledger into an intelligent contract;
and when the encryption state data in the intelligent contract is in a success or failure state, sending the intelligent contract to a preset transaction system, and storing the intelligent contract into a node of a pre-constructed alliance chain.
2. The method for confirming a fund transaction based on a blockchain according to claim 1, wherein the generating transaction data and state data according to the transaction application ordered by the client comprises:
executing the transaction application by using a channel side system in a preset transaction system, and outputting channel result data, channel state and transaction instructions;
processing the transaction instruction by using a transaction processing system in the transaction system, and outputting transaction result data, transaction processing state and bank payment instruction;
executing the bank payment instruction by using a bank payment system in the transaction system, and outputting payment result data and a bank payment state;
combining the channel result data, the transaction result data and the payment result data to obtain transaction data;
and combining the channel state, the transaction processing state and the bank payment state to obtain state data.
3. The method for confirming a fund transaction based on a blockchain according to claim 1, wherein the encrypting the transaction data and the state data to obtain encrypted transaction data, encrypted state data, and a decryption private key corresponding to the encrypted transaction data and the encrypted state data comprises:
randomly obtaining two different prime numbers, and respectively carrying out asymmetric calculation processing on the prime numbers to obtain an encryption key and a decryption private key;
and encrypting the transaction data and the state data by using the encryption key to obtain encrypted transaction data and encrypted state data, and determining the decryption private key as a decryption private key corresponding to the encrypted transaction data and the encrypted state data.
4. The method of claim 1, wherein the monitoring the transaction status of encrypted transaction data in the transaction ledger comprises:
inquiring the transaction state of the encrypted transaction data in the transaction book;
when the transaction state is an intermediate state, acquiring the intermediate state stay time of the encrypted transaction data;
judging the stay time of the intermediate state and a preset time threshold value;
when the stay time of the intermediate state is less than a preset time threshold, the encrypted transaction data is in a non-overtime state;
when the stay time of the intermediate state is greater than or equal to a preset time threshold, the encrypted transaction data is in an overtime state;
and when the transaction state is the completion state, marking the encrypted transaction data as the completion state.
5. The blockchain-based fund transaction validation method according to claim 1, wherein the converting the transaction ledger into an intelligent contract when there is no timeout state in the transaction state comprises:
acquiring the encrypted transaction data, the encrypted state data and a preset rule corresponding to the encrypted transaction data and the encrypted state data;
and generating the intelligent contract by using the encrypted transaction data and the encrypted state data according to the preset rule and the encoding rule of the intelligent contract.
6. The blockchain-based fund transaction confirmation method according to any one of claims 1 to 5, wherein before sending the intelligent contract to a preset transaction system when the encryption status data in the intelligent contract is a success or failure status, the method further comprises:
acquiring encryption state data of each subsystem in the encryption state data in the intelligent contract;
judging whether the encryption state data of each subsystem are all in a success or failure state;
when all the encryption state data of each subsystem are in a success state or a failure state, defining the encryption state data as the success state or the failure state;
and when the encryption state data of each subsystem are not all in a success state or a failure state, defining the encryption state data as an abnormal state, sending prompt information needing to be confirmed, and manually confirming the transaction data corresponding to the abnormal state.
7. The blockchain-based fund transaction validation method of claim 6, wherein prior to depositing the intelligent contract into a node of a pre-built federation chain, the method further comprises:
acquiring an identity certificate information set preset by each subsystem in the preset transaction system;
and storing the identity certificate information set to a node of a standard alliance chain, and constructing the alliance chain.
8. A blockchain-based fund transaction confirmation apparatus, the apparatus comprising:
the data generation module is used for generating transaction data and state data according to a transaction application issued by a client;
the encryption module is used for carrying out encryption operation on the transaction data and the state data to obtain encrypted transaction data, encrypted state data and decryption private keys corresponding to the encrypted transaction data and the encrypted state data;
a write-in transaction book module, configured to write the encrypted transaction data, the encrypted state data, and the corresponding decryption private key into a preset transaction book, and monitor a transaction state of the encrypted transaction data in the transaction book;
the intelligent contract conversion module is used for sending prompt information to be confirmed when the overtime state exists in the transaction state, returning to the step of processing the transaction instruction issued by the client by using the fund transaction system, and manually confirming the transaction data corresponding to the overtime state; when the transaction state is not in the overtime state, converting the transaction ledger into an intelligent contract;
and the intelligent contract storage module is used for sending the intelligent contract to a preset transaction system and storing the intelligent contract into a node of a pre-constructed alliance chain when the encryption state data in the intelligent contract is in a success or failure state.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the method of block chain based fund transaction validation as claimed in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the method for confirming a blockchain-based fund transaction according to any one of claims 1 to 7.
CN202111602610.5A 2021-12-24 2021-12-24 Method, device, equipment and storage medium for confirming fund transaction based on block chain Pending CN114331460A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111602610.5A CN114331460A (en) 2021-12-24 2021-12-24 Method, device, equipment and storage medium for confirming fund transaction based on block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111602610.5A CN114331460A (en) 2021-12-24 2021-12-24 Method, device, equipment and storage medium for confirming fund transaction based on block chain

Publications (1)

Publication Number Publication Date
CN114331460A true CN114331460A (en) 2022-04-12

Family

ID=81013032

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111602610.5A Pending CN114331460A (en) 2021-12-24 2021-12-24 Method, device, equipment and storage medium for confirming fund transaction based on block chain

Country Status (1)

Country Link
CN (1) CN114331460A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115713334A (en) * 2022-11-28 2023-02-24 武汉利楚商务服务有限公司 Transaction data monitoring method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115713334A (en) * 2022-11-28 2023-02-24 武汉利楚商务服务有限公司 Transaction data monitoring method and device
CN115713334B (en) * 2022-11-28 2023-06-16 武汉利楚商务服务有限公司 Transaction data monitoring method and device

Similar Documents

Publication Publication Date Title
CN109544160B (en) Transaction authenticity verification method and system based on block chain and intelligent contract
TWI773912B (en) Blockchain-based claims settlement method and device
CN109829824B (en) Commodity transaction information sharing method based on block chain technology
CN107180350B (en) Method, device and system for multi-party sharing transaction metadata based on block chain
CN111414650B (en) Order processing method and system based on blockchain storage certificate
CN111415159B (en) Block chain-based settlement data processing method, system and relevant nodes
CN109690539A (en) Self-cleaning token pool
US20150356523A1 (en) Decentralized identity verification systems and methods
CN112003858B (en) Block chain-based platform docking method, electronic device and storage medium
CN112804218B (en) Block chain-based data processing method, device, equipment and storage medium
CN110599178A (en) Data processing method and device based on intelligent contract and storage medium
CN112184444A (en) Method, apparatus, device and medium for processing information based on information characteristics
KR102085997B1 (en) Method and system for real estate transaction service based on block chain
CN109785145B (en) Fixed-point drugstore financing method based on block chain, storage medium and computer equipment
CN111274597A (en) Data processing method and equipment
CN114331460A (en) Method, device, equipment and storage medium for confirming fund transaction based on block chain
CN112217639B (en) Data encryption sharing method and device, electronic equipment and computer storage medium
CN112488707A (en) Service flow supervision method and system
KR20210117731A (en) The blockchain-based transaction history confirmation system
CN115345729A (en) Credit card issuing method and device, electronic equipment and storage medium
CN114066451A (en) Method and system for managing fund transaction and electronic equipment
CN114629663A (en) Block chain-based digital commodity transaction method and device
CN111683070B (en) Data transmission method and device based on identity encryption and storage medium
CN110852891B (en) Data processing method and device based on rolling stock and readable storage medium
CN114638610A (en) Receiving and paying channel encryption method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination