CN115328621A - Transaction processing method, device and equipment based on block chain and storage medium - Google Patents

Transaction processing method, device and equipment based on block chain and storage medium Download PDF

Info

Publication number
CN115328621A
CN115328621A CN202211232442.XA CN202211232442A CN115328621A CN 115328621 A CN115328621 A CN 115328621A CN 202211232442 A CN202211232442 A CN 202211232442A CN 115328621 A CN115328621 A CN 115328621A
Authority
CN
China
Prior art keywords
utxo
candidate
time
target
state
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.)
Granted
Application number
CN202211232442.XA
Other languages
Chinese (zh)
Other versions
CN115328621B (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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology 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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202211232442.XA priority Critical patent/CN115328621B/en
Publication of CN115328621A publication Critical patent/CN115328621A/en
Application granted granted Critical
Publication of CN115328621B publication Critical patent/CN115328621B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/466Transaction processing
    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

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

Abstract

The disclosure provides a transaction processing method, a transaction processing device, transaction processing equipment and a storage medium based on a block chain, relates to the field of computers, particularly relates to a block chain technology, and can be applied to a cloud platform. The method comprises the following steps: acquiring a transfer transaction request initiated by a target user node; determining the state of a candidate UTXO in a target user account according to the cool-still time in the block chain; selecting at least one target UTXO from the candidate UTXOs according to the state of the candidate UTXO; and performing digital asset transfer processing according to the at least one target UTXO and the transfer transaction request. By the technical scheme, the safety of the user account can be improved.

Description

Transaction processing method, device and equipment based on block chain and storage medium
Technical Field
The present disclosure relates to the field of computers, and in particular, to a block chain technique applicable to a cloud platform, and more particularly, to a method, an apparatus, a device, and a storage medium for transaction processing based on a block chain.
Background
UTXO (outstanding Transaction Output) is a common model of blockchains. The UTXO model describes the unspent transaction outputs owned by each account. The transaction output of the UTXO is associated with the account public key address, and when the user transfers the transaction output of a certain UTXO to another account through a transaction using the account private key, the transaction is equivalent to using digital money, and at the same time, the original UTXO transaction output is spent and is no longer associated with the account public key address.
How to improve the safety of UTXO-based systems is an important issue in the industry.
Disclosure of Invention
The disclosure provides a transaction processing method, device, equipment and storage medium based on a block chain.
According to an aspect of the present disclosure, there is provided a transaction processing method based on a block chain, the method including:
acquiring a transfer transaction request initiated by a target user node;
determining the state of a candidate UTXO in a target user account according to the cold dead time in the block chain;
selecting at least one target UTXO from the candidate UTXOs according to the state of the candidate UTXO;
and performing digital asset transfer processing according to the at least one target UTXO and the transfer transaction request.
According to an aspect of the present disclosure, there is provided a transaction processing apparatus based on a block chain, the apparatus including:
the transfer request module is used for acquiring a transfer transaction request initiated by a target user node;
the state determining module is used for determining the state of the candidate UTXO in the target user account according to the cool and quiet time in the block chain;
the target selection module is used for selecting at least one target UTXO from the candidate UTXOs according to the state of the candidate UTXOs;
and the transfer processing module is used for performing digital asset transfer processing according to the at least one target UTXO and the transfer transaction request.
According to another aspect of the present disclosure, there is provided an electronic device including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein, the first and the second end of the pipe are connected with each other,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform a method of blockchain based transaction as described in any embodiment of the present disclosure.
According to another aspect of the present disclosure, there is provided a non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the blockchain based transaction processing method according to any embodiment of the present disclosure.
According to the technology disclosed by the invention, the safety of the user account can be improved.
It should be understood that the statements in this section are not intended to identify key or critical features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
fig. 1 is a flowchart of a transaction processing method based on a block chain according to an embodiment of the present disclosure;
FIG. 2 is a flow chart of another block chain based transaction processing method provided in accordance with an embodiment of the present disclosure;
FIG. 3 is a flowchart of another block chain based transaction processing method provided in accordance with an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a transaction processing apparatus based on a block chain according to an embodiment of the present disclosure;
fig. 5 is a block diagram of an electronic device used to implement a blockchain-based transaction method according to an embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 is a flowchart of a transaction processing method based on a block chain according to an embodiment of the present disclosure. The method is suitable for the condition of transfer supervision of the UTXO model. The method may be performed by a transaction device based on a blockchain, which may be implemented in software and/or hardware and may be configured in a block generation node of a blockchain network. As shown in fig. 1, the block chain-based transaction processing method of this embodiment may include:
s101, obtaining a transfer transaction request initiated by a target user node;
s102, determining the state of a candidate UTXO in a target user account according to the cool-quiet time in the block chain;
s103, selecting at least one target UTXO from the candidate UTXOs according to the state of the candidate UTXOs;
and S104, performing digital asset transfer processing according to the at least one target UTXO and the transfer transaction request.
The target user refers to a paying party, the target user node is a block chain node used by the paying party, and the target user account is a block chain account possessed by the paying party.
The transfer transaction request may include a recipient account address and an amount of the digital asset to be transferred, the transfer transaction request to transfer the amount of the digital asset to be transferred from the payor account address to the recipient account address. Specifically, the transfer transaction request may be manually initiated by the target user according to a requirement, or may be automatically generated when it is monitored that the target user purchases an article from a receiving party. It should be noted that the number of the account addresses of the receiving party may be one, or may be at least two.
The cold quiet time is a system parameter of the block chain and is used for representing the supervision locking duration of the UTXO held by the user. The candidate UTXO is in a locked state or an unlocked state, and if any candidate UTXO is in the locked state, the candidate UTXO cannot be paid out; any candidate UTXO may cost if it is in the unlocked state.
Specifically, in response to a transfer transaction request initiated by a target user node, taking the UTXO in the target user account as a candidate UTXO, and determining whether the candidate UTXO is in a locked state or an unlocked state according to the cold quiet time; and, at least one target UTXO may be selected from the candidate UTXOs in the unlocked state. It should be noted that the total amount of digital assets of at least one target UTXO should be equal to or just greater than the amount of digital assets to be transferred, i.e. the sum of the target UTXOs should be as close as possible to the amount of digital assets to be transferred.
And at least one target UTXO can be used as input data, digital asset transfer processing is carried out according to the account address of the receiving party in the transfer transaction request and the amount of the digital assets to be transferred, and the transfer processing result of the digital assets is written into the block chain. The transfer locking capacity of the UTXO is introduced through the cold quiet time, the use risk of the UTXO can be reduced, the UTXO can be monitored, and therefore the safety of the UTXO is improved. And moreover, the cold quiet period is realized at the bottom layer of the block chain through the system parameters of the cold quiet period in the block chain, and compared with the realization of the cold quiet period at a service layer, the problem of inconsistent cold quiet periods of all service parties can be avoided.
According to the technical scheme of the embodiment of the disclosure, the transfer locking of the UTXO is realized at the bottom layer of the block chain according to the cool quiet period in the block chain, so that the UTXO is conveniently monitored, and the safety of the UTXO is improved.
Fig. 2 is a flowchart of another block chain based transaction processing method provided in accordance with an embodiment of the present disclosure. The present embodiment is an alternative proposed on the basis of the above-described embodiments. Referring to fig. 2, the transaction processing method based on a block chain according to this embodiment may include:
s201, acquiring a transfer transaction request initiated by a target user node;
s202, determining the unlocking time of the candidate UTXO according to the cool-quiet time in the block chain and the block time of the block to which the candidate UTXO belongs in the target user account;
s203, comparing the unlocking time of the candidate UTXO with the current time, and determining the state of the candidate UTXO according to the comparison result;
s204, selecting at least one target UTXO from the candidate UTXOs according to the state of the candidate UTXOs;
s205, according to the at least one target UTXO and the transfer transaction request, performing digital asset transfer processing.
In the embodiment of the present disclosure, the block time of the block to which the candidate UTXO belongs is used as the timestamp of the candidate UTXO, and the unlocking time of the candidate UTXO is determined by combining the cool time and the timestamp of the candidate UTXO, that is, the sum of the cool time and the timestamp of the candidate UTXO is used as the unlocking time of the candidate UTXO. The block height of the block to which the candidate UTXO belongs may be determined according to a block height of the block, and the current time may be determined according to a block height corresponding to a current block to be generated.
Specifically, for each candidate UTXO in the target user account, the sum of the block time and the cool-still time of the block to which the candidate UTXO belongs may be determined as the unlocking time of the candidate UTXO; and comparing the unlocking time of the candidate UTXO with the current time, and determining whether the candidate UTXO is in a locking state or an unlocking state according to the comparison result. By using the block time of the block to which the candidate UTXO belongs as the timestamp of the candidate UTXO, no additional new timestamp needs to be added for each candidate UTXO. Because of the massive UTXOs in the block chain, if a new timestamp is additionally added to each UTXO, the data structure of each UTXO needs to be modified, the network throughput and the disk storage are greatly increased, and the processing efficiency of the UTXOs is reduced. In addition, the block time of the block to which the candidate UTXO belongs is selected as the timestamp, namely the effective time of the historical transfer transaction request to which the candidate UTXO belongs is selected as the timestamp, compared with the method that the initiating time of the historical transfer transaction request is selected as the timestamp, the problem of initiating time forgery can be avoided, and therefore the accuracy of the timestamp is improved, namely the accuracy of transfer locking of the candidate UTXO is improved.
In an optional implementation, the comparing the unlock time of the candidate UTXO with the current time and determining the state of the candidate UTXO according to the comparison result includes: if the unlocking time of the candidate UTXO is before the current time, determining that the candidate UTXO is in a locking state; otherwise, determining that the candidate UTXO is in an unlocked state.
For each candidate UTXO, if the unlocking time of the candidate UTXO is before the current time, the candidate UTXO is in an unlocking state; otherwise, the candidate UTXO is in a locked state, i.e., in a cold quiescent period. By comparing the unlocking time of the candidate UTXO with the current time, the state of the candidate UTXO can be accurately obtained, and therefore the candidate UTXO can be supervised based on the state.
In an optional implementation, the selecting at least one target UTXO from the candidate UTXOs according to a state in which the candidate UTXOs are located includes: filtering the candidate UTXO in the locking state to obtain the remaining candidate UTXO in the unlocking state; and selecting at least one target UTXO from the candidate UTXOs in the unlocking state according to the amount of the digital assets to be transferred in the transfer transaction request.
Wherein the candidate UTXO in the locked state is not payable out and the candidate UTXO in the unlocked state is payable out. And filtering the candidate UTXOs in the locked state to obtain the remaining candidate UTXOs in the unlocked state, and selecting at least one target UTXO from the candidate UTXOs in the unlocked state to enable the total digital asset amount of the target UTXOs to be equal to or larger than the digital asset amount to be transferred. And if the total digital asset amount of the target UTXO is less than the digital asset amount to be transferred, rejecting the transfer transaction request and failing to transfer. By selecting the target UTXO from the candidate UTXOs in the unlocking state, the target UTXO for transferring the account meets the supervision requirement, so that the security of the UTXO transferring is improved, and the malicious transferring risk is reduced.
In an alternative embodiment, the method further comprises: and acquiring the cool and quiet time from the creature block of the block chain.
The cool-quiet time is used as an initialization system parameter of the block chain and can be written into a creation block of the block chain. During block chain start-up, the cool-still time may be read from the created blocks. By reading the cool-quiet time from the bottom layer of the block chain, compared with the method for acquiring the cool-quiet time at the service layer, the global consistency of the cool-quiet time can be kept, and mutual conflict among different service parties is avoided.
According to the technical scheme of the embodiment of the disclosure, the block time of the block to which the candidate UTXO belongs is used as the timestamp of the candidate UTXO, and the state of the candidate UTXO is determined by combining the cool-still time and the timestamp, so that the accuracy of transfer locking of the candidate UTXO can be improved.
Fig. 3 is a flowchart of another block chain-based transaction processing method provided in accordance with an embodiment of the present disclosure. This embodiment is an alternative proposed on the basis of the above-described embodiments. Referring to fig. 3, the block chain-based transaction processing method of the present embodiment may include:
s301, obtaining a transfer transaction request initiated by a target user node;
s302, determining the state of a candidate UTXO in a target user account according to the cold quiet time in the block chain;
s303, selecting at least one target UTXO from the candidate UTXOs according to the state of the candidate UTXOs;
s304, if the total digital asset amount of the at least one target UTXO is larger than the digital asset amount to be transferred in the transfer transaction request, combining the at least one target UTXO into a first UTXO and a second UTXO;
s305, outputting the first UTXO to the recipient account address, and outputting the second UTXO to the destination user account address.
Wherein the first UTXO is the amount of digital assets to be transferred, the second UTXO is the amount remaining for transfer, and the sum of the first UTXO and the second UTXO is equal to the total amount of digital assets of each target UTXO. In the case that the total digital asset amount of the at least one target UTXO is greater than the digital asset amount to be transferred in the transfer transaction request, the at least one target UTXO may be used as input data, the first UTXO may be output to the recipient account address, the second UTXO may be output to the target user account address, and the first UTXO and the second UTXO may be written into the current block to be generated, that is, the block time of the current block may be subsequently used as the time stamp of the first UTXO and the second UTXO for subsequently determining whether the first UTXO and the second UTXO are in the cold quiescent period.
It should be noted that, in the case where the total digital asset amount of the at least one target UTXO is equal to the amount of the digital asset to be transferred in the transfer transaction request, only one UTXO is generated by combining the at least one target UTXO during the digital asset transfer process, and the remaining amount is not transferred.
In an alternative embodiment, the method further comprises: responding to a voting proposal transaction provided by an initiator in the block chain system, and acquiring a voting result; if the voting pass proportion value in the voting result is larger than the voting effective proportion threshold value in the voting proposal transaction, determining that the voting pass and extracting the cool-quiet time from the proposal voting transaction; the extracted cool quiet time is written into the blockchain.
In embodiments of the present disclosure, the blockchain system may update the cool down time by initiating a voting proposal transaction. The voting proposal transaction may include a voting validation proportion threshold and a cool quiet time to be updated, and may also include a validation block height. Under the condition that the height of the effective block is reached, the block generation node can respond to the voting proposal transaction, control the block link node to vote and acquire a voting result; if the vote passing proportion value is larger than the vote effective proportion threshold value, the vote passing is determined, and the cool and quiet time to be updated can be written into the block chain, so that the cool and quiet time is updated. The cold quiet time is updated in the block chain system through the voting proposal, so that the system consistency of the cold quiet time can be kept, the flexibility of the cold quiet time can be improved, and the flexibility of transfer supervision is improved.
According to the technical scheme of the embodiment of the disclosure, transfer is realized by combining all target UTXOs according to the transfer characteristics of the UTXOs, and the transfer is reliable and easy to use; and the cold quiet time is updated through voting proposal, so that the flexibility of transfer supervision can be improved.
Fig. 4 is a schematic structural diagram of a transaction processing apparatus based on a block chain according to an embodiment of the present disclosure. The embodiment is suitable for the condition that the UTXO model is used for transfer supervision. The device can be realized in a software and/or hardware mode and can be configured in a block generation node of a block chain network. As shown in fig. 4, the block chain-based transaction processing apparatus 400 of the present embodiment may include:
a transfer request module 410, configured to obtain a transfer transaction request initiated by a target user node;
a state determining module 420, configured to determine, according to the cool-still time in the block chain, a state where the candidate UTXO in the target user account is located;
a target selection module 430, configured to select at least one target UTXO from the candidate UTXOs according to a state of the candidate UTXOs;
and a transfer processing module 440 for performing digital asset transfer processing according to the at least one target UTXO and the transfer transaction request.
In an alternative embodiment, the status determination module 420 comprises:
the unlocking time unit is used for determining the unlocking time of the candidate UTXO according to the cold quiet time in the block chain and the block time of the block to which the candidate UTXO belongs in the target user account;
and the state determining unit is used for comparing the unlocking time of the candidate UTXO with the current time and determining the state of the candidate UTXO according to the comparison result.
In an optional implementation manner, the state determination unit is specifically configured to:
if the unlocking time of the candidate UTXO is before the current time, determining that the candidate UTXO is in a locking state; otherwise, determining that the candidate UTXO is in an unlocked state.
In an alternative embodiment, the target selection module 430 includes:
the locking filtering unit is used for filtering the candidate UTXO in the locking state to obtain the residual candidate UTXO in the unlocking state;
and the target selection unit is used for selecting at least one target UTXO from the candidate UTXOs in the unlocking state according to the amount of the digital assets to be transferred in the transfer transaction request.
In an alternative embodiment, the transfer processing module 440 includes:
a merging unit for merging the at least one target UTXO into a first UTXO and a second UTXO if a total digital asset amount of the at least one target UTXO is greater than a digital asset amount to be transferred in the transfer transaction request;
an output unit to output the first UTXO to a recipient account address and to output the second UTXO to the target user account address.
In an optional implementation manner, the above block chain based transaction processing apparatus 400 further includes:
and the cool and quiet time reading module is used for acquiring the cool and quiet time from the creature block of the block chain.
In an optional implementation manner, the above block chain-based transaction processing apparatus 400 further includes a cool-still time update module, where the cool-still time update module includes:
the voting unit is used for responding to a voting proposal transaction provided by an initiator in the block chain system and acquiring a voting result;
the time extraction unit is used for determining that the votes pass and extracting the cool quiet time from the proposal voting transaction if the voting pass proportion value in the voting result is greater than the voting effective proportion threshold value in the proposal voting transaction;
and the time writing unit is used for writing the extracted cool and quiet time into the block chain.
According to the technical scheme, a transfer locking scheme for the UTXO is provided based on the system parameter cool-still time of the block chain, the candidate UTXO in the locking state cannot be transferred out, and only the candidate UTXO in the unlocking state can be transferred out. Malicious use risk of the UTXO can be reduced through transfer locking processing, and the security of the UTXO is improved, so that the supervision requirement on the UTXO is met.
In the technical scheme of the disclosure, the acquisition, storage, application and the like of the personal information of the related user all accord with the regulations of related laws and regulations, and do not violate the good customs of the public order.
The present disclosure also provides an electronic device, a readable storage medium, and a computer program product according to embodiments of the present disclosure.
Fig. 5 is a block diagram of an electronic device for implementing a blockchain-based transaction method according to an embodiment of the present disclosure. FIG. 5 illustrates a schematic block diagram of an example electronic device 500 that can be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 5, the electronic device 500 includes a computing unit 501, which can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 502 or a computer program loaded from a storage unit 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic apparatus 500 can also be stored. The computing unit 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
A number of components in the electronic device 500 are connected to the I/O interface 505, including: an input unit 506 such as a keyboard, a mouse, or the like; an output unit 507 such as various types of displays, speakers, and the like; a storage unit 508, such as a magnetic disk, optical disk, or the like; and a communication unit 509 such as a network card, modem, wireless communication transceiver, etc. The communication unit 509 allows the electronic device 500 to exchange information/data with other devices through a computer network such as the internet and/or various telecommunication networks.
The computing unit 501 may be a variety of general-purpose and/or special-purpose processing components having processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The computing unit 501 performs the various methods and processes described above, such as a blockchain-based transaction method. For example, in some embodiments, the blockchain-based transaction method may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 508. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 500 via the ROM 502 and/or the communication unit 509. When loaded into RAM 503 and executed by the computing unit 501, may perform one or more of the steps of the blockchain based transaction method described above. Alternatively, in other embodiments, the computing unit 501 may be configured to perform the blockchain-based transaction method by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), system on a chip (SOCs), complex Programmable Logic Devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server with a combined blockchain.
Artificial intelligence is the subject of research that makes computers simulate some human mental processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.), both at the hardware level and at the software level. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing, and the like; the artificial intelligence software technology mainly comprises a computer vision technology, a voice recognition technology, a natural language processing technology, a machine learning/deep learning technology, a big data processing technology, a knowledge map technology and the like.
Cloud computing (cloud computing) refers to a technology system that accesses a flexibly extensible shared physical or virtual resource pool through a network, where resources may include servers, operating systems, networks, software, applications, storage devices, and the like, and may be deployed and managed in a self-service manner as needed. Through the cloud computing technology, high-efficiency and strong data processing capacity can be provided for technical application and model training of artificial intelligence, block chains and the like.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be executed in parallel, sequentially, or in different orders, as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved, and the present disclosure is not limited herein.
The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the scope of protection of the present disclosure.

