CN113225193A - Delayed transaction storage method, computer device and storage medium - Google Patents

Delayed transaction storage method, computer device and storage medium Download PDF

Info

Publication number
CN113225193A
CN113225193A CN202110488621.9A CN202110488621A CN113225193A CN 113225193 A CN113225193 A CN 113225193A CN 202110488621 A CN202110488621 A CN 202110488621A CN 113225193 A CN113225193 A CN 113225193A
Authority
CN
China
Prior art keywords
delayed
transaction
delay
deposit
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110488621.9A
Other languages
Chinese (zh)
Inventor
姜鹏
王志文
吴思进
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Fuzamei Technology Co Ltd
Original Assignee
Hangzhou Fuzamei 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 Hangzhou Fuzamei Technology Co Ltd filed Critical Hangzhou Fuzamei Technology Co Ltd
Priority to CN202110488621.9A priority Critical patent/CN113225193A/en
Publication of CN113225193A publication Critical patent/CN113225193A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/14Charging, metering or billing arrangements for data wireline or wireless communications
    • H04L12/1432Metric aspects
    • H04L12/1439Metric aspects time-based
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The invention provides a delayed transaction storage method, computer equipment and a storage medium, wherein the method comprises the following steps: receiving a delayed deposit transaction; the delayed deposit certificate transaction is generated according to the delayed transaction, a payload field of the delayed deposit certificate transaction comprises the delayed transaction, and the delayed transaction comprises delayed information; when the delayed evidence-storing transaction is judged to be the first type of transaction needing delay, determining the delay time of the delayed transaction according to the delay information; determining the delay charging of the delay deposit transaction according to the pre-configured delay charging calculation rule and the delay time; determining the lowest total commission charge of the delayed deposit evidence transaction according to the delayed commission charge and the basic commission charge of the delayed deposit evidence transaction; and when the procedure charge of the delayed certificate-deposit transaction is not less than the minimum procedure charge, deducting the procedure charge of the delayed certificate-deposit transaction, and storing the delayed certificate-deposit transaction locally. The method and the device enhance the safety of the block chain network on the basis of providing the delayed transaction storage service.

Description

