CN110728504A - Data processing method, device and equipment of block chain and readable storage medium - Google Patents

Data processing method, device and equipment of block chain and readable storage medium Download PDF

Info

Publication number
CN110728504A
CN110728504A CN201910845674.4A CN201910845674A CN110728504A CN 110728504 A CN110728504 A CN 110728504A CN 201910845674 A CN201910845674 A CN 201910845674A CN 110728504 A CN110728504 A CN 110728504A
Authority
CN
China
Prior art keywords
account
blockchain
data processing
transaction
transaction information
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
CN201910845674.4A
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 One Wallet E Commerce Co Ltd
Original Assignee
Ping An One Wallet E Commerce 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 One Wallet E Commerce Co Ltd filed Critical Ping An One Wallet E Commerce Co Ltd
Priority to CN201910845674.4A priority Critical patent/CN110728504A/en
Publication of CN110728504A publication Critical patent/CN110728504A/en
Pending legal-status Critical Current

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
    • 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/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/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3825Use of electronic signatures
    • 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/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3827Use of message hashing
    • 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/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management

Landscapes

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

Abstract

The invention belongs to the technical field of data processing, and provides a data processing method of a block chain, which comprises the following steps: monitoring each account in the block chain system in a preset period so as to determine a hot account from each account; obtaining a plurality of non-spending transaction outputs associated with the hotspot account; merging the obtained plurality of non-spending transaction outputs to obtain a target non-spending transaction output; and converting the non-cost state output by the target non-cost transaction into the balance state of the account balance model corresponding to the hotspot account. The invention also provides a data processing device, equipment and a readable storage medium of the block chain. The invention can optimize the account balance calculation mode, improve the operation efficiency of the block chain system and improve the account balance inquiry experience.

Description

