CN110648125B - Packaging transaction method and device, electronic equipment and storage medium - Google Patents

Packaging transaction method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN110648125B
CN110648125B CN201910851709.5A CN201910851709A CN110648125B CN 110648125 B CN110648125 B CN 110648125B CN 201910851709 A CN201910851709 A CN 201910851709A CN 110648125 B CN110648125 B CN 110648125B
Authority
CN
China
Prior art keywords
transaction
packaged
packageable
depended
judging whether
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.)
Active
Application number
CN201910851709.5A
Other languages
Chinese (zh)
Other versions
CN110648125A (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.)
Hangzhou Rivtower Technology Co Ltd
Original Assignee
Cryptape 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 Cryptape Co ltd filed Critical Cryptape Co ltd
Priority to CN201910851709.5A priority Critical patent/CN110648125B/en
Publication of CN110648125A publication Critical patent/CN110648125A/en
Application granted granted Critical
Publication of CN110648125B publication Critical patent/CN110648125B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/08Payment architectures
    • G06Q20/085Payment architectures involving remote charge determination or related payment systems
    • G06Q20/0855Payment architectures involving remote charge determination or related payment systems involving a third party

Landscapes

  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Packages (AREA)

Abstract

The embodiment of the specification relates to a method, a device, electronic equipment and a system for packaging transaction, which comprise the following steps: judging whether the transaction to be packaged belongs to a packageable transaction or not based on a dependency field set in the transaction to be packaged; if yes, packaging the transaction to be packaged; otherwise, wait. Therefore, whether the transaction to be packaged belongs to the packageable transaction or not can be determined according to the dependency field, the packageable transaction can be packaged, the occurrence of transaction execution failure caused by transaction dependency loss is avoided, loss caused by transaction failure is reduced, and user experience is improved.

Description