Delayed transaction storage method, computer device and storage medium
Technical Field
The application relates to the technical field of block chains, in particular to a delayed transaction storage method, computer equipment and a storage medium.
Background
In another patent application with application number 202011425280.2 filed by the applicant, the applicant proposes that a delayed transaction is included in payload of a delayed credit transaction, and a method for storing the delayed transaction locally when a commission charge of the delayed credit transaction is deducted is adopted, so as to enhance the block chain network security.
In the above mechanism, the fees for storing delayed transactions with different delay durations are the same, that is, a malicious node can store a large number of delayed transactions with longer delay durations by using only a small basic fee (equivalent to the above-mentioned fee), which eventually results in a problem that a local storage space is largely occupied.
Disclosure of Invention
In view of the above-mentioned drawbacks and deficiencies of the prior art, it is desirable to provide a delayed transaction storage method, a computer device, and a storage medium that enhance the security of a blockchain network based on providing a delayed transaction storage service.
In a first aspect, the present invention provides a method for storing delayed transactions applicable to a blockchain node, where the method includes:
receiving a delayed deposit transaction; the delayed deposit certificate transaction is generated according to the delayed transaction, a payload field of the delayed deposit certificate transaction comprises the delayed transaction, and the delayed transaction comprises delayed information;
when the delayed evidence-storing transaction is judged to be the first type of transaction needing delay, determining the delay time of the delayed transaction according to the delay information;
determining the delay charging of the delay deposit transaction according to the pre-configured delay charging calculation rule and the delay time;
determining the lowest total commission charge of the delayed deposit evidence transaction according to the delayed commission charge and the basic commission charge of the delayed deposit evidence transaction;
judging whether the commission charge of the delayed certificate-keeping transaction is not less than the minimum commission charge:
and if so, deducting the commission charge of the delayed deposit certificate transaction, and storing the delayed deposit certificate transaction to the local.
In a second aspect, the present invention also provides an apparatus comprising one or more processors and a memory, wherein the memory contains instructions executable by the one or more processors to cause the one or more processors to perform a delayed transaction storage method provided according to embodiments of the present invention.
In a third aspect, the present invention also provides a storage medium storing a computer program that causes a computer to execute the delayed transaction storage method provided according to the embodiments of the present invention.
The delayed transaction storage method, the computer equipment and the storage medium provided by the embodiments of the invention receive the delayed deposit evidence transaction; the delayed deposit certificate transaction is generated according to the delayed transaction, a payload field of the delayed deposit certificate transaction comprises the delayed transaction, and the delayed transaction comprises delayed information; when the delayed evidence-storing transaction is judged to be the first type of transaction needing delay, determining the delay time of the delayed transaction according to the delay information; determining the delay charging of the delay deposit transaction according to the pre-configured delay charging calculation rule and the delay time; determining the lowest total commission charge of the delayed deposit evidence transaction according to the delayed commission charge and the basic commission charge of the delayed deposit evidence transaction; the method deducts the commission of the delayed card-storing transaction when the commission of the delayed card-storing transaction is not less than the minimum commission and stores the delayed transaction in the local area, and enhances the safety of the block chain network on the basis of providing the delayed transaction storage service.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
fig. 1 is a flowchart of a delayed transaction storage method according to an embodiment of the present invention.
Fig. 2 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the present invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Fig. 1 is a flowchart of a delayed transaction storage method according to an embodiment of the present invention. As shown in fig. 1, in this embodiment, the present invention provides a method for storing deferred transactions applicable to a blockchain node, where the method includes:
s11: receiving a delayed deposit transaction; the delayed deposit certificate transaction is generated according to the delayed transaction, a payload field of the delayed deposit certificate transaction comprises the delayed transaction, and the delayed transaction comprises delayed information;
s13: when the delayed evidence-storing transaction is judged to be the first type of transaction needing delay, determining the delay time of the delayed transaction according to the delay information;
s15: determining the delay charging of the delay deposit transaction according to the pre-configured delay charging calculation rule and the delay time;
s17: determining the lowest total commission charge of the delayed deposit evidence transaction according to the delayed commission charge and the basic commission charge of the delayed deposit evidence transaction;
s191: judging whether the commission charge of the delayed certificate-keeping transaction is not less than the minimum commission charge:
if yes, go to step S192: deducting the commission fee of the delayed deposit transaction, and storing the delayed transaction to the local.
Specifically, S15 is configured to: the delayed 1s is required to pay the handling fee m, and the delayed handling fee of the delayed credit card transaction is determined according to the delayed time length as an example;
the client generates a delayed evidence storing transaction tx2 according to the delayed transaction tx 1; the payload field of tx2 includes tx1, tx1 includes delay information, and it is assumed that the delay information is t 1;
the blockchain node performs step S11, receiving tx 2;
the block chain node executes the step S13, when it is determined that tx2 is the first type transaction requiring delay, the delay duration of tx1 is determined according to t2, and if the time node for executing tx2 is t1, the delay duration of tx1 is determined to be t2+ t 1;
the blockchain node executes step S15 to determine the delay handling fee of tx2, where the delay handling fee of tx2 is t1 × m;
the blockchain node executes step S17, and determines the lowest total commission fee fe _ min of tx2 according to the basic commission fees of t1 × m and tx 2;
the blockchain node executes step S191 to determine whether fe _ tx2 is not less than fe _ min:
when the fe _ tx2 is not less than fe _ min, step S192 is performed to deduct the commission fee fe _ tx2 of tx2 and store tx1 locally.
In more embodiments, tx1 may also be carried in tx2 according to actual requirements, for example, tx1 is used as an appendix to tx2, which may achieve the same technical effect;
in further embodiments, the delay information may also be configured according to actual requirements, for example, configured as a fixed time, and the same technical effect may be achieved.
In further embodiments, the delay information of the delayed transaction may be configured in other fields according to actual requirements, for example, when the delay information of the delayed transaction is configured in the signature information, the assets delayed in the delayed transaction may be not only assets in the delayed contract, but also assets of other contracts (i.e. the executor name of the delayed transaction is configured as other contracts outside the delayed contract), or global assets (i.e. the executor name of the delayed transaction is configured as null).
In more embodiments, the manner of determining whether the delayed evidence-storing transaction is the first type of transaction that needs to be delayed may also be configured according to actual requirements, for example, the transaction is configured with a delayed transaction field, when the delayed transaction field of one transaction is empty, the transaction is a transaction that does not need to be delayed, and when the delayed transaction field of the transaction is not empty, the transaction is a transaction that does not need to be delayed, so that the same technical effect may be achieved.
In further embodiments, the method for determining the basic commission of the delayed credit transaction may be configured according to actual requirements, for example, the basic commission is configured as a fixed value, or a floating tariff for calculating the basic commission is determined according to congestion conditions of the blockchain network, and then the basic commission is determined according to a storage space occupied by the delayed credit transaction and the floating tariff, so that the same technical effect may be achieved.
In further embodiments, the S15 may be further configured according to actual requirements, for example, configured to determine the delayed charging fee of the delayed deposit transaction according to a preconfigured delayed charging fee calculation rule, a delayed time length, and a storage space occupied by the delayed transaction, and assuming that the storage space occupied by the delayed transaction is n, the delayed charging fee of the delayed deposit transaction is t1 m n, which may achieve the same technical effect.
The embodiment enhances the safety of the block chain network on the basis of providing the delayed transaction storage service.
Preferably, the determining the delayed charging for the delayed credit transaction according to the pre-configured delayed charging calculation rule and the delayed time duration includes:
and determining the delay charging of the delay deposit evidence transaction according to the pre-configured delay charging calculation rule, the delay time length and the storage space occupied by the delay transaction.
The delayed transaction storage principle of the above embodiment can refer to the method shown in fig. 1, and is not described herein again.
Preferably, each block link point is configured with the same total storage space for storing the first type of transaction, and determining the delay charge of the delayed deposit evidence transaction according to the pre-configured delay charge calculation rule and the delay time duration includes:
determining a delay rate according to the spent storage space and the total storage space of the spent first-class transaction;
and determining the delay handling charge of the delay deposit evidence transaction according to the delay rate, the pre-configured delay handling charge calculation rule and the delay time length.
Specifically, assuming that the total storage space allocated to each block node for storing the first type of transaction is 100M, each block node is allocated with a delay rate policy: when the spent storage space of the spent first type transaction reaches 20M, the required rate doubles for every 10M increase; and assuming a base delay rate of 1;
assume that the spent storage space of the first type of transaction that has been spent at this time is 35M;
determining a delay rate to be 2 by the block chain node;
the blockchain node determines the delay commission of tx2 to be t1 m 2.
The embodiment dynamically adjusts the delay rate, further solves the problem that a large amount of local storage space is occupied, and further ensures the availability of the block chain nodes.
Preferably, the block link point is configured with a first interface for other terminals to obtain the total memory space and the spent memory space.
Preferably, the determining the lowest total commission for the delayed credit transaction based on the delayed commission, the base commission for the delayed credit transaction comprises:
determining a floating rate for calculating a basic handling fee according to the congestion condition of the block chain network;
determining the basic commission charge of the delayed deposit certificate transaction according to the storage space occupied by the delayed deposit certificate transaction and the floating rate;
and determining the lowest total commission charge of the delayed evidence-storing transaction according to the delayed commission charge and the basic commission charge.
The delayed transaction storage principle of the above embodiment can refer to the method shown in fig. 1, and is not described herein again.
Preferably, the delayed transaction further comprises a hash value of the delayed credit transaction; block link points perform delayed transactions:
finding out corresponding delayed evidence storing transaction through the hash value, and judging whether the delayed transaction in the payload of the delayed evidence storing transaction is the same as the delayed transaction:
otherwise, the delayed transaction fails to be executed.
The embodiment ensures that the locally stored delayed transactions corresponding to the delayed credit transactions are not replaced.
Fig. 2 is a schematic structural diagram of a computer device according to an embodiment of the present invention. As shown in fig. 2, as another aspect, the present application also provides a computer apparatus including one or more Central Processing Units (CPUs) 201 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)202 or a program loaded from a storage section 208 into a Random Access Memory (RAM) 203. In the RAM203, various programs and data necessary for the operation of the computer apparatus are also stored. The CPU201, ROM202, and RAM203 are connected to each other via a bus 204. An input/output (I/O) interface 205 is also connected to bus 204.
The following components are connected to the I/O interface 205: an input portion 206 including a keyboard, a mouse, and the like; an output section 207 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 208 including a hard disk and the like; and a communication section 209 including a network interface card such as a LAN card, a modem, or the like. The communication section 209 performs communication processing via a network such as the internet. A drive 210 is also connected to the I/O interface 205 as needed. A removable medium 211 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 210 as necessary, so that a computer program read out therefrom is mounted into the storage section 208 as necessary.
In particular, according to an embodiment of the present disclosure, the method described in any of the above embodiments may be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program tangibly embodied on a machine-readable medium, the computer program comprising program code for performing any of the methods described above. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 209 and/or installed from the removable medium 211.
As yet another aspect, the present application also provides a computer-readable storage medium, which may be the computer-readable storage medium included in the apparatus of the above-described embodiment; or it may be a computer-readable storage medium that exists separately and is not assembled into a computer device. The computer readable storage medium stores one or more programs for use by one or more processors in performing the methods described in the present application.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units or modules described in the embodiments of the present application may be implemented by software or hardware. The described units or modules may also be provided in a processor, for example, each of the described units may be a software program provided in a computer or a mobile intelligent device, or may be a separately configured hardware device. Wherein the designation of a unit or module does not in some way constitute a limitation of the unit or module itself.
The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention herein disclosed is not limited to the particular combination of features described above, but also encompasses other arrangements formed by any combination of the above features or their equivalents without departing from the spirit of the present application. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (7)