Data processing method, device and equipment of block chain and readable storage medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a method, an apparatus, a device, and a readable storage medium for processing data of a block chain.
Background
UTXO (unspent Transaction Output), a common model of blockchain, describes the unspent Transaction Output owned by each account, and records Transaction events, e.g., one account a (100 ten thousand old) transfers 10 ten thousand dollars of transactions to account B, which is recorded as follows:
account A100 ten thousand- - > Account B10 ten thousand
- - > Account A90 ten thousand
One record on the left is input, two records on the right are output, and three transfer events recorded by the account A are UTXO of the account A.
Then, when the balance of an account needs to be queried at a certain time, the blockchain needs to be traversed to search for all UTXOs related to the account for calculation, and as time goes on, the transaction operation times of the account increase, the UTXOs related to the account become more and more, and at the next time of query, the blockchain needs to be traversed again to search for all UTXOs related to the account for calculation, that is, all the UTXOs related to the account currently need to be searched for calculation once when the balance of the account is queried, and this replay calculation method not only consumes time, but also affects the operation efficiency of the blockchain and affects the query experience of the balance of the account.
Disclosure of Invention
The invention mainly aims to provide a data processing method, a data processing device, data processing equipment and a readable storage medium for a block chain, and aims to solve the technical problems that the existing mode of replaying and calculating account balance influences the operation efficiency of the block chain and influences the account balance inquiry experience.
In order to achieve the above object, the present invention provides a data processing method for a block chain, including the following steps:
monitoring each account in the block chain system in a preset period so as to determine a hot account from each account;
obtaining a plurality of non-spending transaction outputs associated with the hotspot account;
merging the obtained plurality of non-spending transaction outputs to obtain a target non-spending transaction output;
and converting the non-cost state output by the target non-cost transaction into the balance state of the account balance model corresponding to the hotspot account.
Optionally, before the step of monitoring each account in the blockchain system to determine a hotspot account from the accounts, the method includes:
when the blockchain system receives the transaction information of each account, the validity verification and the re-judgment verification are sequentially carried out on the transaction information of each account;
for accounts for which the transaction information passes validation and revalidation, a related unspent transaction output is created.
Optionally, the step of monitoring each account in the blockchain system within a preset period to determine a hotspot account from each account includes:
monitoring the number of unspent transaction outputs associated with each account during a preset period;
and determining the account with the related amount of the non-spending transaction output exceeding a preset threshold as the hot account.
Optionally, the step of sequentially performing validity verification and revalidation verification on the transaction information of each account includes:
extracting a public key from the transaction information of each account, and performing elliptic curve operation on each extracted public key to obtain an operation address corresponding to each account;
comparing the operation address corresponding to each account with the address of the account balance model corresponding to each account;
confirming that the operation address and the transaction information with the same address pass the validity verification;
extracting a nonce parameter from the transaction information passing the legality, and if the nonce parameter is unique, confirming that the transaction information passing the legality verification passes the re-judgment verification.
Optionally, when the blockchain system receives the transaction information of each account, before the step of sequentially performing validity verification and re-judgment verification on the transaction information of each account, the method includes:
receiving original transaction information of each account through a front-end system of a block chain system;
and preprocessing the original transaction information of each account through the front-end system to obtain the transaction information of each account, and sending the transaction information of each account to the block chain system, wherein the preprocessing comprises recombining the original transaction information of each account according to a format agreed by the front-end system and the block chain system in advance.
Optionally, the step of converting the non-spending status of the target non-spending transaction output into the balance status of the account balance model is followed by:
deleting the acquired plurality of non-spent transaction outputs and retaining the target non-spent transaction output.
Optionally, the method further comprises:
and when the block chain system receives a balance inquiry request aiming at the hot spot account, returning the balance state of the account balance model corresponding to the hot spot account.
In addition, to achieve the above object, the present invention provides a data processing apparatus of a block chain, including:
the monitoring module is used for monitoring each account in the block chain system in a preset period so as to determine a hot spot account from each account;
an acquisition module to acquire a plurality of non-spent transaction outputs associated with the hotspot account;
a merging module, configured to merge the obtained multiple unspent transaction outputs to obtain a target unspent transaction output;
and the conversion module is used for converting the non-cost state output by the target non-cost transaction into the balance state of the account balance model corresponding to the hotspot account.
In addition, to achieve the above object, the present invention further provides a data processing device of a blockchain, including a processor, a memory, and a data processing program of the blockchain stored on the memory and executable by the processor, wherein when the data processing program of the blockchain is executed by the processor, the steps of the data processing method of the blockchain are implemented.
In addition, to achieve the above object, the present invention further provides a readable storage medium, which stores thereon a data processing program of a blockchain, wherein when the data processing program of the blockchain is executed by a processor, the steps of the data processing method of the blockchain are implemented as described above.
The invention provides a data processing method, a device, equipment and a readable storage medium of a block chain, wherein in a preset period, each account in a block chain system is monitored so as to determine a hot account from each account; obtaining a plurality of non-spending transaction outputs associated with the hotspot account; merging the obtained plurality of non-spending transaction outputs to obtain a target non-spending transaction output; and converting the non-cost state output by the target non-cost transaction into the balance state of the account balance model corresponding to the hotspot account. According to the method and the device, the account balance model is used for collecting the related non-cost transaction output of the hot account, the account balance calculation mode is optimized, the operation efficiency of a block chain system is further improved, when the account balance is inquired, the balance state can be directly obtained from the account balance model corresponding to the hot account, replay calculation is not needed, and the inquiry experience of the account balance is improved.
Drawings
Fig. 1 is a schematic diagram of a hardware structure of a data processing apparatus of a block chain according to embodiments of the present invention;
FIG. 2 is a flowchart illustrating a block chain data processing method according to a first embodiment of the present invention;
fig. 3 is a functional block diagram of a data processing apparatus according to a first embodiment of the block chain 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 data processing method of the block chain related to the embodiment of the invention is mainly applied to data processing equipment of the block chain, and the data processing equipment of the block chain can be equipment with display and processing functions such as a Personal Computer (PC), a portable computer and the like.
Referring to fig. 1, fig. 1 is a schematic diagram of a hardware structure of a data processing device of a block chain according to an embodiment of the present invention. In this embodiment of the present invention, the data Processing apparatus of the blockchain may include a processor 1001 (e.g., a Central Processing Unit, CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used for realizing connection communication among the components; the user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard); the network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface); the memory 1005 may be a high-speed RAM memory, or may be a non-volatile memory (e.g., a magnetic disk memory), and optionally, the memory 1005 may be a storage device independent of the processor 1001. Those skilled in the art will appreciate that the hardware configuration depicted in FIG. 1 is not intended to be limiting of the present invention, and may include more or less components than those shown, or some components in combination, or a different arrangement of components.
With continued reference to fig. 1, the memory 1005 of fig. 1, which is one type of readable storage medium, may include an operating system, a network communication module, and a data processing program of a blockchain. In fig. 1, the network communication module is mainly used for connecting to a server and performing data communication with the server; and the processor 1001 may call a data processing program of the blockchain stored in the memory 1005 and execute the data processing method of the blockchain provided by the embodiment of the present invention.
The embodiment of the invention provides a data processing method of a block chain.
Referring to fig. 2, fig. 2 is a flowchart illustrating a data processing method of a block chain according to a first embodiment of the present invention.
In this embodiment, the data processing method of the blockchain is implemented by a data processing device of the blockchain, where the data processing device of the blockchain may be a terminal device such as a PC, a palm computer, a tablet computer, or the like, or may be a server, where the server may be a single server or a server cluster formed by multiple servers, and the data processing method of the blockchain includes the following steps:
step S10, monitoring each account in the blockchain system in a preset period so as to determine a hot spot account from each account;
step S20, obtaining a plurality of non-spending transaction outputs associated with the hotspot account;
step S30, merging the acquired plurality of unspent transaction outputs to obtain a target unspent transaction output;
step S40, converting the state of non-spending of the target UTXO into the balance state of the Account model.
In this embodiment, in addition to each Account in the blockchain system possessing a key pair (public key and private key), the data processing device of the blockchain creates an Account balance Account model for each Account in the blockchain system, where the Account model is used to record the balance status of the corresponding Account. The hash value of the public key of each account is used as the public key address of each account; and carrying out elliptic curve digital signature on the public key of each Account to obtain the address of the Account model of each Account.
In this embodiment, step S10 is preceded by the step of creating an unspent transaction output UTXO for each account for each transaction information of each account, specifically, step S10 is preceded by the step of:
when the blockchain system receives the transaction information of each account, the validity verification and the re-judgment verification are sequentially carried out on the transaction information of each account;
for accounts for which the transaction information passes validation and revalidation, a related unspent transaction output is created.
That is, for an account which frequently performs transaction operations, multiple corresponding transaction information sets may be submitted to the blockchain system at the same time or within a short time, and in consideration of concurrent processing requirements of such accounts, the shunting is performed by using a way of dynamically creating the UTXO, so that as long as transaction information of an account is submitted to the blockchain system, a relevant UTXO is created for the transaction information of the account, and in consideration of security and processing resource saving, before creating a relevant UTXO for the transaction information of an account, the transaction information of each account is sequentially subjected to validity verification and re-validation, and as for an account whose transaction information passes the validity verification and re-validation, a relevant UTXO (associated with a public key address of the account) is created for the transaction information of the account, thereby preventing illegal and/or repeated transaction information from being processed.
Therefore, accounts which are frequently subjected to transaction operation can be determined according to the number of the UTXOs, the accounts are defined as hot spot accounts in the embodiment, and due to the fact that the number of the UTXOs related to the hot spot accounts is large, when Account balance inquiry requirements exist, time is consumed and loads are increased by replaying a mode of calculating Account balances, therefore, the UTXOs related to the hot spot accounts are collected by using an Account model, the Account balance calculation mode is optimized, the operation efficiency of a block chain system is improved, and the inquiry experience of the Account balances is improved.
The specific steps for implementing data processing of the blockchain of the present invention are described in detail below:
step S10, monitoring each account in the blockchain system to determine a hotspot account from each account;
wherein, step S10 includes:
monitoring the number of unspent transaction outputs associated with each account during a preset period;
and determining the account with the related amount of the non-spending transaction output exceeding a preset threshold as the hot account.
That is, a period is preset, in the preset period, the number of UTXOs of each account is counted according to the public key address of each account, and when it is monitored that the number of UTXOs related to a certain account reaches a preset threshold (for example, more than 2), the account is determined as a hot account. The preset period may be set according to an actual situation, which is not limited in this embodiment.
Step S20, obtaining a plurality of non-spending transaction outputs associated with the hotspot account;
after the hot account is determined, a plurality of UTXOs related to the hot account are obtained according to the public key address of the hot account.
Step S30, merging the acquired plurality of unspent transaction outputs to obtain a target unspent transaction output;
and then combining the plurality of UTXOs related to the hot spot account, combining the plurality of UTXOs into a new UTXO (defined as a target UTXO), namely respectively summarizing the non-cost state and the cost state of the plurality of UTXOs related to the hot spot account, summarizing the obtained non-cost state and cost state, and forming the target UTXO.
Step S40, converting the non-spending state output by the target non-spending transaction into the balance state of the account balance model corresponding to the hotspot account.
And then, synchronizing the non-cost state of the target UTXO into the Account model corresponding to the hotspot Account to convert the non-cost state of the target UTXO into the balance state of the Account model, so that the calculation mode of the Account balance is optimized, and the operation efficiency of the block chain is improved.
After the step of converting the non-spent state of the target UTXO to the balance state of the Account model, the method includes:
deleting the acquired plurality of non-spent transaction outputs and retaining the target non-spent transaction output.
After the block chain system is subjected to merging operation, the UTXO model before merging can be deleted, so that the storage space of the block chain system is saved, and the target UTXO model obtained by the current merging operation is reserved as the basis of the next merging.
Further, the method further comprises:
and when the block chain system receives a balance inquiry request aiming at the hot spot account, returning the balance state recorded in the account balance model corresponding to the hot spot account.
That is, when the blockchain system receives a balance inquiry request for a hot account, the balance state is directly acquired from the account balance model corresponding to the hot account and returned, so that replay calculation on the relevant UTXO is avoided when the account balance inquiry is received, and the inquiry experience of the account balance is improved.
The embodiment provides a data processing method of a blockchain, which includes monitoring each account in a blockchain system in a preset period to determine a hotspot account from each account; obtaining a plurality of non-spending transaction outputs associated with the hotspot account; merging the obtained plurality of non-spending transaction outputs to obtain a target non-spending transaction output; and converting the non-cost state output by the target non-cost transaction into the balance state of the account balance model corresponding to the hotspot account. In the embodiment, the UTXO related to the hot account is collected by using the account balance model, so that the account balance calculation mode is optimized, the operation efficiency of the block chain system is further improved, when the account balance is inquired, the balance state can be directly obtained from the account balance model corresponding to the hot account, the replay calculation is not needed, and the inquiry experience of the account balance is improved.
Further, based on the first embodiment, a second embodiment of the data processing method of the blockchain of the present invention is provided, and the difference from the foregoing embodiment is that before the step of sequentially performing validity verification and re-judgment verification on the transaction information of each account when the blockchain system receives the transaction information of each account, the method includes:
receiving original transaction information of each account through a front-end system of a block chain system;
and preprocessing the original transaction information of each account through the front-end system to obtain the transaction information of each account, and sending the transaction information to the block chain system.
That is, in order to reduce the load of the blockchain system, a front-end system may be set up for the blockchain system in advance, and before the transaction information of each account is submitted to the blockchain system, the front-end system preprocesses the original transaction information of each account to obtain the transaction information of each account, and then the transaction information is submitted to the blockchain system by the front-end system. Specifically, before the original transaction information of each Account is submitted to the front-end system, according to the convention with the front-end system, a unique identifier-nonce token nonce parameter must be added, the nonce parameter is a kind of anti-duplication parameter, generally, the value of the nonce parameter is counted from 0, each Account generates each piece of initial transaction information, the value of the nonce parameter is added with 1, and in addition, the original transaction information of each Account includes an Account address, a public key and a private key signature (private key signature to indicate the approval of the Account to the original transaction information) of the Account corresponding to each Account. The method comprises the steps that original transaction information of each account is submitted to a front-end system firstly, the front-end system verifies the original transaction information of each account, specifically, whether the format of the original transaction information of each account conforms to a format agreed in advance with the front-end system or not is verified, a public key is extracted from the original transaction information of each account, a private key signature of the original transaction information of each account is verified by using the extracted public key, and refution is performed on the original transaction information of which the format does not conform to the agreed format in advance and/or the signature is correct, so that processing resources of a block chain system can be saved. And for the original transaction information with the format conforming to the pre-agreed format and the correct signature, the pre-posed system recombines the original transaction information according to the pre-agreed format of the pre-posed system and the block chain system to obtain the transaction information, the recombined transaction information still comprises the nonce parameter, the Account address of the Account model, the public key and the private key signature, and the pre-posed system submits the recombined transaction information to the block chain system.
In the embodiment, the front-end system is built for the blockchain system, and the front-end system shares the work of preprocessing the original transaction information of each account, so that the operation efficiency of the blockchain system can be improved.
Further, based on the first embodiment or the second embodiment, a third embodiment of the data processing method of the blockchain of the present invention is provided, which is different from the foregoing embodiments in that the step of sequentially performing validity verification and retrying verification on the transaction information of each account includes:
extracting a public key from the transaction information of each account, and performing elliptic curve operation on each extracted public key to obtain an operation address corresponding to each account;
comparing the operation address corresponding to each account with the address of the account balance model corresponding to each account;
confirming that the operation address and the transaction information with the same address pass the validity verification;
extracting a nonce parameter from the transaction information passing the legality, and if the nonce parameter is unique, confirming that the transaction information passing the legality verification passes the re-judgment verification.
The method includes the steps of firstly verifying the legality of transaction information of each Account, specifically, verifying Account addresses of Account models carried in the transaction information of each Account, firstly extracting public keys from the transaction information of each Account, carrying out elliptic curve operation on each extracted public key to obtain operation addresses, then comparing the operation addresses corresponding to each Account with the addresses of the Account models corresponding to each Account, and confirming that the legality verification is passed on the transaction information with the operation addresses being consistent with the addresses of the Account models. Further, the transaction information passing the legality verification is judged and verified again, firstly, a nonce parameter is extracted from the transaction information passing the legality verification, if the nonce parameter is unique, the corresponding transaction information is judged not to belong to repeated transaction information, and the fact that the transaction information passes the judgment and re-verification is confirmed. The transaction information which passes the legality verification but does not pass the re-judgment verification is also directly rejected, so that illegal and/or repeated transaction information is prevented from being processed, and processing resources are saved.
In addition, the embodiment of the invention also provides a data processing device of the block chain.
Referring to fig. 3, fig. 3 is a functional block diagram of a data processing apparatus according to a first embodiment of the present invention.
In this embodiment, the data processing apparatus of the block chain includes:
the monitoring module 10 is configured to monitor each account in the blockchain system in a preset period, so as to determine a hotspot account from each account;
an obtaining module 20 for obtaining a plurality of non-spending transaction outputs associated with the hotspot account;
a merging module 30, configured to merge the obtained multiple unspent transaction outputs to obtain a target unspent transaction output;
a conversion module 40, configured to convert the non-cost state output by the target non-cost transaction into a balance state of the account balance model corresponding to the hotspot account.
Wherein, each virtual function module of the data processing apparatus of the above block chain is stored in the memory 1005 of the data processing device of the block chain shown in fig. 1, and is used for implementing all functions of the data processing program of the block chain; when the modules are executed by the processor 1001, the UTXO related to the hot account is collected by using the account balance model, so that the account balance calculation mode is optimized, the operation efficiency of the block chain system is improved, when the account balance is inquired, the balance state can be directly acquired from the account balance model corresponding to the hot account, replay calculation is not needed, and the inquiry experience of the account balance is improved.
Further, the data processing apparatus of the blockchain further includes:
the verification module is used for sequentially carrying out validity verification and judgment and re-verification on the transaction information of each account when the blockchain system receives the transaction information of each account;
and the creating module is used for creating related non-expense transaction output for the account of which the transaction information passes the legality verification and the judgment and reauthentication verification.
Further, the monitoring module 10 includes:
the monitoring unit is used for monitoring the number of the non-spending transaction outputs related to each account in a preset period;
and the determining unit is used for determining the account with the related output amount of the unconsumed transaction exceeding the preset threshold value as the hot account.
Further, the verification module includes:
the operation unit is used for extracting a public key from the transaction information of each account and performing elliptic curve operation on each extracted public key to obtain an operation address corresponding to each account;
the comparison unit is used for comparing the operation address corresponding to each account with the address of the account balance model corresponding to each account;
the first confirmation unit is used for confirming that the validity verification is passed for the transaction information with the operation address consistent with the address;
and the second confirmation unit is used for extracting the nonce parameter from the transaction information passing the legality, and if the nonce parameter is unique, confirming that the transaction information passing the legality verification passes the re-judgment verification.
Further, the data processing apparatus of the blockchain further includes:
the receiving module is used for receiving the original transaction information of each account through a front-end system of the block chain system;
the preprocessing module is used for preprocessing the original transaction information of each account through the front-end system to obtain the transaction information of each account and sending the transaction information to the block chain system, and the preprocessing comprises the step of recombining the original transaction information of each account according to a format agreed by the front-end system and the block chain system in advance.
Further, the data processing apparatus of the blockchain further includes:
a deleting module for deleting the acquired plurality of non-spent transaction outputs and retaining the target non-spent transaction output.
Further, the data processing apparatus of the blockchain further includes:
and the query module is used for returning the balance state of the account balance model corresponding to the hotspot account when the block chain system receives a balance query request aiming at the hotspot account.
The function implementation of each module in the data processing apparatus of the block chain corresponds to each step in the data processing method embodiment of the block chain, and the function and implementation process are not described in detail here.
In addition, the embodiment of the invention also provides a readable storage medium.
The readable storage medium of the present invention stores thereon a data processing program of a blockchain, wherein the data processing program of the blockchain, when executed by a processor, implements the steps of the data processing method of the blockchain as described above.
The method for implementing the data processing program of the blockchain when executed may refer to various embodiments of the data processing method of the blockchain of the present invention, and will not be described herein again.
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.
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.
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, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A method for processing data in a blockchain, the method comprising the steps of:
monitoring each account in the block chain system in a preset period so as to determine a hot account from each account;
obtaining a plurality of non-spending transaction outputs associated with the hotspot account;
merging the obtained plurality of non-spending transaction outputs to obtain a target non-spending transaction output;
and converting the non-cost state output by the target non-cost transaction into the balance state of the account balance model corresponding to the hotspot account.
2. The method for processing data of a blockchain according to claim 1, wherein the step of monitoring each account in the blockchain system to determine the hotspot account from the accounts is preceded by the steps of:
when the blockchain system receives the transaction information of each account, the validity verification and the re-judgment verification are sequentially carried out on the transaction information of each account;
for accounts for which the transaction information passes validation and revalidation, a related unspent transaction output is created.
3. The method for processing data of a blockchain according to claim 2, wherein the step of monitoring each account in the blockchain system for a preset period to determine the hot account from each account comprises:
monitoring the number of unspent transaction outputs associated with each account during a preset period;
and determining the account with the related amount of the non-spending transaction output exceeding a preset threshold as the hot account.
4. The blockchain data processing method according to claim 2, wherein the step of sequentially verifying the validity and the re-verifying the transaction information of each account includes:
extracting a public key from the transaction information of each account, and performing elliptic curve operation on each extracted public key to obtain an operation address corresponding to each account;
comparing the operation address corresponding to each account with the address of the account balance model corresponding to each account;
confirming that the operation address and the transaction information with the same address pass the validity verification;
extracting a nonce parameter from the transaction information passing the legality, and if the nonce parameter is unique, confirming that the transaction information passing the legality verification passes the re-judgment verification.
5. The blockchain data processing method according to claim 2, wherein before the step of performing the validity verification and the re-judgment verification on the transaction information of each account in sequence when the blockchain system receives the transaction information of each account, the method comprises:
receiving original transaction information of each account through a front-end system of a block chain system;
and preprocessing the original transaction information of each account through the front-end system to obtain the transaction information of each account, and sending the transaction information of each account to the block chain system, wherein the preprocessing comprises recombining the original transaction information of each account according to a format agreed by the front-end system and the block chain system in advance.
6. The blockchain data processing method according to claim 1, wherein the step of converting the non-spent state of the target non-spent transaction output to a balance state of the account balance model is followed by:
deleting the acquired plurality of non-spent transaction outputs and retaining the target non-spent transaction output.
7. The method of data processing of a blockchain according to claim 1, the method further comprising:
and when the block chain system receives a balance inquiry request aiming at the hot spot account, returning the balance state of the account balance model corresponding to the hot spot account.
8. A data processing apparatus of a blockchain, the data processing apparatus of the blockchain comprising:
the monitoring module is used for monitoring each account in the block chain system in a preset period so as to determine a hot spot account from each account;
an acquisition module to acquire a plurality of non-spent transaction outputs associated with the hotspot account;
a merging module, configured to merge the obtained multiple unspent transaction outputs to obtain a target unspent transaction output;
and the conversion module is used for converting the non-cost state output by the target non-cost transaction into the balance state of the account balance model corresponding to the hotspot account.
9. A blockchain data processing apparatus comprising a processor, a memory, and a blockchain data processing program stored on the memory and executable by the processor, wherein the blockchain data processing program, when executed by the processor, implements the steps of the blockchain data processing method according to any one of claims 1 to 7.
10. A readable storage medium, on which a data processing program of a blockchain is stored, wherein the data processing program of the blockchain, when executed by a processor, implements the steps of the data processing method of the blockchain according to any one of claims 1 to 7.
CN201910845674.4A 2019-09-06 2019-09-06 Data processing method, device and equipment of block chain and readable storage medium Pending CN110728504A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910845674.4A CN110728504A (en) 2019-09-06 2019-09-06 Data processing method, device and equipment of block chain and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910845674.4A CN110728504A (en) 2019-09-06 2019-09-06 Data processing method, device and equipment of block chain and readable storage medium