Packaging transaction method and device, electronic equipment and storage medium
Technical Field
The embodiment of the specification relates to the technical field of networks, in particular to a packaging transaction method, a packaging transaction device and electronic equipment.
Background
In some application scenarios of account-based blockchains, there may be dependencies between transactions, in other words, a transaction must be executed after the execution of one or more other transactions is completed.
For example, one transaction deposits money for a contract, and another transaction calls for the deposit of the contract to complete a certain transaction; if the previous transaction is not executed, i.e. no money is saved in the contract, the next transaction cannot call the deposit in the contract, so that the next transaction is inevitably failed and needs to be retransmitted to be executed again, the confirmation time of the transaction is longer, and very poor user experience is brought. Moreover, the transaction fee is still deducted by the failed transaction, which brings unnecessary loss to the user.
Disclosure of Invention
The embodiment of the specification provides a packaged transaction method, a packaged transaction device and electronic equipment, and is used for solving the problems that in the prior art, due to the fact that transaction dependence is lost, execution fails, user experience is poor, and loss is brought to a user.
In order to solve the above technical problem, the embodiments of the present specification adopt the following technical solutions:
in a first aspect, a method for a packed transaction is provided, which is applied in an account-type blockchain network, and the method includes:
judging whether the transaction to be packaged belongs to a packageable transaction or not based on a dependency field set in the transaction to be packaged;
if yes, packaging the transaction to be packaged;
otherwise, waiting for packing.
In a second aspect, there is provided an apparatus for a packet transaction, which is applied in an account-type blockchain network, the apparatus comprising:
the judging module is used for judging whether the transaction to be packaged belongs to a packageable transaction or not based on a dependency field set in the transaction to be packaged;
the packaging module is used for packaging the transaction to be packaged if the transaction belongs to a packagable transaction;
otherwise, waiting for packing.
In a third aspect, an electronic device is provided, including: a memory, a processor, and a computer program stored on the memory and executable on the processor, the computer program being executed by the processor to:
judging whether the transaction to be packaged belongs to a packageable transaction or not based on a dependency field set in the transaction to be packaged;
if yes, packaging the transaction to be packaged;
otherwise, waiting for packing.
In a fourth aspect, a computer-readable storage medium is provided that stores one or more programs that, when executed by an electronic device that includes a plurality of application programs, cause the electronic device to:
judging whether the transaction to be packaged belongs to a packageable transaction or not based on a dependency field set in the transaction to be packaged;
if yes, packaging the transaction to be packaged;
otherwise, waiting for packing.
The embodiment of the specification adopts at least one technical scheme which can achieve the following beneficial effects:
according to the technical scheme, whether the transaction to be packaged belongs to a packageable transaction is judged based on the dependency field set in the transaction to be packaged; if yes, packaging the transaction to be packaged; otherwise, wait. Therefore, whether the transaction to be packaged belongs to the packageable transaction or not can be determined according to the dependency field, the packageable transaction can be packaged, the occurrence of transaction execution failure caused by transaction dependency loss is avoided, loss caused by transaction failure is reduced, and user experience is improved.
Drawings
In order to more clearly illustrate the embodiments of the present specification or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only some embodiments described in the embodiments of the present specification, and for those skilled in the art, other drawings can be obtained according to the drawings without any creative efforts.
Fig. 1 is a schematic diagram of method steps of a package transaction provided in an embodiment of the present disclosure.
Fig. 2 is a schematic diagram of method steps of a package transaction provided in an embodiment of the present specification.
Fig. 3 is a schematic structural diagram of an electronic device provided in an embodiment of this specification.
Fig. 4 is a schematic structural diagram of a device for packaging transaction provided in an embodiment of the present disclosure.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present disclosure more clear, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below with reference to the specific embodiments of the present disclosure and the accompanying drawings. It is to be understood that the embodiments described are only a few embodiments of the present disclosure, and not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present specification without any creative effort belong to the protection scope of the embodiments in the present specification.
The technical solutions provided by the embodiments of the present description are described in detail below with reference to the accompanying drawings.
Example one
Referring to fig. 1, a schematic diagram of method steps of a package transaction provided in an embodiment of the present disclosure is shown, where the package transaction method may be applied in an account-based block chain network to clarify transaction dependencies and package transactions in sequence according to the order of the transaction dependencies for consensus, and the method may include the following steps:
step 102: judging whether the transaction to be packaged belongs to a packageable transaction or not based on a dependency field set in the transaction to be packaged;
if so, step 104 is executed: otherwise, step 106 is performed.
Optionally, in this embodiment of this specification, when determining whether the transaction to be packaged belongs to a packageable transaction based on a dependency field set in the transaction to be packaged, step 102 may specifically be performed as:
judging whether a transaction identifier of the transaction depended on by the transaction to be packaged is added in the dependence field;
if the transaction is not added, the transaction to be packaged does not have a dependable transaction, and the transaction to be packaged is determined to belong to a packagable transaction;
otherwise, judging whether the transaction depended on by the transaction to be packaged is chain-linked or packaged, if so, determining that the transaction to be packaged belongs to a packageable transaction, otherwise, judging whether the transaction depended on by the transaction to be packaged is in a transaction pool, if so, recursively judging whether the depended transactions of all the transactions depended on by the transaction to be packaged finally point to the chain-linked or packaged transaction, if so, sequentially packaging all the transactions depended on by the transaction to be packaged in the transaction pool according to the dependency sequence, and determining that the transaction to be packaged belongs to the packageable transaction, otherwise, determining that the transaction to be packaged does not belong to the packageable transaction; determining that the transaction to be packaged does not belong to a packagable transaction if the transaction on which the transaction to be packaged depends is not in a transaction pool.
For example, the transaction to be packaged is taken as n, the transaction dependent on the transaction is n-1, when judging whether the transaction n to be packaged belongs to the packageable transaction, the judgment can be made according to whether the transaction identifier of the transaction n-1, which is dependent on the transaction n to be packaged, is added in the dependency field, and if the dependency field does not have the transaction identifier of the transaction n-1, which is dependent on the transaction n to be packaged, the transaction n to be packaged is determined to belong to the packageable transaction; if yes, firstly judging whether a transaction n-1 which is depended by a transaction n to be packaged is linked or packaged, if so, determining that the transaction n to be packaged belongs to a packageable transaction, otherwise, judging whether the transaction n-1 which is depended by the transaction n to be packaged is in a transaction pool, if so, further recursing whether the transaction which is depended by the transaction n-1 to the transaction which is finally depended is finally directed to the linked or packaged (namely, whether the depended transactions of all the transactions which are depended by the transaction n to be packaged recurrently are finally directed to the linked or packaged transaction), if so, sequentially packaging all the transactions with the dependency relationship according to a dependency sequence, and determining that the transaction n to be packaged belongs to the packageable transaction; if not, then it is determined that the transaction n to be packaged does not belong to a packageable transaction.
Optionally, in an embodiment of this specification, the dependency field is a dependency array, and the transaction identifier of the transaction dependent transaction to be packaged included in the dependency array is a hash value of the transaction dependent transaction to be packaged.
The hash value of the transaction which depends on is used as the dependency array of the current transaction, and the established dependency relationship is safe and reliable considering that the hash value has high safety performance and is not easy to crack.
In fact, in the embodiments of the present specification, other transaction identifiers capable of characterizing the uniqueness of the transaction relied on, such as a transaction ID, may also be employed, which is not limited herein.
Optionally, the content in the dependency field is added automatically after the user initiates a transaction. In other words, after the user initiates a transaction, the client will automatically add the transaction identification of the transaction on which it depends in the dependency field of the current transaction. The content in the dependency field here is actually the transaction identification.
Step 104: and packaging the transaction to be packaged.
The specific packing scheme may be executed with reference to a packing scheme in the prior art, which is not described herein in detail.
Step 106: and waiting for packing.
This step is performed without any processing, and the packaging can be performed only after all dependent transactions are packaged or linked, or after other pointing operations (e.g., a reboot operation) are performed and the conditions of step 102 are satisfied.
According to the technical scheme, whether the transaction to be packaged belongs to a packageable transaction is judged based on the dependency field set in the transaction to be packaged; if yes, packaging the transaction to be packaged; otherwise, wait. Therefore, whether the transaction to be packaged belongs to the packageable transaction or not can be determined according to the dependency field, the packageable transaction can be packaged, the occurrence of transaction execution failure caused by transaction dependency loss is avoided, loss caused by transaction failure is reduced, and user experience is improved.
The scheme of the packaging transaction related to the embodiment of the present specification is described in detail below by referring to fig. 2 by way of specific examples.
Step 202: and judging whether the transaction depended on by the transaction to be packaged is uplink or packaged according to the hash value in the dependency field.
If yes, executing step 204, otherwise, jumping to step 206;
step 204: and packaging the transaction to be packaged.
Step 206: and judging whether the transaction depended by the transaction to be packaged is in the transaction pool.
If so, step 208 is performed, otherwise, the transaction to be packaged is not packaged and waits.
Step 208: and recursively judging whether the dependent transactions of all the transactions depended on by the transactions to be packaged finally point to the linked or packaged transactions.
If so, step 210 is performed, otherwise, the transaction to be packaged is not packaged and waits.
Step 210: and (5) sequentially packaging all the transactions depended by the transactions to be packaged in the transaction pool according to the dependency sequence, and jumping to the step 204.
Therefore, the dependent transactions can be traced one by one according to the transaction identifiers in the dependent array, and the current transactions to be packaged are packaged after all the dependent transactions are packaged or linked, so that transaction execution failure caused by transaction dependence loss is avoided, and user experience is improved.
Fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure. Referring to fig. 3, at a hardware level, the electronic device includes a processor, and optionally further includes an internal bus, a network interface, and a memory. The Memory may include a Memory, such as a Random-Access Memory (RAM), and may further include a non-volatile Memory, such as at least 1 disk Memory. Of course, the electronic device may also include hardware required for other services.
The processor, the network interface, and the memory may be connected to each other via an internal bus, which may be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 3, but this does not indicate only one bus or one type of bus.
And the memory is used for storing programs. In particular, the program may include program code comprising computer operating instructions. The memory may include both memory and non-volatile storage and provides instructions and data to the processor.
The processor reads the corresponding computer program from the nonvolatile memory into the memory and then runs the computer program to form the shared resource access control device on the logic level. The processor is used for executing the program stored in the memory and is specifically used for executing the following operations:
judging whether the transaction to be packaged belongs to a packageable transaction or not based on a dependency field set in the transaction to be packaged;
if yes, packaging the transaction to be packaged;
otherwise, waiting for packing.
The method performed by the apparatus for packaging transaction disclosed in the embodiment of fig. 1 in this specification can be applied to or implemented by a processor. The processor may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in a processor or instructions in the form of software. The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present specification may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the methods disclosed in connection with the embodiments of this specification may be embodied directly in a hardware decoding processor, or in a combination of hardware and software modules within a decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory, and a processor reads information in the memory and completes the steps of the method in combination with hardware of the processor.
The electronic device may also execute the method of fig. 1, and the functions of the apparatus for implementing a package transaction in the embodiment shown in fig. 1 are not described herein again in this specification.
Of course, besides the software implementation, the electronic device of the embodiment of the present disclosure does not exclude other implementations, such as a logic device or a combination of software and hardware, and the like, that is, the execution subject of the following processing flow is not limited to each logic unit, and may also be hardware or a logic device.
According to the technical scheme, whether the transaction to be packaged belongs to a packageable transaction is judged based on the dependency field set in the transaction to be packaged; if yes, packaging the transaction to be packaged; otherwise, wait. Therefore, whether the transaction to be packaged belongs to the packageable transaction or not can be determined according to the dependency field, the packageable transaction can be packaged, the occurrence of transaction execution failure caused by transaction dependency loss is avoided, loss caused by transaction failure is reduced, and user experience is improved.
EXAMPLE III
Embodiments of the present specification also propose a computer-readable storage medium storing one or more programs, the one or more programs comprising instructions, which when executed by a portable electronic device comprising a plurality of application programs, are capable of causing the portable electronic device to perform the method of the embodiment shown in fig. 1, and in particular for performing the method of:
judging whether the transaction to be packaged belongs to a packageable transaction or not based on a dependency field set in the transaction to be packaged;
if yes, packaging the transaction to be packaged;
otherwise, waiting for packing.
According to the technical scheme, whether the transaction to be packaged belongs to a packageable transaction is judged based on the dependency field set in the transaction to be packaged; if yes, packaging the transaction to be packaged; otherwise, wait. Therefore, whether the transaction to be packaged belongs to the packageable transaction or not can be determined according to the dependency field, the packageable transaction is packaged, the occurrence of transaction execution failure caused by transaction dependency loss is avoided, loss caused by transaction failure is reduced, and user experience is improved.
Example four
Fig. 4 is a schematic structural diagram of an apparatus 400 for a package transaction according to an embodiment of the present disclosure. Referring to fig. 4, in one software implementation, the apparatus 400 for packaging transactions may include:
a judging module 402, configured to judge whether a transaction to be packaged belongs to a packageable transaction based on a dependency field set in the transaction to be packaged;
a packaging module 404, configured to package the transaction to be packaged if the transaction belongs to a packageable transaction;
otherwise, waiting for packing.
Optionally, the determining module 402, when determining whether the transaction to be packaged belongs to a packageable transaction based on a dependency field set in the transaction to be packaged, is specifically configured to:
judging whether a transaction identifier of the transaction depended on by the transaction to be packaged is added in the dependence field;
if not, determining that the transaction to be packaged belongs to a packageable transaction;
otherwise, judging whether the transaction depended on by the transaction to be packaged is chain-linked or packaged, if so, determining that the transaction to be packaged belongs to a packageable transaction, otherwise, judging whether the transaction depended on by the transaction to be packaged is in a transaction pool, if so, recursively judging whether the depended transactions of all the transactions depended on by the transaction to be packaged finally point to the chain-linked or packaged transaction, if so, sequentially packaging all the transactions depended on by the transaction to be packaged in the transaction pool according to the dependency sequence, and determining that the transaction to be packaged belongs to the packageable transaction, otherwise, determining that the transaction to be packaged does not belong to the packageable transaction; determining that the transaction to be packaged belongs to a packagable transaction if the transaction on which the transaction to be packaged depends is not in a transaction pool.
In a specific implementation manner of the embodiment of the present specification, the dependency field is a dependency array, and the transaction identifier of the transaction dependent transaction to be packaged included in the dependency array is a hash value of the transaction dependent transaction to be packaged.
In yet another specific implementation of the embodiments of the present specification, the content in the dependency field is automatically added after a user initiates a transaction.
According to the technical scheme, whether the transaction to be packaged belongs to a packageable transaction is judged based on the dependency field set in the transaction to be packaged; if yes, packaging the transaction to be packaged; otherwise, wait. Therefore, whether the transaction to be packaged belongs to the packageable transaction or not can be determined according to the dependency field, the packageable transaction can be packaged, the occurrence of transaction execution failure caused by transaction dependency loss is avoided, loss caused by transaction failure is reduced, and user experience is improved.
It should be understood that the apparatus for a package transaction according to the embodiments of the present disclosure may also perform the method performed by the apparatus (or device) for a package transaction in fig. 1, and the functions of the apparatus (or device) for a package transaction according to the embodiments shown in fig. 1 are not described herein again.
In short, the above description is only a preferred embodiment of the present disclosure, and is not intended to limit the scope of the present disclosure. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present specification shall be included in the protection scope of the present specification.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus 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 apparatus. 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 apparatus that comprises the element.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.

