CN109087201A - Data processing method, server and the storage medium of virtual resource - Google Patents
Data processing method, server and the storage medium of virtual resource Download PDFInfo
- Publication number
- CN109087201A CN109087201A CN201810643023.2A CN201810643023A CN109087201A CN 109087201 A CN109087201 A CN 109087201A CN 201810643023 A CN201810643023 A CN 201810643023A CN 109087201 A CN109087201 A CN 109087201A
- Authority
- CN
- China
- Prior art keywords
- data
- virtual resource
- user
- historical trading
- day
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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/00—Finance; Insurance; Tax strategies; Processing of corporate or income taxes
- G06Q40/04—Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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/00—Finance; Insurance; Tax strategies; Processing of corporate or income taxes
- G06Q40/06—Asset management; Financial planning or analysis
Landscapes
- Business, Economics & Management (AREA)
- Engineering & Computer Science (AREA)
- Finance (AREA)
- Accounting & Taxation (AREA)
- Development Economics (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- General Business, Economics & Management (AREA)
- Economics (AREA)
- Marketing (AREA)
- Strategic Management (AREA)
- Technology Law (AREA)
- Entrepreneurship & Innovation (AREA)
- Operations Research (AREA)
- Human Resources & Organizations (AREA)
- Game Theory and Decision Science (AREA)
- Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
Abstract
This application discloses a kind of data processing method of virtual resource, server and storage mediums.This method comprises: receiving user from client handles request for the historical data of virtual resource, the historical trading data of at least one virtual resource of request user is handled according to historical data, at least one virtual resource includes the virtual resource that user does not hold currently;According to historical trading data whether include each day of trade in history transaction data, pending data is determined from historical trading data;At least one historical trading statistical indicator for user is counted according to pending data;And at least one historical trading statistical indicator is sent to client and is shown.Using these technical solutions, the Global statistical analysis of history virtual resource can be provided a user, improves the resource utilization of client.
Description
Technical field
This application involves technical field of data processing more particularly to a kind of data processing methods of virtual resource, server
And storage medium.
Background technique
Rapid development based on intelligent terminal, user can install types of applications program and easily operate various virtual moneys
Source.For example, user's assemble and interlinking interconnection net financial instrument product on mobile terminals, operated on the platform of the product stock, fund,
The virtual resources such as foreign exchange.
Currently, count these by user generate for virtual resource data when, be limited to user and hold the stage,
It is emptied with buying in as a measurement period.If user empties or sold stock, the profit and loss information of this strand cannot be obtained, because
This, the timeliness of statistics is limited.Further, since the profit and loss for the stock that user currently holds can only be obtained, it is whole user can not to be provided
The personal share investment profit and loss of a investment securities career and accumulative profit and loss situation.Therefore, the usage experience of user is affected, and is dropped
The low resource utilization of client.
Summary of the invention
In view of this, the present invention provides a kind of data processing method of virtual resource, server and storage medium, it can
The Global statistical analysis for providing a user history virtual resource improves the resource utilization of client.
The technical scheme of the present invention is realized as follows:
The embodiment of the invention provides a kind of data processing methods of virtual resource, comprising:
User is received from client and handles request for the historical data of virtual resource, is handled and is asked according to the historical data
The historical trading data for obtaining at least one virtual resource of the user is sought, at least one described virtual resource includes the use
The virtual resource that family is not held currently;
According to the historical trading data whether include each day of trade in history transaction data, from the historical trading
Pending data is determined in data;
At least one historical trading statistical indicator for the user is counted according to the pending data;And
At least one described historical trading statistical indicator is sent to the client to show.
The embodiment of the invention also provides a kind of servers, comprising:
Receiving module handles request for the historical data of virtual resource for receiving user from client, according to described
Historical data handles the historical trading data of at least one virtual resource of user described in request, and described at least one is virtual
Resource includes the virtual resource that the user does not hold currently;
Determining module, whether the historical trading data for being got according to the receiving module includes each friendship in history
The transaction data of Yi determines pending data from the historical trading data;
Statistical module, the pending data for being determined according to the determining module are counted for the user extremely
A few historical trading statistical indicator;And
Sending module, at least one historical trading statistical indicator for obtaining the statistical module are sent to the visitor
Family end is shown.
The embodiment of the present invention provides a kind of computer readable storage medium again, which is characterized in that being stored with computer can
Reading instruction can make at least one processor execute above-mentioned method.
Compared with prior art, method provided in an embodiment of the present invention allows user to view itself account and opens certainly
The statistical result of vertical all history virtual resources so far, these statistical results independent of currently whether be virtual resource friendship
Whether the easy time currently has been cleared independent of the virtual resource, provide the user personalized data analysis;Meanwhile
Using these historical trading datas, the interface of third party (such as stock trader) offer is needed not rely on, not no by stock trader's system maintenance etc.
Can the influence of master factor cause not calculating or calculate failure, this improves the accuracy of statistical result and clients
Resource utilization.
Detailed description of the invention
For the clearer technical solution illustrated in the embodiment of the present invention, will make below to required in embodiment description
Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for
For those of ordinary skill in the art, without creative efforts, it can also be obtained according to these attached drawings other
Attached drawing.Wherein,
Fig. 1 is the architecture diagram of the data processing system of the virtual resource of an embodiment according to the present invention;
Fig. 2 is the exemplary process diagram of the data processing method of the virtual resource of an embodiment according to the present invention;
Fig. 3 is that the user of an embodiment according to the present invention initiates the interface schematic diagram of historical data processing request;
Fig. 4 is the schematic diagram of the determination pending data of an embodiment according to the present invention;
Fig. 5 is the exemplary process diagram of the data processing method of the virtual resource of another embodiment according to the present invention;
Fig. 6 is the exemplary process diagram of the data processing method of the virtual resource of another embodiment according to the present invention;
The structural schematic diagram of Fig. 7 server of an embodiment according to the present invention;
Fig. 8 is the structural schematic diagram of the server of another embodiment according to the present invention;
Fig. 9 is the structural schematic diagram of the server of another embodiment according to the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are some of the embodiments of the present invention, instead of all the embodiments.Based on this hair
Embodiment in bright, every other implementation obtained by those of ordinary skill in the art without making creative efforts
Example, shall fall within the protection scope of the present invention.
Fig. 1 is the architecture diagram of the data processing system of the virtual resource of an embodiment according to the present invention.As shown in Figure 1, empty
The data processing system 100 of quasi- resource includes: user 101, terminal device 102, data processing server 103 and third party's service
Device 104.Wherein, data processing server 103 again include virtual resource database 1031, in real time processing child servers 1032 and from
Line handles child servers 1033;Virtual resource database 1031 is divided into subdata base 1031a today and history subdata base again
1031b。
According to an embodiment of the invention, virtual resource database 1031 is periodically interacted with third-party server 104, used
The transaction data of the virtual resource at family, wherein historical trading data regular delta is stored in history subdata base 1031b, modern
The real-time transaction data of day is then stored in subdata base 1031a today.For example, third-party server 104 is stock trader's server,
User 101 is traded security by the client of stock trader's server.By using third party's interface that stock trader's server provides, the
These transaction data bought and sold are periodically sent to virtual resource database 1031 daily and carry out local deposit by tripartite's server 104
Storage.
According to one embodiment of present invention, the client installed in 101 using terminal equipment 102 of user is to data processing
Server 103 initiates historical data processing request.Processed offline child servers 1033 are obtained from history subdata base 1031b and are gone through
At least one historical trading statistical indicator is returned to terminal device 102 by data statistic analysis and processing by history transaction data
It is shown to user 101.
According to another embodiment of the invention, the client installed in 101 using terminal equipment 102 of user is at data
It manages server 103 and initiates real time data processing request.Processing child servers 1032 obtain in day subdata base 1031a from now in real time
Today, real-time transaction data, and obtained at least one historical trading statistical indicator from processed offline child servers 1033,
At least one real-time deal statistical indicator is calculated based on these data return to terminal device 102 be shown to user 101.
In the embodiment of the present invention, the terminal device refers to the terminal device with data calculation processing function, including but
It is not limited to and (communication module is installed) smart phone, palm PC, tablet computer, smart television (Smart TV) etc..These
Operating system is fitted on communication terminal, including but not limited to: Android operation system, Symbian operating system,
Windows mobile operating system and apple iPhone OS operating system etc..
In practical application, wired or wireless network can be passed through between terminal device 102 and data processing server 103
It is communicated.Data processing server 103 and third-party server 104 are used as a kind of server, can be a server, or
The server cluster or a cloud computing service center that person consists of several servers.
Fig. 2 is the exemplary process diagram of the data processing method of the virtual resource of an embodiment according to the present invention.This method
Applied to server, data processing server 103 as shown in Figure 1.As shown in Fig. 2, this method may include following steps:
Step 201, user is received from client and handle request for the historical data of virtual resource, at historical data
Manage the historical trading data of at least one virtual resource of request user.
In this step, client can be application program (APP) or public service platform (public platform in such as wechat).
Historical data processing request carries the user identifier for logging in client, and server obtains the use according to the user identifier received
The historical trading data at family.Wherein, at least one virtual resource includes the virtual resource that the user's history is held.It is current with regard to user
From the point of view of the virtual resource held, at least one above-mentioned virtual resource includes the virtual resource that user does not hold currently.
Table 1 is the multidimensional historical trading data table of an embodiment according to the present invention.As shown in table 1, virtual resource is specially
Stock, each user identifier are corresponding with the transaction on the date of historical trading day, the date interior the stock mark, the stock held
Data.Wherein, historical trading day includes day to the day of trade between today of opening an account from user, and stock mark includes the code name of stock
And title, transaction data include: opening quotation holds position (quantity, price), buys in (quantity, price), selling (quantity, price) and close
It holds position (quantity, price).
1 multidimensional historical trading data list of table
Fig. 3 is that the user of an embodiment according to the present invention initiates the interface schematic diagram of data processing request.As shown in figure 3,
Client is security service client, and in the display interface 300 of the security service client, user clicks " I in box 310
Assets " option, it will option " historic asset " or " real time asset " in box 320 are shown on display interface 300.When with
When option button (as shown in the concentric circles solid black) of " historic asset " is clicked at family, user end to server initiates historical data
Processing request.
Step 202, according to historical trading data whether include each day of trade in history transaction data, from historical trading
Pending data is determined in data.
In embodiments of the present invention, shadow is generated since the transaction data of each day of trade can obtain statistical indicator finally
It rings, therefore, the data of missing will affect the accuracy of statistical indicator.In this step, judge historical trading data whether include from
The from date of user's registration account to the day of trade each between today transaction data.
In an embodiment of the present invention, if historical trading data includes it from the from date of user's registration account to today
Between each day of trade transaction data, then using all these historical trading datas as pending data.In this case, it goes through
History transaction data is considered as complete, the not no missing of data.
In an alternative embodiment of the invention, if historical trading data do not include from the from date of user's registration account so far
The transaction data of each day of trade between day, i.e. there is the missing of data in historical trading data, then will since from date, wrap
The transaction data for continuing more days is included as the first pending data;Transaction data before today, including continuing more days is made
For the second pending data.
Fig. 4 is the schematic diagram of the determination pending data of an embodiment according to the present invention.As shown in figure 4, user's registration account
The from date at family is also referred to as being day of opening an account, and judges whether from day to the historical trading data between today of opening an account include each
Whether the transaction data of the day of trade, that is, the historical trading data obtained are complete.Include when judging historical trading data not
From transaction data of the day to the day of trade each between today of opening an account, as shown in figure 4, between date node 1 and date node 2
What the transaction data of the day of trade was missing from, then the transaction data for continuing more days between day and date node 1 that will open an account is as
One pending data;Using the transaction data for continuing more days between date node 2 and today as the second pending data.First to
Handling data and the second pending data will be different in the daily quantity of calculating virtual resource.
Step 203, at least one historical trading statistical indicator for user is counted according to pending data.
In an embodiment of the present invention, for virtual resource each in pending data, daily according to the virtual resource
Number of transaction and value parameter calculate the first quantity of the daily initial time of the virtual resource, the second number of daily end time
Amount, daily value total value, in the accumulative value total value of the accumulative value total value of the virtual resource and all virtual resources
At least one of.
In specific application, the historical data handles request in step 201, logs in client in addition to carrying
User identifier also further carries at least one historical trading statistical indicator that user specifies.As shown in figure 3, in box 320
The middle specific transaction statistical indicator of display, specific " opening quotation is held position " (the of i.e. above-mentioned daily initial time as in box 331
One quantity), " closing quotation is held position " (the second quantity of i.e. above-mentioned daily end time), " profit and loss of personal share odd-numbered day " (i.e. above-mentioned is every
Day value total value), " personal share adds up profit and loss " (i.e. above-mentioned accumulative value total value) and " full dose adds up profit and loss " (i.e. above-mentioned institute
There is the accumulative value total value of virtual resource).
As shown in figure 3, when user can click one or more of above-mentioned 5 indexs." opening quotation is held when the user clicks
When storehouse ", " closing quotation is held position ", " profit and loss of personal share odd-numbered day ", " personal share adds up profit and loss ", will on display interface 300 further displaying side
" please input personal share mark: " option in " asking inputting date: " option and box 333, allows a user to specify that and is wanted in frame 332
The date checked and personal share.When the user clicks when " personal share adds up profit and loss ", from date and termination can be inputted in box 332
Date determines accumulative date range.Similar, it, can also be in display interface when the user clicks when " full dose adds up profit and loss "
" asking inputting date: " option in box 332 is shown on 300, inputs the accumulative date range of full dose for user.
In an alternative embodiment of the invention, in the first quantity and daily termination for calculating the daily initial time of virtual resource
When the second quantity carved, the first pending data and the second pending data are different.Specifically, to be processed for first
Each virtual resource in data, since from date backward, according to the virtual resource, this is calculated in daily number of transaction
Second quantity of day end time;For each virtual resource in the second pending data, since today forward, according to the void
The first quantity of this day initial time is calculated in the daily number of transaction of quasi- resource.
Step 204, at least one historical trading statistical indicator client is sent to show.
In this step, request is handled in response to the historical data that user issues, by least one historical trading statistical indicator
It is sent to client as a result.For example, in a manner of floating layer, being gone through what user specified on interface 300 shown in Fig. 3
The specific value of history transaction statistical indicator is shown, is browsed for user.
In the present embodiment, request is handled for the historical data of virtual resource by receiving user from client, according to
Historical data handle request user at least one virtual resource historical trading data, according to historical trading data whether
Transaction data including each day of trade in history, determines pending data from historical trading data, according to number to be processed
Go out at least one historical trading statistical indicator for user according to statistics, at least one historical trading statistical indicator is sent to visitor
Family end is shown, following technical effect can be obtained:
1) user can view itself account from the statistical result for opening all history virtual resources so far, these systems
Meter result independent of currently whether be virtual resource exchange hour, currently whether had been cleared independent of the virtual resource
(not holding currently) meets the demand that user knows the statistical result of all history virtual resources, such as holds position and profit and loss
Details provide the user personalized data analysis, user helped preferably to recall oneself investment behavior and level;
2) these historical trading statistical results are in addition to showing user, can be also used for the developer of client platform into
Row deep development.Specifically, can be combined with investment model, provide such as only to be full of and stop loss, invest the form of portrait, close to
Family actual scene carries out throwing religion guidance, to help user to set up correctly investment idea.
Here, investment portrait refers to, it is that value is thrown that user, which can check that they are short operation person or long line operator,
Embracer or high-tech stock preference person etc. are provided, user is allowed to be better understood by the investment style of oneself.Only it is full of only to lose and then faces
User educates the greediness of income or the investor for not giving up offer of loss, in conjunction with the investment behavior of user, provides hypothetical
Suggestion for operation, guidance user, which establishes correctly only to be full of, only loses concept.
3) these historical trading datas are used, the interface of third party (such as stock trader) offer is provided, is not by stock trader
The influences of ignorance factors such as system maintenance cause not calculating or calculate failure, this improves the accuracy of statistical result with
And the resource utilization of client.
For above-mentioned steps 203, by taking virtual resource is stock as an example, it is given below and calculates at least one historical trading statistics
The specific method of index.
(1) it for single stock G, calculates " opening quotation is held position " and " closing quotation is held position "
(1-a) be directed to the first pending data, from day of opening an account as from date backward, held position by opening quotation and receipts be calculated
Disk is held position, and is a kind of reckoning mode of forward direction in time, and specific calculation is as follows:
The closing quotation of T days stock G holds position=opening quotation of T days stock G hold position the+T days G that buy in stocks sell stock within quantity-T days
The quantity (formula 1-1) of G
It puts aside the special screne for causing stock number of share of stock to change during part stops business, has:
The opening quotation of T days stock G holds position=and the closing quotation of T-1 days stock G holds position (formula 1-2)
So above-mentioned formula 1-1 becomes:
The closing quotation of T days stock G holds position=closing quotation of T-1 days stock G hold position the+T days G that buy in stocks sell stock within quantity-T days
The quantity (formula 1-3) of ticket G
(1-b) is directed to the second pending data, and (not including today) can use day until transaction data forward since today
Phase, being held position by closing quotation is calculated opening quotation and holds position, and is a kind of reversed reckoning mode in time.Specific calculation is as follows:
T days stock G opening quotation holds position=T day stock G close hold position-T days stock G buy in selling for+T days stock G of quantity
Quantity (formula 1-4)
It puts aside the special screne for causing stock number of share of stock to change during part stops business, has:
T days stock G opening quotation holds position=and T-1 day stock G close and hold position (formula 1-5)
Then above-mentioned formula 1-4 becomes:
T-1 days stock G closing quotation holds position=T day stock G close hold position-T days stock G buy in selling for+T days stock G of quantity
Quantity (formula 1-6) out
And have:
T-1 days stock G opening quotation holds position=T-1 day stock G close hold position-T-1 days stock G buy in+T-1 days stock of quantity
G's sells quantity (formula 1-7)
It should be pointed out that for being pointed out in step 202, by all historical trading datas, (no any data are lacked
Lose) be used as pending data when, both can be by the way of above-mentioned (1-a), can also be by the way of above-mentioned (1-b).
(2) it for single stock G, calculates " profit and loss of personal share odd-numbered day "
- T days stock the G's of closing quotation market value of the stock G of the odd-numbered day profit and loss of T days stock G=T days sells stock in opening quotation market value+T days
The service charge (formula 1-8) that the total amount stock G transaction in-T days of-T days G that buy in stocks of total amount of G generates
Wherein:
The closing quotation of the stock G of the closing quotation market value of T days stock G=T days is held position the closing price (formula 1-9) of T days stock G of *
The opening quotation of the stock G of the opening quotation market value of T days stock G=T days is held position the opening price (formula 1-10) of T days stock G of *
(3) " personal share adds up profit and loss " of single stock G is calculated
Stock G adds up profit and loss=∑DailyStock G odd-numbered day profit and loss (formula 1-11)
Here accumulative can also be by user's designated time period, within certain date range (such as within nearly 30 days)
All odd-numbered day profit and loss are summed to obtain the accumulative profit and loss of stock G.
(4) " full dose adds up profit and loss " of all stocks is calculated
Full dose adds up profit and loss=∑Every stock∑DailyStock same day profit and loss (formula 1-12)
In view of user currently also holds one or more virtual resources, today, the transaction data of operation was also required to be included in system
Within the scope of meter.Fig. 5 is the exemplary process diagram of the data processing method of the virtual resource of another embodiment according to the present invention.Such as
Further include following steps on step basis shown in Fig. 2 shown in Fig. 5:
Step 501, it receives user from client to request for the real time data processing of virtual resource, at real time data
Reason request, determines the virtual resource that user currently holds from the virtual resource that pending data includes.
Here, it includes real-time transaction data today and historical trading data that real time data processing request, which is request processing,
All data.For this purpose, server determines the virtual resource that user currently holds from pending data first.As shown in figure 3,
When the user clicks in box 320 when option " real time asset ", user end to server initiates real time data processing request.
Step 502, each virtual resource today in the virtual resource that user currently holds is obtained from third-party server
Transaction data obtains at least one real-time deal statistical indicator in conjunction at least one historical trading statistical indicator.
Here, third-party server is, for example, stock trader's server, and the third party's interface provided by stock trader's server obtains
Real-time transaction data is got, as incremental data, historical trading statistical indicator is modified, to obtain real-time deal system
Count index.
Specifically, in amendment, first of the daily initial time of virtual resource history in historical trading statistical indicator
The value total value that the second quantity, the history of the daily end time of quantity, history are daily is constant.
And the accumulative value total value of virtual resource and the accumulative value total value of all virtual resources need to consider today
Increment.Specifically, in the virtual resource currently held according to user virtual resource today transaction data, history is handed over
The accumulative value total value of the virtual resource is modified in easy statistical indicator, obtains reality corresponding with the historical trading statistical indicator
When trade statistical indicator.In this way, the real-time accumulated profit and loss of the available virtual resource.In addition, currently held according to user
The transaction data of all virtual resource today in virtual resource, to the accumulative valence of all virtual resources in historical trading statistical indicator
Value total value is modified, and obtains real-time deal statistical indicator corresponding with the historical trading statistical indicator.In this way, available should
The real-time accumulated profit and loss of the full dose of virtual resource.
In addition to this, real-time deal statistical indicator (such as can also currently be held including current quantity virtual resource today
Storehouse), current value total value (real-time odd-numbered day profit and loss such as today) virtual resource today.
Step 503, at least one real-time deal statistical indicator client is sent to show.
For above-mentioned steps 502, by taking virtual resource is stock as an example, it is given below and calculates at least one real-time deal statistics
The specific method of index.It is compared with historical trading statistical indicator is calculated, real-time deal statistical indicator is based on historical trading data
And the transaction data (i.e. real time data) of each virtual resource today is calculated in the virtual resource currently held of user.
(1) it for the single stock G currently held, calculates " currently holding position "
The opening quotation of stock G today holds position=and currently the holding position of stock G-today stock G buys in quantity+today stock G's
Sell quantity (formula 2-1)
Likewise, having when putting aside the special screne for causing stock number of share of stock to change during partially stopping business:
The closing quotation of last day of trade stock G holds position=today stock G opening quotation hold position (formula 2-2)
Then above-mentioned formula 2-1 becomes:
Currently the holding position of stock G=last day of trade stock G closing quotation holds position+today stock G buy in quantity-today strand
Ticket G's sells quantity (formula 2-3)
(2) it for the single stock G currently held, calculates " real-time odd-numbered day profit and loss today "
Market value+today is sold stock G's in real-time odd-numbered day profit and loss today of stock G=stock G current market value-stock G opening quotation
The service charge that total amount-stock G today transaction of G of buying in stocks total amount-today generates
=current stock G holds position * stock G when present value-stock G opening quotation holds position and sells stock G's * stock G opening price+today
The service charge (formula 2-4) that total amount-stock G today transaction of G of buying in stocks total amount-today generates
(3) it for the single stock G currently held, calculates " real-time accumulated profit and loss "
Accumulative profit and loss+stock G today real-time odd-numbered day of the real-time accumulated profit and loss of the stock G=stock G by the upper day of trade is full of
Thanks to (formula 2-5)
(4) " the real-time accumulated profit and loss of full dose " of all stocks are calculated
The real-time accumulated profit and loss of full dose stock=full dose by the upper day of trade adds up profit and loss+today and holds position the stock real-time odd-numbered day
Profit and loss (formula 2-6)
In the above-described embodiments, it is requested by responding the real time data processing of user, the number of deals that user is generated in real time
It is merged according to historical trading data, so that the data of statistics are more comprehensive, has been provided a user from opening an account to current institute
There are investment statistics data, improves the integrality of statistical result.
In the process of exchange of virtual resource, the quantity that some special events or behavior will lead to virtual resource generates change
It is dynamic, it is adapted at this time.Fig. 6 is the exemplary of the data processing method of the virtual resource of another embodiment according to the present invention
Flow chart.As shown in fig. 6, further comprising following steps on the basis step 201-203 shown in Fig. 2:
Step 601, obtaining causes the quantity of virtual resource to generate the event changed in pending data;
Step 602, at least one historical trading statistical indicator is modified according to event.
Step 603, at least one revised historical trading statistical indicator client is sent to show.
Specifically, when virtual resource is stock, including following event and specific correcting mode.
(1) it rations shares
Have that the rationed shares keeps accounts record and record is paid in the rationed shares in scene one, pending data.
Before the opening quotation of the discs first day holds position=is suspended after the rationed shares closing quotation of the last one day of trade hold position+the period rationed shares keeps accounts quantity
(formula 3-1)
After the rationed shares after odd-numbered day discs first day profit and loss=rationed shares the discs first day closing quotation market value-rationed shares after the discs first day open the set city
The amount of money (formula 3-2) is paid in value-rationed shares
It keeps accounts record in scene two, pending data without the rationed shares, there is the rationed shares to pay in record.
The amount of money/this burst rationed shares price (formula 3-3) is paid in the rationed shares quantity=rationed shares that keeps accounts during the rationed shares
Other, the calculating of discs first day odd-numbered day profit and loss is the same as scene one after the opening quotation of the discs first day holds position and rations shares after the rationed shares.
(2) share consolidation
Assuming that stock G1 merges with stock G2, stock G3 is merged into, the ratio that G1 changes G3 is R13, and G2 changes the ratio of G3
Example is R23, then stock transformation rule when merging are as follows:
The holding position of stock G3=stock G1 holds position// the R23 (formula 3-4) that holds position of R13+ stock G2
Closing quotation market value-conjunction of stock G2 before odd-numbered day profit and loss=stock G3 closing quotation market value-merging of merging first day stock G3
And the closing quotation market value (formula 3-5) of preceding stock G1
In addition, the quantity of stock G1, G2 set 0 after merging.
(3) presented shares share increase
The behaviors such as presented shares share increase will cause the variation of number of share of stock, but not influence the cost of user.Therefore only needing to be adapted to should
The quantity variation of stock.
Stock closing quotation is held position/presented shares ratio (formula 3-6) before first day opening quotation holds position=presents shares after presented shares
(4) new stock
New stock is related to new stock and keeps accounts the data paid in new stock, includes the variation of stock quantity and stock cost.Adaptation
It is as follows:
New stock listing first day opening quotation holds position=and new stock keeps accounts quantity (formula 3-7)
New stock listing odd-numbered day first day profit and loss=new stock listing first day closing quotation market value-new stock pays in the amount of money (formula 3-8)
(5) it changes to trusteeship
Generation change to trusteeship between two stock traders, calculates profit and loss and is only carried out under current stock trader.It was closed and is held position as mark with the same day
Standard is transferred to if it is trustship, is transferred to part and is calculated same day profit and loss;It is produced if it is trustship, produces part and be not counted in same day profit and loss.
Scene one, user's trustship in T days are transferred to stock G:
The opening quotation of T days stock G holds position=closing quotation of T-1 days stock G hold position stock G that trustship in+T days is transferred to quantity it is (public
Formula 3-9)
The opening quotation of the stock G of the opening quotation market value of T days stock G=T days is held position T days opening price (the formula 3- of * (containing part is transferred to)
10)
Stock G is produced in scene two, user's trustship in T days:
The opening quotation of T days stock G holds position=closing quotation of T-1 days stock G hold position stock G that trustship in-T days is produced quantity it is (public
Formula 3-11)
The opening quotation of the stock G of the opening quotation market value of T days stock G=T days is held position T days opening price (the formula 3- of * (without part is produced)
12)
(6) bonus difference tax, dividend payout
Bonus difference tax, dividend payout etc. mainly have an impact the profit and loss on the stock same day, can be adapted to as follows:
- T days bonus difference tax volume+the T of stock G odd-numbered day profit and loss in T days obtained by the odd-numbered day profit and loss of T days stock G=above-mentioned calculating
The dividend payout (formula 3-13) of day stock G
Through the foregoing embodiment, it is contemplated that certain special events can generate variation to the quantity of virtual resource, and count
Calculate virtual resource value (such as profit and loss) when, quantity calculate correctness it is extremely important, therefore, to historical trading statistical result into
After row amendment, the accuracy of statistical result is improved.
The structural schematic diagram of Fig. 7 server of an embodiment according to the present invention.As shown in fig. 7, server 700 includes:
Receiving module 710 handles request for the historical data of virtual resource for receiving user from client, according to going through
History data processing request obtains the historical trading data of at least one virtual resource of user, at least one virtual resource includes using
The virtual resource that family is not held currently;
Determining module 720, whether the historical trading data for being got according to receiving module 710 includes each in history
The transaction data of the day of trade, determines pending data from historical trading data;
Statistical module 730, the pending data for being determined according to determining module 720 are counted for user at least
One historical trading statistical indicator;And
Sending module 740, at least one historical trading statistical indicator for obtaining statistical module 730 are sent to client
End is shown.
Fig. 8 is the structural schematic diagram of the server of another embodiment according to the present invention.As shown in figure 8, in server 800
Determining module 720 includes:
Judging unit 721, for judge historical trading data whether include from the from date of user's registration account so far
The transaction data of each day of trade between day;
Determination unit 722, if judging that historical trading data includes from user's registration account for judging unit 721
The transaction data of date to the day of trade each between today beginning, then using historical trading data as pending data;If judgement is single
Member 721 judges historical trading data not and includes the friendship from the from date of user's registration account to the day of trade each between today
Easy data, then using since from date, including continue more days transaction data as the first pending data;Will today it
Before, including continue more days transaction data as the second pending data.
In an embodiment of the present invention, statistical module 730 is used for, for virtual resource each in pending data, according to
The daily number of transaction of the virtual resource and value parameter calculate the first quantity, daily of the daily initial time of the virtual resource
Second quantity of end time, daily value total value, the accumulative value total value of the virtual resource and all virtual resources
At least one of in accumulative value total value.
In an embodiment of the present invention, statistical module 730 includes:
First statistic unit 731, for for virtual money each in the first determining pending data of determination unit 722
Source since from date is backward calculated the second of this day end time according to the daily number of transaction of the virtual resource
Quantity;
Second statistic unit 732, for for virtual money each in the second determining pending data of determination unit 722
The first quantity of this day initial time since today is forward calculated according to the daily number of transaction of the virtual resource for source.
In an embodiment of the present invention, receiving module 710 is further used for, and receives user from client and is directed to virtual resource
Real time data processing request;
Determining module 720 is further used for, and is requested according to the real time data processing that receiving module 710 receives, to from
The virtual resource that user currently holds is determined in the virtual resource that reason data include;
Receiving module 710 is further used for, and obtains the user that determining module 720 is determined from third-party server and currently holds
The transaction data of each virtual resource today in some virtual resources;
Statistical module 730 is further used for, in the virtual resource currently held according to the user that receiving module 710 receives
At least one is calculated in real time in conjunction at least one historical trading statistical indicator in the transaction data of each virtual resource today
Transaction statistical indicator;
Sending module 740 is further used for, at least one the calculated real-time deal statistical indicator of statistical module 730 is sent out
Client is given to be shown.
In an embodiment of the present invention, receiving module 710 is further used for, and obtaining in pending data leads to virtual resource
Quantity generate change event;
Statistical module 730 is further used for, and is united according to the event that receiving module 710 receives at least one historical trading
Meter index is modified;
Sending module 740 is used for, and the revised historical trading statistical indicator of statistical module 730 is sent to client and is carried out
Display.
Fig. 9 is the structural schematic diagram of the server of another embodiment according to the present invention.The server 900 can include: processing
Device 910, memory 920, port 930 and bus 940.Processor 910 and memory 920 are interconnected by bus 940.Processor
910 can send and receive data by port 930.Wherein,
Processor 910 is used to execute the machine readable instructions module of the storage of memory 920.
Memory 920 is stored with the executable machine readable instructions module of processor 910.The executable finger of processor 910
Enabling module includes: receiving module 921, determining module 922, statistical module 923 and sending module 924.Wherein,
Receiving module 921 can be with when being executed by processor 910 are as follows: receives the history that user is directed to virtual resource from client
Data processing request handles the historical trading data of at least one virtual resource of request user according to historical data, until
A few virtual resource includes the virtual resource that user does not hold currently;
Determining module 922 can be with when being executed by processor 910 are as follows: the historical trading number got according to receiving module 921
According to whether include each day of trade in history transaction data, pending data is determined from historical trading data;
Statistical module 923 can be with when being executed by processor 910 are as follows: the pending data determined according to determining module 922
Count at least one historical trading statistical indicator for user;
Sending module 924 can be with when being executed by processor 910 are as follows: at least one history for obtaining statistical module 923 is handed over
Easy statistical indicator is sent to client and is shown.
It can thus be seen that when storing the instruction module in memory 920 and being executed by processor 910, it can be achieved that preceding
State the various functions of receiving module in each embodiment, determining module, statistical module and sending module.
In above-mentioned apparatus and system embodiment, modules and unit realize that the specific method of itself function is implemented in method
It is described in example, which is not described herein again.
It, can also be in addition, each functional module in each embodiment of the present invention can integrate in one processing unit
It is that modules physically exist alone, can also be integrated in one unit with two or more modules.Above-mentioned integrated list
Member both can take the form of hardware realization, can also realize in the form of software functional units.
In addition, each embodiment of the invention can pass through the data processing by data processing equipment such as computer execution
Program is realized.Obviously, data processor constitutes the present invention.In addition, being commonly stored data in one storage medium
Processing routine is by directly reading out storage medium for program or by installing or copying to data processing equipment for program
It stores in equipment (such as hard disk and/or memory) and executes.Therefore, such storage medium also constitutes the present invention.Storage medium can be with
Use any kind of recording mode, such as paper storage medium (such as paper tape), magnetic storage medium (such as floppy disk, hard disk, flash memory
Deng), optical storage media (such as CD-ROM), magnetic-optical storage medium (such as MO) etc..
Therefore, the invention also discloses a kind of storage mediums, wherein it is stored with data processor, the data processor
For executing any embodiment of the above method of the present invention.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all in essence of the invention
Within mind and principle, any modification, equivalent substitution, improvement and etc. done be should be included within the scope of the present invention.
Claims (15)
1. a kind of data processing method of virtual resource characterized by comprising
User is received from client and handles request for the historical data of virtual resource, and request is handled according to the historical data and is obtained
The historical trading data of at least one virtual resource of the user is taken, at least one described virtual resource includes that the user works as
The preceding virtual resource that do not hold;
According to the historical trading data whether include each day of trade in history transaction data, from the historical trading data
In determine pending data;
At least one historical trading statistical indicator for the user is counted according to the pending data;And
At least one described historical trading statistical indicator is sent to the client to show.
2. according to the method described in claim 1, wherein, whether described according to the historical trading data include each in history
The transaction data of the day of trade determines that pending data includes: from the historical trading data
Judge whether the historical trading data includes from the from date of the user's registration account to friendship each between today
The transaction data of Yi;
If the historical trading data includes from the from date of the user's registration account to the day of trade each between today
Transaction data, then using the historical trading data as the pending data;
If the historical trading data does not include from the from date of the user's registration account to the day of trade each between today
Transaction data, then using since the from date, including continue more days transaction data as the first pending data;It will
Before today, including continue more days transaction data as the second pending data.
3. described to be counted according to the pending data for the user's according to the method described in claim 1, wherein
At least one historical trading statistical indicator includes:
For each virtual resource in the pending data, according to the daily number of transaction of the virtual resource and value parameter,
It calculates the first quantity of the daily initial time of the virtual resource, the second quantity of daily end time, daily value total value, be somebody's turn to do
At least one of in the accumulative value total value of virtual resource and the accumulative value total value of all virtual resources.
4. described to be counted according to the pending data for the user's according to the method described in claim 2, wherein
At least one historical trading statistical indicator includes:
For each virtual resource in first pending data, since the from date backward, according to the virtual money
The second quantity of this day end time is calculated in the daily number of transaction in source;
For each virtual resource in second pending data, since today forward, daily according to the virtual resource
The first quantity of this day initial time is calculated in number of transaction.
5. according to the method described in claim 1, further comprising:
User is received from the client to request for the real time data processing of virtual resource;
It is requested according to the real time data processing, determines that user currently holds from the virtual resource that the pending data includes
Some virtual resources;
The transaction data of each virtual resource today in the virtual resource that the user currently holds is obtained from third-party server,
In conjunction at least one described historical trading statistical indicator, at least one real-time deal statistical indicator is calculated;
At least one described real-time deal statistical indicator is sent to the client to show.
6. described to obtain the void that the user currently holds from third-party server according to the method described in claim 5, wherein
The transaction data of each virtual resource today is calculated in conjunction at least one described historical trading statistical indicator in quasi- resource
At least one real-time deal statistical indicator includes:
The transaction data of virtual resource today in the virtual resource currently held according to the user, counts historical trading
The accumulative value total value of the virtual resource is modified in index, obtains real-time deal corresponding with the historical trading statistical indicator
Statistical indicator.
7. described to obtain the void that the user currently holds from third-party server according to the method described in claim 5, wherein
The transaction data of each virtual resource today is calculated in conjunction at least one described historical trading statistical indicator in quasi- resource
At least one real-time deal statistical indicator includes:
The transaction data of all virtual resource today in the virtual resource currently held according to the user counts historical trading
The accumulative value total value of all virtual resources is modified in index, obtains real-time friendship corresponding with the historical trading statistical indicator
Easy statistical indicator.
8. method according to any one of claim 1 to 7, further comprises:
Obtaining causes the quantity of virtual resource to generate the event changed in the pending data;
At least one described historical trading statistical indicator is modified according to the event;
It is described by least one described historical trading statistical indicator be sent to the client carry out display include:
Revised historical trading statistical indicator is sent to the client to show.
9. a kind of server characterized by comprising
Receiving module handles request for the historical data of virtual resource for receiving user from client, according to the history
Data processing request obtains the historical trading data of at least one virtual resource of the user, at least one described virtual resource
The virtual resource that do not hold currently including the user;
Whether determining module, historical trading data for being got according to the receiving module include each day of trade in history
Transaction data, determine pending data from the historical trading data;
Statistical module, the pending data for being determined according to the determining module count at least one for the user
A historical trading statistical indicator;And
Sending module, at least one historical trading statistical indicator for obtaining the statistical module are sent to the client
It is shown.
10. server according to claim 9, wherein the determining module includes:
Judging unit, for judge the historical trading data whether include from the from date of the user's registration account so far
The transaction data of each day of trade between day;
Determination unit, if judging that historical trading data includes the starting from the user's registration account for the judging unit
The transaction data of date to the day of trade each between today, then using the historical trading data as the pending data;If
The judging unit judges historical trading data not and includes from the from date of the user's registration account to every between today
The transaction data of a day of trade, then using since the from date, including continue more days transaction data as first wait locate
Manage data;Using before today, including continue more days transaction data as the second pending data.
11. server according to claim 9, wherein the statistical module is used for, for every in the pending data
A virtual resource calculates the daily initial time of the virtual resource according to the daily number of transaction of the virtual resource and value parameter
The first quantity, the second quantity of daily end time, daily value total value, the accumulative value total value of the virtual resource and
At least one of in the accumulative value total value of all virtual resources.
12. server according to claim 10, wherein the statistical module includes:
First statistic unit, for being directed to each virtual resource in the first pending data that the determination unit determines, from institute
From date is stated to start backward, the second number of this day end time to be calculated according to the daily number of transaction of the virtual resource
Amount;
Second statistic unit, for being directed to each virtual resource in the second pending data that the determination unit determines, from now on
Start day forward, the first quantity of this day initial time to be calculated according to the daily number of transaction of the virtual resource.
13. server according to claim 9, wherein the receiving module is further used for, and receives from the client
User requests for the real time data processing of virtual resource;
The determining module is further used for, and the real time data processing received according to the receiving module is requested, from it is described to
The virtual resource that user currently holds is determined in the virtual resource that processing data include;
The receiving module is further used for, and obtains the user that the determining module is determined from third-party server and currently holds
Virtual resource in each virtual resource today transaction data;
The statistical module is further used for, every in the virtual resource currently held according to the user that the receiving module receives
At least one reality is calculated in conjunction at least one described historical trading statistical indicator in the transaction data of a virtual resource today
When trade statistical indicator;
The sending module is further used for, at least one calculated real-time deal statistical indicator of the statistical module is sent
It is shown to the client.
14. the server according to any one of claim 9 to 13, wherein the receiving module is further used for, and obtains
The quantity of virtual resource is caused to generate the event changed in the pending data;
The statistical module is further used for, and the event received according to the receiving module is at least one described historical trading
Statistical indicator is modified;
The sending module is used for, by the revised historical trading statistical indicator of the statistical module be sent to the client into
Row display.
15. a kind of computer readable storage medium, which is characterized in that be stored with computer-readable instruction, at least one can be made
Processor executes such as method described in any item of the claim 1 to 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810643023.2A CN109087201B (en) | 2018-06-21 | 2018-06-21 | Data processing method, server and storage medium for virtual resources |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810643023.2A CN109087201B (en) | 2018-06-21 | 2018-06-21 | Data processing method, server and storage medium for virtual resources |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109087201A true CN109087201A (en) | 2018-12-25 |
CN109087201B CN109087201B (en) | 2022-04-26 |
Family
ID=64840092
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810643023.2A Active CN109087201B (en) | 2018-06-21 | 2018-06-21 | Data processing method, server and storage medium for virtual resources |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109087201B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111125071A (en) * | 2019-11-25 | 2020-05-08 | 珠海格力电器股份有限公司 | Method and device for evaluating real-time data reliability and storage medium |
CN111309594B (en) * | 2020-01-17 | 2024-04-23 | 腾讯科技(深圳)有限公司 | System testing method, device, equipment and storage medium |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020099636A1 (en) * | 2000-11-29 | 2002-07-25 | Narumo Timo J. | Computerized method, process and service for stock investment timing |
CN105844523A (en) * | 2016-04-11 | 2016-08-10 | 海南世嘉亮科技有限公司 | Method, apparatus and calculation equipment for simulated stock trading by using securities back traced data |
CN107085582A (en) * | 2016-10-12 | 2017-08-22 | 雷盈企业管理(上海)有限公司 | Block chain digital asset visualization rendering method, system and server apparatus |
CN107330790A (en) * | 2017-06-26 | 2017-11-07 | 上交所技术有限责任公司 | A kind of ownership of assets of reviewing for saving memory space changes historic villages and towns |
CN107578334A (en) * | 2017-09-07 | 2018-01-12 | 张毅 | The execution method and distributed transaction system of a kind of electronic transaction strategy |
CN107657500A (en) * | 2016-12-03 | 2018-02-02 | 平安证券股份有限公司 | Stock recommends method and server |
CN107798057A (en) * | 2017-09-05 | 2018-03-13 | 平安科技(深圳)有限公司 | transaction data processing method, device, storage medium and computer equipment |
-
2018
- 2018-06-21 CN CN201810643023.2A patent/CN109087201B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020099636A1 (en) * | 2000-11-29 | 2002-07-25 | Narumo Timo J. | Computerized method, process and service for stock investment timing |
CN105844523A (en) * | 2016-04-11 | 2016-08-10 | 海南世嘉亮科技有限公司 | Method, apparatus and calculation equipment for simulated stock trading by using securities back traced data |
CN107085582A (en) * | 2016-10-12 | 2017-08-22 | 雷盈企业管理(上海)有限公司 | Block chain digital asset visualization rendering method, system and server apparatus |
CN107657500A (en) * | 2016-12-03 | 2018-02-02 | 平安证券股份有限公司 | Stock recommends method and server |
CN107330790A (en) * | 2017-06-26 | 2017-11-07 | 上交所技术有限责任公司 | A kind of ownership of assets of reviewing for saving memory space changes historic villages and towns |
CN107798057A (en) * | 2017-09-05 | 2018-03-13 | 平安科技(深圳)有限公司 | transaction data processing method, device, storage medium and computer equipment |
CN107578334A (en) * | 2017-09-07 | 2018-01-12 | 张毅 | The execution method and distributed transaction system of a kind of electronic transaction strategy |
Non-Patent Citations (2)
Title |
---|
ZHANG, WN 等: ""Statistical Arbitrage Mining for Display Advertising"", 《21ST ACM SIGKDD CONFERENCE ON KNOWLEDGE DISCOVERY AND DATA MINING 》 * |
沈骏: ""基于行为金融学的股指期货投资者行为研究"", 《中国优秀博硕士学位论文全文数据库(博士)经济与管理科学辑》 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111125071A (en) * | 2019-11-25 | 2020-05-08 | 珠海格力电器股份有限公司 | Method and device for evaluating real-time data reliability and storage medium |
CN111309594B (en) * | 2020-01-17 | 2024-04-23 | 腾讯科技(深圳)有限公司 | System testing method, device, equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN109087201B (en) | 2022-04-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11750484B2 (en) | Compressed message tracing and parsing | |
US20230206335A1 (en) | Secure electronic tokens in an electronic tokening system | |
EP3582112B1 (en) | Optimized data structure | |
US10728125B2 (en) | State generation system for a sequential stage application | |
US11681658B2 (en) | Data file compression | |
US20210217090A1 (en) | Minimization of the consumption of data processing resources in an electronic transaction processing system via selective premature settlement of products transacted thereby based on a series of related products | |
EP0867009A1 (en) | Apparatus and accompanying methods for automatically modifying a financial portfolio through dynamic re-weighting based on a non-constant function of current capitalization weights | |
US20240127338A1 (en) | Apparatuses, methods and systems for a tracking platform for standardized instruments | |
EP3435238A1 (en) | Concurrent write operations for use with multi-threaded file logging | |
CN109087201A (en) | Data processing method, server and the storage medium of virtual resource | |
US20240048630A1 (en) | Graph-based deployment tool | |
KR101899217B1 (en) | Method for finance technology service for deposit money loan of stock allocated and apparatus thereof | |
US11257160B2 (en) | Integration application utilizing a communications protocol | |
US11443377B1 (en) | Single action replication of complex financial instrument using options strip and user interface therefore | |
US20210065299A1 (en) | Asynchronous computational engine | |
CN114119089A (en) | Internal fund transfer pricing system, method, equipment and medium | |
KR20180103035A (en) | Method for finance technology service for deposit money loan using peer to peer finance and apparatus thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |