CN110533534B - Method and device for generating and loading ordered mode block grouping - Google Patents

Method and device for generating and loading ordered mode block grouping Download PDF

Info

Publication number
CN110533534B
CN110533534B CN201910794480.6A CN201910794480A CN110533534B CN 110533534 B CN110533534 B CN 110533534B CN 201910794480 A CN201910794480 A CN 201910794480A CN 110533534 B CN110533534 B CN 110533534B
Authority
CN
China
Prior art keywords
block
order
unit
snapshot
loading
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
CN201910794480.6A
Other languages
Chinese (zh)
Other versions
CN110533534A (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.)
Chengdu Tongchuang Jialian Technology Co ltd
Original Assignee
Hainan Xinruan Software 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 Hainan Xinruan Software Co ltd filed Critical Hainan Xinruan Software Co ltd
Priority to CN201910794480.6A priority Critical patent/CN110533534B/en
Publication of CN110533534A publication Critical patent/CN110533534A/en
Application granted granted Critical
Publication of CN110533534B publication Critical patent/CN110533534B/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
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0633Lists, e.g. purchase orders, compilation or processing
    • G06Q30/0635Processing of requisition or of purchase orders
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Abstract

In the generation method, order form books are orderly stored in the block groups so as to rapidly achieve transactions in digital asset transactions such as transaction matching or settlement and the like. In the loading method, the matching engine loads the order book according to the order snapshot block, the order snapshot differential block, the order request block and the transaction matching block stored in the latest block group, so that the situation that the matching result is disordered can be avoided.

Description