Claims (16)

1. The transaction processing method based on the block chain comprises the following steps:
acquiring a transfer transaction request initiated by a target user node;
determining the state of a candidate UTXO in a target user account according to the cool-still time in the block chain;
selecting at least one target UTXO from the candidate UTXOs according to the state of the candidate UTXO;
and performing digital asset transfer processing according to the at least one target UTXO and the transfer transaction request.
2. The method of claim 1, wherein the determining the state of the candidate UTXO in the target user account from the cool dead time in the blockchain comprises:
determining the unlocking time of the candidate UTXO according to the cool-quiet time in the block chain and the block time of the block to which the candidate UTXO belongs in the target user account;
and comparing the unlocking time of the candidate UTXO with the current time, and determining the state of the candidate UTXO according to the comparison result.
3. The method of claim 2, wherein the comparing the unlock time of the candidate UTXO with the current time and determining the state of the candidate UTXO based on the comparison comprises:
if the unlocking time of the candidate UTXO is before the current time, determining that the candidate UTXO is in a locking state; otherwise, determining that the candidate UTXO is in an unlocked state.
4. The method of any of claims 1-3, wherein the selecting at least one target UTXO from the candidate UTXOs based on a state in which the candidate UTXO is located comprises:
filtering the candidate UTXO in the locking state to obtain the remaining candidate UTXO in the unlocking state;
and selecting at least one target UTXO from the candidate UTXOs in the unlocking state according to the amount of the digital assets to be transferred in the transfer transaction request.
5. The method of any of claims 1-3, wherein the performing digital asset transfer processing based on the at least one target UTXO and the transfer transaction request comprises:
if the total digital asset amount of the at least one target UTXO is larger than the digital asset amount to be transferred in the transfer transaction request, combining the at least one target UTXO into a first UTXO and a second UTXO;
outputting the first UTXO to a recipient account address and the second UTXO to the target user account address.
6. The method of any of claims 1-3, further comprising:
and acquiring the cool and quiet time from the creation block of the block chain.
7. The method of any of claims 1-3, further comprising:
responding to a voting proposal transaction provided by an initiator in the block chain system, and acquiring a voting result;
if the voting pass proportion value in the voting result is larger than the voting effective proportion threshold value in the voting proposal transaction, determining that the voting pass and extracting the cool-quiet time from the proposal voting transaction;
the extracted cool quiet time is written into the blockchain.
8. A blockchain based transaction processing apparatus comprising:
the transfer request module is used for acquiring a transfer transaction request initiated by a target user node;
the state determining module is used for determining the state of the candidate UTXO in the target user account according to the cool and quiet time in the block chain;
the target selection module is used for selecting at least one target UTXO from the candidate UTXOs according to the state of the candidate UTXOs;
and the transfer processing module is used for performing digital asset transfer processing according to the at least one target UTXO and the transfer transaction request.
9. The apparatus of claim 8, wherein the status determination module comprises:
the unlocking time unit is used for determining the unlocking time of the candidate UTXO according to the cold quiet time in the block chain and the block time of the block to which the candidate UTXO belongs in the target user account;
and the state determining unit is used for comparing the unlocking time of the candidate UTXO with the current time and determining the state of the candidate UTXO according to the comparison result.
10. The apparatus according to claim 9, wherein the state determination unit is specifically configured to:
if the unlocking time of the candidate UTXO is before the current time, determining that the candidate UTXO is in a locking state; otherwise, determining that the candidate UTXO is in an unlocked state.
11. The apparatus of any one of claims 8-10, wherein the target selection module comprises:
the locking filtering unit is used for filtering the candidate UTXO in the locking state to obtain the remaining candidate UTXO in the unlocking state;
and the target selection unit is used for selecting at least one target UTXO from the candidate UTXOs in the unlocking state according to the amount of the digital assets to be transferred in the transfer transaction request.
12. The apparatus of any of claims 8-10, wherein the transfer processing module comprises:
a merging unit for merging the at least one target UTXO into a first UTXO and a second UTXO if a total digital asset amount of the at least one target UTXO is greater than a digital asset amount to be transferred in the transfer transaction request;
an output unit to output the first UTXO to a recipient account address and to output the second UTXO to the target user account address.
13. The apparatus of any one of claims 8-10, the apparatus further comprising:
and the cool and quiet time reading module is used for acquiring the cool and quiet time from the creature block of the block chain.
14. The apparatus of any of claims 8-10, the apparatus further comprising a cool dead time update module, the cool dead time update module comprising:
the voting unit is used for responding to a voting proposal transaction provided by an initiator in the block chain system and acquiring a voting result;
the time extraction unit is used for determining that the votes pass and extracting the cool quiet time from the proposal voting transaction if the voting pass proportion value in the voting result is greater than the voting effective proportion threshold value in the proposal voting transaction;
and the time writing unit is used for writing the extracted cool and quiet time into the block chain.
15. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the blockchain based transaction method of any one of claims 1-7.
16. A non-transitory computer readable storage medium having stored thereon computer instructions for causing a computer to execute the blockchain based transaction method according to any one of claims 1 to 7.
CN202211232442.XA 2022-10-10 2022-10-10 Transaction processing method, device, equipment and storage medium based on block chain Active CN115328621B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211232442.XA CN115328621B (en) 2022-10-10 2022-10-10 Transaction processing method, device, equipment and storage medium based on block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211232442.XA CN115328621B (en) 2022-10-10 2022-10-10 Transaction processing method, device, equipment and storage medium based on block chain

