CN106919643A - The reading/writing method and system of the write-in, reading and market data of market data - Google Patents

The reading/writing method and system of the write-in, reading and market data of market data Download PDF

Info

Publication number
CN106919643A
CN106919643A CN201710029289.3A CN201710029289A CN106919643A CN 106919643 A CN106919643 A CN 106919643A CN 201710029289 A CN201710029289 A CN 201710029289A CN 106919643 A CN106919643 A CN 106919643A
Authority
CN
China
Prior art keywords
data
market
point
notes record
source data
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
CN201710029289.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.)
Guangzhou New Patio Network Information Technology Co Ltd
Original Assignee
Guangzhou New Patio Network Information 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 Guangzhou New Patio Network Information Technology Co Ltd filed Critical Guangzhou New Patio Network Information Technology Co Ltd
Priority to CN201710029289.3A priority Critical patent/CN106919643A/en
Publication of CN106919643A publication Critical patent/CN106919643A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2308Concurrency control
    • G06F16/2315Optimistic concurrency control
    • 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
    • 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/06Asset management; Financial planning or analysis

Abstract

The reading/writing method and system of a kind of write-in of market data, reading and market data are the embodiment of the invention provides, wherein, said write method includes:A generation point market data;For a currently point market data, its difference data with upper one point market data is calculated;A market data and its corresponding difference data will currently be divided as a point of notes record write-in preset memory areas domain;After point write-in of notes record is completed, add up a point notes record quantity.The embodiment of the present invention is solved in the prior art when for a large amount of read access, and write-in thread is susceptible to congestion, and, the excessive problem of consumption internal memory, so that when there is the situation of a large amount of read access, improving handling capacity.

Description