Method and device for generating and loading ordered mode block grouping
Technical Field
The application relates to the field of digital asset transactions, in particular to a method and a device for generating and loading ordered mode block groups.
Background
The digital asset exchange is a physical platform for all traders to buy or sell digital assets and exchange the digital assets into other assets, and is a bridge for connecting the primary and secondary markets of digital asset investment. Digital assets are developed by a group of facing fair, transparent and free technical keepers, and the digital assets are point-to-point, transparent and decentralized currency credit systems, so that environments required for digital asset transaction, circulation, payment and the like are necessarily decentralized.
The user has absolute control right on the digital assets, the transaction matching and clearing are carried out on the blockchain, and the whole transaction process is transparent and public and cannot be tampered. However, in the prior art, when the trade matching and clearing are carried out on the blockchain, order book confusion occurs, and the order book needs to be re-combed in the digital asset trade such as the trade matching or clearing and the like each time, so that the orders of both parties can be clearly seen, and the workload during the trade is increased.
Therefore, how to make the contents of the order book clear during the transaction of the digital assets and reduce the workload during the transaction becomes a problem to be solved urgently in the industry.
Disclosure of Invention
The application provides a method and a device for generating and loading ordered mode block groups, which are used for solving the problem that the content of an order book is unclear during digital asset transaction in the prior art.
In a first aspect, the present application provides a method for generating an ordered pattern block grouping, where the method includes:
acquiring a snapshot of an effective order book, packaging the snapshot into order snapshot blocks, and storing the order snapshot blocks in a first block unit;
acquiring snapshots of a stage order book, packaging the snapshots into order snapshot differential blocks, and storing the order snapshot differential blocks in different second block units according to a time sequence, wherein the first block units and the second block units form block groups;
acquiring an order request, packaging the order request into an order request block, and storing the order request block in the first block unit and behind the corresponding order snapshot block, or storing the order request block in the second block unit and behind the corresponding order snapshot differential block;
and acquiring a transaction matching result of the matching engine, packaging the transaction matching result into a transaction matching block, and storing the transaction matching block in the first block unit or the second block unit and behind the corresponding order request block.
In a second aspect, the present application provides a method for loading ordered pattern block groups, where the method for loading ordered pattern block groups includes:
a matching engine acquires the latest block grouping;
loading an order snapshot block in a first block unit in the latest block group;
sequentially loading order snapshot differential blocks in each second block unit;
loading order request blocks and transaction matching blocks in the first block unit or the second block unit in sequence;
and updating the order book by using the order snapshot block, the order snapshot difference block, the order request block and the transaction matching block.
With reference to the second aspect, in a first possible implementation manner of the second aspect, the step of sequentially loading the order snapshot differential block in each second block unit includes:
sequentially loading order snapshot differential blocks in a second block unit;
judging whether a second block unit of the order snapshot differential block which is not loaded exists in the latest block group;
and if the second block unit which is not loaded with the order snapshot differential block exists in the latest block group, repeatedly executing the order snapshot differential block which is loaded in the second block unit in sequence until the second block unit which is not loaded with the order snapshot differential block does not exist in the latest block group.
In a third aspect, the present application provides an apparatus for generating ordered pattern block groups, where the apparatus includes:
the first packing unit is used for acquiring snapshots of the effective order book, packing the snapshots into order snapshot blocks and storing the order snapshot blocks in the first block unit;
the second packing unit is used for acquiring snapshots of the stage order book, packing the snapshots into order snapshot differential blocks, and storing the order snapshot differential blocks in different second block units according to a time sequence, wherein the first block units and the second block units form blocks;
the third packing unit is used for acquiring the order request, packing the order request into an order request block, storing the order request block in the first block unit and positioned behind the corresponding order snapshot block, or storing the order request block in the second block unit and positioned behind the corresponding order snapshot differential block;
and the fourth packing unit is used for obtaining the transaction matching result of the matching engine, packing the transaction matching result into a transaction matching block, storing the transaction matching block in the first block unit or the second block unit, and is positioned behind the corresponding order request block.
In a fourth aspect, the present application provides a loading apparatus for ordered pattern block grouping, the loading apparatus comprising:
the acquisition unit is used for acquiring the latest block group by the matching engine;
the first loading unit is used for loading the order snapshot block in the first block unit in the latest block group;
the second loading unit is used for sequentially loading the order snapshot differential blocks in each second block unit;
the third loading unit is used for loading the order request block and the transaction matching block in the first block unit or the second block unit in sequence;
and the updating unit is used for updating the order book by utilizing the order snapshot block, the order snapshot differential block, the order request block and the transaction matching block.
With reference to the fourth aspect, in a first possible implementation manner of the fourth aspect, the second loading unit includes:
the fourth loading unit is used for sequentially loading the order snapshot differential blocks in the second block unit;
the judging unit is used for judging whether a second block unit which is not loaded with the order snapshot differential block exists in the latest block group;
and the fifth loading unit is used for repeatedly executing the order snapshot differential block loading in the second block unit in sequence until the second block unit which is not loaded with the order snapshot differential block does not exist in the latest block group.
In a fifth aspect, the present application provides a server configured to:
acquiring a snapshot of an effective order book, packaging the snapshot into order snapshot blocks, and storing the order snapshot blocks in a first block unit;
acquiring snapshots of a stage order book, packaging the snapshots into order snapshot differential blocks, and storing the order snapshot differential blocks in different second block units according to a time sequence, wherein the first block units and the second block units form block groups;
acquiring an order request, packaging the order request into an order request block, and storing the order request block in the first block unit and behind the corresponding order snapshot block, or storing the order request block in the second block unit and behind the corresponding order snapshot differential block;
and acquiring a transaction matching result of the matching engine, packaging the transaction matching result into a transaction matching block, and storing the transaction matching block in the first block unit or the second block unit and behind the corresponding order request block.
In a sixth aspect, the present application provides a server configured to:
the matching engine acquires the latest block group;
loading an order snapshot block in a first block unit in the latest block group;
sequentially loading order snapshot differential blocks in each second block unit;
loading order request blocks and transaction matching blocks in the first block unit or the second block unit in sequence;
and updating the order book by using the order snapshot block, the order snapshot difference block, the order request block and the transaction matching block.
According to the technical scheme, the method and the device for generating and loading the ordered mode block grouping comprise the following steps: acquiring a snapshot of an effective order book, packaging the snapshot into order snapshot blocks, and storing the order snapshot blocks in a first block unit; acquiring snapshots of a stage order book, packaging the snapshots into order snapshot differential blocks, and storing the order snapshot differential blocks in different second block units according to a time sequence, wherein the first block units and the second block units form block groups; acquiring an order request, packaging the order request into an order request block, and storing the order request block in the first block unit and behind the corresponding order snapshot block, or storing the order request block in the second block unit and behind the corresponding order snapshot differential block; and acquiring a transaction matching result of the matching engine, packaging the transaction matching result into a transaction matching block, and storing the transaction matching block in the first block unit or the second block unit and behind the corresponding order request block. In the generation method, order sheets are stored in block groups in order to quickly reach transactions in digital asset transactions such as match or settlement of each transaction. In the loading method, the matching engine loads the order book according to the order snapshot block, the order snapshot differential block, the order request block and the transaction matching block stored in the latest block group, so that the situation that the matching result is disordered can be avoided.
Drawings
In order to more clearly describe the technical solution of the present application, the drawings required to be used in the embodiments will be briefly described below, and it is obvious for those skilled in the art to obtain other drawings without inventive labor.
Fig. 1 is a flowchart of an embodiment of a method for generating ordered pattern block groups according to the present application;
FIG. 2 is a block grouping structure diagram provided herein;
FIG. 3 is a flowchart of a first embodiment of a method for loading ordered pattern block groupings provided herein;
FIG. 4 is a flowchart of a second embodiment of a method for loading ordered pattern block groupings provided herein;
fig. 5 is a schematic structural diagram of an apparatus for generating ordered pattern block groups according to the present application;
fig. 6 is a schematic structural diagram of a loading apparatus for ordered pattern block grouping according to the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, the technical solutions of the present application will be clearly and completely described below with reference to specific embodiments of the present application and the accompanying drawings. It should be apparent that the described embodiments are only a few embodiments of the present application, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application. The technical solutions provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings.
In the prior art, when transaction matching and settlement are carried out on a blockchain, order book confusion occurs, and the order book needs to be combed again in digital asset transactions such as transaction matching or settlement each time, so that orders of buyers and sellers can be cleared, and the workload during transaction is increased.
Referring to fig. 1, a flowchart of an embodiment of a method for generating ordered pattern block groups according to the present application is shown, where the method includes:
step S100, obtaining snapshots of an effective order book, packaging the snapshots into order snapshot blocks, and storing the order snapshot blocks in a first block unit;
the order book is stored in blocks, and the blocks are stored on nodes of a block chain. The blocks include an order snapshot block, an order snapshot differential block, an order request block, and a trade match block.
Specifically, the order book stores therein digital asset transaction order data such as order type (market, limit, stop-run, etc.), order time, timeliness, price, quantity, etc.
In the embodiment of the present application, the valid order book refers to digital asset transaction order data that does not expire within the order expiration date. Additionally, a snapshot of an active order book refers to a full backup of the active order book at a time.
Step S200, acquiring snapshots of the stage order book, packaging the snapshots into order snapshot differential blocks, and storing the order snapshot differential blocks in different second block units according to a time sequence, wherein the first block units and the second block units form block groups;
specifically, the snapshot of the phase order book refers to a backup of the newly added order book, for example, the snapshot of the valid order book refers to a full backup performed at a fixed time per week, and the snapshot of the phase order book refers to an incremental backup performed every day. The phase order book is a change data set of the effective order book.
Step S300, obtaining order requests, packaging the order requests into order request blocks, storing the order request blocks in the first block unit and behind the corresponding order snapshot block, or storing the order request blocks in the second block unit and behind the corresponding order snapshot differential block;
specifically, the order snapshot block and the order snapshot difference block are accumulations of order request blocks, and are filed as the order snapshot block or the order snapshot difference block when there are a plurality of order request blocks. Therefore, the order request block may be stored in a first block unit corresponding to the order snapshot block, and may also be stored in a second block unit that is a differential block from the order snapshot.
The block link receives the order request, and the order request is packaged into an order request block after being confirmed by the node, wherein the order request can be an order request of a buyer or an order request of a seller.
And step S400, acquiring a transaction matching result of the matching engine, packaging the transaction matching result into a transaction matching block, and storing the transaction matching block in the first block unit or the second block unit and behind the corresponding order request block.
Specifically, the matching engine matches the current order, and the matched result is packaged into an order matching block. The order request blocks and the transaction matching blocks are arranged at intervals, and the transaction matching blocks are matching results of the previous order request blocks and are arranged in order.
In order to make the order book clearer, the embodiment of the present application provides a method for generating a block group of an ordered mode, where the block Group (GOB) includes a first block unit (session1) and several second block units (session2), the first block unit (session1) stores therein an order snapshot block (S block), an order request block (R block), and a trade match block (M block) corresponding to the order request block, and the second block unit (session2) stores therein an order snapshot difference block (Sd block), an order request block (R block), and a trade match block (M block) corresponding to the order request block. The S block, the Sd block, the R block and the M block are all blocks. The block arrangement structure in the block unit is that an S block or an Sd block is arranged at the beginning, then an R block and an M block are arranged at intervals, and the M block is the matching result of the previous R blocks and is arranged in order. In the embodiment of the present application, R blocks and M blocks appear in pairs, M blocks are the result chains matched with the order book of R blocks, there is no case of matching only part of the result chains, and the structure of block grouping is shown in fig. 2 below.
As can be seen from the above embodiments, in the embodiment of the method for generating ordered pattern block groups, a snapshot of an effective order book is obtained, and is packaged into an order snapshot block and stored in the first block unit; acquiring snapshots of a stage order book, packaging the snapshots into order snapshot differential blocks, and storing the order snapshot differential blocks in different second block units according to a time sequence, wherein the first block units and the second block units form block groups; acquiring an order request, packaging the order request into an order request block, and storing the order request block in the first block unit and behind the corresponding order snapshot block, or storing the order request block in the second block unit and behind the corresponding order snapshot differential block; and acquiring a transaction matching result of the matching engine, packaging the transaction matching result into a transaction matching block, and storing the transaction matching block in the first block unit or the second block unit and behind the corresponding order request block. In the embodiment of the application, the order book is stored in order, so that the transaction can be rapidly achieved in digital asset transactions such as transaction matching or settlement and the like, a solution is provided for realizing chain matching, settlement and rapid achievement of the transaction in decentralized transactions, and ordering of orders is realized by using a block chain technology.
Referring to fig. 3, a flowchart of a first embodiment of a loading method for ordered mode block grouping according to the present application is shown, where the loading method includes:
step S500, the matching engine acquires the latest block group;
specifically, each node of the block chain will have multiple block groupings, so it is necessary to find the latest. The plurality of block groupings of each node are identical in content.
Step S600, loading order snapshot blocks in a first block unit in the latest block group;
step S700, sequentially loading order snapshot differential blocks in each second block unit;
it should be noted that, the order snapshot block and the order snapshot differential block in the latest block group are obtained, and the matching engine can be directly used by merging and changing, that is, obtaining the current latest order book. If the matching engine does not load the order book up to date, it will cause the matching result to be confusing.
And step S800, loading the order request block and the transaction matching block in the first block unit or the second block unit in sequence.
The order request block and the transaction matching block are stored according to time, but the order request block and the transaction matching block need to be corresponded.
And step S900, updating the order book by using the order snapshot block, the order snapshot differential block, the order request block and the transaction matching block.
As can be seen from the above embodiments, in the first embodiment of the loading method for ordered pattern block grouping of the present application, step S500, the matching engine obtains the latest block grouping; step S600, loading order snapshot blocks in a first block unit in the latest block group; step S700, sequentially loading order snapshot differential blocks in each second block unit; and step S800, loading the order request block and the transaction matching block in the first block unit or the second block unit in sequence. And step S900, updating the order book by using the order snapshot block, the order snapshot differential block, the order request block and the transaction matching block. In the embodiment of the application, the matching engine loads the order book according to the order snapshot block, the order snapshot difference block, the order request block and the transaction matching block stored in the latest block group, so that the situation that matching results are disordered can be avoided.
Referring to fig. 4, a flowchart of a second embodiment of a method for loading ordered pattern block groups according to the present application is provided, where the second embodiment is different from the first embodiment in that the step of sequentially loading order snapshot difference blocks in each second block unit includes:
step S701, sequentially loading order snapshot differential blocks in a second block unit;
step S702, judging whether a second block unit which is not loaded with the order snapshot differential block exists in the latest block group;
step S703, if there is a second block unit not loaded with the order snapshot differential block in the latest block group, repeatedly executing the order snapshot differential block in the second block unit that is loaded in sequence until there is no second block unit not loaded with the order snapshot differential block in the latest block group.
As can be seen from the above embodiments, in the second embodiment of the loading method for ordered mode block grouping according to the present application, after the order snapshot block, the order snapshot differential block is loaded one by one. And if the second block units which are not loaded with the order snapshot differential blocks exist in the latest block group, continuing to load the order snapshot differential blocks in the next second block unit in sequence until the second block units which are not loaded with the order snapshot differential blocks do not exist in the latest block group. At this point, the match engine loads to the latest order book state and enters a ready to match state.
Referring to fig. 5, a schematic structural diagram of a generating device for ordered pattern block grouping provided by the present application is shown, where the generating device includes: a first packing unit 100, configured to obtain a snapshot of an effective order book, pack the snapshot into an order snapshot block, and store the order snapshot block in a first block unit; a second packing unit 200, configured to obtain snapshots of the stage order book, pack the snapshots into order snapshot differential blocks, and store the order snapshot differential blocks in different second block units in a time sequence, where the first block unit and the second block unit form a block; a third packing unit 300, configured to obtain an order request, pack the order request into an order request block, store the order request block in the first block unit and be located after the corresponding order snapshot block, or store the order request block in the second block unit and be located after the corresponding order snapshot differential block; and a fourth packing unit 400, configured to obtain a transaction matching result of the matching engine, pack the transaction matching result into a transaction matching block, store the transaction matching block in the first block unit or the second block unit, and be located behind the corresponding order request block.
Referring to fig. 6, a loading apparatus for ordered pattern block grouping provided by the present application includes: an obtaining unit 500, configured to obtain the latest block group by a matching engine; a first loading unit 600, configured to load an order snapshot block in a first block unit in the latest block group; a second loading unit 700, configured to sequentially load the order snapshot differential blocks in each second block unit; a third loading unit 800, configured to load the order request block and the transaction matching block in the first block unit or the second block unit in sequence; an updating unit 900, configured to update the order book by using the order snapshot block, the order snapshot difference block, the order request block, and the transaction match block.
In another embodiment of the present application, there is provided a loading apparatus for ordered pattern block grouping, wherein the second loading unit includes: the fourth loading unit is used for sequentially loading the order snapshot differential blocks in the second block unit; the judging unit is used for judging whether a second block unit which is not loaded with the order snapshot differential block exists in the latest block group; and the fifth loading unit is used for repeatedly executing the order snapshot differential block loading in the second block unit in sequence until the second block unit which is not loaded with the order snapshot differential block does not exist in the latest block group.
The present application provides a server configured to: acquiring a snapshot of an effective order book, packaging the snapshot into order snapshot blocks, and storing the order snapshot blocks in a first block unit; acquiring snapshots of a stage order book, packaging the snapshots into order snapshot differential blocks, and storing the order snapshot differential blocks in different second block units according to a time sequence, wherein the first block units and the second block units form block groups; acquiring an order request, packaging the order request into an order request block, and storing the order request block in the first block unit and behind the corresponding order snapshot block, or storing the order request block in the second block unit and behind the corresponding order snapshot differential block; and acquiring a transaction matching result of the matching engine, packaging the transaction matching result into a transaction matching block, and storing the transaction matching block in the first block unit or the second block unit and behind the corresponding order request block.
In a sixth aspect, the present application provides a server configured to: the matching engine acquires the latest block group; loading an order snapshot block in a first block unit in the latest block group; sequentially loading order snapshot differential blocks in each second block unit; loading order request blocks and transaction matching blocks in the first block unit or the second block unit in sequence; and updating the order book by using the order snapshot block, the order snapshot difference block, the order request block and the transaction matching block.
In a specific implementation, the present application further provides a computer storage medium, where the computer storage medium may store a program, and the program may include some or all of the steps in the embodiments of the method for prompting a process of transferring a digital asset address provided by the present invention when executed. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM) or a Random Access Memory (RAM).
Those skilled in the art will readily appreciate that the techniques of the embodiments of the present invention may be implemented as software plus a required general purpose hardware platform. Based on such understanding, the technical solutions in the embodiments of the present invention may be essentially or partially implemented in the form of a software product, which may be stored in a storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the embodiments or some parts of the embodiments.
The same and similar parts in the various embodiments in this specification may be referred to each other. In particular, for the embodiments of the secure network middleware for identity authentication and the implementation method and apparatus thereof, since they are substantially similar to the embodiments of the method, the description is simple, and for the relevant points, reference may be made to the description in the embodiments of the method.
The above-described embodiments of the present application do not limit the scope of the present application.