Claims (8)

1. A method of a packaged transaction for use in an account-based blockchain network, the method comprising:
judging whether the transaction to be packaged belongs to a packageable transaction or not based on a dependency field set in the transaction to be packaged;
if yes, packaging the transaction to be packaged;
otherwise, waiting for packing;
wherein, based on the dependency field set in the transaction to be packaged, judging whether the transaction to be packaged belongs to a packagable transaction, specifically comprising:
judging whether a transaction identifier of the transaction depended on by the transaction to be packaged is added in the dependence field;
if not, determining that the transaction to be packaged belongs to a packageable transaction;
otherwise, judging whether the transaction depended on by the transaction to be packaged is chain-linked or packaged, if so, determining that the transaction to be packaged belongs to a packageable transaction, otherwise, judging whether the transaction depended on by the transaction to be packaged is in a transaction pool, if so, recursively judging whether the depended transactions of all the transactions depended on by the transaction to be packaged finally point to the chain-linked or packaged transaction, if so, sequentially packaging all the transactions depended on by the transaction to be packaged in the transaction pool according to the dependency sequence, and determining that the transaction to be packaged belongs to the packageable transaction, otherwise, determining that the transaction to be packaged does not belong to the packageable transaction; determining that the transaction to be packaged does not belong to a packagable transaction if the transaction on which the transaction to be packaged depends is not in a transaction pool.
2. The method of claim 1, wherein the dependency field is a dependency array, and the transaction identification of the transaction dependent transaction to be packaged contained in the dependency array is a hash value of the transaction dependent transaction to be packaged.
3. The method of claim 1, wherein the content in the dependency field is added automatically upon initiation of a transaction by a user.
4. An apparatus for packet transaction in an account-based blockchain network, the apparatus comprising:
the judging module is used for judging whether the transaction to be packaged belongs to a packageable transaction or not based on a dependency field set in the transaction to be packaged;
the packaging module is used for packaging the transaction to be packaged if the transaction belongs to a packagable transaction;
otherwise, waiting for packing;
the judging module is used for judging whether the transaction to be packaged belongs to a packageable transaction or not based on a dependency field set in the transaction to be packaged, and is specifically used for:
judging whether a transaction identifier of the transaction depended on by the transaction to be packaged is added in the dependence field;
if not, determining that the transaction to be packaged belongs to a packageable transaction;
otherwise, judging whether the transaction depended on by the transaction to be packaged is chain-linked or packaged, if so, determining that the transaction to be packaged belongs to a packageable transaction, otherwise, judging whether the transaction depended on by the transaction to be packaged is in a transaction pool, if so, recursively judging whether the depended transactions of all the transactions depended on by the transaction to be packaged finally point to the chain-linked or packaged transaction, if so, sequentially packaging all the transactions depended on by the transaction to be packaged in the transaction pool according to the dependency sequence, and determining that the transaction to be packaged belongs to the packageable transaction, otherwise, determining that the transaction to be packaged does not belong to the packageable transaction; determining that the transaction to be packaged does not belong to a packagable transaction if the transaction on which the transaction to be packaged depends is not in a transaction pool.
5. The apparatus of claim 4, the dependency field being a dependency array, the transaction identification of the transaction dependent transaction to be packaged contained in the dependency array being a hash value of the transaction dependent transaction to be packaged.
6. The apparatus of claim 4, the content in the dependency field is added automatically upon initiation of a transaction by a user.
7. An electronic device, comprising: a memory, a processor, and a computer program stored on the memory and executable on the processor, the computer program being executed by the processor to:
judging whether the transaction to be packaged belongs to a packageable transaction or not based on a dependency field set in the transaction to be packaged;
if yes, packaging the transaction to be packaged;
otherwise, waiting for packing;
wherein, based on the dependency field set in the transaction to be packaged, judging whether the transaction to be packaged belongs to a packagable transaction, specifically comprising:
judging whether a transaction identifier of the transaction depended on by the transaction to be packaged is added in the dependence field;
if not, determining that the transaction to be packaged belongs to a packageable transaction;
otherwise, judging whether the transaction depended on by the transaction to be packaged is chain-linked or packaged, if so, determining that the transaction to be packaged belongs to a packageable transaction, otherwise, judging whether the transaction depended on by the transaction to be packaged is in a transaction pool, if so, recursively judging whether the depended transactions of all the transactions depended on by the transaction to be packaged finally point to the chain-linked or packaged transaction, if so, sequentially packaging all the transactions depended on by the transaction to be packaged in the transaction pool according to the dependency sequence, and determining that the transaction to be packaged belongs to the packageable transaction, otherwise, determining that the transaction to be packaged does not belong to the packageable transaction; determining that the transaction to be packaged does not belong to a packagable transaction if the transaction on which the transaction to be packaged depends is not in a transaction pool.
8. A computer-readable storage medium storing one or more programs that, when executed by an electronic device including a plurality of application programs, cause the electronic device to:
judging whether the transaction to be packaged belongs to a packageable transaction or not based on a dependency field set in the transaction to be packaged;
if yes, packaging the transaction to be packaged;
otherwise, waiting for packing;
wherein, based on the dependency field set in the transaction to be packaged, judging whether the transaction to be packaged belongs to a packagable transaction, specifically comprising:
judging whether a transaction identifier of the transaction depended on by the transaction to be packaged is added in the dependence field;
if not, determining that the transaction to be packaged belongs to a packageable transaction;
otherwise, judging whether the transaction depended on by the transaction to be packaged is chain-linked or packaged, if so, determining that the transaction to be packaged belongs to a packageable transaction, otherwise, judging whether the transaction depended on by the transaction to be packaged is in a transaction pool, if so, recursively judging whether the depended transactions of all the transactions depended on by the transaction to be packaged finally point to the chain-linked or packaged transaction, if so, sequentially packaging all the transactions depended on by the transaction to be packaged in the transaction pool according to the dependency sequence, and determining that the transaction to be packaged belongs to the packageable transaction, otherwise, determining that the transaction to be packaged does not belong to the packageable transaction; determining that the transaction to be packaged does not belong to a packagable transaction if the transaction on which the transaction to be packaged depends is not in a transaction pool.
CN201910851709.5A 2019-09-10 2019-09-10 Packaging transaction method and device, electronic equipment and storage medium Active CN110648125B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910851709.5A CN110648125B (en) 2019-09-10 2019-09-10 Packaging transaction method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910851709.5A CN110648125B (en) 2019-09-10 2019-09-10 Packaging transaction method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110648125A CN110648125A (en) 2020-01-03
CN110648125B true CN110648125B (en) 2022-08-02