1. A method for storing delayed transactions, the method being applicable to a blockchain node, the method comprising:
receiving a delayed deposit transaction; the delayed deposit certificate transaction is generated according to delayed transaction, a payload field of the delayed deposit certificate transaction comprises the delayed transaction, and the delayed transaction comprises delayed information;
when the delayed deposit evidence transaction is judged to be a first type transaction needing delay, determining the delay time length of the delayed transaction according to the delay information;
determining the delay charging of the delay deposit evidence transaction according to a pre-configured delay charging calculation rule and the delay time;
determining the lowest total commission charge of the delayed deposit evidence transaction according to the delayed commission charge and the basic commission charge of the delayed deposit evidence transaction;
judging whether the commission charge of the delayed deposit evidence transaction is not less than the minimum commission charge:
and if so, deducting the commission charge of the delayed deposit receipt transaction, and storing the delayed deposit receipt transaction to the local.
2. The method of claim 1, wherein determining the delayed charging for the delayed credit transaction according to the pre-configured delayed charging calculation rule and the delay time comprises:
and determining the delay commission of the delay deposit evidence transaction according to a pre-configured delay commission calculation rule, the delay duration and the storage space occupied by the delay transaction.
3. The method of claim 1, wherein each block link point is configured with the same total storage space for storing the first type of transaction, and wherein determining the delay charge for the delayed credit transaction according to the pre-configured delay charge calculation rule and the delay time duration comprises:
determining a delay rate based on the spent storage space of the first type of transaction that has been spent, the total storage space;
and determining the delay handling charge of the delay deposit evidence transaction according to the delay rate, the pre-configured delay handling charge calculation rule and the delay time length.
4. The method of claim 3, wherein the blockchain node is configured with a first interface for other terminals to obtain the total memory space and the spent memory space.
5. The method of any of claims 1-4, wherein determining the lowest total commission for the delayed credit transaction based on the delayed commission, the base commission for the delayed credit transaction comprises:
determining a floating rate for calculating the basic handling fee according to the congestion condition of the block chain network;
determining the basic commission charge of the delayed deposit certificate transaction according to the storage space occupied by the delayed deposit certificate transaction and the floating rate;
and determining the lowest total commission charge of the delayed deposit evidence transaction according to the delayed commission charge and the basic commission charge.
6. A computer device, the device comprising:
one or more processors;
a memory for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method recited in any of claims 1-5.
7. A storage medium storing a computer program, characterized in that the program, when executed by a processor, implements the method according to any one of claims 1-5.
CN202110488621.9A 2021-05-06 2021-05-06 Delayed transaction storage method, computer device and storage medium Pending CN113225193A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110488621.9A CN113225193A (en) 2021-05-06 2021-05-06 Delayed transaction storage method, computer device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110488621.9A CN113225193A (en) 2021-05-06 2021-05-06 Delayed transaction storage method, computer device and storage medium