Claims (5)

1. A method for generating and loading ordered mode block groups is characterized in that,
the generation method comprises the following steps:
acquiring a snapshot of an effective order book, packaging the snapshot into order snapshot blocks, and storing the order snapshot blocks in a first block unit; the valid order book is digital asset transaction order data which is not expired within the order expiration date;
acquiring snapshots of the stage order book, packaging the snapshots into order snapshot differential blocks, and storing the order snapshot differential blocks in different second block units according to a time sequence, wherein the first block units and the second block units form block groups; the stage order book is a change data set of the effective order book;
acquiring an order request, packaging the order request into an order request block, and storing the order request block in the first block unit and behind the corresponding order snapshot block, or storing the order request block in the second block unit and behind the corresponding order snapshot differential block;
acquiring a transaction matching result of a matching engine, packaging the transaction matching result into a transaction matching block, storing the transaction matching block in the first block unit or the second block unit, and locating behind the corresponding order request block;
the order request block and the transaction matching block are arranged at intervals, and the transaction matching block is a matching result of the order request block and is arranged in order;
the loading method comprises the following steps:
the matching engine acquires the latest block group;
loading an order snapshot block in a first block unit in the latest block group;
sequentially loading order snapshot differential blocks in each second block unit;
loading order request blocks and transaction matching blocks in the first block unit or the second block unit in sequence;
and updating the order book by using the order snapshot block, the order snapshot difference block, the order request block and the transaction matching block.
2. The method for generating and loading ordered pattern block grouping according to claim 1, wherein the step of loading the order snapshot difference block in each second block unit in turn comprises:
sequentially loading order snapshot differential blocks in a second block unit;
judging whether a second block unit of the order snapshot differential block which is not loaded exists in the latest block group;
and if the second block unit which is not loaded with the order snapshot differential block exists in the latest block group, repeatedly executing the order snapshot differential block in the second block unit which is loaded in sequence until the second block unit which is not loaded with the order snapshot differential block does not exist in the latest block group.
3. A device for generating and loading ordered mode block grouping is characterized in that,
the generation device comprises:
the first packing unit is used for acquiring snapshots of the effective order book, packing the snapshots into order snapshot blocks and storing the order snapshot blocks in the first block unit; the valid order book is digital asset transaction order data which is not expired within the order expiration date;
the second packing unit is used for acquiring snapshots of the stage order book, packing the snapshots into order snapshot differential blocks, and storing the order snapshot differential blocks in different second block units according to a time sequence, wherein the first block units and the second block units form blocks; the stage order book is a change data set of the effective order book;
the third packing unit is used for acquiring the order request, packing the order request into an order request block, storing the order request block in the first block unit and positioned behind the corresponding order snapshot block, or storing the order request block in the second block unit and positioned behind the corresponding order snapshot differential block;
the fourth packing unit is used for obtaining the transaction matching result of the matching engine, packing the transaction matching result into a transaction matching block, storing the transaction matching block in the first block unit or the second block unit and being positioned behind the corresponding order request block;
the order request block and the transaction matching block are arranged at intervals, and the transaction matching block is a matching result of the order request block and is arranged in order;
the loading device comprises:
the acquisition unit is used for acquiring the latest block group by the matching engine;
the first loading unit is used for loading the order snapshot block in the first block unit in the latest block group;
the second loading unit is used for sequentially loading the order snapshot differential blocks in each second block unit;
the third loading unit is used for loading the order request block and the transaction matching block in the first block unit or the second block unit in sequence;
and the updating unit is used for updating the order book by utilizing the order snapshot block, the order snapshot differential block, the order request block and the transaction matching block.
4. The apparatus of claim 3, wherein the second loading unit comprises:
the fourth loading unit is used for sequentially loading the order snapshot differential blocks in the second block unit;
the judging unit is used for judging whether a second block unit which is not loaded with the order snapshot differential block exists in the latest block group;
and the fifth loading unit is used for repeatedly executing the order snapshot differential block loading in the second block unit in sequence until the second block unit which is not loaded with the order snapshot differential block does not exist in the latest block group.
5. A server, configured to:
acquiring a snapshot of an effective order book, packaging the snapshot into order snapshot blocks, and storing the order snapshot blocks in a first block unit; the valid order book is digital asset transaction order data which is not expired within the order expiration period;
acquiring snapshots of a stage order book, packaging the snapshots into order snapshot differential blocks, and storing the order snapshot differential blocks in different second block units according to a time sequence, wherein the first block units and the second block units form block groups; the stage order book is a change data set of the effective order book;
acquiring an order request, packaging the order request into an order request block, and storing the order request block in the first block unit and behind the corresponding order snapshot block, or storing the order request block in the second block unit and behind the corresponding order snapshot differential block;
acquiring a transaction matching result of the matching engine, packaging the transaction matching result into a transaction matching block, and storing the transaction matching block in the first block unit or the second block unit and behind the corresponding order request block;
the order request block and the transaction matching block are arranged at intervals, and the transaction matching block is a matching result of the order request block and is arranged in order;
the matching engine acquires the latest block group;
loading an order snapshot block in a first block unit in the latest block group;
sequentially loading order snapshot differential blocks in each second block unit;
loading order request blocks and transaction matching blocks in the first block unit or the second block unit in sequence;
and updating the order book by using the order snapshot block, the order snapshot difference block, the order request block and the transaction matching block.
CN201910794480.6A 2019-08-27 2019-08-27 Method and device for generating and loading ordered mode block grouping Active CN110533534B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910794480.6A CN110533534B (en) 2019-08-27 2019-08-27 Method and device for generating and loading ordered mode block grouping

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910794480.6A CN110533534B (en) 2019-08-27 2019-08-27 Method and device for generating and loading ordered mode block grouping