Family

ID=68991716

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910851709.5A Active CN110648125B (en) 2019-09-10 2019-09-10 Packaging transaction method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110648125B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111724258B (en) * 2020-05-28 2024-05-31 天津大学 Method for realizing alliance chain transaction concurrency scheme based on ring topology, dependency graph and multi-version control
CN111882322A (en) * 2020-07-20 2020-11-03 杭州溪塔科技有限公司 Method and device for packaging transactions in sequence and electronic equipment
CN112837156A (en) * 2021-02-10 2021-05-25 中国人民银行数字货币研究所 Transaction method and device with fixed execution sequence

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105446757A (en) * 2014-08-21 2016-03-30 阿里巴巴集团控股有限公司 Data packet processing method and device
CN106656974A (en) * 2016-10-17 2017-05-10 江苏通付盾科技有限公司 Block chain grouping consensus method and system
CN106991607A (en) * 2017-03-29 2017-07-28 杭州秘猿科技有限公司 A kind of unordered transaction control method based on block chain account model
CN108564470A (en) * 2018-04-17 2018-09-21 北京天德科技有限公司 The transaction distribution method of block is built in a kind of block chain parallel
CN108764909A (en) * 2018-06-01 2018-11-06 杭州复杂美科技有限公司 A kind of block chain data monitoring and managing method
CN109064171A (en) * 2018-07-26 2018-12-21 杭州秘猿科技有限公司 A kind of method, apparatus and electronic system of block chain parallel transaction
CN109214823A (en) * 2018-08-27 2019-01-15 北京京东金融科技控股有限公司 Transaction verification method, device, storage medium and electronic equipment based on block chain
CN109360100A (en) * 2018-11-13 2019-02-19 北京航空航天大学 Transaction rapid acknowledgment method and device based on block chain technology
CN109360095A (en) * 2018-09-27 2019-02-19 深圳技术大学(筹) A kind of processing method, device and the terminal device of block chain transaction data
CN109636395A (en) * 2019-02-15 2019-04-16 上海溢唐数据科技有限公司 A kind of across the chain transaction processing system of multi-tiling chain and method
WO2019072280A2 (en) * 2018-11-27 2019-04-18 Alibaba Group Holding Limited Executing multi-party transactions using smart contracts
CN109687953A (en) * 2018-12-24 2019-04-26 杭州复杂美科技有限公司 Classification of business transaction method, equipment and storage medium
CN110197377A (en) * 2019-06-12 2019-09-03 杭州秘猿科技有限公司 A kind of block chain transaction validation verification method, apparatus and electronic equipment

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11823178B2 (en) * 2017-11-17 2023-11-21 International Business Machines Corporation Optimization of high volume transaction performance on a blockchain
CN109656616A (en) * 2018-11-26 2019-04-19 平安科技(深圳)有限公司 A kind of packaging method, system and electronic equipment based on transaction process optimization
CN109801070B (en) * 2019-01-12 2020-11-06 杭州复杂美科技有限公司 Transaction queuing method, device and storage medium

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105446757A (en) * 2014-08-21 2016-03-30 阿里巴巴集团控股有限公司 Data packet processing method and device
CN106656974A (en) * 2016-10-17 2017-05-10 江苏通付盾科技有限公司 Block chain grouping consensus method and system
CN106991607A (en) * 2017-03-29 2017-07-28 杭州秘猿科技有限公司 A kind of unordered transaction control method based on block chain account model
CN108564470A (en) * 2018-04-17 2018-09-21 北京天德科技有限公司 The transaction distribution method of block is built in a kind of block chain parallel
CN108764909A (en) * 2018-06-01 2018-11-06 杭州复杂美科技有限公司 A kind of block chain data monitoring and managing method
CN109064171A (en) * 2018-07-26 2018-12-21 杭州秘猿科技有限公司 A kind of method, apparatus and electronic system of block chain parallel transaction
CN109214823A (en) * 2018-08-27 2019-01-15 北京京东金融科技控股有限公司 Transaction verification method, device, storage medium and electronic equipment based on block chain
CN109360095A (en) * 2018-09-27 2019-02-19 深圳技术大学(筹) A kind of processing method, device and the terminal device of block chain transaction data
CN109360100A (en) * 2018-11-13 2019-02-19 北京航空航天大学 Transaction rapid acknowledgment method and device based on block chain technology
WO2019072280A2 (en) * 2018-11-27 2019-04-18 Alibaba Group Holding Limited Executing multi-party transactions using smart contracts
CN109687953A (en) * 2018-12-24 2019-04-26 杭州复杂美科技有限公司 Classification of business transaction method, equipment and storage medium
CN109636395A (en) * 2019-02-15 2019-04-16 上海溢唐数据科技有限公司 A kind of across the chain transaction processing system of multi-tiling chain and method
CN110197377A (en) * 2019-06-12 2019-09-03 杭州秘猿科技有限公司 A kind of block chain transaction validation verification method, apparatus and electronic equipment

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
Power Efficient Hardware Transactional Memory: Dynamic Issue of Transactions;Do, Sang Wook Stephen等;《ACM Transactions On Architecture And Code Optimization》;20160430;第13卷(第1期);第93-98页 *
区块链中,交易被如何打包进区块;唐霜;《https://www.tangshuang.net/4097.html》;20180307;第1-2页 *
基于区块链的电子证据系统架构模型;侯义斌等;《计算机科学》;20180615;第45卷(第S1期);第348-351页 *
深入理解以太坊-3.6交易管理;华章计算机;《https://bbs.huaweicloud.com/blogs/105259》;20190719;第1-4页 *

