CN112950381A - Block chain matching exchange - Google Patents

Block chain matching exchange Download PDF

Info

Publication number
CN112950381A
CN112950381A CN202110342162.3A CN202110342162A CN112950381A CN 112950381 A CN112950381 A CN 112950381A CN 202110342162 A CN202110342162 A CN 202110342162A CN 112950381 A CN112950381 A CN 112950381A
Authority
CN
China
Prior art keywords
matching
transaction
server
bitmap
center
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
CN202110342162.3A
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 CN202110342162.3A priority Critical patent/CN112950381A/en
Publication of CN112950381A publication Critical patent/CN112950381A/en
Pending legal-status Critical Current

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
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures

Abstract

When the signed price meets the transaction requirement, the transaction amount accumulation is not larger than the signature amount, and the matching sequence on the same price on the same server is sorted according to the time sequence entering the server. If the users to be matched are respectively located in a plurality of areas with certain network delay, a plurality of area matching centers can be added besides a single full-network matching center, the users can only assign (need to sign) the matching on one server in a certain area to match, and if the matching servers need to be replaced, the matching needs to be realized by hanging the order again after removing the order. The transaction records of the regional matching center deals are sent to the full-network matching center, and the new blocks of the block chain can be directly written in without matching of the full-network matching center.

Description

