CN108960801B - Transaction record management method, system and storage medium based on block chain technology - Google Patents

Transaction record management method, system and storage medium based on block chain technology Download PDF

Info

Publication number
CN108960801B
CN108960801B CN201711299394.5A CN201711299394A CN108960801B CN 108960801 B CN108960801 B CN 108960801B CN 201711299394 A CN201711299394 A CN 201711299394A CN 108960801 B CN108960801 B CN 108960801B
Authority
CN
China
Prior art keywords
transaction
transaction record
confirmed
blockchain
cache
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.)
Expired - Fee Related
Application number
CN201711299394.5A
Other languages
Chinese (zh)
Other versions
CN108960801A (en
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.)
Puhua Yunchuang Technology Beijing Co ltd
Original Assignee
Puhua Yunchuang Technology Beijing 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 Puhua Yunchuang Technology Beijing Co ltd filed Critical Puhua Yunchuang Technology Beijing Co ltd
Priority to CN201711299394.5A priority Critical patent/CN108960801B/en
Publication of CN108960801A publication Critical patent/CN108960801A/en
Application granted granted Critical
Publication of CN108960801B publication Critical patent/CN108960801B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/08Payment architectures
    • G06Q20/10Payment architectures specially adapted for electronic funds transfer [EFT] systems; specially adapted for home banking systems
    • G06Q20/102Bill distribution or payments
    • 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/04Payment circuits
    • G06Q20/06Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme
    • G06Q20/065Private payment circuits, e.g. involving electronic currency used among participants of a common payment scheme using e-cash
    • 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/30Payment architectures, schemes or protocols characterised by the use of specific devices or networks
    • G06Q20/36Payment architectures, schemes or protocols characterised by the use of specific devices or networks using electronic wallets or electronic money safes
    • 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
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • Strategic Management (AREA)
  • Theoretical Computer Science (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Technology Law (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The invention discloses a transaction record management method based on a block chain technology, which comprises the following steps: acquiring a transaction ID generated by account transfer transaction of a current user, and caching the transaction ID in a cache of a terminal; inquiring whether the transaction ID exists on a block chain agent node according to the transaction ID stored in the cache; if not, deleting the corresponding transaction ID in the cache; and acquiring the transaction record corresponding to the transaction ID cached in the cache of the terminal, and acquiring the confirmed transaction record of the current user in the block chain network block through a polling interface at the server end. The transaction record management method based on the blockchain technology provides a transaction record management mechanism which can acquire confirmed and unconfirmed transaction records of a user, and simultaneously reduces the storage space requirement of mobile equipment. The invention also provides a transaction record management system based on the block chain technology and a computer readable storage medium.

Description

Transaction record management method, system and storage medium based on block chain technology
Technical Field
The invention relates to the technical field of computer networks, in particular to a transaction record management method based on a block chain technology, a transaction record management system based on the block chain technology and a computer-readable storage medium.
Background
The Blockchain (Blockchain) is a distributed database system participated by nodes, and has the characteristics of being unchangeable and unforgeable, and can also be understood as an account book system (leader). It is an important concept of bitcoin, a copy of the complete bitcoin block chain, which records every transaction of its token (token). From this information, the value that each address has at any point in the history can be found.
A block chain is composed of a string of data blocks generated by cryptography, each block containing the hash value (hash) of the previous block, and is linked to the current block starting from a starting block (genesis block) to form the block chain. Each chunk is guaranteed to be generated after the previous chunk in time order, otherwise the hash value of the previous chunk is unknown. These characteristics make bitcoin double-blooming (double-blooming) very difficult. The block chain is a core innovation of virtual currency such as bitcoin.
One of the biggest difficulties in the technical implementation of mobile wallets is the extraction and presentation of transaction records. The block chain network transaction is greatly different from the traditional transaction, and the traditional transaction is that the current transaction takes effect immediately without intermediate node confirmation as long as the transfer is realized by two parties participating in the transaction. Once a transaction of the blockchain occurs, the transaction must be confirmed by miners on the blockchain first, and the transaction is only effective currently, and a period of time is required from the beginning of the transaction to the completion of the transaction, and the length of the period of time also has a great influence on the user experience. According to the conventional blockchain technology, each node stores all transaction records of the whole blockchain network, a huge storage space must be prepared locally, and 1T may not be enough at present. Such a backup transaction record would be substantially impossible with a mobile wallet and it is determined that the transaction record presentation for a mobile wallet would be less likely than on a stationary computer device such as a PC.
Currently, it is very inconvenient for how the transaction record information on the mobile wallet is displayed before and after the transaction is submitted to the blockchain agent node. The main proposed solutions are the following two:
the first scheme is as follows: after the transfer transaction occurs and before the miners node does not confirm the transaction, the current transaction cannot enter a specific block of the block chain, and the current transaction is not displayed on the mobile wallet until the current transaction is confirmed by the miners. The user experience is very poor, the user feels no security feeling, and the account transfer transaction display cannot be displayed in time.
And after the transfer transaction occurs, the mobile wallet reads the transaction information in the current block from the block chain network every time a block is generated from the initial block, displays the current transaction information in the transaction record list, and stores the transaction record to the mobile equipment, so that the storage space of the mobile equipment is greatly occupied, and the frequent block synchronization with the block network is carried out, so that the network flow is greatly increased, and the adverse effect is generated on the user. And when the transfer transaction occurs and no miner node confirms the transaction, the mobile wallet detects whether a new block is generated or not continuously during the period, whether the current transfer transaction is in the block or not, and only the current transaction can be cached locally at the mobile wallet terminal, so that the confirmed transaction is automatically changed after the time of the miner transaction is up.
Therefore, there is a need to provide a new transaction record management method based on blockchain technology to solve the above-mentioned problems in the prior art.
Disclosure of Invention
The invention mainly aims to provide a transaction record management method based on a blockchain technology, a transaction record management system based on the blockchain technology and a computer readable storage medium, and aims to improve a transaction record display method applied to a mobile wallet based on the blockchain technology so as to solve the technical problems of insufficient storage space of the current mobile wallet and low flow of a mobile terminal, and also provide a mechanism for solving how to display transaction records when a miner node does not confirm.
In order to achieve the above object, the invention provides a transaction record management method based on a blockchain technology, comprising the steps of:
acquiring transaction IDs generated by account transfer transactions of current users, and caching the transaction IDs in a cache of a terminal, wherein each transaction ID corresponds to a transaction record and comprises a unique string code HASH value of the transaction;
according to the transaction ID stored in the cache, whether the transaction ID exists is inquired on a block chain agent node regularly according to a preset time interval;
when the transaction ID does not exist on the blockchain agent node, confirming that the transaction record corresponding to the transaction ID is confirmed, and deleting the corresponding transaction ID in the cache;
when the transaction ID exists on the blockchain agent node, confirming that the transaction record corresponding to the transaction ID is not confirmed;
and acquiring the transaction record corresponding to the transaction ID cached in the cache of the terminal, and acquiring the confirmed transaction record of the current user in the block chain network block through a polling interface at the server end.
Further, after the step of obtaining the transaction record corresponding to the transaction ID cached in the cache of the terminal and obtaining the confirmed transaction record of the current user in the blockchain network block through the server-side polling interface, the method further includes:
displaying the transaction record corresponding to the transaction ID cached in the cache of the terminal on a transaction record display interface in a corresponding unconfirmed state;
and/or
And displaying the confirmed transaction record of the current user in the block chain network block acquired through the server-side polling interface on a transaction record display interface in a corresponding confirmed state.
Further, the method also comprises the following steps:
and reading the transaction record data of the latest block in the block chain network block at a corresponding updating frequency according to the growth speed of the block chain network block, and storing the transaction record data of the latest block in a preset record database of the server.
Further, the step of obtaining the confirmed transaction record of the current user in the blockchain network block through the server-side polling interface includes:
and acquiring the confirmed transaction record of the current user in the blockchain network block by calling the server-side polling interface according to the address of the mobile wallet of the current user and the block height parameter.
Further, the unconfirmed state comprises a confirmed state of the transaction ID at the blockchain agent node or a to-be-confirmed state of the transaction ID at the blockchain agent node;
the confirmed status includes that the transaction ID has been confirmed by a mineworker, a failed transaction, or a successful transaction.
The invention also provides a transaction record management system based on the block chain technology, which comprises the following steps:
the wallet transaction caching module is used for acquiring transaction IDs generated by account transfer transactions of current users and caching the transaction IDs in a cache of a terminal, wherein each transaction ID corresponds to a transaction record and comprises a unique string code HASH value of the transaction; inquiring whether the transaction ID exists on a block chain agent node according to the transaction ID stored in the cache; when the transaction ID does not exist on the blockchain agent node, confirming that the transaction record corresponding to the transaction ID is confirmed, deleting the transaction ID corresponding to the cache, and acquiring the transaction record corresponding to the transaction ID cached in the cache of the terminal; and when the transaction ID exists on the blockchain agent node, confirming that the transaction record corresponding to the transaction ID is not confirmed;
and the transaction polling module is used for acquiring the confirmed transaction record of the current user in the block chain network block through the server polling interface.
Further, the transaction record management system based on the blockchain technology further includes:
the transaction record display module is used for displaying the transaction record corresponding to the transaction ID cached in the cache of the terminal on a transaction record display interface in a corresponding unconfirmed state; and/or
And displaying the confirmed transaction record of the current user in the block chain network block acquired through the server-side polling interface on a transaction record display interface in a corresponding confirmed state.
Further, the transaction polling module of the transaction record management system based on the blockchain technology is further configured to read the transaction record data of the latest block in the blockchain network block at a corresponding update frequency according to the growth speed of the blockchain network block, and store the transaction record data of the latest block in the preset record database of the server.
Further, the transaction polling module is further configured to read transaction record data of a latest block in the blockchain network block at a corresponding update frequency according to the growth speed of the blockchain network block, and store the transaction record data of the latest block in a preset record database of the server.
Further, the transaction polling module is specifically configured to obtain a confirmed transaction record of the current user in the blockchain network block by calling the server-side polling interface according to the address of the mobile wallet of the current user and the block height parameter.
The invention also provides a transaction record management system based on the blockchain technology, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor executes the program to realize the steps of the transaction record management method based on the blockchain technology.
The invention also provides a computer-readable storage medium, on which a computer program is stored, which program, when executed by a processor, carries out the steps of the method for managing transaction records based on blockchain technology as defined in any one of the preceding claims.
In the invention, whether the transaction record corresponding to the transaction ID is stored in the blockchain agent node is inquired on the blockchain agent node, and the transaction record in the cache is deleted and the transaction ID is confirmed, so that the cache occupation is reduced; meanwhile, the confirmed transaction record of the current user in the blockchain network block is obtained through the server-side polling interface, and the mobile terminal only needs to store the transaction ID of the current user which is not confirmed yet, so that a transaction record management mechanism capable of obtaining the confirmed and unconfirmed transaction records of the user is provided; and when needed, the confirmed transaction record of the current user in the block chain network block is obtained from the server, so that the storage space requirement of the mobile equipment is reduced.
Drawings
Fig. 1 is a schematic network structure of a mobile wallet system based on blockchain technology according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating a hardware configuration of a transaction record management system based on blockchain technology according to an embodiment of the present invention;
FIG. 3 is a block chain technology-based transaction record management system according to an embodiment of the present invention;
fig. 4 is a diagram illustrating the effect of a specific example of transaction record presentation according to the present invention.
FIG. 5 is a diagram illustrating an effect of another state of the specific example presented in the transaction record of FIG. 4;
FIG. 6 is a flowchart of a transaction record management method based on blockchain technology according to a first embodiment of the present invention;
FIG. 7 is a flowchart of a transaction record management method based on blockchain technology according to a second embodiment of the present invention;
FIG. 8 is a flowchart of a transaction record management method based on blockchain technology according to a third embodiment of the present invention;
fig. 9 is a flowchart of a transaction record management method based on blockchain technology according to a fourth 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.
In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for facilitating the explanation of the present invention, and have no specific meaning in itself. Thus, "module", "component" or "unit" may be used mixedly.
Referring to fig. 1, fig. 1 is a schematic network structure diagram of a mobile wallet system based on a blockchain technology in various embodiments of the present invention, where the mobile wallet system includes a blockchain proxy node 10, a server 20, and a mobile terminal 30. Wherein the mobile terminal 30 has a mobile wallet application running thereon based on blockchain technology.
The mobile wallet application based on the blockchain technology is a client tool capable of realizing transaction management and address management of blockchain virtual money, the mobile wallets are also called light wallets, communication between the mobile wallets and the mobile wallets can be completed only by supporting proxy nodes on a server side, and a traditional pc wallet is an independent node and does not need the server to provide proxy services.
In the mobile wallet system network, the blockchain agent node 10 is an access module of the blockchain network, each blockchain agent node 10 stores all transaction records of the whole blockchain network, and operations related to the blockchain network, such as query of each wallet transaction, submission of transfer transaction for confirmation of a miner node, and the like, can be realized through the blockchain agent node 10.
The server 20 is configured to provide a proxy node for the mobile wallet application, so as to implement communication between multiple mobile wallets, and the server 20 stores a transaction record database, which also stores all transaction records of the whole blockchain network.
The mobile terminal 30 runs a mobile wallet application based on the blockchain technology, and a user can initiate transactions such as transfer, transaction and inquiry through the mobile wallet application.
Please refer to fig. 2, which is a hardware structure diagram of a transaction record management system 100 based on the blockchain technique according to various embodiments of the present invention. The transaction record management system based on the blockchain technology can be a server terminal 20 for managing transaction records, and can also be a mobile terminal 30 provided with a mobile wallet application based on the blockchain technology.
The transaction record management system 100 based on the blockchain technology includes components such as a communication module 11, a memory 21, and a processor 31. Wherein, the processor 31 is connected to the memory 21 and the communication module 11, respectively, and the memory 21 stores thereon a computer program, which is executed by the processor 30 at the same time.
The communication module 11 may be connected to an external device, such as a remote scanner, via a network. The communication module 11 may receive a request from an external communication device, and may also send an event, an instruction, and information to the external device and/or other server. The external communication device may be another mobile terminal 30, a server 20 or a blockchain proxy node 10.
The memory 20 may be used to store software programs as well as various data. The memory 20 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and the like; the storage data area may store data or information created according to the use of the transaction management system based on the blockchain technology, or the like. Further, the memory 20 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 30, which is the control center of the transaction record management system, connects various parts of the entire transaction record management system using various interfaces and lines, and performs various functions of the transaction record management system and processes data by running or executing software programs and/or modules stored in the memory 20 and calling data stored in the memory 20. Processor 30 may include one or more processing units; preferably, the processor 30 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 30.
Although not shown in fig. 1, the transaction record management system 100 may further include a circuit control module for connecting to a power supply to implement power supply control.
Those skilled in the art will appreciate that the architecture of the blockchain technology based transaction record management system shown in fig. 1 does not constitute a limitation of the blockchain technology based transaction record management system and may include more or fewer components than shown, or some components may be combined, or a different arrangement of components.
Please refer to fig. 3, which is a schematic structural diagram of functional modules of the transaction record management system 100 based on the blockchain technique according to an embodiment of the present invention. The transaction record management system based on the blockchain technology can be a server terminal 20 for managing transaction records, and can also be a mobile terminal 30 provided with a mobile wallet application based on the blockchain technology.
The transaction record management system 100 based on the blockchain technology includes: a wallet transaction caching module 12 and a transaction polling module 22.
The wallet transaction cache module 12 is configured to obtain a transaction ID generated by a current user occurring a transfer transaction, and cache the transaction ID in a cache of a terminal. Each transaction ID corresponds to a transaction record, and the transaction ID comprises a unique character string code HASH value of the transaction.
Specifically, each operation of transferring accounts, digging mines and the like of a user on the block chain network generates a transaction, each transaction record is generated in the block chain and comprises a unique character string code, and the unique character string code is called as a transaction hash value and is a transaction ID corresponding to the transaction record; the specific information of the current transaction, such as the roll-out party, the roll-in party, the roll-out quantity, the roll-out time, the transaction hash value and the like, can be inquired through the transaction ID.
The wallet transaction cache module 12 is further configured to query, according to the transaction ID stored in the cache, whether the transaction ID exists on a blockchain proxy node; when the transaction ID does not exist on the blockchain agent node, confirming that the transaction record corresponding to the transaction ID is confirmed, and deleting the corresponding transaction ID in the cache; and confirming that the transaction record corresponding to the transaction ID is not confirmed when the transaction ID exists on the blockchain agent node.
Specifically, the wallet transaction cache module 12 first loads the transaction ID currently stored in the cache, and then queries, on the blockchain agent node 10 through a blockchain agent interface, whether the transaction record corresponding to the transaction ID is also stored on the blockchain agent node 10; if so, confirming that the transaction record corresponding to the transaction ID is not confirmed, for example, the transaction ID is in a confirmation state of the blockchain agent node, or the transaction ID is in a to-be-confirmed state of the blockchain agent node; if the transaction record corresponding to the transaction ID is not found on the blockchain agent node 10, it is confirmed that the transaction record corresponding to the transaction ID is confirmed, for example, the transaction ID is confirmed by miners, a failed transaction, or a successful transaction, and then the transaction ID still in the cache needs to be deleted until all transaction IDs are confirmed.
Further, the wallet transaction caching module 12 periodically queries the blockchain proxy node 10 for the presence of the transaction ID at preset time intervals.
The wallet transaction cache module 12 is further configured to obtain a transaction record corresponding to the transaction ID cached in the cache of the terminal.
The transaction polling module 22 is configured to obtain a confirmed transaction record of a current user in a blockchain network block through a server-side polling interface.
In this embodiment, the wallet transaction caching module 12 queries whether the transaction record corresponding to the transaction ID is still stored on the blockchain agent node 10, and deletes the transaction record in time after the transaction ID is confirmed, thereby reducing cache occupation; meanwhile, the wallet transaction cache module 12 acquires the transaction record corresponding to the transaction ID cached in the terminal cache, the transaction polling module 22 acquires the confirmed transaction record of the current user in the blockchain network block through the server-side polling interface, and the mobile terminal only needs to store the transaction ID of the current user which is not confirmed yet, so that a transaction record management mechanism capable of acquiring the confirmed and unconfirmed transaction records of the user is provided; when needed, the confirmed transaction record of the current user in the network block of the block chain is obtained from the server 20, so that the requirement on the storage space of the mobile device is reduced.
Further, the transaction record management system 100 based on the blockchain technique further includes:
the transaction record display module 32 is configured to display the transaction record corresponding to the transaction ID cached in the cache of the terminal on a transaction record display interface in a corresponding unconfirmed state; and/or
And displaying the confirmed transaction record of the current user in the block chain network block acquired through the server-side polling interface on a transaction record display interface in a corresponding confirmed state.
Specifically, when a user initiates a request for sending a transaction record display, the transaction record display module 32 is started to load the unconfirmed transaction records, that is, the transaction records corresponding to the transaction IDs in the cache of the terminal, respectively; and confirmed transaction records, i.e., transaction records stored in the blockchain network block. The two transaction record information are combined together to form a relatively complete transaction record display view.
Specifically, referring to fig. 4 and 5 together, 4A is an unconfirmed transaction ID stored in the blockchain proxy node 10, 4B is an unconfirmed transaction ID stored in the wallet transaction cache, 4C is a transaction record contained in a block in the blockchain network, and 4D is a transaction record display interface (no transaction record) of the mobile wallet; when the transaction ID of 10000 is confirmed in the blockchain agent node 10, it is removed from the blockchain agent node 10 as shown in 5A, and a corresponding transaction record is generated in the blockchain network block as shown in 5C; at this time, the wallet transaction cache module 12 queries, through the blockchain proxy interface, on the blockchain proxy node 10 whether the transaction record corresponding to the transaction ID of 10000 is still stored in the blockchain proxy node 10, and at this time, the transaction ID of 10000 is not already in the blockchain proxy node 10, which indicates that the current miner has confirmed the transaction, and then a transaction record with the ID of 10000 is added to the blockchain network at this time, and the transaction ID of 10000 in the wallet transaction cache module 12 is deleted as shown in fig. 5B; as shown in fig. 5D, when the user initiates a request for displaying a transaction record, on the transaction record display interface of the mobile wallet, the transaction record in the transaction cache of the wallet, that is, the transaction of 10001, is preferentially added, and then the confirmed transaction record is loaded from the polling program according to the time sequence, and meanwhile, it can also be found that the transaction record of clear 10000 is also synchronized in the transaction cache of the wallet, and the whole transaction record is displayed and dynamically changed in this way.
Further, the transaction polling module 22 is specifically configured to read the transaction record data of the latest block in the blockchain network block at a corresponding update frequency according to the growth speed of the blockchain network block, and store the transaction record data of the latest block in a preset record database of the server 20.
Specifically, the block chain is formed by connecting a series of blocks according to a time sequence, each block includes a plurality of transaction data, and the transaction polling module 22 reads the transaction record data of the latest block in the block chain network block at a preset update frequency, and stores the transaction record data of the latest block in the preset record database of the server 20, so that the server 20 can store the latest transaction record database, thereby ensuring that all transaction records of the whole block chain network are stored.
Further, the transaction polling module 22 is specifically configured to obtain the confirmed transaction record of the current user in the blockchain network block by calling the server-side polling interface according to the address of the mobile wallet of the current user and the block height parameter.
Optionally, in an embodiment, the transaction record management system 100 based on the blockchain technique further includes:
and the transaction inquiry module 42 is used for responding to an inquiry request of a user and requesting the specific information of the selected transaction record from the blockchain agent node 10. The specific information includes, but is not limited to, information of a roll-out party, a roll-in party, a roll-out quantity, a roll-out time, a transaction hash value and the like of the transaction record.
Referring to fig. 6, fig. 6 is a flowchart illustrating a transaction record management method 601 based on blockchain technology according to a first embodiment of the present invention, wherein a terminal to which the transaction record management method 601 based on blockchain technology is applied may be a mobile terminal 30 installed with a mobile wallet application based on blockchain technology, such as a smart phone, a tablet computer, a mobile PC, and the like. Specifically, the transaction record management method 601 based on the blockchain technology includes the steps of:
step S1, obtaining transaction IDs generated by account transfer transactions of current users, and caching the transaction IDs in a cache of a terminal, wherein each transaction ID corresponds to a transaction record and comprises a unique string code HASH value of the transaction.
Specifically, each operation of transferring accounts, digging mines and the like of a user on the block chain network generates a transaction, each transaction record is generated in the block chain and comprises a unique character string code, and the unique character string code is called as a transaction hash value and is a transaction ID corresponding to the transaction record; the specific information of the current transaction, such as the roll-out party, the roll-in party, the roll-out quantity, the roll-out time, the transaction hash value and the like, can be inquired through the transaction ID. The wallet transaction cache module 12 obtains a transaction ID generated by a transfer transaction of a current user, and caches the transaction ID in a cache of a terminal.
Step 2, inquiring whether the transaction ID exists on the block chain agent node according to the transaction ID stored in the cache;
step S31, when the transaction ID does not exist on the blockchain agent node, confirming that the transaction record corresponding to the transaction ID is confirmed, and deleting the corresponding transaction ID in the cache;
step S32, when the transaction ID exists on the blockchain agent node, it is determined that the transaction record corresponding to the transaction ID is not yet determined.
Specifically, the wallet transaction cache module 12 first loads the transaction ID currently stored in the cache, and then queries, on the blockchain agent node 10 through a blockchain agent interface, whether the transaction record corresponding to the transaction ID is also stored on the blockchain agent node 10; if so, confirming that the transaction record corresponding to the transaction ID is not confirmed, for example, the transaction ID is in a confirmation state of the blockchain agent node, or the transaction ID is in a to-be-confirmed state of the blockchain agent node; if the transaction record corresponding to the transaction ID is not found on the blockchain agent node 10, it is confirmed that the transaction record corresponding to the transaction ID is confirmed, for example, the transaction ID is confirmed by miners, a failed transaction, or a successful transaction, and then the transaction ID still in the cache needs to be deleted until all transaction IDs are confirmed.
Step S4, obtaining the transaction record corresponding to the transaction ID cached in the cache of the terminal, and obtaining the confirmed transaction record of the current user in the blockchain network block through the server-side polling interface.
Specifically, the wallet transaction cache module 12 obtains the transaction record corresponding to the transaction ID cached in the cache of the terminal; the transaction polling module 22 obtains the confirmed transaction record of the current user in the blockchain network block through the server-side polling interface.
In this embodiment, by querying whether the transaction record corresponding to the transaction ID is still stored in the blockchain agent node 10 on the blockchain agent node 10, the transaction record in the cache is deleted in time after the transaction ID is confirmed, so that cache occupation is reduced; meanwhile, the wallet transaction cache module 12 acquires the transaction record corresponding to the transaction ID cached in the terminal cache, and the transaction polling module 22 acquires the confirmed transaction record of the current user in the blockchain network block through the server-side polling interface, so that the mobile terminal only needs to store the transaction ID of the current user which is not yet confirmed, and acquires the confirmed transaction record of the current user in the blockchain network block from the server-side 20 when needed, thereby reducing the storage space requirement of the mobile device, and providing a transaction record management mechanism capable of acquiring the confirmed and unconfirmed transaction records of the user.
Further, in the step S2, the wallet transaction caching module 12 periodically queries the blockchain proxy node 10 for the presence of the transaction ID at preset time intervals.
Referring to fig. 7, a transaction record management method 702 based on the blockchain technology in the second embodiment of the present invention is proposed based on the first embodiment of the transaction record management method based on the blockchain technology in the present invention, in this embodiment, the steps S1 to S4 are the same as those in the first embodiment, and are not repeated herein; after step S4, the method further includes:
step S5, displaying the transaction record corresponding to the transaction ID cached in the cache of the terminal on a transaction record display interface in a corresponding unconfirmed state;
and/or
And displaying the confirmed transaction record of the current user in the block chain network block acquired through the server-side polling interface on a transaction record display interface in a corresponding confirmed state.
It can be understood that, when a user initiates a request for sending a transaction record display, the transaction record display module 32 starts to load the unconfirmed transaction records, that is, the transaction records corresponding to the transaction IDs in the cache of the terminal, respectively; and confirmed transaction records, i.e., transaction records stored in the blockchain network block. The two transaction record information are combined together to form a relatively complete transaction record display view.
Specifically, referring to fig. 4 and 5 together, 4A is an unconfirmed transaction ID stored in the blockchain proxy node 10, 4B is an unconfirmed transaction ID stored in the wallet transaction cache, 4C is a transaction record contained in a block in the blockchain network, and 4D is a transaction record display interface (no transaction record) of the mobile wallet; when the transaction ID of 10000 is confirmed in the blockchain agent node 10, it is removed from the blockchain agent node 10 as shown in 5A, and a corresponding transaction record is generated in the blockchain network block as shown in 5C; at this time, the wallet transaction cache module 12 queries, through the blockchain proxy interface, on the blockchain proxy node 10 whether the transaction record corresponding to the transaction ID of 10000 is still stored in the blockchain proxy node 10, and at this time, the transaction ID of 10000 is not already in the blockchain proxy node 10, which indicates that the current miner has confirmed the transaction, and then a transaction record with the ID of 10000 is added to the blockchain network at this time, and the transaction ID of 10000 in the wallet transaction cache module 12 is deleted as shown in fig. 5B; as shown in fig. 5D, when the user initiates a request for displaying a transaction record, on the transaction record display interface of the mobile wallet, the transaction record in the transaction cache of the wallet, that is, the transaction of 10001, is preferentially added, and then the confirmed transaction record is loaded from the polling program according to the time sequence, and meanwhile, it can also be found that the transaction record of clear 10000 is also synchronized in the transaction cache of the wallet, and the whole transaction record is displayed and dynamically changed in this way.
Referring to fig. 8, a transaction record management method 803 based on the blockchain technique in the third embodiment of the present invention is proposed based on the first embodiment of the transaction record management method based on the blockchain technique of the present invention, and in this embodiment, the steps S1 to S4 are the same as those in the first embodiment, and are not repeated herein; wherein, still include the step:
step S6, according to the growth rate of the blockchain network block, reading the transaction record data of the latest block in the blockchain network block at a corresponding update frequency, and storing the transaction record data of the latest block in a preset record database of the server.
Specifically, the block chain is formed by connecting a series of blocks according to a time sequence, each block includes a plurality of transaction data, and the transaction polling module 22 reads the transaction record data of the latest block in the block chain network block at a preset update frequency, and stores the transaction record data of the latest block in the preset record database of the server 20, so that the server 20 can store the latest transaction record database, thereby ensuring that all transaction records of the whole block chain network are stored.
Optionally, in an embodiment, in the step S4, the step of obtaining the transaction record corresponding to the transaction ID cached in the cache of the terminal includes: and acquiring the confirmed transaction record of the current user in the blockchain network block by calling the server-side polling interface according to the address of the mobile wallet of the current user and the block height parameter.
Optionally, the unconfirmed state includes a confirmed state of the transaction ID at the blockchain agent node or a to-be-confirmed state of the transaction ID at the blockchain agent node;
the confirmed status bar includes whether the transaction ID has been confirmed by a mineworker, a failed transaction, or a successful transaction.
Referring to fig. 9, a transaction record management method 904 based on the blockchain technique is provided in a fourth embodiment of the invention according to the first embodiment of the transaction record management method based on the blockchain technique of the invention, and in this embodiment, the steps S1 to S4 are the same as those in the first embodiment, and are not repeated herein; wherein, still include the step:
step S7, responding to the query request of the user, requests the blockchain agent node 10 for the specific information of the selected transaction record. The specific information includes, but is not limited to, information of a roll-out party, a roll-in party, a roll-out quantity, a roll-out time, a transaction hash value and the like of the transaction record.
It is understood that the location and order of the step S7 are not limited, and the user may perform the step S7 before, after, or in between any steps.
Referring to fig. 2 again, the transaction record management system 100 based on the blockchain technology in an embodiment of the present invention includes a memory 21 and a processor 31, where the memory 21 stores a computer program, and the processor 31 implements the steps of the transaction record management method based on the blockchain technology in any of the above embodiments when executing the computer program, and detailed steps are not described herein again.
The present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, can implement the steps of the transaction record management method based on the blockchain technology in any of the above embodiments, and specific steps are not described herein again.
It is to be understood that throughout the description of the present specification, reference to the term "one embodiment", "another embodiment", "other embodiments", or "first through nth embodiments", etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
It should be understood that the above is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all equivalent structures or equivalent flow transformations made by the present specification and drawings, or applied directly or indirectly to other related technical fields, are included in the scope of the present invention.

Claims (7)

1. A transaction record management method based on block chain technology is characterized by comprising the following steps:
acquiring transaction IDs generated by account transfer transactions of current users, and caching the transaction IDs in a cache of a terminal, wherein each transaction ID corresponds to a transaction record and comprises a unique string code HASH value of the transaction;
inquiring whether the transaction ID exists on a block chain agent node according to the transaction ID stored in the cache;
when the transaction ID does not exist on the blockchain agent node, confirming that the transaction record corresponding to the transaction ID is confirmed, and deleting the corresponding transaction ID in the cache;
when the transaction ID exists on the blockchain agent node, confirming that the transaction record corresponding to the transaction ID is not confirmed;
acquiring the transaction record corresponding to the transaction ID cached in the cache of the terminal, and acquiring the confirmed transaction record of the current user in the block chain network block through a server-side polling interface;
after the steps of obtaining the transaction record corresponding to the transaction ID cached in the cache of the terminal and obtaining the confirmed transaction record of the current user in the blockchain network block through the server-side polling interface, the method further includes:
displaying the transaction record corresponding to the transaction ID cached in the cache of the terminal on a transaction record display interface in a corresponding unconfirmed state;
and/or
The confirmed transaction records of the current user in the block chain network block are obtained through the server-side polling interface and displayed on a transaction record display interface in a corresponding confirmed state;
when a user initiates a request for sending a transaction record display, transaction records in a wallet transaction cache are preferentially added on a transaction record display interface of the mobile wallet, and then confirmed transaction records are loaded from a polling program according to a time sequence.
2. The blockchain technology based transaction record management method of claim 1, further comprising the steps of:
and reading the transaction record data of the latest block in the block chain network block at a corresponding updating frequency according to the growth speed of the block chain network block, and storing the transaction record data of the latest block in a preset record database of the server.
3. The blockchain technology based transaction record management method of claim 1, wherein the step of obtaining the confirmed transaction record of the current user in the blockchain network block through the server-side polling interface comprises:
and acquiring the confirmed transaction record of the current user in the blockchain network block by calling the server-side polling interface according to the address of the mobile wallet of the current user and the block height parameter.
4. A system for transaction record management based on blockchain technology, comprising:
the wallet transaction caching module is used for acquiring transaction IDs generated by account transfer transactions of current users and caching the transaction IDs in a cache of a terminal, wherein each transaction ID corresponds to a transaction record and comprises a unique string code HASH value of the transaction; according to the transaction ID stored in the cache, whether the transaction ID exists is inquired on a block chain agent node regularly according to a preset time interval; when the transaction ID does not exist on the blockchain agent node, confirming that the transaction record corresponding to the transaction ID is confirmed, deleting the transaction ID corresponding to the cache, and acquiring the transaction record corresponding to the transaction ID cached in the cache of the terminal; and when the transaction ID exists on the blockchain agent node, confirming that the transaction record corresponding to the transaction ID is not confirmed;
the transaction polling module is used for acquiring confirmed transaction records of the current user in the block chain network block through the server polling interface;
wherein, the transaction record management system based on the block chain technology further comprises:
the transaction record display module is used for displaying the transaction record corresponding to the transaction ID cached in the cache of the terminal on a transaction record display interface in a corresponding unconfirmed state; and/or
The confirmed transaction records of the current user in the block chain network block are obtained through the server-side polling interface and displayed on a transaction record display interface in a corresponding confirmed state;
when a user initiates a request for sending a transaction record display, transaction records in a wallet transaction cache are preferentially added on a transaction record display interface of the mobile wallet, and then confirmed transaction records are loaded from a polling program according to a time sequence.
5. The system according to claim 4, wherein the transaction polling module is further configured to read the transaction record data of the latest block of the blockchain network blocks at a corresponding update frequency according to the growth rate of the blockchain network blocks, and store the transaction record data of the latest block in the preset record database at the server.
6. The blockchain technology-based transaction record management system of claim 4, wherein the transaction polling module is specifically configured to obtain the confirmed transaction record of the current user in the blockchain network block by calling the server-side polling interface according to the address of the mobile wallet of the current user and the block height parameter.
7. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method for transaction record management based on blockchain technology according to one of claims 1 to 3.
CN201711299394.5A 2017-12-08 2017-12-08 Transaction record management method, system and storage medium based on block chain technology Expired - Fee Related CN108960801B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711299394.5A CN108960801B (en) 2017-12-08 2017-12-08 Transaction record management method, system and storage medium based on block chain technology

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711299394.5A CN108960801B (en) 2017-12-08 2017-12-08 Transaction record management method, system and storage medium based on block chain technology

Publications (2)

Publication Number Publication Date
CN108960801A CN108960801A (en) 2018-12-07
CN108960801B true CN108960801B (en) 2020-05-15

Family

ID=64495347

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711299394.5A Expired - Fee Related CN108960801B (en) 2017-12-08 2017-12-08 Transaction record management method, system and storage medium based on block chain technology

Country Status (1)

Country Link
CN (1) CN108960801B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109741171B (en) * 2018-12-26 2024-01-30 中国银联股份有限公司 Cross-border money transfer information registration method and device
CN110349029B (en) * 2019-07-17 2022-04-15 中国银行股份有限公司 Block chain-based transaction consistency processing method, device and system
CN110472977B (en) * 2019-08-20 2023-09-19 深圳市迅雷网络技术有限公司 Transaction record generation method of blockchain and related equipment

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1681246A (en) * 2004-06-30 2005-10-12 中国银行股份有限公司 Payment system and method for customs tax by internet
JP6425808B2 (en) * 2014-07-11 2018-11-21 ロイヤル コーポレイション Decentralized Ledger Protocol Encouraging Trade and Non-Trading Commerce
CN107169055B (en) * 2017-04-27 2019-10-18 北京众享比特科技有限公司 A kind of operating method and operating system of database table
CN107317672A (en) * 2017-05-10 2017-11-03 广东网金控股股份有限公司 A kind of light weight terminating machine block catenary system
CN107332826B (en) * 2017-06-09 2019-12-03 中国联合网络通信集团有限公司 The communication means and device of block chain agent node

Also Published As

Publication number Publication date
CN108960801A (en) 2018-12-07

Similar Documents

Publication Publication Date Title
CN101064630B (en) Data synchronization method and system
CN100334583C (en) Smart card enabled mobile personal computing environment system
CN108960801B (en) Transaction record management method, system and storage medium based on block chain technology
CN102088519A (en) Address book management method and device
EP2086204A2 (en) Method and system for data synchronisation between network devices
CN101923571B (en) Method and device for managing terminal data logging
JP2001522074A (en) Communication system and method
CN101340425A (en) Method and apparatus for data synchronization between terminals
CN102227901A (en) Trickle sync protocol
CN105677250A (en) Method and device for updating object data in object storage system
CN109684282A (en) A kind of method and device constructing metadata cache
CN105868251A (en) Cache data updating method and device
US9311622B2 (en) Resolving mutations in a partially-loaded spreadsheet model
CN105530269B (en) Data interactive method and system and server
CN109582329A (en) Data management and method for subscribing, device, system, electronic equipment and storage medium
CN103455599A (en) Method, equipment and system for data synchronism
CN103634444A (en) Method and system for providing number information
CN111400334A (en) Data processing method, data processing device, storage medium and electronic device
CN101730085B (en) Address book data synchronizing method and system
JP4719732B2 (en) Backup server, mobile device, communication system using these, and backup method
CN107741994B (en) Data updating method and device
CN103327480A (en) Intelligent mobile phone multiple-account contact information synchronizing method
EP1383054A1 (en) Data synchronization procedures for smartcards
CN114020321B (en) Intelligent application interface making system and method based on user behavior data
CN109165259A (en) Index table updating method, processor and storage device based on network attached storage

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20200423

Address after: Room 202, 2nd floor, F1 Building, Yuanjun Shuyuan International Media Industry Park, No. 8 Gaojing Cultural Park Road, Chaoyang District, Beijing

Applicant after: Puhua Yunchuang Technology (Beijing) Co.,Ltd.

Address before: 100036 No. 141, Gate 1, 3rd Floor, No. 14 Fuxing Road, Haidian District, Beijing

Applicant before: Zhai Hongying

GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20200515

Termination date: 20211208