Publications (2)

Publication Number Publication Date
CN110533534A CN110533534A (en) 2019-12-03
CN110533534B true CN110533534B (en) 2022-08-26

Family

ID=68664363

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910794480.6A Active CN110533534B (en) 2019-08-27 2019-08-27 Method and device for generating and loading ordered mode block grouping

Country Status (1)

Country Link
CN (1) CN110533534B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6055607A (en) * 1996-12-23 2000-04-25 Unisys Corporation Interface queue with bypassing capability for main storage unit
CN107330788A (en) * 2017-06-15 2017-11-07 雷盈科技(上海)有限公司 A kind of block chain digital asset transaction match method, system, device and medium
CN109636388A (en) * 2018-12-07 2019-04-16 深圳市智税链科技有限公司 Data processing method, device, medium and electronic equipment in block chain network
CN110096476A (en) * 2019-04-08 2019-08-06 平安科技(深圳)有限公司 Data back up method, device and computer readable storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8037032B2 (en) * 2008-08-25 2011-10-11 Vmware, Inc. Managing backups using virtual machines

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6055607A (en) * 1996-12-23 2000-04-25 Unisys Corporation Interface queue with bypassing capability for main storage unit
CN107330788A (en) * 2017-06-15 2017-11-07 雷盈科技(上海)有限公司 A kind of block chain digital asset transaction match method, system, device and medium
CN109636388A (en) * 2018-12-07 2019-04-16 深圳市智税链科技有限公司 Data processing method, device, medium and electronic equipment in block chain network
CN110096476A (en) * 2019-04-08 2019-08-06 平安科技(深圳)有限公司 Data back up method, device and computer readable storage medium