The reading/writing method and system of the write-in, reading and market data of market data
Technical field
The present invention relates to technical field of data transmission, more particularly to a kind of write-in of market data, reading and market The reading/writing method of data and the read-write system of a kind of write-in of market data, reading and market data.
Background technology
In securities industry, market data are the basic data of all data analysis systems, the offer of each security The change of breath, is all that the data of turn of the market embody, and these data supply investor as reference in investment process, so that directly Influence the investment behavior of investor.In this context, how it is more efficient market data are processed, become industry The a great problem that technical staff is faced.
The access of market data is divided into three parts:The renewal write-in in server response market source;Server customer in response Hold the digital independent of request;A point pen data is distributed by network.Wherein, it is while carrying out to write and read two access , when needing to carry out digital independent in data writing process, therefore, to assure that two threads of read-write need not be waited mutually, and The market data for obtaining are complete logics, rather than dirty data.
In the prior art, the concurrently access to data has two kinds of solutions.
Scheme one, using read-write lock technology, during digital independent, using read lock, do not had to be mutually exclusive between reading, read lock only with Lock is write to repel.When data write, using lock is write, write between lock, write mutually exclusive between lock and read lock.That is, if other Thread has been obtained for read lock or writes lock, and presently written thread has to wait for other thread and discharges the lock.This scheme advantage is Can ensure that while the operation that only a thread is write to data, it is ensured that mathematical logic is complete, it is to avoid dirty data.
Scheme two, using RCU (Read Copy Update, read, and replicate, and update), is specifically referred to, and data area is all gathered around There is an index, data can not be accessed directly, but by index accesses.Write when updating the data, replicate a first Data, after carrying out write-in renewal to the field of replicate data, then are locked and are updated to index.The advantage of this scheme is, more Locking data is not needed when new, index need to be only locked when index is updated, it is time-consuming seldom due to updating index, so write-in thread With read thread between stand-by period it is relatively short, almost without waiting for.
However, in solution of the prior art, still there is very important technological deficiency.
For scheme one, read-write lock technology is used.The shortcoming of this scheme is that write-in thread needs to wait when concurrently accessing, especially , when a large amount of read access are carried out, write-in thread is susceptible to congestion, and this influence to quotation service device is fatal for it.
For scheme two, RCU technologies are used.The shortcoming of this scheme is to update the data to be required for carrying out data copy every time, It is very big to memory consumption, and copy also consumes cpu resource so that throughput degradation.
Therefore, under the scene of a large amount of read access, solved to the concurrently access of data very using prior art The inefficiency of write-in thread is likely to result in, and, to excessively occupying for cpu resource, cause throughput degradation.
The content of the invention
In view of the above problems, it is proposed that the embodiment of the present invention overcomes above mentioned problem or at least in part to provide one kind A kind of write-in of the market data for solving the above problems, read and market data reading/writing method and a kind of corresponding market number According to write-in, read and market data read-write system.
In order to solve the above problems, the embodiment of the invention discloses a kind of write-in of market data, read and market number According to reading/writing method and system, solve the problems, such as that handling capacity is low during for a large amount of read access.
In a first aspect, the embodiment of the invention provides a kind of wiring method of market data, methods described includes:
A generation point market data;
For a currently point market data, its difference data with upper one point market data is calculated;
A market data and its corresponding difference data will currently be divided as a point of notes record write-in preset memory areas domain;
After point write-in of notes record is completed, add up a point notes record quantity.
Preferably, the step of generation point market data include:
Obtain market source data;
Judge the market source data generation time whether before liquidation;If it is not, being then have by the market data judging The market source data of effect;
Whether the market data genaration time is judged in bidding the stage, if it is not, being by the market data judging then Effective market source data;
Judge whether the market data are abnormal data, if it is not, being then effective market by the market data judging Source data;
The effective market source data is carried out into a point pen treatment, a point market data are obtained.
Preferably, it is described to judge whether the market data are that the sub-step of abnormal data is further included:
When falling back occurs in the market source data exchange hand,
And/or,
Falling back occurs in the market source data generation time,
And/or,
There is mistake in the market source data internal and external disk mark,
And/or,
It is abnormal number by the market data judging when average price amplitude of the market source data exceedes predetermined threshold value According to.
Preferably, the market source data includes, market source data code, market source data market code, market source number According to generation time, market source data price, market source data opening price, market source data ceiling price, market source data most Low price, market source data recent quotation, market source data exchange hand, market source data transaction value, market source data buy monovalence, Market source data is bought divalence, market source data and buys trivalent, market source data and buy tetravalence, market source data and buys pentavalent, market source number According to sell monovalence, market source data sell divalence, market source data sell trivalent, market source data sell tetravalence, market source data sell pentavalent, Market source data is bought an amount, market source data and buys two amounts, market source data and buy three amounts, market source data and buys four amounts, market source number According to five amounts of buying, market source data sell an amount, market source data sell two amounts, market source data sell three amounts, market source data sell four amounts, Market source data sells five amounts, market source data internal and external disk mark, market source data ups and downs man number;
Described that the effective market source data is carried out into a point pen treatment, the sub-step for obtaining a point market data is further Including:
When the market source data recent quotation is 0 and to be not equal to the newest valency of market source data once concluded the business before it Lattice,
And/or,
The market source number exchange hand is more than 0 and more than the market source data exchange hand once concluded the business before it,
And/or,
The market source number transaction value more than 0 and during more than the market source data transaction value once concluded the business before it, from current In effective market source data, extract market source data code, market source data market code, the market source data generation time, Market source data transaction value, the newest valency of market source data, market source data exchange hand, the market source data amount of holding position, market source number An amount, market source data internal and external disk are sold according to buying monovalence, market source data and buying an amount, market source data and sell monovalence, market source data Mark, organizes composition market data.
Preferably, the difference data include time difference, poor transaction value, price difference, exchange hand is poor, the amount of holding position is poor, buy one Price differential, buy that an amount is poor, sell a price differential, to sell an amount poor, described for a currently point market data, calculates it with a upper point of pen row The step of difference data of feelings data, includes:
For point market data genaration time in a current point of market data, calculate its with its before once conclude the business divide A point market data genaration time difference of market data, and it is recorded as the time difference;
For point market data transaction value in a current point of market data, calculate its with its before once conclude the business divide pen A point market data transaction value difference of market data, and it is poor to be recorded as transaction value;
For point newest valency of market data in a current point of market data, calculate its with its before once conclude the business divide pen Point newest price differential volume of a market data of market data, and it is recorded as price difference;
For point market data exchange hand in a current point of market data, calculate its with its before once conclude the business divide pen A point market data exchange hand difference of market data, and it is poor to be recorded as exchange hand;
For point market data amount of holding position in a current point of market data, calculate its with its before once conclude the business divide pen Point market data amount of a holding position difference of market data, and it is poor to be recorded as the amount of holding position;
Buy monovalence for point market data in a current point of market data, calculate its with its before once conclude the business divide pen A point market data for market data buy monovalence difference, and are recorded as buying a price differential;
Buy an amount for point market data in a current point of market data, calculate its with its before once conclude the business divide pen Point market data of market data buy an amount difference, and are recorded as buying an amount poor;
Sell monovalence for point market data in a current point of market data, calculate its with its before once conclude the business divide pen A point market data for market data sell monovalence difference, and are recorded as selling a price differential;
Sell an amount for point market data in a current point of market data, calculate its with its before once conclude the business divide pen Point market data of market data sell an amount difference, and are recorded as selling an amount poor.
Preferably, described after the write-in for completing to divide notes record, cumulative point includes the step of taking down notes record quantity:
It is a point total amount to record the cumulative point notes record quantity;
Judge a current point of total amount whether beyond the size for presetting storage region;
If so, then terminating a point write-in for notes record.
Second aspect, the embodiment of the invention provides there is provided a kind of read method of market data, and methods described includes:
A point notes record read requests are received, the request includes that initial time is read in a point notes record;
Point notes record quantity that acquisition has been recorded;
Using the reading initial time and point notes record quantity for having recorded, current reading is positioned in the domain of preset memory areas The first stroke for taking point notes record, and, it is necessary to point notes record quantity for reading;Described point of notes record includes a point market number According to, and, currently divide the difference data of a market data and upper one point market data;
Since a point market data of described the first stroke point notes record, the difference in follow-up respective numbers point notes record is read Specified number evidence;
Represent point a market data and the difference data for reading to user.
The third aspect, the embodiment of the invention provides there is provided a kind of reading/writing method of market data, and methods described is related to Read thread and write thread, the reading thread and write thread while carrying out, the thread of writing includes:
A generation point market data;
For a currently point market data, its difference data with upper one point market data is calculated;
A market data and its corresponding difference data will currently be divided as a point of notes record write-in preset memory areas domain;
After point write-in of notes record is completed, add up a point notes record quantity;
The reading thread includes:
A point notes record read requests are received, the request includes that initial time is read in a point notes record;
Point notes record quantity that acquisition has been recorded;
Using the reading initial time and point notes record quantity for having recorded, current reading is positioned in the domain of preset memory areas The first stroke for taking point notes record, and, it is necessary to point notes record quantity for reading;Described point of notes record includes a point market number According to, and, currently divide the difference data of a market data and upper one point market data;
Since a point market data of described the first stroke point notes record, the difference in follow-up respective numbers point notes record is read Specified number evidence;
Represent point a market data and the difference data for reading to user.
Fourth aspect, the embodiment of the invention provides there is provided a kind of writing system of market data, and the system includes:
Data generation module, for generating a point market data;
Difference data computation module, for for a currently point market data, calculating it with upper one point market data Difference data;
Writing module, for will currently divide a market data and its corresponding difference data as a point of notes record write-in Preset memory areas domain;
Quantity accumulator module, for point notes record quantity that after point write-in of notes record is completed, adds up.
5th aspect, the embodiment of the invention provides there is provided a kind of reading system of market data, and the system includes:
Request receiving module, for receiving a point notes record read requests, the request includes that starting is read in a point notes record Time;
Quantity acquisition module, for obtaining point notes record quantity for having recorded;
Notes record and a point notes are divided to record quantity read module, for using the reading initial time and point pen for having recorded Record quantity, positions current the first stroke for reading point notes record, and, it is necessary to point notes record read in the domain of preset memory areas Quantity;Described point of notes record includes a point market data, and, currently divide a market data and upper one point market data Difference data;
Difference data read module, for since a point market data of described the first stroke point notes record, reading follow-up Difference data in respective numbers point notes record;
Data return to module, for representing point a market data and the difference data that read to user.
6th aspect, the embodiment of the invention provides there is provided a kind of read-write system of market data, and the system is related to Read thread and write thread, the reading thread and write thread while carrying out, the thread of reading includes:
Second data generation module, for generating a point market data;
Second difference data computation module, for for a currently point market data, calculating it with a upper point of market The difference data of data;
Second writing module, for will currently divide a market data and its corresponding difference data to be recorded as a point of notes Write-in preset memory areas domain;
Second quantity accumulator module, for point notes record quantity that after point write-in of notes record is completed, adds up;
The reading thread includes:
Second request receiving module, for receiving a point notes record read requests, the request includes that a point notes record is read Initial time;
Second quantity acquisition module, for obtaining point notes record quantity for having recorded;
Second point of notes record and point notes record quantity read module, for using the reading initial time and having recorded Divide notes record quantity, the first stroke point notes record of current reading is positioned in the domain of preset memory areas, and, it is necessary to that reads divides pen Record quantity;Described point of notes record includes a point market data, and, currently divide a market data and a upper point of market The difference data of data;
Second difference data read module, for since a point market data of described the first stroke point notes record, reading Difference data in follow-up respective numbers point notes record;
Second data return to module, for representing point a market data and the difference data that read to user.
The embodiment of the present invention includes advantages below:
The embodiment of the present invention, by when market data update, generates one point new market data, calculate its with it is upper The one point difference data of market data, in the domain of preset memory areas, this group of data, each field is inserted successively, is reused Atomic operation, add up a point notes record quantity, when market occurs in next time to be updated, repeats this operation;Receiving a point notes record reading please Ask, obtain receive point notes record read requests when generate point notes record read initial time, and, recorded point notes record number Amount, quantity is recorded using the reading initial time and the notes that divide for having recorded, and current reading is positioned in the domain of preset memory areas The first stroke point notes record, and, it is necessary to point notes record quantity for reading, and a point market data are extracted from point notes record, with And, the difference data of a current point of market data and upper one point market data take down notes point pen recorded from described the first stroke point Market data start, and read the difference data in follow-up respective numbers point notes record, and most after image user represents point pen for reading Market data and difference data, by with the method described in the embodiment of the present invention, it is possible to achieve write thread with read thread can be with Concurrent to carry out simultaneously, operating system provides the reading and write operation that can not overlap of instruction-level, it is ensured that to read or write Byte will not be suspended (interruption) in operation so that system can only read point pen before write-in in thread is read A point pen after collecting or writing collects, so as to obtain the complete point market data of logic, this just ensure that and is concurrently accessing When write-in thread without waiting for so as to improve the read-write efficiency to market data.
Brief description of the drawings
The step of Fig. 1 is a kind of wiring method embodiment of market data of the invention flow chart;
The step of Fig. 2 is a kind of read method embodiment of market data of the invention flow chart;
The step of Fig. 3 is a kind of reading/writing method embodiment of market data of the invention flow chart;
Fig. 4 is a kind of structured flowchart of the writing system embodiment of market data of the invention;
Fig. 5 is a kind of structured flowchart of the reading system embodiment of market data of the invention;
Fig. 6 is a kind of structured flowchart of the read-write system embodiment of market data of the invention.
Specific embodiment
It is below in conjunction with the accompanying drawings and specific real to enable the above objects, features and advantages of the present invention more obvious understandable The present invention is further detailed explanation to apply mode.
Reference picture 1, flow chart the step of show a kind of wiring method embodiment of market data of the invention, specifically may be used To comprise the following steps:
Step 101, a generation point market data;
In actual applications, the embodiment of the present invention can apply to client, and/or, in server, the present invention is directed to and divides The characteristics of market data, design specific access technique so that write and read while point market data, then transmit To client, it is hereby achieved that bigger handling capacity.
In embodiments of the present invention, a point market data can in the following way be generated:
First the market source data transmitted by market source is obtained, then whether is effective market to the market source data Data are judged, when the market source data is judged as effective market source data, by the effective market source data A point pen treatment is carried out, a point market data are obtained.
Used as a kind of example of the embodiment of the present invention, the market source data can include, market source data code, market Source data market code, market source data generation time, market source data price, market source data opening price, market source number According to ceiling price, market source data lowest price, market source data recent quotation, market source data exchange hand, market source data Transaction value, market source data are bought monovalence, market source data and buy divalence, market source data and buy trivalent, market source data and buy tetravalence, OK Feelings source data is bought pentavalent, market source data and sells monovalence, market source data and sell divalence, market source data and sells trivalent, market source data Sell tetravalence, market source data and sell pentavalent, market source data and buy an amount, market source data and buy two amounts, market source data and buy three amounts, OK Feelings source data is bought four amounts, market source data and buys five amounts, market source data and sell an amount, market source data and sells two amounts, market source data Sell three amounts, market source data sell four amounts, market source data sell five amounts, market source data internal and external disk mark, market source data ups and downs Family's number etc..
In implementing, whether market source data that can be in the following way to getting is effective market source data Judged:
Mode one:Judge the market source data generation time whether before liquidation;If it is not, then by the market source data It is judged to effective market source data.
For example, the day of trade 9:00am liquidates, and the market source data arrived before liquidation does not generate a point market data.
Mode two:Whether the market source data generation time is judged in bidding the stage, if it is not, then by the market source Data judging is effective market source data.
If for example, disk mouthful price is effectively (buy 1 and sell 1), and disk mouthful price and amount are equal, then in the stage of bidding, now arrive The market source data come does not generate a point market data.
Mode three:Judge whether the market source data is abnormal data, if it is not, being then judged to the market source data Effective market source data.
It is described to judge whether the market market source data is abnormal number as a particularly preferred embodiment of the invention According to can also include:
When falling back occurs in the market source data exchange hand, judge that the market source data is abnormal number;
For example, the exchange hand in the current market source data for obtaining is fewer than the exchange hand of the preceding market source data for once obtaining When, the market source data is judged to abnormal data, the abnormal data is not involved in a generation point market data.
When the market source data generation time occurring falling back, judge that the market source data is abnormal number;
For example, time for being marked of the current market source data for obtaining than the market source data of previous acquisition marked when Between it is early, the market source data is judged to abnormal data, the abnormal data is not given birth to and participates in composition market data.
When mistake occurs in market source data internal and external disk mark, judge that the market source data is abnormal number;
In concrete operations, can judge to mark whether mistake occur on internal and external disk mark internal and external disk by the following method By mistake:
If when present value is more than or equal to selling price, belonging to external disk.
If when present value is less than or equal to buying rate, belonging to inner disc.
If when present value is between buying rate and selling price:Judged using a upper point of pen, category is increased than previous price External disk, category inner disc is reduced than previous price, maintains the internal and external disk of upper to mark if equal, if without previous pen data, Then received valency using yesterday to judge, it is external disk to be received more than or equal to yesterday, it is inner disc to be received less than yesterday.
For example, reduced successively to buying 5 when buying 1, sell 1 to sell 5 and increase successively when, the market source data is judged to exception Data, the abnormal data is not involved in a generation point market data.
When the average price amplitude of the market source data exceedes predetermined threshold value, the market source data is judged to different Regular data.
For example, accumulative 1 minute transaction value is divided by exchange hand, when this wave amplitude is more than 50%, by the market source data It is judged to abnormal data, the abnormal data does not generate a point market data.
Certainly, those skilled in the art arbitrarily select above-mentioned one or more method all to the market source data whether be Invalid market source data is judged it is all feasible, in this invention is not limited in this regard.
In a preferred embodiment of the invention, the effective market source data can be carried out by the following method Divide pen treatment, obtain a point market data:
Method one, when the market source data recent quotation is 0 and to be not equal to the market source data once concluded the business before it During recent quotation, the effective market source data is carried out into a point pen treatment.
Method two, the market source data exchange hand once concluded the business before the market source number exchange hand is more than 0 and more than it When, the effective market source data is carried out into a point pen treatment.
Method three, the market source data transaction value once concluded the business before the market source number transaction value is more than 0 and more than it When, the effective market source data is carried out into a point pen treatment.
Certainly, those skilled in the art arbitrarily select above-mentioned one or more method to enter effective market source data Row point pen treatment is all feasible, to this invention is not limited in this regard.
Further, the method for described point of pen treatment includes, from currently valid market source data, extracts market source number It is newest according to code, market source data market code, market source data generation time, market source data transaction value, market source data Valency, market source data exchange hand, the market source data amount of holding position, market source data are bought monovalence, market source data and buy an amount, market source Data are sold monovalence, market source data and sell an amount, market source data internal and external disk mark etc., organize composition market data.
To make those skilled in the art more fully understand the embodiment of the present invention, the example below by way of a concrete application is entered Row explanation.
For example, being when the market source data for getting:Market source data code:600000;When market source data is generated Between:212347272630000000;Market source data opening price:1728;Market source data ceiling price:1729;Market source Data lowest price:1726;Market source data recent quotation:1729;Market source data exchange hand:237301;Market source data Transaction value:3581907;Market source data buys 1 valency/amount:1728/4900;Market source data buys divalent/amount:1726/17699;OK Feelings source data buys trivalent/amount:1725/29200;Market source data buys 4 valencys/amount:1724/26200;Market source data buys 5 valencys/amount: 1723/700;Market source data sells 1 valency/amount:1729/71093;Market source data sells divalent/amount:1730/133650;Market source Data sell trivalent/amount:1731/2400;Market source data sells 4 valencys/amount:1732/11000;Market source data sells 5 valencys/amount:1733/ 30800;Point market data for then generating can be:Divide a time:212347272630000000;Divide the newest valency of pen:1729; Stepped transaction amount:4600;Stepped transaction volume:79534;Pen is divided to buy 1 valency:1728;Pen is divided to buy 1 amount:4900;Pen is divided to sell 1 valency: 1729;Pen is divided to sell 1 amount:71093;Internal and external disk:External disk;Rise man number:0;Drop man number:0.
Wherein, this field of rise man number and drop man number is only effective to index kind, and non-exponential field fills out 0, and index is then Traversal constituent stocks, count the kind number of the kind number and drop for going up.
Step 102, for a currently point market data, calculates its difference data with upper one point market data;
In actual applications, the difference data can be between two component market data, each field be subtracted each other, and is drawn A point difference (increment) data, the difference data include that time difference, poor transaction value, price difference, exchange hand be poor, the amount of holding position Difference, buy a price differential, buy that an amount is poor, sell a price differential, to sell an amount poor.
In embodiments of the present invention, it is described for a currently point market data, it is calculated with upper one point market data Difference data the step of can include:
For point market data genaration time in a current point of market data, calculate its with its before once conclude the business divide A point market data genaration time difference of market data, and it is recorded as the time difference;
For point market data transaction value in a current point of market data, calculate its with its before once conclude the business divide pen A point market data transaction value difference of market data, and it is poor to be recorded as transaction value;
For point newest valency of market data in a current point of market data, calculate its with its before once conclude the business divide pen Point newest price differential volume of a market data of market data, and it is recorded as price difference;
For point market data exchange hand in a current point of market data, calculate its with its before once conclude the business divide pen A point market data exchange hand difference of market data, and it is poor to be recorded as exchange hand;
For point market data amount of holding position in a current point of market data, calculate its with its before once conclude the business divide pen Point market data amount of a holding position difference of market data, and it is poor to be recorded as the amount of holding position;
Buy monovalence for point market data in a current point of market data, calculate its with its before once conclude the business divide pen A point market data for market data buy monovalence difference, and are recorded as buying a price differential;
Buy an amount for point market data in a current point of market data, calculate its with its before once conclude the business divide pen Point market data of market data buy an amount difference, and are recorded as buying an amount poor;
Sell monovalence for point market data in a current point of market data, calculate its with its before once conclude the business divide pen A point market data for market data sell monovalence difference, and are recorded as selling a price differential;
Sell an amount for point market data in a current point of market data, calculate its with its before once conclude the business divide pen Point market data of market data sell an amount difference, and are recorded as selling an amount poor.
For example:Currently a point market data are:Divide a time:212347272635000000;Divide the newest valency of pen:1729; Stepped transaction amount:200;Stepped transaction volume:522025;Pen is divided to buy 1 valency:1726;Pen is divided to buy 1 amount:17699;Pen is divided to sell 1 valency: 1729;Pen is divided to sell 1 amount:60793;Internal and external disk:External disk;Rise man number:0;Drop man number:0;The ginseng of a previous pen point market data Number is:Divide a time:212347272630000000;Divide the newest valency of pen:1729;Stepped transaction amount:4600;Stepped transaction volume: 79534;Pen is divided to buy 1 valency:1728;Pen is divided to buy 1 amount:4900;Pen is divided to sell 1 valency:1729;Pen is divided to sell 1 amount:71093;Internal and external disk:Outward Disk;Rise man number:0;Drop man number:0;Then difference data can be:Time:5000000;Newest valency:0;Exchange hand:4400; Transaction value:442491;Buy 1 valency:1;Buy 1 amount:12799;Sell 1 valency:0;Sell 1 amount:-10300;Internal and external disk:0;Rise man number:0;Under Fall a number:0;Then the difference data are that point pen is poor:Time difference:5000000 newest valencys:0;Exchange hand is poor:4400;Transaction value Difference:442491;Buy 1 price differential:1;Buy 1 amount poor:12799;Sell 1 price differential:0;Sell 1 amount poor:-10300;Internal and external disk:0;Rise man number: 0;Drop man number:0
Moreover, it is noted that the difference data corresponding to the first stroke point market data are a described point of market number According to itself.
Step 103, will currently divide a market data and its corresponding difference data to be write as a point of notes record Preset memory areas domain;
In implementing, the embodiment of the present invention can be by will currently divide a market data and its corresponding difference data Write-in treatment is carried out by the atomic operation that can not be overlapped as a point of notes record, it is ensured that the byte that need be write was being operated Will not be suspended in journey (interruption).
Step 104, after point write-in of notes record is completed, add up a point notes record quantity.
In a preferred embodiment of the invention, described after point write-in of notes record is completed, add up a point notes record number The step of amount, can include following sub-step:
S41, it is a point total amount to record the cumulative point notes record quantity;
Whether S42, judge a current point of total amount beyond the size for presetting storage region;
S43, if so, then terminating a point write-in for notes record.
In implementing, the embodiment of the present invention can be carried out by the atomic operation that can not be overlapped to point notes record quantity It is cumulative, accumulation result is carried out by point notes record quantity point notes record quantity is updated, and record the cumulative point pen Whether record quantity, by current point of total amount of judgement beyond the size for presetting storage region, decides whether end to divide a total amount The write-in for only dividing notes to record.
For example, after the write-in to difference data is completed, a point total quantity for notes record is updated using atomic operation, write every time Updated when entering difference data and once divide notes record quantity, point notes record quantity is equal to the stroke count of whole difference quantity, checks current Divide a total amount, if size of the described point of total amount more than default storage region, just will no longer divide notes to record and write the storage Region.
Reference picture 2, flow chart the step of show a kind of read method embodiment of market data of the invention, specifically may be used To comprise the following steps:
Step 201, receives a point notes record read requests, and the request includes that initial time is read in a point notes record;
Step 202, point notes record quantity that acquisition has been recorded;
In implementing, the embodiment of the present invention can record the atom that quantity passes through to overlap by by current point of notes Operation is read out treatment, it is ensured that point notes record quantity that need be read will not be suspended (interruption) in operation.
Step 203, it is fixed in the domain of preset memory areas using the reading initial time and point notes record quantity for having recorded Current the first stroke for the reading point notes record in position, and, it is necessary to point notes record quantity for reading;Can include in described point of notes record Divide a market data, and, the difference data of a current point of market data and upper one point market data;
Step 204, since a point market data of described the first stroke point notes record, reads follow-up respective numbers point notes Difference data in record;
In implementing, the embodiment of the present invention can be by dividing that acquisition point notes record quantity and user terminal be asked The time of market data, determined from storage area a basis point market data as the first stroke point notes record point Market data, then by with follow-up increment difference, calculate point stroke count amount to be transmitted altogether.
Step 205, point a market data and the difference data for reading are represented to user.
In practical operation, in order to ensure reducing transmission quantity in transmitting procedure, the embodiment of the present invention can also by with Lower section normal direction client returns to point a market data and the difference data for reading:
Described point market data are first carried out into elongated compression treatment generation client transmissions data, then by the client Transmit data is activation to client.
Reference picture 3, flow chart the step of show a kind of reading/writing method embodiment of market data of the invention, wherein, Methods described is related to read thread and writes thread, the reading thread and writes thread while carrying out, described to write using the embodiment of the present invention Thread specifically may include steps of:
Step 301, a generation point market data;
Step 302, for a currently point market data, calculates its difference data with upper one point market data;
Step 303, will currently divide a market data and its corresponding difference data preset as a point of notes record write-in Storage region;
Step 304, after point write-in of notes record is completed, add up a point notes record quantity;
The reading thread specifically may include steps of:
Step 305, receives a point notes record read requests, and the request includes that initial time is read in a point notes record;
Step 306, point notes record quantity that acquisition has been recorded;
Step 307, it is fixed in the domain of preset memory areas using the reading initial time and point notes record quantity for having recorded Current the first stroke for the reading point notes record in position, and, it is necessary to point notes record quantity for reading;Described point of notes record includes a point pen Market data, and, currently divide the difference data of a market data and upper one point market data;
Step 308, since a point market data of described the first stroke point notes record, reads follow-up respective numbers point notes Difference data in record;
Step 309, point a market data and the difference data for reading are represented to user.
The embodiment of the present invention, by when market data update, generates one point new market data, calculate its with it is upper The one point difference data of market data, in the domain of preset memory areas, this group of data, each field is inserted successively, is reused Atomic operation, add up a point notes record quantity, when market occurs in next time to be updated, repeats this operation;Receiving a point notes record reading please Ask, obtain receive point notes record read requests when generate point notes record read initial time, and, recorded point notes record number Amount, quantity is recorded using the reading initial time and the notes that divide for having recorded, and current reading is positioned in the domain of preset memory areas The first stroke point notes record, and, it is necessary to point notes record quantity for reading, and a point market data are extracted from point notes record, with And, the difference data of a current point of market data and upper one point market data take down notes point pen recorded from described the first stroke point Market data start, and read the difference data in follow-up respective numbers point notes record, and most after image user represents point pen for reading Market data and difference data, by with the method described in the embodiment of the present invention, it is possible to achieve write thread with read thread can be with Concurrent to carry out simultaneously, operating system provides the reading and write operation that can not overlap of instruction-level, it is ensured that to read or write Byte will not be suspended (interruption) in operation so that system can only read point pen before write-in in thread is read A point pen after collecting or writing collects, so as to obtain the complete point market data of logic, this just ensure that and is concurrently accessing When write-in thread without waiting for so as to improve the read-write efficiency to market data.
For this method embodiment, because it is substantially similar to above method embodiment, so in same section Appearance is just repeated no more.
It should be noted that for embodiment of the method, in order to be briefly described, therefore it to be all expressed as a series of action group Close, but those skilled in the art should know, and the embodiment of the present invention is not limited by described sequence of movement, because according to According to the embodiment of the present invention, some steps can sequentially or simultaneously be carried out using other.Secondly, those skilled in the art also should Know, embodiment described in this description belongs to preferred embodiment, the involved action not necessarily present invention is implemented Necessary to example.
Reference picture 4, shows a kind of structured flowchart of the writing system embodiment of market data of the invention, specifically can be with Including such as lower module:
Data generation module 401, for generating a point market data;
Difference data computation module 402, for for a currently point market data, calculating it with upper one point market number According to difference data;
Writing module 403, for will currently divide a market data and its corresponding difference data to be recorded as a point of notes Write-in preset memory areas domain;
Quantity accumulator module 404, for point notes record quantity that after point write-in of notes record is completed, adds up.
In a kind of preferred embodiment of the invention, the data generation module 401 can also include following submodule:
Market source data acquisition submodule, for obtaining market source data;
First judging submodule, for judging the market source data generation time whether before liquidation;If it is not, then calling Divide pen treatment submodule;
Second judging submodule, for whether judging the market data genaration time in bidding the stage, if it is not, then adjusting Submodule is processed with point pen;
3rd judging submodule, for judging whether the market data are abnormal data, if it is not, then calling point pen to process Submodule;
Divide pen treatment submodule, for the effective market source data to be carried out into a point pen treatment, obtain a point market number According to.
In one kind of the present invention is more highly preferred to embodiment, the judging submodule of the data generation module the 3rd can also include Such as lower unit:
Exchange hand judging unit, for judging whether the market source data exchange hand occurs falling back;If so, then calling different Regular data judging unit;
Time judging unit, for judging whether the market source data generation time occurs falling back, if so, then calling different Regular data judging unit;
Disk mouthful judging unit, for judging that the market source data internal and external disk marks whether mistake occur, if so, then calling Abnormal data judging unit;
Divide a processing unit, whether the average price amplitude for judging the market source data exceedes predetermined threshold value, if It is then to call abnormal data judging unit;
Abnormal data judging unit, for being abnormal data by the market data judging.
In a kind of preferred embodiment of the invention, described point of pen treatment submodule can also include such as lower unit:
Newest valency judging unit, for judging whether the market source data recent quotation is 0, and, if equal to it The preceding market source data recent quotation once concluded the business, if the market source data recent quotation is 0 or to be not equal to before it once The market source data recent quotation of transaction, then call extraction unit;
Exchange hand judging unit, for whether judging the market source number exchange hand more than 0, and, if more than before it The market source data exchange hand once concluded the business;If the market source number exchange hand is more than 0 or more than the market once concluded the business before it Source data exchange hand, then call extraction unit;
Transaction value judging unit, for whether judging the market source number transaction value more than 0, and, if more than before it During the market source data transaction value once concluded the business;If the market source number transaction value is more than 0 or more than the row once concluded the business before it Feelings source data transaction value, then call extraction unit;
Extraction unit, for from currently valid market source data, extracting market source data code, market source data city Code, the market source data generation time, market source data transaction value, the newest valency of market source data, market source data exchange hand, The market source data amount of holding position, market source data are bought monovalence, market source data and buy an amount, market source data and sell monovalence, market source number According to an amount of selling, market source data internal and external disk mark group composition market data.
In a kind of preferred embodiment of the invention, the difference data computation module 402 can also include following submodule:
Time difference calculating sub module, for for point market data genaration time in a current point of market data, meter Calculate its with its before point market data genaration time difference of point market data once concluded the business, and be recorded as the time difference;
Transaction value difference calculating sub module, for for point market data transaction value in a current point of market data, meter Calculate its with its before point market data transaction value difference of point market data once concluded the business, and it is poor to be recorded as transaction value;
Price margin calculating sub module, for for point newest valency of market data in a current point of market data, meter Calculate its with its before point newest price differential volume of a market data of point market data once concluded the business, and be recorded as price difference;
Exchange hand difference calculating sub module, for for point market data exchange hand in a current point of market data, meter Calculate its with its before point market data exchange hand difference of point market data once concluded the business, and it is poor to be recorded as exchange hand;
The amount of holding position difference calculating sub module, for for point market data amount of holding position in a current point of market data, meter Calculate its with its before point market data amount of the holding position difference of point market data once concluded the business, and it is poor to be recorded as the amount of holding position;
A price differential calculating sub module is bought, for buying monovalence for point market data in a current point of market data, is counted Calculate its with its before point market data of point market data once concluded the business buy monovalence difference, and be recorded as buying a price differential;
Amount difference calculating sub module is bought, for buying an amount for point market data in a current point of market data, is counted Calculate its with its before point market data of point market data once concluded the business buy an amount difference, and be recorded as buying an amount poor;
A price differential calculating sub module is sold, for selling monovalence for point market data in a current point of market data, is counted Calculate its with its before point market data of point market data once concluded the business sell monovalence difference, and be recorded as selling a price differential;
Amount difference calculating sub module is sold, for selling an amount for point market data in a current point of market data, is counted Calculate its with its before point market data of point market data once concluded the business sell an amount difference, and be recorded as selling an amount poor.
In a kind of preferred embodiment of the invention, the quantity accumulator module 404 can also include following submodule:
Divide a total amount record sub module, for recording the cumulative point notes record quantity to divide a total amount;
Storage area size judging submodule, for judging currently to divide a total amount whether beyond the big of default storage region It is small;If so, then calling write-in to terminate submodule;
Write-in terminates submodule, for stopping a point write-in for notes record.
Reference picture 5, shows a kind of structured flowchart of the reading system embodiment of market data of the invention, specifically can be with Including such as lower module:
Request receiving module 501, for receiving a point notes record read requests, the request includes that a point notes record is read Time beginning;
Quantity acquisition module 502, for obtaining point notes record quantity for having recorded;
Point notes record and point notes record quantity read module 503, for using the reading initial time and having recorded Divide notes record quantity, the first stroke point notes record of current reading is positioned in the domain of preset memory areas, and, it is necessary to that reads divides pen Record quantity;Described point of notes record includes a point market data, and, currently divide a market data and a upper point of market The difference data of data;
Difference data read module 504, for taking down notes point market data recorded since described the first stroke point, after reading Difference data in continuous respective numbers point notes record;
Data return to module 505, for representing point a market data and the difference data that read to user.
In a preferred embodiment of the invention, the data return to module 505 can also include following submodule:
Compression submodule, for described point market data to be carried out into elongated compression treatment generation client transmissions data;
Sending submodule, for by the client transmissions data is activation to client.
Reference picture 6, shows a kind of structured flowchart of the read-write system embodiment of market data of the invention, wherein, institute The method of stating is related to read thread and writes thread, the reading thread and writes thread while carrying out, described to write line using the embodiment of the present invention Journey can specifically include such as lower module:
Second data generation module 601, for generating a point market data;
Second difference data computation module 602, for for a currently point market data, calculating it with a upper point of pen row The difference data of feelings data;
Second writing module 603, for will currently divide a market data and its corresponding difference data as a point of pen Record write-in preset memory areas domain;
Second quantity accumulator module 604, for point notes record quantity that after point write-in of notes record is completed, adds up;It is described Reading thread can specifically include such as lower module:
Second request receiving module 605, for receiving a point notes record read requests, the request includes that a point notes record is read Take initial time;
Second quantity acquisition module 606, for obtaining point notes record quantity for having recorded;
Second point is taken down notes record and point notes record quantity read module 607, for using the reading initial time and having remembered Point notes record quantity of record, position current the first stroke for reading point notes record in the domain of preset memory areas, and, it is necessary to reads Divide notes record quantity;Described point of notes record includes a point market data, and, currently divide a market data and a upper point of pen The difference data of market data;
Second difference data read module 608, for since a point market data of described the first stroke point notes record, reading Take the difference data in follow-up respective numbers point notes record;
Second data return to module 609, for representing point a market data and the difference data that read to user.
The embodiment of the present invention, by when market data update, generates one point new market data, calculate its with it is upper The one point difference data of market data, in the domain of preset memory areas, this group of data, each field is inserted successively, is reused Atomic operation, add up a point notes record quantity, when market occurs in next time to be updated, repeats this operation;Receiving a point notes record reading please Ask, obtain receive point notes record read requests when generate point notes record read initial time, and, recorded point notes record number Amount, quantity is recorded using the reading initial time and the notes that divide for having recorded, and current reading is positioned in the domain of preset memory areas The first stroke point notes record, and, it is necessary to point notes record quantity for reading, and a point market data are extracted from point notes record, with And, the difference data of a current point of market data and upper one point market data take down notes point pen recorded from described the first stroke point Market data start, and read the difference data in follow-up respective numbers point notes record, and most after image user represents point pen for reading Market data and difference data, by with the method described in the embodiment of the present invention, it is possible to achieve write thread with read thread can be with Concurrent to carry out simultaneously, operating system provides the reading and write operation that can not overlap of instruction-level, it is ensured that to read or write Byte will not be suspended (interruption) in operation so that system can only read point pen before write-in in thread is read A point pen after collecting or writing collects, so as to obtain the complete point market data of logic, this just ensure that and is concurrently accessing When write-in thread without waiting for so as to improve the read-write efficiency to market data.
For system embodiment, because it is substantially similar to embodiment of the method, so description is fairly simple, it is related Part is illustrated referring to the part of embodiment of the method.
Each embodiment in this specification is described by the way of progressive, what each embodiment was stressed be with The difference of other embodiment, between each embodiment identical similar part mutually referring to.
It should be understood by those skilled in the art that, the embodiment of the embodiment of the present invention can be provided as method, system or calculate Machine program product.Therefore, the embodiment of the present invention can using complete hardware embodiment, complete software embodiment or combine software and The form of the embodiment of hardware aspect.And, the embodiment of the present invention can using wherein include computer at one or more can With in the computer-usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) of program code The form of the computer program product of implementation.
The embodiment of the present invention is with reference to method according to embodiments of the present invention, terminal device (system) and computer program The flow chart and/or block diagram of product is described.It should be understood that flow chart and/or block diagram can be realized by computer program instructions In each flow and/or flow and/or square frame in square frame and flow chart and/or block diagram combination.These can be provided Computer program instructions set to all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing terminals Standby processor is producing a machine so that held by the processor of computer or other programmable data processing terminal equipments Capable instruction is produced for realizing in one flow of flow chart or multiple one square frame of flow and/or block diagram or multiple square frames The system of the function of specifying.
These computer program instructions may be alternatively stored in can guide computer or other programmable data processing terminal equipments In the computer-readable memory for working in a specific way so that instruction of the storage in the computer-readable memory produces bag The manufacture of instruction system is included, the instruction system is realized in one flow of flow chart or multiple one side of flow and/or block diagram The function of being specified in frame or multiple square frames.
These computer program instructions can be also loaded into computer or other programmable data processing terminal equipments so that Series of operation steps is performed on computer or other programmable terminal equipments to produce computer implemented treatment, so that The instruction performed on computer or other programmable terminal equipments is provided for realizing in one flow of flow chart or multiple flows And/or specified in one square frame of block diagram or multiple square frame function the step of.
Although having been described for the preferred embodiment of the embodiment of the present invention, those skilled in the art once know base This creative concept, then can make other change and modification to these embodiments.So, appended claims are intended to be construed to Including preferred embodiment and fall into having altered and changing for range of embodiment of the invention.
Finally, in addition it is also necessary to explanation, herein, such as first and second or the like relational terms be used merely to by One entity or operation make a distinction with another entity or operation, and not necessarily require or imply these entities or operation Between there is any this actual relation or order.And, term " including ", "comprising" or its any other variant meaning Covering including for nonexcludability, so that process, method, article or terminal device including a series of key elements are not only wrapped Those key elements, but also other key elements including being not expressly set out are included, or also includes being this process, method, article Or the intrinsic key element of terminal device.In the absence of more restrictions, by wanting that sentence "including a ..." is limited Element, it is not excluded that also there is other identical element in the process including the key element, method, article or terminal device.
Reading/writing method and a kind of read-write system of market data above to a kind of market data provided by the present invention, enter Go and be discussed in detail, specific case used herein has been set forth to principle of the invention and implementation method, the above has been implemented The explanation of example is only intended to help and understands the method for the present invention and its core concept;Simultaneously for the general technology people of this area Member, according to thought of the invention, will change in specific embodiments and applications, in sum, this explanation Book content should not be construed as limiting the invention.

