CN108512775A - A kind of method and device of sequence transaction queue - Google Patents

A kind of method and device of sequence transaction queue Download PDF

Info

Publication number
CN108512775A
CN108512775A CN201810337284.1A CN201810337284A CN108512775A CN 108512775 A CN108512775 A CN 108512775A CN 201810337284 A CN201810337284 A CN 201810337284A CN 108512775 A CN108512775 A CN 108512775A
Authority
CN
China
Prior art keywords
transaction
sequence number
sequence
queue
less
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
CN201810337284.1A
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 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 CN201810337284.1A priority Critical patent/CN108512775A/en
Publication of CN108512775A publication Critical patent/CN108512775A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/62Queue scheduling characterised by scheduling criteria
    • H04L47/625Queue scheduling characterised by scheduling criteria for service slots or service orders
    • H04L47/6275Queue scheduling characterised by scheduling criteria for service slots or service orders based on priority
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/90Buffering arrangements
    • H04L49/9063Intermediate storage in different physical parts of a node or terminal

Abstract

The embodiment of the present application discloses a kind of method and device of sequence transaction queue, and transaction queue includes multiple transaction.The method includes:Determine the corresponding transaction sequence number of each transaction;It sorts to the transaction sequence number of each transaction according to certain rule;Selection transaction sequence number is minimum to be traded.The method that the application permits a variety of sequence transaction queues based on Different Strategies under chain model by offer, make user pass through configure parameter can be carried out transaction sequence, availability, flexibility and the user friendly for improving license chain, keep the application scenarios of license chain more diversified.

Description

A kind of method and device of sequence transaction queue
Technical field
This application involves the sides of the sequence transaction queue under financial circles block chain technical field, more particularly to license chain model Method and device.
Background technology
Block chain is a kind of new distributed computing technology, is Distributed Storage, point-to-point transmission, common recognition mechanism, encryption The new application pattern of the computer technologies such as algorithm.Common recognition mechanism refers to the ballot by special joint, complete within a very short time The verification and confirmation of swap.One block catenary system is made of many nodes, for a transaction, if interests are irrelevant Several nodes can reach common understanding, then it is assumed that the node that the whole network can reach common understanding to this, and reach common understanding be referred to as altogether Know node.When transaction, which is broadcasted, to be received by common recognition node, transaction first can be done some simple verifications, verification by common recognition node Transaction will be added in local trading pit after success, trading pit is made of transaction queue, and transaction queue includes multiple Transaction.
The trading pit of oneself can be arranged corresponding limitation to ensure that the quantity of transaction will not be excessive in each common recognition node.Altogether Node is known when being packaged transaction to block, and transaction can be selected according to certain priority, it is more as possible to which oneself can be obtained Interests.
Node itself of knowing together has the strategies such as the right of sequence transaction queue, including the high transaction of priority processing service charge, But if not supported in software, then node of knowing together has to write code and can just be ranked up, poor operability, not clever enough It is living.
Invention content
The embodiment of the present application provides a kind of method and device for the sequence transaction queue permitted under chain model, solves transaction Sort underaction the problem of, by means of permit chain data can persistence, provide a variety of rows for merchandising on block chain Sequence method.
In a first aspect, this application provides a kind of method of sequence transaction queue, the transaction queue includes multiple friendships Easily, which is characterized in that the method includes:Determine the corresponding transaction sequence number of each transaction;According to certain rule to every The transaction sequence number of a transaction sorts;Select the transaction of transaction sequence number minimum.
It is in one possible implementation, described to sort to the transaction sequence number of each transaction according to certain rule, Including:The sequence arrived first first according to transaction sorts to the sequence number of each transaction;Alternatively, according to user-defined priority Sequence number sequence to each transaction.
Wherein, the sequence arrived first first according to transaction sorts to the sequence number of each transaction, including:It is introduced into transaction The transaction sequence number of the transaction of queue enters the sequence number of the transaction of transaction queue after being less than.
In one possible implementation, described that the sequence number of each transaction is arranged according to user-defined priority Sequence, including:The transaction sequence number of high priority transaction is less than the transaction sequence number of low priority transaction, alternatively, the friendship of VIP transaction Easy sequence number is less than the transaction sequence number of non-VIP transaction.
Second aspect, the application provide a kind of device of sequence transaction queue, and the transaction queue includes multiple transaction, It is characterized in that, described device includes:Determination unit, for determining the corresponding transaction sequence number of each transaction;Sequencing unit, For sorting to the transaction sequence number of each transaction according to certain rule;Selecting unit, for selecting transaction sequence number minimum Transaction.
In one possible implementation, the sequencing unit, the sequence for being additionally operable to arrive first first according to transaction is to every The sequence number of a transaction sorts;Alternatively, sorting to the sequence number of each transaction according to user-defined priority.
Optionally, the sequencing unit, be additionally operable to configuration be introduced into transaction queue transaction transaction sequence number be less than after Into the sequence number of the transaction of transaction queue.
In one possible implementation, the sequencing unit is additionally operable to the transaction sequence of configuration high priority transaction Number be less than low priority transaction transaction sequence number, alternatively, VIP transaction transaction sequence number be less than non-VIP transaction transaction sequence Row number.
The third aspect, the application provide a kind of computer readable storage medium, are deposited in the computer readable storage medium Instruction is contained, when run on a computer so that computer executes described in first aspect to the 6th aspect either side Method.
Fourth aspect, the application provide a kind of chip, and the chip is connected with memory, for reading and executing described deposit The software program stored in reservoir, to realize the method described in first aspect to second aspect either side.
The application permits the method and device of a variety of sequence transaction queues based on Different Strategies under chain model by offer, Make user pass through configure parameter can be carried out transaction sequence, improve license chain availability, flexibility and user friendly, Keep the application scenarios of license chain more diversified.
Description of the drawings
Fig. 1 is a kind of method flow schematic diagram of sequence transaction queue provided by the embodiments of the present application;
Fig. 2 is a kind of schematic device of sequence transaction queue provided by the embodiments of the present application.
Specific implementation mode
It should be noted that in technical solution of the present invention, " transaction " refers to change account status in license chain model one Secondary event, the meaning not equivalent to merchandised in financial field.
Block chain is substantially the database of a decentralization, be it is a succession of using cryptography method generate it is associated Data block contains the information that the whole network is merchandised in a period of time in each data block.Different block chains has different interior Culvert and function.
Block chain includes publicly-owned chain and license chain.Publicly-owned chain (Public Blockchain) refers to no mechanism of permitting the entrance, entirely Anyone can generate legal account according to disclosure agreement in the world, participate in reading, send transaction, trade confirmation, or even participate in The block chain of common recognition.License chain (Permissioned Blockchain) refers to the block chain that node and user have mechanism of permitting the entrance, Community is formed by several mechanisms, each mechanism runs a node, needs to obtain it to make each block come into force The confirmation of middle majority mechanism.The identity of user also passes through audit on block chain, is mostly system of real name, is closed with the identity of real world System corresponds to.
The application provides a kind of trading pit sort method and device permitted under chain model, to provide on block chain The a variety of sort methods and device of transaction, sequence can be traded by so that user is passed through parameter configuration, improve the use of license chain The friendly at family, makes license chain be adapted to more scenes, and utilization is more flexible.Wherein, method and apparatus are based on same Inventive concept, since the principle that method and device solves the problems, such as is similar, the implementation of apparatus and method can with cross-reference, Overlaps will not be repeated.
Below in conjunction with the attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application carries out clear, complete Whole description.
Fig. 1 is the method flow schematic diagram of sequence transaction queue provided by the embodiments of the present application.The embodiment of the present application provides Method, include the following steps:
S101, corresponding the transaction sequence number of each transaction is determined.
The queue waited in transaction is present in trading pit, and transaction queue includes multiple transaction.Further include in trading pit Tables of data record transaction cryptographic Hash tx_hash and transaction sequence number index.Signature and data of the cryptographic Hash of merchandising for data Integrality.Each corresponding transaction sequence number of transaction, the ordering strategy of transaction is all to carry out reality by transaction sequence number index Existing.
S102, it sorts to the transaction sequence number of each transaction according to certain rule.
It is in one possible implementation, described to sort to the transaction sequence number of each transaction according to certain rule, Including:The sequence arrived first first according to transaction sorts to the sequence number of each transaction;Alternatively, according to user-defined priority Sequence number sequence to each transaction.
Optionally, the sequence arrived first first according to transaction sorts to the sequence number of each transaction, including:It is introduced into friendship The transaction sequence number of the transaction of easy queue enters the sequence number of the transaction of transaction queue after being less than.If merchandising to arrive first first Sequence enters trading pit, then transaction sequence number index is from increasing, and the transaction of first entrance trading pit is assigned a value of 0, second Transaction into trading pit is assigned a value of 1, and so on.
Optionally, described to sort to the sequence number of each transaction according to user-defined priority, including:High priority The transaction sequence number of transaction is less than the transaction sequence number of low priority transaction, alternatively, the transaction sequence number of VIP transaction is less than non- The transaction sequence number of VIP transaction.
If transaction is to enter trading pit according to User Defined priority, node of knowing together meeting additional maintenance includes each excellent The tables of data of first grade Addr_list, by interface, according to Addr_list, the index numerical value for being assigned to low priority is big, is assigned to height The index numerical value of priority is low, and to which the transaction of high priority comes front, the transaction of low priority comes below.
If be ranked up according to VIP patterns, user reaches an agreement outside chain with common recognition node, and allowing it that oneself is arranged becomes VIP user.Node of then knowing together meeting additional maintenance includes the VIP_list tables of VIP information, for example VIP shares 100, then 0- 100 index advance reservations come out, and by interface, the index assignment of general transaction is since 101, also according to index Numerical value be traded sequence.Similarly, the transaction sequence of general transaction still may be used above-mentioned first first according to transaction The sequence arrived sorts to the sequence number of each transaction;Alternatively, according to user-defined priority to the sequence number of each transaction Sequence, details are not described herein.
S103, the transaction for selecting transaction sequence number minimum.
User can select a kind of sort method in above-mentioned steps, according to transaction sequence number index numerical value from it is small to It is ranked up greatly, selects transaction sequence number is minimum to be traded.
More than, in conjunction with the method that the sequence transaction queue according to the embodiment of the present application is described in detail in Fig. 1, in the following, in conjunction with Fig. 2 describes the device of the sequence transaction queue according to the embodiment of the present application, and technical characteristic is equally suitable described in embodiment of the method For following device embodiment.
Fig. 2 shows the schematic block diagrams according to the device 200 of the sequence transaction queue of the embodiment of the present application.Such as Fig. 2 institutes Show, which includes:
Determination unit 201, for determining the corresponding transaction sequence number of each transaction.
Sequencing unit 202, for sorting to the transaction sequence number of each transaction according to certain rule.
Selecting unit 203, the transaction for selecting transaction sequence number minimum.
In one possible implementation, it is right to be additionally operable to the sequence arrived first first according to transaction for the sequencing unit 202 The sequence number sequence each merchandised;Alternatively, sorting to the sequence number of each transaction according to user-defined priority.
Optionally, the sequencing unit 202, the transaction sequence number for being additionally operable to the transaction that configuration is introduced into transaction queue are less than Enter the sequence number of the transaction of transaction queue afterwards.
In one possible implementation, the sequencing unit 202 is additionally operable to the transaction sequence of configuration high priority transaction Row number is less than the transaction sequence number of low priority transaction, alternatively, the transaction sequence number of VIP transaction is less than the transaction of non-VIP transaction Sequence number.
The step of method in conjunction with described in present disclosure or algorithm, can be realized in a manner of hardware, also may be used It is realized in a manner of being to execute software instruction by processor.Software instruction can be made of corresponding software module, software mould Block can be stored on RAM memory, flash memory, ROM memory, eprom memory, eeprom memory, register, hard disk, In the storage medium of mobile hard disk, CD-ROM or any other form well known in the art.A kind of illustrative storage medium It is coupled to processor, to enable a processor to from the read information, and information can be written to the storage medium.When So, storage medium can also be the component part of processor.Pocessor and storage media can be located in ASIC.In addition, should ASIC can be located in user equipment.Certainly, pocessor and storage media can also be used as discrete assembly and be present in user equipment In.For those skilled in the art it will be appreciated that in said one or multiple examples, function described herein can be with It is realized with hardware, software, firmware or their arbitrary combination.When implemented in software, these functions can be stored in It instructs in computer-readable medium or as the one or more on computer-readable medium or code is transmitted.Computer Readable medium includes computer storage media and communication media, wherein communication media include convenient for from a place to another ground Any medium of side's transmission computer program.Storage medium can be any available Jie that general or specialized computer can access Matter.
Above-described specific implementation mode has carried out further the purpose, technical solution and advantageous effect of the application It is described in detail, it should be understood that the foregoing is merely the specific implementation mode of the application, is not used to limit the application Protection domain, all any modification, equivalent substitution, improvement and etc. on the basis of the technical solution of the application, done should all It is included within the protection domain of the application.