Block chain matching exchange
Technical Field
The invention relates to the technical field of internet, in particular to technologies such as a block chain, a trading exchange and the like.
Background
1. At present, most exchanges store data in a master-slave backup mode, an effective encryption and verification mechanism is not available, a database is easy to tamper, a plurality of safety monitoring schemes are needed to prevent data tampering, the cost of manpower and material resources is increased, and the data is more harmful if data of internal personnel are counterfeited.
2. Funds generally need to be cleared before being collected on the day, and the funds cannot be traded for 24 hours due to safety problems.
3. Data transmission is generally not encrypted and verified, and transaction instructions are easy to tamper.
4. At present, no mature blockchain exchange case exists, the function is incomplete, and the performance needs to be improved.
Disclosure of Invention
The invention aims to replace a centralized exchange with a blockchain exchange, each transaction instruction is signed by a user with a private key of the user, the transaction instruction cannot be tampered in the transmission process, a blockchain distributed storage mode is adopted in a historical database, a synchronous verification mechanism is adopted, and even internal personnel cannot modify historical transaction data.
The scheme better solves the matching transaction mode of one-to-many and many-to-many on the block chain, optimizes the data comparison technology, reduces data omission, accelerates the data synchronization speed, increases the regional matching center server and reduces the influence of network delay of different regions on the transaction.
The technical scheme adopted by the invention is as follows: the block chain exchange orders are signed by the user, the quantities can not be completely matched, the requirements are stipulated, when the signed prices meet the transaction requirements, the accumulated quantity of the transactions is not larger than the quantity of the signatures, and the matching sequence on the same price on the same server is sorted according to the time sequence entering the server.
Each server receives a transaction request, because of time difference, the same order price and uncertain sequencing positions of different servers, in order to ensure the transaction efficiency, one server can be selected as a unique full-network matching center according to a certain rule or randomly, after the matching of each new block is finished, the matching result is packaged and broadcasted to other servers, and after the verification of other servers is passed, the new block is added locally.
In order to improve the efficiency of data synchronization, a user can change a hash value by converting a random number, the user can select certain preposed numbering machines, can stipulate certain bits of a transaction hash value to distribute number segments in a segmented mode, the certain bits of the hash value are used as non-repeated numbers in the same block, the numbers of the hash value are recorded by bitmaps, the transaction data are transmitted to another server and then are sequenced by the bitmap method, new bitmaps are generated, and after the bitmaps of the two servers are compared, bitmaps formed by the missed transaction numbers of the data can be immediately known to request for downloading and supplementing.
If the users to be matched are respectively in a plurality of areas with time delay in the network, a plurality of area matching centers can be added besides one full-network matching center, the users can assign a certain area matching center to be matched, each user can only assign (need to sign) one server in a certain area to match a deal, and if the matching servers need to be replaced, the matching is realized by withdrawing the order and then hanging the order again. The transaction records of the regional matching center are sent to the full-network matching center, the new blocks of the block chain can be directly written in without matching of the full-network matching center, and if the matching center specified by a certain order changes, the matching center specified by the certain order is defaulted and transferred to a new matching center server.
Each server scores surrounding servers according to communication conditions (considering bandwidth and network delay) with the surrounding servers, for example, 5, 4, 3, 2 and 1 points, the server with the highest score (one of the servers is randomly selected if the server with the highest score is the same) is selected as a full-network matching center server, the server with the highest score statistics (such as the first 30% of the servers in proportion) is selected as a regional matching center server, and the server with the highest average value is selected as a regional matching center server.
The block chain matching exchange can not only carry out matching transaction in a multi-area center, but also place different transaction varieties on different servers to carry out matching transaction, but because the fund balance cannot be checked on a plurality of servers at the same time, a user still needs to designate one (or default) server to carry out fund balance check, and then the fund balance check can be sent to the matching centers of corresponding different varieties.
Compared with the prior art, the invention has the beneficial effects that:
the scheme better solves the matching transaction mode of one-to-many and many-to-many on the block chain, optimizes the data comparison technology, reduces data omission, accelerates the data synchronization speed, increases the election of regional matching center servers and reduces the influence of network delay of different regions on the transaction.
Drawings
FIG. 1 is a block chain showing how a match transaction of multiple signed orders is implemented;
FIG. 2 is a flow diagram illustrating the use of bitmaps versus synchronized transaction data;
FIG. 3 is a diagram illustrating how a network matching center server is selected;
fig. 4 shows that each server scores surrounding servers according to the communication conditions with the surrounding servers (considering bandwidth and network delay).
Example 1. referring to the accompanying figure 1 of the specification,
this embodiment illustrates how to implement a match transaction of signed orders on the blockchain:
each server receives a transaction request, because of time difference, the same order price and uncertain sequencing positions of different servers, in order to ensure the transaction efficiency, one server can be selected as a unique full-network matching center according to a certain rule or randomly, after the matching of each new block is finished, the matching result is packaged and broadcasted to other servers, and after the verification of other servers is passed, the new block is added locally.
Step S1: user a purchases 300 shares of stock, price 15 dollars,
user B sells 200 shares of stock, price 15 yuan,
c user orders to buy 500 shares of stock, price 15 yuan,
user order sells 200 shares of stock, price 15 yuan,
e user orders to sell 300 shares of stock, 15 dollars in price,
the server receives a signature (user private key signature) attached to the user in each transaction, and agrees that the number of future pairs cannot be accumulated more than the preset number in the signature, wherein each transaction does not specify a transaction opponent.
A. B, C, D, E the order of the user's order on a server is sorted by chronological order of entry into the server for the same price.
Each order will check that the amount accumulated by each user must not exceed its own available fund balance or available stock balance before entering the match queue.
Step S2: the order A appears earliest, the order B appears 2 nd, the prices of the two orders are the same, the buying and selling directions are opposite, and all 200 shares of the order B and 200 shares of 300 shares of the order A are paired to form a deal.
The record of the deal is:
paying 200 shares of B to A
3000 yuan (200 x 15) of A is paid to B
Step S3: after the last step, the order A has 100 shares left and has not been traded, then the turn is to the D user for pairing, the D user sells 100 shares in 15 yuan, the deal with the order A has 100 shares left, the D user sells 100 shares in 15 yuan, and the deal with the order C has 100 shares.
The transaction records are:
d100 shares paid to A
1500 yuan (100 x 15) of A to D
D100 shares payment to C
1500 yuan (100 x 15) of C to D
Step S4: after the last step, the C order has 400 shares left without bargaining, and then the E user is paired, and the E user sells 300 shares in 15 Yuan to bargain with the C order.
The record of the deal is:
e300 shares payment to C
4500-ary (300 × 15) of C pays to E
Step S5: if the C user wants to cancel 100 deals which have not been committed, a deleting instruction (needing signature) is sent, the server withdraws the C orders which have not been committed out from the matching queue after receiving the instruction, and the committed part cannot be cancelled.
Example 2. referring to figure 2 of the drawings,
the flow of using bitmaps versus synchronized transaction data is illustrated. Scene, the front-end node A selects 10 ten thousand transactions (1e5) with non-repeated numbers, and the node server B synchronizes the transaction orders of the front-end server node A. Step S1 node A uses 18 bits (2^18>2^17>1e5, but 18 bits of bitmap is more time efficient) bitmap A, which can be computed with https:// github.
bitNum:=uint(18)
A:=bitset.New(2^bitNum)
And taking the first 18-bit integer (binary system) of each transaction hash value (32 bytes and 256 bits), putting the integer into the bitmap A, ensuring that the position of the bitmap corresponding to each transaction is unique, and if the position is set, transforming the transaction random number and regenerating the hash value.
Step S2, node a sends 10 ten thousand transactions to node B, and finally sends bitmap a to node B.
And step S3, the node B generates the bitmap B according to the step S1 from the received transaction, compares the bitmap A with the bitmap B, and if the bitmap A is equal to the bitmap B, the process is finished. Otherwise, marking the missing transaction, generating a bitmap C, and sending the bitmap C to the node a. C: difference (B).
And step S4, the node A finds out the transaction of the position corresponding to the bitmap C and sends the transaction to the node B. Step S5, repeat step S3, step S4.
Example 3. referring to the description of fig. 3, fig. 4,
each server scores surrounding servers according to communication conditions (considering bandwidth and network delay) with the surrounding servers, for example, 5, 4, 3, 2 and 1 points, and a certain server with the highest score is selected as a full-network matching center server, wherein the total score of the number 8 server is 46 points, the server with the highest total score is the server with the highest total score in all servers, and the server is easily selected as the full-network matching center server.
The server with the highest score statistics (e.g., the first 30%) is selected as the regional match center server. Here, if the top 3 servers with the highest scores are obtained, 4, 6, and 8 are all selected as the regional matching center servers, and since 8 is already the full-network matching center server, 4 and 6 are selected as the regional matching center servers.
Since neither the network-wide nor the regional match server is fixed, once the user-specified center has changed, the right to pair the transaction can be transferred by default to the next selected match center, and the only route on the blockchain that needs to be indicated for the transfer is agreed upon.
And the regional matching center server is added, so that the influence of network delay of different regions on the transaction can be reduced.