Claims (11)

1. a kind of wiring method of market data, it is characterised in that including:
A generation point market data;
For a currently point market data, its difference data with upper one point market data is calculated;
A market data and its corresponding difference data will currently be divided as a point of notes record write-in preset memory areas domain;
After point write-in of notes record is completed, add up a point notes record quantity.
2. method according to claim 1, it is characterised in that include the step of the generation point market data:
Obtain market source data;
Judge the market source data generation time whether before liquidation;If it is not, being then effective by the market data judging Market source data;
Whether the market data genaration time is judged in bidding the stage, if it is not, being then effective by the market data judging Market source data;
Judge whether the market data are abnormal data, if it is not, being then effective market source number by the market data judging According to;
The effective market source data is carried out into a point pen treatment, a point market data are obtained.
3. method according to claim 2, it is characterised in that described to judge whether the market data are abnormal data Sub-step is further included:
When falling back occurs in the market source data exchange hand,
And/or,
Falling back occurs in the market source data generation time,
And/or,
There is mistake in the market source data internal and external disk mark,
And/or,
It is abnormal data by the market data judging when average price amplitude of the market source data exceedes predetermined threshold value.
4. method according to claim 1, it is characterised in that the market source data includes, market source data code, OK Feelings source data market code, market source data generation time, market source data price, market source data opening price, market source Data ceiling price, market source data lowest price, market source data recent quotation, market source data exchange hand, market source number According to transaction value, market source data buy monovalence, market source data buy divalence, market source data buy trivalent, market source data buy tetravalence, Market source data is bought pentavalent, market source data and sells monovalence, market source data and sell divalence, market source data and sells trivalent, market source number According to sell tetravalence, market source data sell pentavalent, market source data buy an amount, market source data buy two amounts, market source data buy three amounts, Market source data is bought four amounts, market source data and buys five amounts, market source data and sell an amount, market source data and sells two amounts, market source number Sell that four amounts, market source data sell five amounts, market source data internal and external disk mark, market source data rises according to three amounts of selling, market source data Fall a number;
Described that the effective market source data is carried out into a point pen treatment, the sub-step for obtaining a point market data is further wrapped Include:
When the market source data recent quotation is 0 and to be not equal to the market source data recent quotation once concluded the business before it,
And/or,
The market source number exchange hand is more than 0 and more than the market source data exchange hand once concluded the business before it,
And/or,
The market source number transaction value more than 0 and during more than the market source data transaction value once concluded the business before it, from the currently active Market source data in, extract market source data code, market source data market code, market source data generation time, market Source data transaction value, the newest valency of market source data, market source data exchange hand, the market source data amount of holding position, market source data are bought Monovalence, market source data buy an amount, market source data sell monovalence, market source data sell an amount, market source data internal and external disk mark, Group composition market data.
5. method according to claim 1, it is characterised in that the difference data include that time difference, transaction value be poor, price Difference, exchange hand is poor, the amount of holding position is poor, buys a price differential, buy that an amount is poor, selling a price differential, to sell an amount poor, described to divide a market for current Data, include the step of calculate its difference data with upper one point market data:
For point market data genaration time in a current point of market data, calculate its with its before once conclude the business divide pen row A point market data genaration time difference of feelings data, and it is recorded as the time difference;
For point market data transaction value in a current point of market data, calculate its with its before once conclude the business divide a market A point market data transaction value difference of data, and it is poor to be recorded as transaction value;
For point newest valency of market data in a current point of market data, calculate its with its before once conclude the business divide a market Point newest price differential volume of a market data of data, and it is recorded as price difference;
For point market data exchange hand in a current point of market data, calculate its with its before once conclude the business divide a market A point market data exchange hand difference of data, and it is poor to be recorded as exchange hand;
For point market data amount of holding position in a current point of market data, calculate its with its before once conclude the business divide a market Point market data amount of a holding position difference of data, and it is poor to be recorded as the amount of holding position;
Buy monovalence for point market data in a current point of market data, calculate its with its before once conclude the business divide a market A point market data for data buy monovalence difference, and are recorded as buying a price differential;
Buy an amount for point market data in a current point of market data, calculate its with its before once conclude the business divide a market Point market data of data buy an amount difference, and are recorded as buying an amount poor;
Sell monovalence for point market data in a current point of market data, calculate its with its before once conclude the business divide a market A point market data for data sell monovalence difference, and are recorded as selling a price differential;
Sell an amount for point market data in a current point of market data, calculate its with its before once conclude the business divide a market Point market data of data sell an amount difference, and are recorded as selling an amount poor.
6. method according to claim 1, it is characterised in that described after point write-in of notes record is completed, add up a point pen The step of record quantity, includes:
It is a point total amount to record the cumulative point notes record quantity;
Judge a current point of total amount whether beyond the size for presetting storage region;
If so, then terminating a point write-in for notes record.
7. a kind of read method of market data, it is characterised in that including:
A point notes record read requests are received, the request includes that initial time is read in a point notes record;
Point notes record quantity that acquisition has been recorded;
Quantity is recorded using the reading initial time and the notes that divide for having recorded, current reading is positioned in the domain of preset memory areas The first stroke point notes record, and, it is necessary to point notes record quantity for reading;Described point of notes record includes a point market data, with And, currently divide the difference data of a market data and upper one point market data;
Since a point market data of described the first stroke point notes record, the differential number in follow-up respective numbers point notes record is read According to;
Represent point a market data and the difference data for reading to user.
8. a kind of reading/writing method of market data, it is characterised in that methods described is related to read thread and writes thread, the reading thread With write thread while carrying out, the thread of writing includes:
A generation point market data;
For a currently point market data, its difference data with upper one point market data is calculated;
A market data and its corresponding difference data will currently be divided as a point of notes record write-in preset memory areas domain;
After point write-in of notes record is completed, add up a point notes record quantity;
The reading thread includes:
A point notes record read requests are received, the request includes that initial time is read in a point notes record;
Point notes record quantity that acquisition has been recorded;
Quantity is recorded using the reading initial time and the notes that divide for having recorded, current reading is positioned in the domain of preset memory areas The first stroke point notes record, and, it is necessary to point notes record quantity for reading;Described point of notes record includes a point market data, with And, currently divide the difference data of a market data and upper one point market data;
Since a point market data of described the first stroke point notes record, the differential number in follow-up respective numbers point notes record is read According to;
Represent point a market data and the difference data for reading to user.
9. a kind of writing system of market data, it is characterised in that including:
Data generation module, for generating a point market data;
Difference data computation module, for for a currently point market data, calculating its difference with upper one point market data Specified number evidence;
Writing module, it is preset as a point of notes record write-in for will currently divide a market data and its corresponding difference data Storage region;
Quantity accumulator module, for point notes record quantity that after point write-in of notes record is completed, adds up.
10. a kind of reading system of market data, it is characterised in that including:
Request receiving module, for receiving a point notes record read requests, the request includes that initial time is read in a point notes record;
Quantity acquisition module, for obtaining point notes record quantity for having recorded;
Notes record and a point notes are divided to record quantity read module, for being recorded using the reading initial time and point notes for having recorded Quantity, positions current the first stroke for reading point notes record, and, it is necessary to point notes record number for reading in the domain of preset memory areas Amount;Described point of notes record includes a point market data, and, currently divide a market data and upper one point market data Difference data;
Difference data read module, it is follow-up corresponding for since a point market data of described the first stroke point notes record, reading Difference data in quantity point notes record;
Data return to module, for representing point a market data and the difference data that read to user.
11. a kind of read-write systems of market data, it is characterised in that the system is related to read thread and writes thread, the reading line Journey and thread is write while carrying out, the thread of reading includes:
Second data generation module, for generating a point market data;
Second difference data computation module, for for a currently point market data, calculating it with upper one point market data Difference data;
Second writing module, for will currently divide a market data and its corresponding difference data as a point of notes record write-in Preset memory areas domain;
Second quantity accumulator module, for point notes record quantity that after point write-in of notes record is completed, adds up;
The reading thread includes:
Second request receiving module, for receiving a point notes record read requests, the request includes that starting is read in a point notes record Time;
Second quantity acquisition module, for obtaining point notes record quantity for having recorded;
Second point of notes record and point notes record quantity read module, for using the reading initial time and point pen for having recorded Record quantity, positions current the first stroke for reading point notes record, and, it is necessary to point notes record read in the domain of preset memory areas Quantity;Described point of notes record includes a point market data, and, currently divide a market data and upper one point market data Difference data;
Second difference data read module, for since a point market data of described the first stroke point notes record, reading follow-up Difference data in respective numbers point notes record;
Second data return to module, for representing point a market data and the difference data that read to user.
CN201710029289.3A 2017-01-16 2017-01-16 The reading/writing method and system of the write-in, reading and market data of market data Pending CN106919643A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710029289.3A CN106919643A (en) 2017-01-16 2017-01-16 The reading/writing method and system of the write-in, reading and market data of market data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710029289.3A CN106919643A (en) 2017-01-16 2017-01-16 The reading/writing method and system of the write-in, reading and market data of market data