Claims (9)

1. a kind of method of sequence transaction queue, the transaction queue includes multiple transaction, which is characterized in that the method packet It includes:
Determine the corresponding transaction sequence number of each transaction;
It sorts to the transaction sequence number of each transaction according to certain rule;
Select the transaction of transaction sequence number minimum.
2. according to the method described in claim 1, it is characterized in that, described according to certain regular transaction sequence to each transaction Row number sorts, including:
The sequence arrived first first according to transaction sorts to the sequence number of each transaction;Alternatively, according to user-defined priority Sequence number sequence to each transaction.
3. according to the method described in claim 2, it is characterized in that, the sequence arrived first first according to transaction is to each transaction Sequence number sequence, including:
Be introduced into the transaction of transaction queue transaction sequence number be less than after enter transaction queue transaction sequence number.
4. according to the method described in claim 2, it is characterized in that, it is described according to user-defined priority to each transaction Sequence number sequence, including:
The transaction sequence number of high priority transaction is less than the transaction sequence number of low priority transaction, alternatively, the transaction sequence of VIP transaction Row number is less than the transaction sequence number of non-VIP transaction.
5. a kind of device of sequence transaction queue, the transaction queue includes multiple transaction, which is characterized in that described device packet It includes:
Determination unit, for determining the corresponding transaction sequence number of each transaction;
Sequencing unit, for sorting to the transaction sequence number of each transaction according to certain rule;
Selecting unit, the transaction for selecting transaction sequence number minimum.
6. device according to claim 5, which is characterized in that the sequencing unit is additionally operable to arrive first first according to transaction Sequence sort to the sequence number of each transaction;Alternatively, being arranged the sequence number of each transaction according to user-defined priority Sequence.
7. device according to claim 5, which is characterized in that the sequencing unit is additionally operable to configuration and is introduced into transaction team The transaction sequence number of the transaction of row enters the sequence number of the transaction of transaction queue after being less than.
8. device according to claim 5, which is characterized in that the sequencing unit is additionally operable to configuration high priority transaction Transaction sequence number be less than low priority transaction transaction sequence number, alternatively, VIP transaction transaction sequence number be less than non-VIP friendship Easy transaction sequence number.
9. a kind of computer readable storage medium, including instruction, when run on a computer so that computer is executed as weighed Profit requires the method described in any one of 1-4.
CN201810337284.1A 2018-04-16 2018-04-16 A kind of method and device of sequence transaction queue Pending CN108512775A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810337284.1A CN108512775A (en) 2018-04-16 2018-04-16 A kind of method and device of sequence transaction queue

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810337284.1A CN108512775A (en) 2018-04-16 2018-04-16 A kind of method and device of sequence transaction queue