Also Published As

Publication number Publication date
CN110533534A (en) 2019-12-03

Similar Documents

Publication Publication Date Title
US20220052857A1 (en) Devices, systems, and methods for facilitating low trust and zero trust value transfers
CN109242681B (en) Asset data storage method, device, equipment and system
CN109325762A (en) Across the chain method of commerce of parallel chain, equipment and storage medium
KR20200066261A (en) System and method for improving the security of smart contracts on the blockchain
CN115004206A (en) System, method and storage medium for managing digital liquidity tokens in a distributed ledger platform
US20190012623A1 (en) Trade management method, trade management system and trade management device
US20200074389A1 (en) Automated inventory management including blockchain smart contracting
CN111553792A (en) Data verification method and device based on block chain
CN110874798A (en) Network platform based on regional chain and safe communication method thereof
US20200151718A1 (en) System and method for improving security of smart contract on blockchain
KR102136976B1 (en) Service method for tokenization mobile gift card and service provider thereof
CN111245829A (en) Network platform based on regional chain and safe communication method thereof
CN114742654A (en) Digital asset circulation method, system, electronic device and medium based on alliance chain
CN110533534B (en) Method and device for generating and loading ordered mode block grouping
CN110704539A (en) Supply chain management method and device
CN110517146B (en) Method and device for generating and loading mixed mode block group
CN112529616A (en) Block chain-based alliance point management method and system
CN113065860A (en) Method and device for processing commission charge service through block chain
TW202025034A (en) Resource object allocation method and device based on block chain and electronic equipment
CN111402053A (en) Transaction matching method, system, computer readable storage medium and computing device
CN113139874B (en) Offline commodity online circulation transaction method based on block chain
CN111461585B (en) Inventory management method and device, storage medium and electronic equipment
CN110175843B (en) Marketing label transaction method and system based on block chain
CN112711565B (en) Bill management method, system, device and storage medium based on blockchain
US20230004955A1 (en) Peer-to-peer selectable digital money system

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

Effective date of registration: 20230908

Address after: No. 1303, 13th Floor, Building 1, No. 166 Tianfu Second Street, Chengdu High tech Zone, China (Sichuan) Pilot Free Trade Zone, Chengdu, Sichuan, 610095

Patentee after: Chengdu Tongchuang Jialian Technology Co.,Ltd.

Address before: 571924 building 8830, Walker Park, Hainan Ecological Software Park, Haikou old town high tech industry demonstration zone, Hainan Province

Patentee before: HAINAN XINRUAN SOFTWARE Co.,Ltd.

TR01 Transfer of patent right