Publications (1)

Publication Number Publication Date
CN110728504A true CN110728504A (en) 2020-01-24

Family

ID=69217973

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910845674.4A Pending CN110728504A (en) 2019-09-06 2019-09-06 Data processing method, device and equipment of block chain and readable storage medium

Country Status (1)

Country Link
CN (1) CN110728504A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113610643A (en) * 2021-08-13 2021-11-05 郑杰骞 Chain structure processing method, transaction data processing device, data verification method, data verification device and medium
CN114266603A (en) * 2021-12-28 2022-04-01 山东浪潮工业互联网产业股份有限公司 Block chain UTXO transaction-based point management method, equipment and medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109064334A (en) * 2018-08-27 2018-12-21 深圳前海益链网络科技有限公司 A kind of intelligence contract bookkeeping methods, computer installation and readable storage medium storing program for executing
CN109360101A (en) * 2018-12-18 2019-02-19 百度在线网络技术(北京)有限公司 A kind of block chain transaction processing method, device, equipment and medium
CN109584063A (en) * 2018-10-25 2019-04-05 阿里巴巴集团控股有限公司 Transaction processing method and device, electronic equipment based on block chain

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109064334A (en) * 2018-08-27 2018-12-21 深圳前海益链网络科技有限公司 A kind of intelligence contract bookkeeping methods, computer installation and readable storage medium storing program for executing
CN109584063A (en) * 2018-10-25 2019-04-05 阿里巴巴集团控股有限公司 Transaction processing method and device, electronic equipment based on block chain
CN109360101A (en) * 2018-12-18 2019-02-19 百度在线网络技术(北京)有限公司 A kind of block chain transaction processing method, device, equipment and medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
邵奇峰等: "区块链技术:架构及进展", 《计算机学报》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113610643A (en) * 2021-08-13 2021-11-05 郑杰骞 Chain structure processing method, transaction data processing device, data verification method, data verification device and medium
CN114266603A (en) * 2021-12-28 2022-04-01 山东浪潮工业互联网产业股份有限公司 Block chain UTXO transaction-based point management method, equipment and medium