Publications (1)

Publication Number Publication Date
CN108512775A true CN108512775A (en) 2018-09-07

Family

ID=63382383

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810337284.1A Pending CN108512775A (en) 2018-04-16 2018-04-16 A kind of method and device of sequence transaction queue

Country Status (1)

Country Link
CN (1) CN108512775A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109492926A (en) * 2018-11-22 2019-03-19 中国银行股份有限公司 A kind of transaction dispatcher method and system based on preferential level adaptation
CN110618859A (en) * 2019-09-10 2019-12-27 杭州秘猿科技有限公司 Transaction pool design method supporting sequential packaging and electronic equipment
CN110738497A (en) * 2019-12-19 2020-01-31 腾讯科技(深圳)有限公司 data processing method, device, node equipment and storage medium
CN111882322A (en) * 2020-07-20 2020-11-03 杭州溪塔科技有限公司 Method and device for packaging transactions in sequence and electronic equipment
CN113191894A (en) * 2019-10-23 2021-07-30 中国人民银行数字货币研究所 Method and device for executing digital currency transaction and electronic equipment
TWI743458B (en) * 2018-10-26 2021-10-21 開曼群島商創新先進技術有限公司 Method, device and system for parallel execution of blockchain transactions
CN117527832A (en) * 2024-01-03 2024-02-06 杭州趣链科技有限公司 Transaction ordering method and device for blockchain, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101217499A (en) * 2008-01-21 2008-07-09 中兴通讯股份有限公司 Array dispatching method
CN103514541A (en) * 2012-06-18 2014-01-15 株式会社Interpay Goods/service price payment system and price payment method of the same
CN106874087A (en) * 2017-01-25 2017-06-20 上海钜真金融信息服务有限公司 A kind of block chain intelligence contract timed task dispatching method
CN107528882A (en) * 2017-07-14 2017-12-29 阿里巴巴集团控股有限公司 The method, apparatus and electronic equipment of processing common recognition request in block chain common recognition network
CN107688945A (en) * 2017-08-11 2018-02-13 杭州秘猿科技有限公司 A kind of efficient license chain based on delaying state common recognition

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101217499A (en) * 2008-01-21 2008-07-09 中兴通讯股份有限公司 Array dispatching method
CN103514541A (en) * 2012-06-18 2014-01-15 株式会社Interpay Goods/service price payment system and price payment method of the same
CN106874087A (en) * 2017-01-25 2017-06-20 上海钜真金融信息服务有限公司 A kind of block chain intelligence contract timed task dispatching method
CN107528882A (en) * 2017-07-14 2017-12-29 阿里巴巴集团控股有限公司 The method, apparatus and electronic equipment of processing common recognition request in block chain common recognition network
CN107688945A (en) * 2017-08-11 2018-02-13 杭州秘猿科技有限公司 A kind of efficient license chain based on delaying state common recognition

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI743458B (en) * 2018-10-26 2021-10-21 開曼群島商創新先進技術有限公司 Method, device and system for parallel execution of blockchain transactions
CN109492926A (en) * 2018-11-22 2019-03-19 中国银行股份有限公司 A kind of transaction dispatcher method and system based on preferential level adaptation
CN110618859A (en) * 2019-09-10 2019-12-27 杭州秘猿科技有限公司 Transaction pool design method supporting sequential packaging and electronic equipment
CN110618859B (en) * 2019-09-10 2021-11-16 杭州秘猿科技有限公司 Transaction pool design method supporting sequential packaging and electronic equipment
CN113191894A (en) * 2019-10-23 2021-07-30 中国人民银行数字货币研究所 Method and device for executing digital currency transaction and electronic equipment
CN110738497A (en) * 2019-12-19 2020-01-31 腾讯科技(深圳)有限公司 data processing method, device, node equipment and storage medium
CN111882322A (en) * 2020-07-20 2020-11-03 杭州溪塔科技有限公司 Method and device for packaging transactions in sequence and electronic equipment
CN117527832A (en) * 2024-01-03 2024-02-06 杭州趣链科技有限公司 Transaction ordering method and device for blockchain, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN108512775A (en) A kind of method and device of sequence transaction queue
CN111062044B (en) Model joint training method and device based on block chain
CN111125779A (en) Block chain-based federal learning method and device
CN110009498A (en) Resource allocation methods and device based on block chain
CN110928951B (en) Data sharing and arbitration method based on block chain
CN110135844A (en) Credit record, querying method and device and electronic equipment based on block chain
CN106934611B (en) Data processing method and device
CN109598147B (en) Data processing method and device based on block chain and electronic equipment
CN110046480A (en) Works copyright distribution method and device based on block chain
CN110275891A (en) Artificial intelligence software market
CN109146681A (en) A kind of element processing method, device, equipment and the storage medium of block chain
CN110517145A (en) Data trade method and relevant device based on multi-tiling interchain
CN109636597A (en) A kind of property execution method and system based on block chain
CN110163634A (en) Withdrawing method and device, electronic equipment based on block chain
CN108876081A (en) virtual room distribution method, device, storage medium and processor
CN114386043A (en) Method for evaluating depocenter privacy keeping credit facing crowd sensing
CN109345311A (en) The method and device that credit is mutually known between different financial institution
CN102594848B (en) A kind of method and system of Internet of Things application being carried out to open type developing
CN113890739B (en) Cross-blockchain authentication method and device, electronic equipment and medium
CN109785177A (en) Communities of users behavior management method, apparatus, medium and equipment based on block chain
CN112184274A (en) Online fulfillment system and method
CN110310103A (en) A kind of resource raises method and block chain node device
Ahmad et al. Implementation of an e-voting prototype using ethereum blockchain in ganache network
CN108259363A (en) A kind of method and device of staged service traffics control
CN108985933A (en) A kind of bookkeeping methods 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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20200316

Address after: 310012 no.1001, 10 / F, block a, Huaxing Times Square, No.478, Wensan Road, Xihu District, Hangzhou City, Zhejiang Province

Applicant after: Hangzhou Xita Technology Co.,Ltd.

Address before: 310013 A 1301, Huaxing Times Square, 478 Wensanlu Road, Xihu District, Hangzhou, Zhejiang.

Applicant before: CRYPTAPE Co.,Ltd.

RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20180907