Publications (2)

Publication Number Publication Date
CN115328621A true CN115328621A (en) 2022-11-11
CN115328621B CN115328621B (en) 2023-06-23

Family

ID=83913734

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211232442.XA Active CN115328621B (en) 2022-10-10 2022-10-10 Transaction processing method, device, equipment and storage medium based on block chain

Country Status (1)

Country Link
CN (1) CN115328621B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115604354A (en) * 2022-12-09 2023-01-13 北京百度网讯科技有限公司(Cn) Transaction processing method, device and equipment based on block chain and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109493014A (en) * 2018-10-18 2019-03-19 北京瑞卓喜投科技发展有限公司 A kind of token operational approach and operation system based on block chain
CN111027947A (en) * 2019-12-06 2020-04-17 湖北文理学院 UTXO wallet selection method, UTXO wallet selection equipment, UTXO wallet storage medium and UTXO wallet selection device
CN111095861A (en) * 2017-09-08 2020-05-01 区块链控股有限公司 Improved time-lock technique for protecting resources on a blockchain
CN111598571A (en) * 2020-07-20 2020-08-28 百度在线网络技术(北京)有限公司 Transaction processing method, device, equipment and storage medium of block chain
CN111784518A (en) * 2020-06-30 2020-10-16 北京海益同展信息科技有限公司 Block chain cross-chain processing method and device, computer equipment and storage medium
WO2021059090A1 (en) * 2019-09-27 2021-04-01 nChain Holdings Limited Time-locked blockchain transactions and related blockchain technology

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111095861A (en) * 2017-09-08 2020-05-01 区块链控股有限公司 Improved time-lock technique for protecting resources on a blockchain
US20200279256A1 (en) * 2017-09-08 2020-09-03 nChain Holdings Limited Improved time lock technique for securing a resource on a blockchain
CN109493014A (en) * 2018-10-18 2019-03-19 北京瑞卓喜投科技发展有限公司 A kind of token operational approach and operation system based on block chain
WO2021059090A1 (en) * 2019-09-27 2021-04-01 nChain Holdings Limited Time-locked blockchain transactions and related blockchain technology
CN111027947A (en) * 2019-12-06 2020-04-17 湖北文理学院 UTXO wallet selection method, UTXO wallet selection equipment, UTXO wallet storage medium and UTXO wallet selection device
CN111784518A (en) * 2020-06-30 2020-10-16 北京海益同展信息科技有限公司 Block chain cross-chain processing method and device, computer equipment and storage medium
CN111598571A (en) * 2020-07-20 2020-08-28 百度在线网络技术(北京)有限公司 Transaction processing method, device, equipment and storage medium of block chain

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115604354A (en) * 2022-12-09 2023-01-13 北京百度网讯科技有限公司(Cn) Transaction processing method, device and equipment based on block chain and storage medium
CN115604354B (en) * 2022-12-09 2023-03-28 北京百度网讯科技有限公司 Transaction processing method, device and equipment based on block chain and storage medium