Also Published As

Publication number Publication date
CN110648125A (en) 2020-01-03

Similar Documents

Publication Publication Date Title
CN108846749B (en) Partitioned transaction execution system and method based on block chain technology
CN110659988B (en) Parallel processing method and device for block chain consensus and execution and electronic equipment
US10999060B2 (en) Data processing method and apparatus
CN110648125B (en) Packaging transaction method and device, electronic equipment and storage medium
CN110648136B (en) Consensus and transaction synchronous parallel processing method and device and electronic equipment
CN110020859B (en) Parallel execution block chain consensus method and device and electronic equipment
CN111383031B (en) Intelligent contract execution method and system in block chain and electronic equipment
CN111369358B (en) Block chain consensus method and device and electronic equipment
CN111882322A (en) Method and device for packaging transactions in sequence and electronic equipment
CN108427636A (en) Test method, system and the electronic equipment of application
CN111698244B (en) Method and device for rapidly participating in consensus of newly added nodes and electronic equipment
CN109582398B (en) State processing method and device and electronic equipment
CN111488289A (en) Fault positioning method, device and equipment
CN117035452A (en) Root cause positioning method and system of business scene and electronic equipment
CN111523887A (en) Authority control method and device of intelligent contract read-only method and electronic equipment
CN111709748B (en) Transaction execution method and device with business attribute and electronic equipment
CN111949297B (en) Block chain intelligent contract upgrading method and device and electronic equipment
CN114527983A (en) Interface adaptation method and device based on middleware and electronic equipment
CN110704134A (en) Method and device for performing function expansion on block chain
CN108650150B (en) Data verification method and device
CN113706146B (en) Processing method, device and system for executing batch transactions based on blockchain
CN110750271B (en) Service aggregation, method and device for executing aggregated service and electronic equipment
CN113485758A (en) Micro-service issuing method and device, electronic equipment and storage medium
CN110599139B (en) Block output method and device in block chain consensus algorithm
CN108829732B (en) Data processing method and device

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
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20200103

Assignee: Hangzhou Xita Technology Co.,Ltd.

Assignor: CRYPTAPE Co.,Ltd.

Contract record no.: X2022330000524

Denomination of invention: A packaging transaction method, device, electronic equipment and storage medium

Granted publication date: 20220802

License type: Common License

Record date: 20221010

EE01 Entry into force of recordation of patent licensing contract
TR01 Transfer of patent right

Effective date of registration: 20231221

Address after: 10/F, Guotou Building, No. 398 Shaoxing Road, Gongshu District, Hangzhou City, Zhejiang Province, 310000

Patentee after: Hangzhou Xita Technology Co.,Ltd.

Address before: Room 1301, block a, Huaxing Times Square, 478 Wensan Road, Xihu District, Hangzhou City, Zhejiang Province, 310013

Patentee before: CRYPTAPE Co.,Ltd.

TR01 Transfer of patent right