Claims (1)

1. A block chain matching exchange is characterized in that in order to improve the efficiency of data synchronization, a user can change a hash value by converting random numbers, can select some preposed queuing machines and can stipulate some bit segmentation distribution number segments of the transaction hash value, some bits of the hash value are used as non-repeated numbers of a uniform block, the numbers of the batch of hash values are recorded by a bitmap, the transaction data are transmitted to another server and then are sequenced by the bitmap method to generate a new bitmap, and after the bitmaps of the two servers are compared, a bitmap formed by the missed transaction numbers of the data can be immediately obtained to request for downloading and supplementing.
CN202110342162.3A 2016-01-24 2016-01-24 Block chain matching exchange Pending CN112950381A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110342162.3A CN112950381A (en) 2016-01-24 2016-01-24 Block chain matching exchange

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610043553.4A CN105761146B (en) 2016-01-24 2016-01-24 Block chain matching exchange
CN202110342162.3A CN112950381A (en) 2016-01-24 2016-01-24 Block chain matching exchange

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
CN201610043553.4A Division CN105761146B (en) 2016-01-24 2016-01-24 Block chain matching exchange

Publications (1)

Publication Number Publication Date
CN112950381A true CN112950381A (en) 2021-06-11

Family

ID=56342548

Family Applications (3)

Application Number Title Priority Date Filing Date
CN201610043553.4A Active CN105761146B (en) 2016-01-24 2016-01-24 Block chain matching exchange
CN202110342161.9A Pending CN113159948A (en) 2016-01-24 2016-01-24 Block chain matching exchange
CN202110342162.3A Pending CN112950381A (en) 2016-01-24 2016-01-24 Block chain matching exchange

Family Applications Before (2)

Application Number Title Priority Date Filing Date
CN201610043553.4A Active CN105761146B (en) 2016-01-24 2016-01-24 Block chain matching exchange
CN202110342161.9A Pending CN113159948A (en) 2016-01-24 2016-01-24 Block chain matching exchange

Country Status (1)

Country Link
CN (3) CN105761146B (en)

Families Citing this family (31)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB201613109D0 (en) * 2016-07-29 2016-09-14 Eitc Holdings Ltd Computer implemented method and system
CN106354994B (en) * 2016-08-22 2019-01-18 布比(北京)网络技术有限公司 Handle the method and system of medical data
CN106682984B (en) * 2016-10-27 2019-09-10 深圳壹账通智能科技有限公司 Transaction business process method and system based on block chain
CN106548330B (en) * 2016-10-27 2018-03-16 上海亿账通区块链科技有限公司 Transaction verification method and system based on block chain
CN106534273B (en) * 2016-10-31 2022-04-15 中金云金融(北京)大数据科技股份有限公司 Block chain metadata storage system and storage method and retrieval method thereof
CN107016606A (en) * 2016-12-08 2017-08-04 阿里巴巴集团控股有限公司 A kind of method for processing resource and device
CN106682907A (en) * 2016-12-10 2017-05-17 江苏恒为信息科技有限公司 Comparison and consensus method for block chain data
CN106886890B (en) * 2017-02-07 2020-07-17 杭州溪塔科技有限公司 Block chain-based timed transaction execution method
CN106899680B (en) * 2017-03-09 2019-07-30 深圳壹账通智能科技有限公司 The fragment treating method and apparatus of multi-tiling chain
CN107395659B (en) 2017-03-28 2021-08-24 创新先进技术有限公司 Method and device for service acceptance and consensus
CN107016543A (en) * 2017-03-29 2017-08-04 宁夏煜隆科技有限公司 The method of commerce and system of model adaptation in e-commerce platform
CN106980980A (en) * 2017-03-29 2017-07-25 宁夏宁信信息科技有限公司 Method of commerce and system based on block chain technology in e-commerce platform
CN106971342A (en) * 2017-03-29 2017-07-21 宁夏凯速德科技有限公司 Method of commerce and system based on block chain technology in the e-commerce platform of decentralization
CN108881166B (en) * 2017-05-16 2021-03-26 江峰 Virtual account block chain verification system with external fixed physical node
CN110069564B (en) * 2017-08-23 2021-02-12 杭州嘉楠耘智信息科技有限公司 Information query system and method based on block chain
CN107608661A (en) * 2017-09-14 2018-01-19 北京天德科技有限公司 A kind of high concurrent two dimension based on block chain brings the core algorithm of matrix together
CN108537627B (en) * 2018-03-22 2021-06-08 朱志文 Copyright trading method and system based on block chain technology
CN108681963B (en) * 2018-03-29 2020-07-31 深圳市网心科技有限公司 Multi-block chain integration control method, system, electronic device and storage medium
CN108647947A (en) * 2018-05-18 2018-10-12 江苏安纳泰克能源服务有限公司 Electricity transaction matching process based on block chain technology
CN108984662B (en) * 2018-06-28 2021-02-09 杭州复杂美科技有限公司 Block chain data synchronization method
CN108876378B (en) * 2018-07-11 2022-04-19 北京国泰网信科技有限公司 Public link data encryption backup method
CN109087082B (en) * 2018-07-23 2020-06-23 阿里巴巴集团控股有限公司 Financial transaction execution method and device based on block chain and electronic equipment
CN109308666B (en) * 2018-10-23 2020-12-15 昧来网络科技(上海)有限公司 Asset certification method based on block chain and computer storage medium
CN109669789A (en) * 2018-12-10 2019-04-23 杭州复杂美科技有限公司 Transaction queuing strategy, trading pit storage method, equipment and storage medium
CN109872139B (en) * 2019-01-31 2020-10-23 杭州复杂美科技有限公司 Transaction replacement method, apparatus and storage medium
CN109871666B (en) * 2019-01-31 2020-09-15 阿里巴巴集团控股有限公司 Copyright stream transfer method and device based on block chain
CN111612453A (en) * 2019-02-22 2020-09-01 北京趣块远扬科技有限公司 Decentralized transaction method and device based on block chain and electronic equipment
SG10201907110VA (en) * 2019-08-01 2020-08-28 Alibaba Group Holding Ltd Methods and devices for transaction matching based on blockchain system
CN111325533A (en) * 2019-12-31 2020-06-23 深圳大学 Decentralized transaction method, decentralized transaction system and computer equipment
CN111402050A (en) * 2020-03-11 2020-07-10 北京价值互联科技有限公司 Center-removing matching method and system based on block chain
CN111626488B (en) * 2020-05-18 2023-09-01 中科易贺(江苏)区块链高科技有限公司 Matching system and method for blockchain data communication

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020194106A1 (en) * 2001-06-06 2002-12-19 Robert Kocher Stock trading limit order coupled link (LOCK)
CN1797463A (en) * 2004-12-30 2006-07-05 干学平 Marketing method and system for generating multiple transaction values
CN1959729A (en) * 2006-11-20 2007-05-09 山东寿光蔬菜电子交易市场有限公司 Electric bargaining system for making a match
CN101019126A (en) * 2004-07-15 2007-08-15 万事达卡国际股份有限公司 Method and system using a bitmap for passing contactless payment card transaction variables in standardized data formats
US20150348169A1 (en) * 2014-05-28 2015-12-03 Michael Richards Harris System and method for marketplace software platform

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7366859B2 (en) * 2005-10-06 2008-04-29 Acronis Inc. Fast incremental backup method and system
CN101866465A (en) * 2009-04-16 2010-10-20 邵贵平 Warehousing service electronic transaction system and electronic transaction method
CN102279958A (en) * 2010-06-09 2011-12-14 杭州我的管家漾网钢铁电子交易市场有限公司 Spot interim-future electronic disc trading system of steel
CN102184128B (en) * 2011-05-26 2013-04-10 成都易我科技开发有限责任公司 Fast disc incremental backup method
US20150220928A1 (en) * 2014-01-31 2015-08-06 Robert Allen Platform for the purchase and sale of digital currency
CN103839160B (en) * 2014-03-20 2015-09-02 武汉信安珞珈科技有限公司 A kind of network trading digital signature method and device
US9818092B2 (en) * 2014-06-04 2017-11-14 Antti Pennanen System and method for executing financial transactions
CN104392377A (en) * 2014-12-09 2015-03-04 四川诚品电子商务有限公司 Cloud transaction system
CN105139255A (en) * 2015-08-03 2015-12-09 上海祥光金属贸易有限公司 Futures trading internal matchmaking method and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020194106A1 (en) * 2001-06-06 2002-12-19 Robert Kocher Stock trading limit order coupled link (LOCK)
CN101019126A (en) * 2004-07-15 2007-08-15 万事达卡国际股份有限公司 Method and system using a bitmap for passing contactless payment card transaction variables in standardized data formats
CN1797463A (en) * 2004-12-30 2006-07-05 干学平 Marketing method and system for generating multiple transaction values
CN1959729A (en) * 2006-11-20 2007-05-09 山东寿光蔬菜电子交易市场有限公司 Electric bargaining system for making a match
US20150348169A1 (en) * 2014-05-28 2015-12-03 Michael Richards Harris System and method for marketplace software platform

