In specific implementation, the state change of the primary sources can be the trading order form shape of primary sources
State changes, and the numerical value of predetermined amount of time end primary sources can be primary sources described in predetermined amount of time
Remaining sum, the total value of the predetermined amount of time end system storage can be the account balance of predetermined amount of time.
State change in the embodiment of the present application according to primary sources in the first predetermined amount of time in system is true
The numerical value of the fixed first predetermined amount of time end primary sources first can make a reservation for according in operation system
The change of the trading order form state of primary sources described in the time period (new data) determines the first predetermined amount of time
The remaining sum of the primary sources.
The technical scheme that the embodiment of the present application is provided, in can apply to operation system, according to trading order form
State change determine the validity of transaction data, it is ensured that the data safety of order transaction.
In implementation, determine in the state change according to primary sources in the first predetermined amount of time in system
The numerical value of the first predetermined amount of time end primary sources, according in the second predetermined amount of time in system first
Before the state change of class data determines the numerical value of the second predetermined amount of time end primary sources, the side
Method may further include:
System records the trading order form state of the primary sources according to trading order form.
In the embodiment of the present application, can when operation system carries out business transaction, according to the order of each transaction,
Record the trading order form state of the primary sources.In specific implementation, trading order form state can be with form
Form record, for example, a certain Column Properties in tables of data are recorded into trading order form state, can also increase
Plus the association attributes such as specific descriptions or explanation, so that the later stage checks.
In the embodiment of the present application in the system directly according to trading order form be can record the he first-class numbert
According to trading order form state, without being obtained from other systems, further increase data validity determination effect
Rate.
In implementation, the primary sources are the data of generation after the newest upgrading of system, the he second-class number
According to the data for being generation before the newest upgrading of system.
It is appreciated that generally, system can with the continuing to develop of business, change and constantly improve,
It is perfect, multiple system upgrade may be experienced in this course.The first kind in the embodiment of the present application
Data are the data of generation after the newest upgrading of system, and the secondary sources are produced before being the newest upgrading of system
Raw data, i.e. how many times upgrading no matter is experienced before the newest upgrading of system, the embodiment of the present application is in the lump
Using these data as secondary sources treatment.
Fig. 2 shows the time shaft schematic diagram of system upgrade in the embodiment of the present application, as shown in the figure, it is assumed that
On March 1st, 2014 has carried out the upgrading of 1 subsystem, and on March 2nd, 2014 has carried out the upgrading of 2 subsystems,
The date that data validity determines is on March 3rd, 2014, then, primary sources are in March, 2014
Produced data after the upgrading of 2nd subsystem on the 2nd, secondary sources are March 2 day in 2014 to be for the 2nd time
Data produced by before system upgrading.
In the embodiment of the present application, according to the newest upgrade case of system, all of data in system are divided into
One class data and secondary sources, greatly simplifie calculation procedure, reduce answering for data validity determination
Miscellaneous degree, such that it is able to ensure fast and effectively to complete Data Detection.
In implementation, trading order form state value, the pass between data form and/or data before and after the system upgrade
Connection relation changes.
Generally, trading order form state value may be caused to occur because service logic changes before and after system upgrade
Change, for example:Buyer's direct payment, in order to ensure the rights and interests of user, increased to seller before system upgrade
Used as internuncial guarantee family, buyer pays guarantee family, by assuring that family pays seller;And for example, with
The increase of counterparty occurs in that family of sharing in the benefit, and buyer pays guarantee family, by assure family pay respectively seller and
Share in the benefit family.In addition, data form before and after system upgrade, the incidence relation between data and data etc.
Etc. changing, for example, there is no redundant data before system upgrade, redundant data etc. is increased after system upgrade.
Before and after system upgrade, some attributes of primary sources and secondary sources may have occurred change.
No matter data structure there occurs that what changes before and after system upgrade, and the embodiment of the present application can be calculated only
The remaining sum of newest primary sources realizes the detection of data validity, it is not necessary to which is concerned about before and after system upgrade
Attribute there occurs the problems such as how data before change and system upgrade calculate remaining sum.
In implementation, the trading order form state of the primary sources can pay guarantee family, load including buyer
The insured pays seller and guarantee family pays family of sharing in the benefit;The trading order form state of the secondary sources can be with
Guarantee family and guarantee family are paid including buyer pay seller.
In specific implementation, it is assumed that before system upgrade, Xiao Ming (buyer) have purchased a CA in Taobao website
Air ticket, Xiao Ming pays Alipay (guarantee family), it is to be determined receive after, Alipay (guarantee family) payment
Give China Airline Company (seller), then, the data for producing in this process as secondary sources;
After system upgrade, Xiao Ming (buyer) have purchased one and goes where net (family of sharing in the benefit) is provided in Taobao website
CA's air ticket, Xiao Ming pays Alipay (guarantee family), it is to be determined receive after, Alipay (guarantee family)
Pay where net (family of sharing in the benefit) and China Airline Company (seller), the number for producing in this process
According to as primary sources.
It is described pre- regularly according to the numerical value of first predetermined amount of time end primary sources and first in implementation
Between section end system storage total value determine the first difference value, according to second predetermined amount of time end first kind
The numerical value of data and the total value of the second predetermined amount of time end system storage determine the second difference value, specifically can be with
For:
The total value of the first predetermined amount of time end system storage is subtracted into the first predetermined amount of time end first
The numerical value of class data obtains the first difference value, and the total value of the second predetermined amount of time end system storage is subtracted into institute
The numerical value for stating the second predetermined amount of time end primary sources obtains the second difference value.
What said process can be visualized is expressed as below equation:
The total value of the first predetermined amount of time end system storage-the first predetermined amount of time end primary sources
Numerical value=the first difference value;
The total value of the second predetermined amount of time end system storage-the second predetermined amount of time end primary sources
Numerical value=the second difference value.
By taking the transaction data detection of operation system as an example, data validity determination process is specifically as follows:
(T-2) difference value of remaining sum+the second=(T-2) day account balance that day new data is calculated;
(T-1) difference value of remaining sum+the first=(T-1) day account balance that day new data is calculated;
The account amount of the old data of second the-the first difference value of difference value=(T-1) day.
Above three formula is arranged as follows:
(T-1) remaining sum+(T-2) day account balance that day new data is calculated-(T-2) day new data is calculated
The account amount of the old data of remaining sum=(T-1) day account balance-(T-1) day.
Due to can be identified in operation system which be new data, which be old data, therefore, it can very
The corresponding account amount of old data is readily come out, and then realizes the purpose that data validity determines.
In the embodiment of the present application, so that business transition family is for guarantee family as an example, available data validity is briefly described
Determine mechanism.
Fig. 3 shows that data validity in the prior art determines the schematic diagram of mechanism, as illustrated, existing skill
It is after the order amount of money that do not finish of all data in system is collected, to be compared with account balance in art, comes
The validity of detection data.
Assuming that the state value of trading order form has 2, respectively buyer pays guarantee family, guarantee family and pays
Seller, the date that data validity determines is T days, then, the formula that data validity determines is:
By T days, all of order amount of money that do not finish collected=the beginning balance of T days account;
Wherein, beginning balance represents the initial amount of money of same day account, and the most end amount of money on the same day is properly termed as the end of term
Remaining sum.
For example, collect by all order amount of money that do not finish of October 1, should be with same day October 1
The initial amount of money is equal.
Illustrated with an instantiation below, it is assumed that trading order form is as shown in following table 1.1:
So, carried out assuring the balance check at family, on 03 03rd, 2015 on 03 03rd, 2015
The order not finished has:ID is 2,3 data, that is to say, that the data from order dimension statistics are 5+3=8.
The data and account balance are checked, you can whether checking data are correct.
Inventor notices during invention:
After operation system is upgraded, it is assumed that business transition family increased family of sharing in the benefit after system upgrade, new data
Trading order form state value becomes for 3, i.e.,:Buyer pays guarantee family, guarantee family and pays seller, load
The insured pays family of sharing in the benefit.Within the switching phase of system upgrade, script order status value is 2 (seller's payments
To guarantee family, guarantee family pay seller) old data with upgrading after order status value be 3 (seller pay the bill
To guarantee family, guarantee family pay seller, guarantee family pay family of sharing in the benefit) new data all there will be.
Now, because order status there occurs change, if continuation determines mechanism using available data validity,
Need to count respectively the backlog amount of money, the backlog amount of money of old data of new data, then again will
The backlog amount of money of new data is compared with the account balance of new data, orders the unfinished of old data
Single amount of money is compared with the account balance of old data.
The example above is intended merely to illustrate the most simplified model of available data detection, in fact, real data
Validity determine logic be often it is extremely complex, old data due to historical reasons or other factors cause it is non-
Often it is difficult to or cannot be detected at all, and account balance is only a numeral, can't distinguish new number
According to, old data, existing data validity determines that mechanism is no longer appropriate for the old and new's data after system upgrade and deposits
Situation.
Fig. 4 shows the old and new's data and the schematic diagram deposited after system upgrade, for verifying logic as soon as possible just
True property, proposes requirement higher, it is therefore desirable to find out one kind as early as possible for the testing mechanism of data validity
New detection logic.
The data validity that the embodiment of the present application is provided determines method, continues to be exemplified as example explanation such as with above-mentioned
Under:
Assuming that after system upgrade, counterparty increased 1 family of sharing in the benefit, the state value of trading order form becomes 3
It is individual, i.e.,:Buyer pays guarantee family, and guarantee family pays seller, and guarantee family pays family of sharing in the benefit.It is being
Unite in the switching phase of upgrading, the old and new's data all there will be.
Example 1, transaction record is as shown in following table 1.2:
Above-mentioned table 1.2 is 2015.03.04~2015.03.05 order status record cases of two days, wherein user
The data that A is produced are old data.
Assuming that the account balance at guarantee family is as shown in following table 1.3:
Assuming that 2015.03.06 days verification guarantee family account, the technical scheme provided using the embodiment of the present application
Carry out data validity and determine that operation can be as follows:
(T-2) difference value of remaining sum+the second=(T-2) day account balance that day new data is calculated, i.e.,:
2015.03.04 the difference value of remaining sum+the second=2015.03.04 days account balance that new data is calculated;
Difference value=15 of 5+ second;
Obtain, the second difference value=10;
(T-1) difference value of remaining sum+the first=(T-1) day account balance that day new data is calculated, i.e.,:
2015.03.05 the difference value of remaining sum+the first=2015.03.05 days account balance that new data is calculated;
Difference value=10 of 10+ first;
Obtain, the first difference value=0;
The account amount of the old data of second the-the first difference value of difference value=(T-1) day, i.e.,:
10-0=2015.03.05 days variation volume=10 of A.
Therefore, in the case of being obtained in the old and new's data and deposited by above-mentioned formula, only statistics new data does not finish
The order amount of money is the purpose that can reach data validity determination.
Example 2, transaction record is as shown in following table 1.4:
Compared with example 1, increased within 3.04th an old data of user H, but the data on 3.05th still
Arrearage is to seller.
Assuming that the account balance at guarantee family is as shown in following table 1.5:
Assuming that family account is assured in verification in 2015.03.06 days, the scheme provided using the embodiment of the present application is carried out
The operation that data validity determines can be as follows:
(T-2) difference value of remaining sum+the second=(T-2) day account balance that day new data is calculated, i.e.,:
2015.03.04 the difference value of remaining sum+the second=2015.03.04 days account balance that new data is calculated;
Difference value=25 of 5+ second;
Obtain, the second difference value=20;
(T-1) difference value of remaining sum+the first=(T-1) day account balance that day new data is calculated, i.e.,:
2015.03.05 the difference value of remaining sum+the first=2015.03.05 days account balance that new data is calculated;
Difference value=20 of 10+ first;
Obtain, the first difference value=10;
The account amount of the old data of second the-the first difference value of difference value=(T-1) day, i.e.,:
20-10=2015.03.05 days variation volume=10 of A.
Example 3, transaction record is as shown in following table 1.6:
Compared with example 1, increased within 3.04th an old data of user H, and the data 3.05 days by
Guarantee family pays seller.
Assuming that the account balance at guarantee family is as shown in following table 1.7:
Assuming that 2015.03.06 days verification guarantee family account, the technical scheme provided using the embodiment of the present application
Carry out data validity and determine that operation can be as follows:
(T-2) difference value of remaining sum+the second=(T-2) day account balance that day new data is calculated, i.e.,:
2015.03.04 the difference value of remaining sum+the second=2015.03.04 days account balance that new data is calculated;
Difference value=25 of 5+ second;
Obtain, the second difference value=20;
(T-1) difference value of remaining sum+the first=(T-1) day account balance that day new data is calculated, i.e.,:
2015.03.05 the difference value of remaining sum+the first=2015.03.05 days account balance that new data is calculated;
Difference value=10 of 10+ first;
Obtain, the first difference value=0;
The account amount of the old data of second the-the first difference value of difference value=(T-1) day, i.e.,:
20-0=2015.03.05 days variation volume=10 for changing volume+B of A.
Therefore, in the case of being obtained in the old and new's data and deposited by above-mentioned formula, only statistics new data does not finish
The order amount of money is the purpose that can reach data validity determination.
Order status change in the embodiment of the present application can also for before system upgrade buyer's direct payment to being sold
Buyer pays guarantee family and pays seller by assuring family after family, upgrading, or order before system upgrade
State pays guarantee family, assures that family pays family of sharing in the benefit, guarantee family and pays seller, system including buyer
Situations such as other business transition families are increased after upgrading, can be carried out accordingly in specific implementation according to service logic
Change, the embodiment of the present application no longer illustrates one by one herein.
For the ease of the implementation of the application, illustrated with another example below.
Assuming that tables of data is as shown in following table 1.8 before system upgrade:
Assuming that after system upgrade, tables of data increased table 1.9, specific as follows shown:
It can be seen that table 1.8 and table 1.9 occur in that redundant data (clothes and the Column Properties of classification two), i.e. system
After upgrading, primary sources increased redundant data, and secondary sources do not have redundant data.
Now, it is assumed that trading order form is as shown in following table 2.0:
Assuming that the account balance at guarantee family is as shown in following table 2.1:
Assuming that family account is assured in verification in 2015.03.08 days, the scheme provided using the embodiment of the present application is carried out
Data validity determines that operation can be as follows:
2015.03.06 day -2015.03.06 days remaining sum=the first difference value of new data of family account balance is assured;
25-15=10;
2015.03.07 day -2015.03.07 days remaining sum=the second difference value of new data of family account balance is assured;
18-18=0;
The variation volume of the old data of first the-the second difference value of difference value=2015.03.07 days;
10-0=2015.03.07 days variation volume=10 of I;
As can be seen that the result that data validity determines is for data are effective.
Above-described embodiment is only that the data validity that is provided of the embodiment of the present application determines method in operation system
Application in transaction data detection is illustrated, and the data validity that the embodiment of the present application is provided determines that method may be used also
To be applied in other systems carry out the detection of data validity.
A kind of data validity determining device is additionally provided based on same inventive concept, in the embodiment of the present application,
Because the principle of these equipment solve problems determines that method is similar to a kind of data validity, therefore these equipment
Implementation may refer to the implementation of method, repeat part and repeat no more.
Fig. 5 shows the structural representation of data validity determining device in the embodiment of the present application, as illustrated,
The data validity determining device can include:
First determining module 501, for the state according to primary sources in the first predetermined amount of time in system
Change determines the numerical value of the first predetermined amount of time end primary sources, according to second scheduled time in system
The state change of primary sources determines the numerical value of the second predetermined amount of time end primary sources in section;Institute
The initial time for stating the second predetermined amount of time is the finish time of first predetermined amount of time;
Second determining module 502, for according to first predetermined amount of time end primary sources numerical value and
The total value of the first predetermined amount of time end system storage determines the first difference value, according to second scheduled time
The numerical value of the last primary sources of section and the total value of the second predetermined amount of time end system storage determine the second difference
Value;The total value of the system storage is the numerical value of primary sources and the numerical value sum of secondary sources;
3rd determining module 503, for the difference by first difference value with second difference value and institute
The change value for stating secondary sources in the second predetermined amount of time is compared;If equal, determine that data are effective;
If unequal, data exception is determined.
In implementation, first determining module specifically can be used for according to primary sources in system T-2 days
State change determine the T-2 days numerical value of the last primary sources, according to the first kind in system T-1 days
The state change of data determines the T-1 days numerical value of the last primary sources;Wherein, T is data validity
Determine the date.
In implementation, first determining module specifically can be used for according in the first predetermined amount of time in system
The trading order form state change of one class data determines the numerical value of the first predetermined amount of time end primary sources,
Trading order form state change according to primary sources in the second predetermined amount of time in system determines that second makes a reservation for
The numerical value of the time period Mo primary sources.
In implementation, described device may further include:
Logging modle 504, in the shape according to primary sources in the first predetermined amount of time in system
State change determines the numerical value of the first predetermined amount of time end primary sources, according to the in system second pre- timing
Between in section the state change of primary sources determine the numerical value of the second predetermined amount of time end primary sources
Before, system records the trading order form state of the primary sources according to trading order form.
In implementation, the primary sources can be the data of generation after the newest upgrading of system, described second
The data that class data are produced before being the newest upgrading of system.
In implementation, trading order form state value, the pass between data form and/or data before and after the system upgrade
Connection relation changes.
In implementation, the trading order form state of the primary sources can pay guarantee family, load including buyer
The insured pays seller and guarantee family pays family of sharing in the benefit;The trading order form state of the secondary sources can be with
Guarantee family and guarantee family are paid including buyer pay seller.
In implementation, second determining module specifically can be used for the system storage of the first predetermined amount of time end
The numerical value that total value subtracts the first predetermined amount of time end primary sources obtains the first difference value, by second
The total value of predetermined amount of time end system storage subtracts the number of the second predetermined amount of time end primary sources
It is worth to the second difference value.
In above-described embodiment, can be implemented using existing function component module.For example, first is true
Cover half block, the second determining module can use existing data processing component, at least, existing business system,
Just possesses the component for realizing the function in computer or mobile terminal, those skilled in the art are by corresponding
Design and develop and be capable of achieving;Then it is that any one possesses setting for data comparing function as the 3rd determining module
The standby component for all possessing;And logging modle, then it is that any one equipment for possessing writing function all possesses
Component.
For convenience of description, each several part of apparatus described above is divided into various modules with function or unit is distinguished
Description.Certainly, can be the function of each module or unit in same or multiple softwares when the application is implemented
Or realized in hardware.
It should be understood by those skilled in the art that, embodiments herein can be provided as method, system or meter
Calculation machine program product.Therefore, the application can be using complete hardware embodiment, complete software embodiment or knot
Close the form of the embodiment in terms of software and hardware.And, the application can be used and wherein wrapped at one or more
Containing computer usable program code computer-usable storage medium (including but not limited to magnetic disk storage,
CD-ROM, optical memory etc.) on implement computer program product form.
The application is produced with reference to the method according to the embodiment of the present application, equipment (system) and computer program
The flow chart and/or block diagram of product is described.It should be understood that can by computer program instructions realize flow chart and
/ or block diagram in each flow and/or the flow in square frame and flow chart and/or block diagram and/
Or the combination of square frame.These computer program instructions to all-purpose computer, special-purpose computer, insertion can be provided
The processor of formula processor or other programmable data processing devices is producing a machine so that by calculating
The instruction of the computing device of machine or other programmable data processing devices is produced for realizing in flow chart one
The device of the function of being specified in individual flow or multiple one square frame of flow and/or block diagram or multiple square frames.
These computer program instructions may be alternatively stored in can guide computer or the treatment of other programmable datas to set
In the standby computer-readable memory for working in a specific way so that storage is in the computer-readable memory
Instruction produce include the manufacture of command device, the command device realization in one flow of flow chart or multiple
The function of being specified in one square frame of flow and/or block diagram or multiple square frames.
These computer program instructions can be also loaded into computer or other programmable data processing devices, made
Obtain and series of operation steps is performed on computer or other programmable devices to produce computer implemented place
Reason, so as to the instruction performed on computer or other programmable devices is provided for realizing in flow chart one
The step of function of being specified in flow or multiple one square frame of flow and/or block diagram or multiple square frames.
Although having been described for the preferred embodiment of the application, those skilled in the art once know base
This creative concept, then can make other change and modification to these embodiments.So, appended right will
Ask and be intended to be construed to include preferred embodiment and fall into having altered and changing for the application scope.