Publications (1)

Publication Number Publication Date
CN106919643A true CN106919643A (en) 2017-07-04

Family

ID=59453422

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710029289.3A Pending CN106919643A (en) 2017-01-16 2017-01-16 The reading/writing method and system of the write-in, reading and market data of market data

Country Status (1)

Country Link
CN (1) CN106919643A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112000675A (en) * 2019-05-27 2020-11-27 招商证券股份有限公司 Market data updating method and device, terminal equipment and storage medium
CN112003814A (en) * 2019-05-27 2020-11-27 招商证券股份有限公司 Market data processing method and device, terminal equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008077385A (en) * 2006-09-21 2008-04-03 Sony Corp Information processing apparatus, method, program and recording medium
CN104112010A (en) * 2014-07-16 2014-10-22 深圳市国泰安信息技术有限公司 Data storage method and device
CN105893566A (en) * 2016-03-31 2016-08-24 北京资配易投资顾问有限公司 Stock quotation data storage method and device
CN106294486A (en) * 2015-06-04 2017-01-04 交通银行股份有限公司 The processing method of finance market data and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008077385A (en) * 2006-09-21 2008-04-03 Sony Corp Information processing apparatus, method, program and recording medium
CN104112010A (en) * 2014-07-16 2014-10-22 深圳市国泰安信息技术有限公司 Data storage method and device
CN106294486A (en) * 2015-06-04 2017-01-04 交通银行股份有限公司 The processing method of finance market data and system
CN105893566A (en) * 2016-03-31 2016-08-24 北京资配易投资顾问有限公司 Stock quotation data storage method and device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112000675A (en) * 2019-05-27 2020-11-27 招商证券股份有限公司 Market data updating method and device, terminal equipment and storage medium
CN112003814A (en) * 2019-05-27 2020-11-27 招商证券股份有限公司 Market data processing method and device, terminal equipment and storage medium
CN112003814B (en) * 2019-05-27 2022-09-20 招商证券股份有限公司 Market data processing method and device, terminal equipment and storage medium
CN112000675B (en) * 2019-05-27 2023-12-01 招商证券股份有限公司 Quotation data updating method and device, terminal equipment and storage medium