Publications (1)

Publication Number Publication Date
CN113225193A true CN113225193A (en) 2021-08-06

Family

ID=77091131

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110488621.9A Pending CN113225193A (en) 2021-05-06 2021-05-06 Delayed transaction storage method, computer device and storage medium

Country Status (1)

Country Link
CN (1) CN113225193A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110445755A (en) * 2019-07-04 2019-11-12 杭州复杂美科技有限公司 Hand over pregnable defence method, equipment and storage medium
EP3595240A1 (en) * 2018-07-13 2020-01-15 Kevin Kei Tuncer Distributed blockchain with delayed transaction
CN112600664A (en) * 2020-12-09 2021-04-02 杭州复杂美科技有限公司 Delayed transaction generation method, delayed transaction execution device and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3595240A1 (en) * 2018-07-13 2020-01-15 Kevin Kei Tuncer Distributed blockchain with delayed transaction
CN110445755A (en) * 2019-07-04 2019-11-12 杭州复杂美科技有限公司 Hand over pregnable defence method, equipment and storage medium
CN112600664A (en) * 2020-12-09 2021-04-02 杭州复杂美科技有限公司 Delayed transaction generation method, delayed transaction execution device and storage medium

Similar Documents

Publication Publication Date Title
CN109035016B (en) Multi-chain concurrent transaction method
CN112600664B (en) Delayed transaction generation method, delayed transaction execution device and storage medium
CN110020846B (en) Transfer service processing method and system
CN112132674A (en) Transaction processing method and device
CN112381543A (en) Multiple signature transaction method, device and storage medium
CN106484603B (en) A kind of service test method and device
CN109325744B (en) Payment processing method, payment processing device, payment processing medium and electronic equipment
CN110889686A (en) Multi-level account data processing method, device, equipment and readable storage medium
CN112182374B (en) Inventory control method, apparatus, electronic device, and computer-readable medium
CN111951112A (en) Intelligent contract execution method based on block chain, terminal equipment and storage medium
CN113225193A (en) Delayed transaction storage method, computer device and storage medium
CN113658003B (en) Transaction method, device, equipment and storage medium based on blockchain network
CN115965474A (en) Service processing method, device, equipment and storage medium
CN112950185B (en) Transaction fee payment method, device and storage medium based on parallel execution
CN112804351B (en) Flow control method, device, node, medium and product of block chain system
CN111694670B (en) Resource allocation method, apparatus, device and computer readable medium
CN113283891A (en) Information processing method and device and electronic equipment
CN112733202A (en) Parallel chain supervision consensus method, computer device and storage medium
CN110827009B (en) Fund transfer method and device based on account balance limit
CN111427691A (en) Virtual resource allocation method, device, medium and electronic equipment
CN115174588B (en) Bandwidth control method, device, apparatus, storage medium and program product
CN113643157A (en) Intelligent contract execution method and device
CN113283907B (en) Order request processing method, related device and storage medium
CN112884586B (en) Transaction execution method and block link point
CN111127003B (en) Wallet account payment method, device and storage medium

Legal Events

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

Application publication date: 20210806