Also Published As

Publication number Publication date
CN115328621B (en) 2023-06-23

Similar Documents

Publication Publication Date Title
JP6743141B2 (en) Service processing method and device
US20170124655A1 (en) Quantification for investment vehicle management employing an advanced decision platform
CN113205037B (en) Event detection method, event detection device, electronic equipment and readable storage medium
CN115328621B (en) Transaction processing method, device, equipment and storage medium based on block chain
CN115242731A (en) Message processing method, device, equipment and storage medium
CN117474091A (en) Knowledge graph construction method, device, equipment and storage medium
CN112750038B (en) Transaction risk determination method, device and server
CN106708869B (en) Group data processing method and device
CN115017236B (en) Data processing method, device and equipment based on block chain and storage medium
CN115330532B (en) Block chain processing method, device, equipment and storage medium based on account model
CN114331446B (en) Method, device, equipment and medium for realizing out-of-chain service of block chain
CN113935069B (en) Data verification method, device and equipment based on block chain and storage medium
CN115757075A (en) Task abnormity detection method and device, computer equipment and storage medium
CN113986710A (en) Big data platform monitoring method and device
CN113094595A (en) Object recognition method, device, computer system and readable storage medium
CN113703793A (en) Application installation method, device, equipment and medium for cloud mobile phone
CN111429257A (en) Transaction monitoring method and device
CN113918513B (en) Data migration method, device, equipment and storage medium based on block chain
CN115129266B (en) Data storage method, device and equipment based on block chain and storage medium
CN115509695A (en) Transaction processing method, device and equipment based on block chain and storage medium
CN116341023B (en) Block chain-based service address verification method, device, equipment and storage medium
CN115797033A (en) Capital supervision method and device, electronic equipment and storage medium
CN114444617A (en) Method, apparatus, device and storage medium for outputting information
CN117455192A (en) Department store matching method, device, equipment and storage medium
CN117519938A (en) Form data-based order receiving task processing method, device, equipment and medium

Legal Events

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