Similar Documents

Publication Publication Date Title
US20210374610A1 (en) Efficient duplicate detection for machine learning data sets
CN107395665A (en) A kind of block chain service handling and business common recognition method and device
US10452992B2 (en) Interactive interfaces for machine learning model evaluations
US8762309B2 (en) Storage policy evaluation in a computing environment
CN106952158A (en) Solve the problems, such as the bookkeeping methods and equipment of focus account
CN107391526A (en) A kind of data processing method and equipment based on block chain
CN108090225A (en) Operation method, device, system and the computer readable storage medium of database instance
CN109067841B (en) Service current limiting method, system, server and storage medium based on ZooKeeper
CN110096489A (en) A kind of data query method, system, device and electronic equipment
CN107016029A (en) A kind of processing method of business datum, apparatus and system
CN109308211A (en) For handling the method, apparatus and storage medium of Transaction Information in block chain
CN115129782A (en) Partition level connection method and device for distributed database
CN110135701A (en) Control automatic generation method, device, electronic equipment and the readable medium of rule
CN108492150A (en) The determination method and system of entity temperature
CN108549592A (en) A kind of monitoring method and monitoring device, application server of database connection pool
CN107578338A (en) A kind of service publishing method, device and equipment
CN106919643A (en) The reading/writing method and system of the write-in, reading and market data of market data
CN109446225A (en) Data cache method, device, computer equipment and storage medium
CN107209764B (en) Rules for specifying and applying data
WO2020000631A1 (en) Virtual currency value estimation method and apparatus, electronic device and storage medium
US20220343198A1 (en) Systems and methods for determining data criticality based on causal evaluation
CN106980920A (en) A kind of execution method and device of Internet service
CN112449021B (en) Internet resource screening method and device
CN110175714A (en) Data processing method, device and system
CN110008386A (en) A kind of data generation, processing, evaluation method, device, equipment and medium

Legal Events

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

Application publication date: 20170704

RJ01 Rejection of invention patent application after publication