Also Published As

Publication number Publication date
CN105761146B (en) 2021-06-01
CN113159948A (en) 2021-07-23
CN105761146A (en) 2016-07-13

Similar Documents

Publication Publication Date Title
CN105761146B (en) Block chain matching exchange
CN108256859B (en) Financial product transaction consensus method, node and system based on block chain
CN108880863B (en) Smart power grid equipment safety diagnosis service system based on block chain technology
CN109872152B (en) Block chain consensus method based on share authorization certification mechanism and related equipment
CN111427957B (en) Block chain voting information verification method, device, equipment and storage medium
EP3928276A1 (en) Trusted tokenized transactions in a blockchain system
US20200058071A1 (en) Least decentralized fund trading system and method thereof
CN110503533B (en) Heterogeneous spectrum multi-round auction method based on block chain
CN109885264A (en) A kind of the logic sharding method and its system of block chain node
CN109379429A (en) A kind of multichain management method and system based on block chain
CN110458709B (en) Resource transfer information transmission method and device, storage medium and electronic device
CN112712420B (en) Green certificate transaction system based on block chain
CN111325581B (en) Data processing method and device, electronic equipment and computer readable storage medium
CN111314067A (en) Block storage method and device, computer equipment and storage medium
CN111681002A (en) Fair data transaction method and system based on block chain
CN113256424B (en) Transaction data processing method, device, equipment and storage medium
CN111522826A (en) Bidding transaction processing method and system based on block chain and related nodes
CN113158650A (en) Message processing method, device, equipment and storage medium
CN110599145A (en) Data processing method and device based on intelligent contract and storage medium
CN110738783A (en) System, method, device, equipment and readable storage medium for updating voting data
CN110941840B (en) Data processing method, system and terminal
CN111767582A (en) Block chain-based electronic bidding method, device, equipment and storage medium
CN112862469A (en) Block chain-based digital asset transaction method, system, equipment and storage medium
CN111383016A (en) Electronic invoice data processing method, device and system based on private chain
CN111008900A (en) Data distribution method and device based on intelligent contract

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