Similar Documents

Publication Publication Date Title
CN108492183B (en) Block chain account transaction method, system and computer readable storage medium
CN110958118B (en) Certificate authentication management method, device, equipment and computer readable storage medium
CN111556059A (en) Abnormity detection method, abnormity detection device and terminal equipment
CN110535970B (en) Evidence storing and processing method, device, equipment and medium of judicial chain
CN110232265B (en) Dual identity authentication method, device and system
CN105119722A (en) Identity verification method, equipment and system
WO2019033840A1 (en) Password authentication method for shared device, shared device, cloud server, and system
CN111507714B (en) Verification method, verification device, server and storage medium
CN111260475A (en) Data processing method, block chain node point equipment and storage medium
CN113506119A (en) APP-based charging pile transaction management method and system
CN110728504A (en) Data processing method, device and equipment of block chain and readable storage medium
CN113569263A (en) Secure processing method and device for cross-private-domain data and electronic equipment
CN113067802A (en) User identification method, device, equipment and computer readable storage medium
CN105184559A (en) System and method for payment
CN111198763B (en) Method for detecting reuse of resources, terminal and computer-readable storage medium
CN117376000A (en) Block chain-based data processing method, device, equipment and storage medium
CN108965335B (en) Method for preventing malicious access to login interface, electronic device and computer medium
CN108882230B (en) Call record management method, device and system
CN110598479A (en) Data processing method and device and computer readable storage medium
CN113014556B (en) Bank-enterprise communication system, communication method and electronic terminal
CN111552949B (en) Encryption method and device for Internet of things equipment and electronic equipment
CN107959683B (en) User name locking method and server
CN113890751A (en) Method, apparatus and readable storage medium for controlling voting of alliance link authority
CN109348472B (en) OTA (over the air) upgrading method and system based on single-point pushing
CN110766407A (en) Transaction verification method, accounting node and medium based on block chain

Legal Events

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

Application publication date: 20200124

RJ01 Rejection of invention patent application after publication