Specific embodiment
Below in conjunction with the attached drawing in this specification embodiment, the technical solution in this specification embodiment is carried out clear
Chu is fully described by, it is clear that described embodiment is only this specification a part of the embodiment, rather than whole implementation
Example.The embodiment of base in this manual, those of ordinary skill in the art are obtained without creative efforts
Every other embodiment, all should belong to this specification protection range.
Please refer to Fig. 1, Fig. 2 and Fig. 3.This specification embodiment provides a kind of data processing system.
In the present embodiment, the data processing system may include client.The client for example can for PC machine,
Server, industrial personal computer (industrial control computer), intelligent movable phone, Flat electronic equipment, portable computer (such as are taken down notes
This computer etc.), personal digital assistant (PDA) or desktop computer or intelligent wearable device etc..
In the present embodiment, the data processing system can also include the service server of Third-party payment mechanism.Institute
Stating Third-party payment mechanism for example may include Alipay, logical, the Baidu's wallet of wealth pair etc..The service server can be used for mentioning
For business service, such as provide the business services such as account charging, loan, shopping at network.The service server can be one
Server, alternatively, can also be the server cluster for including multiple servers.
In the present embodiment, the data processing system can also include the account server of Third-party payment mechanism.Institute
Stating account server may be used to provide book keeping operation and reconciliation service.The account server can be a server, alternatively, also
It can be the server cluster for including multiple servers.The account server and the service server can be respectively independent
Server, alternatively, same server can also be integrated in.The account server can be provided with accounting data table, idempotent
Tables of data and clearance tables of data.
The accounting data table can be used to save the accounting data of the Third-party payment mechanism.The accounting data table
It can have at least one field, the accounting data may include the element value corresponding at least one field.For example,
The accounting data table may include order number field, transaction amount field, transaction channel field, currency type field etc., the account
Data of being engaged in may include the elements value such as order number, transaction amount, transaction channel, currency type.The idempotent tables of data can be used for pair
Accounting data carries out idempotent processing, saves to avoid by duplicate accounting data to the accounting data table.The idempotent data
Table can have at least one field.In the actual process, can according to business need from the accounting data table choose to
A few field is as the field in the idempotent tables of data.It, can be from the accounting data table in a Sample Scenario
It chooses corresponding data value and is capable of the field (such as order number field) of one business of unique identification as the idempotent tables of data
In field.Unique constraints has can be set in some or all of idempotent tables of data field.Unique constraints can be protected
The data demonstrate,proved in field are unique in the idempotent tables of data.In this way by unique constraints, can realize to account
The idempotent of data is handled.The clearance tables of data can be used to save the clearance data of liquidation organization.The liquidation organization is for example
It may include bank, Unionpay etc..The clearance tables of data can have at least one field.Field in the clearance tables of data
It can be partly or entirely identical with the field in the accounting data table.The clearance data may include at least one element
Value.The type of element value can be partly or entirely identical in the type of element value and the accounting data in the clearance data.
The quantity of the accounting data table, the idempotent tables of data and the clearance tables of data can be respectively one.Or
Person can be used multiple tables of data and carry out storing data in the biggish situation of data scale, with maintain to data in tables of data into
Performance when row operation.The quantity of the accounting data table described in this way, the idempotent tables of data and the clearance tables of data can be with
It is respectively multiple.Specifically, the account server can be provided with multiple tables of data groups, and each tables of data group may include phase
Mutual corresponding accounting data table, idempotent tables of data and clearance tables of data.Accounting data table, idempotent data in each tables of data group
Table and clearance tables of data can respectively correspond table mark.For example, the account server can be provided with tables of data group A, B and
C.Tables of data group A may include accounting data Table A _ ZW, idempotent data Table A _ MD, clearance tables of data A_QS.Accounting data Table A _
The corresponding table mark of ZW can be A_ZW;The corresponding table mark of idempotent data Table A _ MD can be A_MD;Clear tables of data A_QS
Corresponding table mark can be A_QS.Tables of data group B may include accounting data table B_ZW, idempotent tables of data B_MD, clearance number
According to table B_QS.The corresponding table mark of accounting data table B_ZW can be B_ZW;Idempotent tables of data B_MD corresponding table mark can be with
For B_MD;Clearing the corresponding table mark of tables of data B_QS can be B_QS.Tables of data group C may include accounting data table C_ZW,
Idempotent tables of data C_MD, clearance tables of data C_QS.The corresponding table mark of accounting data table C_ZW can be C_ZW;Idempotent tables of data
The corresponding table mark of C_MD can be C_MD;Clearing the corresponding table mark of tables of data C_QS can be C_QS.
In the present embodiment, the data processing system can also include the authority server of liquidation organization.The clearance
Mechanism for example may include bank, Unionpay etc..The authority server may be used to provide payment services.The authority server
It can be a server, alternatively, can also be the server cluster for including multiple servers.
Based on the Third-party payment mechanism, user can be supplemented with money and (be also known as transferred to), clearing (also known as withdrawing deposit),
The operation such as pay and transfer accounts.Below for supplementing scene with money, the technical solution of this specification embodiment is discussed in detail.This scene is shown
The account that example is related to may include the first account, the second account and third account.First account may include that user exists
The account that liquidation organization opens up, such as the account that user opens up in banks such as Construction Bank, industrial and commercial banks.Second account can
To include account that user opens up in Third-party payment mechanism, such as user pays the third parties such as logical, Baidu's wallet in Alipay, wealth
The account that payment mechanism opens up.The third account may include the account that Third-party payment mechanism is opened up in liquidation organization, example
The account that such as Alipay is opened up in Construction Bank, bank, industrial and commercial bank.
In this Sample Scenario, user can carry out supplementing operation with money in the client.Operation, institute are supplemented with money in response to described
Charging request can be sent to the service server by stating client, can be carried the first account in the charging request, be filled
It is worth the information such as the amount of money and the second account.The service server can receive the charging request;Can by financial channel to
The authority server sends payment request, with notify the liquidation organization deducted from the first account the recharge amount and
Increase the recharge amount in third account.
In this Sample Scenario, it can arrange have clearance side between the liquidation organization and the Third-party payment mechanism
Formula.According to the clearance mode of agreement, the clearance time between liquidation organization and Third-party payment mechanism is usually later than third party's branch
Pay the settlement time between mechanism and user.For example, liquidation organization and Third-party payment mechanism can arrange using the clear of " T+3 "
Calculation mode, " T " refer to payment request submitting day;"+3 " refer to the third working day after payment request submission.As described
Authority server can receive payment request;The recharge amount can be deducted from the first account;It can be taken to the business
Business device feeds back successful message of withholing.It should be noted that the authority server will not at this time according to the clearance mode of agreement
Increase the recharge amount in third account;But after the clearance time of agreement reaches, just increase in third account
The recharge amount.
In this Sample Scenario, the service server can receive successful message of withholing;It can be in the second account
Increase the recharge amount;It can be to the information of the client feedback successful recharging.The client, which can receive, supplements with money into
The information of function.Furthermore the service server can also send the corresponding account number of this recharging service to the account server
According to.The account server can receive the accounting data;Idempotent tables of data can be written into the accounting data.If write-in
Success, then show that the accounting data meets the unique constraints of idempotent tables of data, that is, show that this recharging service is not user
Repetitive operation, the account server can by the accounting data be written accounting data table.If write-in failure, shows institute
The unique constraints that accounting data is unsatisfactory for idempotent tables of data is stated, that is, shows that this recharging service is the repetitive operation of user, institute
The accounting data can be ignored by stating account server.If write-in failure certainly, the account server can also be performed other
Predetermined action, details are not described herein.It should be noted that including some or all of in accounting data table in view of idempotent tables of data
Idempotent tables of data is written here, it can be understood as write element value some or all of in accounting data in accounting data by field
Enter idempotent tables of data, such as idempotent tables of data is written into element value corresponding with the field of idempotent tables of data in accounting data.
The quantity of the idempotent tables of data can be one.As described account server can write the accounting data
Enter the idempotent tables of data.Alternatively, the quantity of the idempotent tables of data can be multiple.As described account server can be from
Target idempotent tables of data is chosen in the multiple idempotent tables of data;The target idempotent number chosen can be written into the accounting data
According to table.For example, the account server can provide N number of idempotent tables of data.The corresponding table mark point of N number of idempotent tables of data
Not Wei A0, A1, A2 ..., A (N-1).So, the account server can calculate some in the accounting data or multiple
The cryptographic Hash of element value (such as order number);When it is 0 that the cryptographic Hash is divided by the remainder of N, it is corresponding that table mark A0 can be chosen
Idempotent tables of data is as target idempotent tables of data;When it is 1 that the cryptographic Hash is divided by the remainder of N, it is corresponding that table mark A1 can be chosen
Idempotent tables of data as target idempotent tables of data;And so on, when it is N-1 that the cryptographic Hash is divided by the remainder of N, can choose
Table identifies A (N-1) corresponding idempotent tables of data as target idempotent tables of data.Certainly, those skilled in the art should can manage
Solution, the above process for choosing target idempotent tables of data is merely illustrative, and the actually described account server can also use other sides
Formula chooses target idempotent tables of data.
The quantity of the accounting data table can be one.As described account server can write the accounting data
Enter the accounting data table.Alternatively, the quantity of the accounting data table can be multiple.As described account server can be from
Target accounting data table is chosen in the multiple accounting data table;The target account number chosen can be written into the accounting data
According to table.The account server chooses the process of target accounting data table, can be with the process pair of selection target idempotent tables of data
According to explanation.
In this Sample Scenario, after the clearance time of agreement reaches, the authority server can also be to the account
Business server sends clearance file.The account server can receive clearance file;It can parse the clearance file, obtain
Clear data;The idempotent tables of data can be written into the clearance data.If write-in is the result shows that the clearance data meet
The unique constraints, the account server can determine that the reconciliation state of the clearance data is abnormality;It can incite somebody to action
Abnormality data table is written in the clearance data, and the abnormality data table is used to save the clearance number that reconciliation state is abnormality
According to.If write-in is the result shows that the clearance data are unsatisfactory for the unique constraints, the account server can determine described
The reconciliation state for clearing data is state to be checked;The clearance tables of data can be written to clearance tables of data, the clearance number
It is used to save the clearance data that reconciliation state is state to be checked according to table.
In this Sample Scenario, since the clearance time arranged between liquidation organization and Third-party payment mechanism is usually later than
Settlement time between Third-party payment mechanism and user, the then time that the account server obtains clearance data are usually later than
Obtain the time of accounting data.Using this feature, this Sample Scenario can realize account number when clearing data landing
According to the verification between clearance data, the performance for influencing database is avoided.
Usually it is later than Third-party payment mechanism in view of the clearance time arranged between liquidation organization and Third-party payment mechanism
Settlement time between user, then account server obtain clearance data time be usually later than obtain accounting data when
Between.A kind of account checking method can be provided based on this feature this specification embodiment.The account checking method is with account server
Executing subject.Please refer to Fig. 1, Fig. 2 and Fig. 3.The account checking method may comprise steps of.
Step S10: the clearance data from liquidation organization are received.
In the present embodiment, the authority server of the liquidation organization can send clearance text to the account server
Part.The account server can receive clearance file;The clearance file can be parsed, obtain at least one clearance
Data.Specifically, the authority server directly can send clearance file to the account server, alternatively, can also be through
Clearance file is sent to the account server indirectly from other servers.The clearance file can be Third-party payment mechanism
A kind of fund detail mutual files arranged between liquidation organization can specifically include the corresponding clearance number of an at least business
According to.
Step S12: idempotent tables of data is written into the clearance data.
In the present embodiment, the idempotent tables of data may include at least one field for being provided with unique constraints.Institute
Stating idempotent tables of data can be used for carrying out idempotent processing to accounting data, save to avoid by duplicate accounting data to account number
According to table.Usually it is later than the time for obtaining accounting data, the idempotent data in view of the time that account server obtains clearance data
Accounting data can be previously written in table.Specifically, the accounting data may include and be provided with unique constraints field
Corresponding element value can be previously written described corresponding with unique constraints field is provided in the idempotent tables of data
Element value.
In the present embodiment, idempotent tables of data can be written in each clearance data by the account server.It is described here
Account server will clear data and idempotent tables of data is written, it can be understood as write element value some or all of in clearance data
Enter idempotent tables of data, such as idempotent tables of data is written into element value corresponding with the field of idempotent tables of data in clearance data.
Specifically, the quantity of the idempotent tables of data can be one.As described account server can write each clearance data
Enter the idempotent tables of data.Alternatively, the quantity of the idempotent tables of data can be multiple.So it is directed to each clearance data, institute
Target idempotent tables of data can be chosen according to the clearance data from the multiple idempotent tables of data by stating account server;It can be with
The target idempotent tables of data that clearance data write-in is chosen.The process that the account server chooses target idempotent tables of data can
With referring to aforementioned Sample Scenario, details are not described herein.
Step S13: according to the write-in of the clearance data as a result, determining the reconciliation state of the clearance data.
In the present embodiment, the reconciliation state may include abnormality and state to be checked.The abnormality example
It such as may include more account states, the state to be checked for example may include normal condition and error condition.Below with a field
Scape example introduces more account states, normal condition and error condition.In the Sample Scenario, data and accounting data are cleared
To include the element value (such as order number) for capableing of one business of unique identification.For ease of description, which can be claimed
For key element value.So, for a certain clearance data, when there is no have identical key element value between the clearance data
Accounting data when, can assert there is no accounting data corresponding with the clearance data, and then can be assumed that the clearance
The reconciliation state of data is more account states;When the accounting data for existing with there is identical key element value between the clearance data
When, it can assert in the presence of accounting data corresponding with the clearance data, and then can be assumed that the reconciliation shape of the clearance data
State is state to be checked.Further, when exist between the clearance data with identical key element value accounting data and
When other elements value between the clearance data and the accounting data is all the same, the reconciliation state of the clearance data can be assert
For normal condition;When exist between the clearance data with identical key element value accounting data but the clearance data with
There are the reconciliation state of the clearance data when different other element values, can be assert for wrong shape between the accounting data
State.
In the present embodiment, accounting data can be previously written in idempotent tables of data.Account number in idempotent tables of data
It is corresponding according to the accounting data in accounting data table.Idempotent tables of data may include that at least one is provided with uniqueness about
The field of beam.Clearance data may include element value corresponding with unique constraints field is provided with.So for each clear
Count evidence, if being written successfully, shows that the clearance data meet the unique constraints, that is, shows to be not present and the clearance data
Corresponding accounting data, the account server can determine that the reconciliation state of the clearance data is abnormality;If write-in
Failure, then show that the clearance data are unsatisfactory for the unique constraints, that is, shows there is account corresponding with the clearance data
Data, the account server can determine that the reconciliation state of the clearance data is state to be checked.
In an embodiment of the present embodiment, determine it is described clearance data reconciliation state be abnormality with
Afterwards, abnormality data table can also be written in the clearance data by the account server.The abnormality data table can be used for protecting
Deposit the clearance data that reconciliation state is abnormality.Determine it is described clearance data reconciliation state be after verification state,
Clearance tables of data can also be written in the clearance data by the account server.The clearance tables of data is for saving reconciliation shape
State is the clearance data of state to be checked.Specifically, the quantity of the clearance tables of data can be one.As described account clothes
Being engaged in device can be by the clearance data write-in clearance tables of data.Alternatively, the quantity of the clearance tables of data can be multiple.
As described account server can choose target clearance tables of data from the multiple clearance tables of data;It can be by the clearance
The target that data write-in is chosen clears tables of data.Before the process that the account server chooses target clearance tables of data is referred to
Sample Scenario is stated, details are not described herein.It should be noted that the account server can also be using other methods come further
The reconciliation state of data is cleared in identification clearance tables of data.For example, the account server can also be by accounting data table and clear
It calculates tables of data and carries out full table correlation inquiry, to clear the reconciliation state of data as normal condition in further identification clearance tables of data
Or error condition.
In this specification embodiment, account server can receive the clearance data from liquidation organization;It can will be described
Clear data be written idempotent tables of data, the idempotent tables of data may include at least one be provided with unique constraints field,
And it is previously written the accounting data from payment mechanism;It can be according to the write-in of the clearance data as a result, determining described clear
The reconciliation state for the evidence that counts.So in the present embodiment, the account server can be when clearing data arrival, in conjunction with idempotent
The unique constraints of tables of data checks clearance data item by item, so as to avoid reconciliation process to the shadow of database performance
It rings.
Please refer to Fig. 4.This specification embodiment also provides a kind of account checking apparatus.The account checking apparatus may include to place an order
Member.
Receiving unit 20, for receiving the clearance data from liquidation organization;
R/w cell 22, for idempotent tables of data to be written in the clearance data;The idempotent tables of data includes at least one
Field provided with unique constraints and it is previously written the accounting data from payment mechanism;
Determination unit 24, for the write-in according to the clearance data as a result, determining the reconciliation state of the clearance data.
Please refer to Fig. 5.This specification embodiment also provides a kind of server.The server may include memory and place
Manage device.
In the present embodiment, the memory can be implemented in any suitable manner.For example, the memory can be
Read-only memory, mechanical hard disk, solid state hard disk or USB flash disk etc..The memory can be used for storing computer instruction.
In the present embodiment, the processor can be implemented in any suitable manner.For example, processor can take example
Such as microprocessor or processor and storage can by (micro-) processor execute computer readable program code (such as software or
Firmware) computer-readable medium, logic gate, switch, specific integrated circuit (Application Specific
Integrated Circuit, ASIC), programmable logic controller (PLC) and the form etc. for being embedded in microcontroller.The processor
The computer instruction can be executed and perform the steps of clearance data of the reception from liquidation organization;By the clearance data
Idempotent tables of data is written;The idempotent tables of data includes that at least one is provided with the field of unique constraints and has been previously written
Accounting data from payment mechanism;According to the write-in of the clearance data as a result, determining the reconciliation state of the clearance data.
It should be noted that all the embodiments in this specification are described in a progressive manner, each embodiment it
Between same and similar part may refer to each other, each embodiment focuses on the differences from other embodiments.
For server example and Installation practice, since it is substantially similar to the method embodiment, so the ratio of description
Relatively simple, the relevent part can refer to the partial explaination of embodiments of method.
Further it will be understood that one of ordinary skill in the art may not need creation after reading this specification file
Property labour some or all of expect in this specification file enumerating and can be combined between embodiment, these combinations are also in this explanation
In the range of book is disclosed and is protected.
In the 1990s, the improvement of a technology can be distinguished clearly be on hardware improvement (for example,
Improvement to circuit structures such as diode, transistor, switches) or software on improvement (improvement for method flow).So
And with the development of technology, the improvement of current many method flows can be considered as directly improving for hardware circuit.
Designer nearly all obtains corresponding hardware circuit by the way that improved method flow to be programmed into hardware circuit.Cause
This, it cannot be said that the improvement of a method flow cannot be realized with hardware entities module.For example, programmable logic device
(Programmable Logic Device, PLD) (such as field programmable gate array (Field Programmable Gate
Array, FPGA)) it is exactly such a integrated circuit, logic function determines device programming by user.By designer
Voluntarily programming comes a digital display circuit " integrated " on a piece of PLD, designs and makes without asking chip maker
Dedicated IC chip 2.Moreover, nowadays, substitution manually makes IC chip, and this programming is also used instead mostly
" logic compiler (logic compiler) " software realizes that software compiler used is similar when it writes with program development
Seemingly, and the source code before compiling also handy specific programming language is write, this is referred to as hardware description language
(Hardware Description Language, HDL), and HDL is also not only a kind of, but there are many kind, such as ABEL
(Advanced Boolean Expression Language)、AHDL(Altera Hardware Description
Language)、Confluence、CUPL(Cornell University Programming Language)、HDCal、JHDL
(Java Hardware Description Language)、Lava、Lola、MyHDL、PALASM、RHDL(Ruby
Hardware Description Language) etc., VHDL (Very-High-Speed is most generally used at present
Integrated Circuit Hardware Description Language) and Verilog2.Those skilled in the art
It will be apparent to the skilled artisan that only needing method flow slightly programming in logic and being programmed into integrated circuit with above-mentioned several hardware description languages
In, so that it may it is readily available the hardware circuit for realizing the logical method process.
System, device, module or the unit that above-described embodiment illustrates can specifically realize by computer chip or entity,
Or it is realized by the product with certain function.It is a kind of typically to realize that equipment is computer.Specifically, computer for example may be used
Think personal computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media play
It is any in device, navigation equipment, electronic mail equipment, game console, tablet computer, wearable device or these equipment
The combination of equipment.
As seen through the above description of the embodiments, those skilled in the art can be understood that this specification
It can realize by means of software and necessary general hardware platform.Based on this understanding, the technical solution of this specification
Substantially the part that contributes to existing technology can be embodied in the form of software products in other words, the computer software
Product can store in storage medium, such as ROM/RAM, magnetic disk, CD, including some instructions are used so that a computer
Equipment (can be personal computer, server or the network equipment etc.) executes each embodiment of this specification or embodiment
Certain parts described in method.
This specification can be used in numerous general or special purpose computing system environments or configuration.Such as: personal computer,
Server computer, handheld device or portable device, laptop device, multicomputer system, microprocessor-based system,
Set top box, programmable consumer-elcetronics devices, network PC, minicomputer, mainframe computer including any of the above system are set
Standby distributed computing environment etc..
This specification can describe in the general context of computer-executable instructions executed by a computer, such as journey
Sequence module.Generally, program module include routines performing specific tasks or implementing specific abstract data types, programs, objects,
Component, data structure etc..This specification can also be practiced in a distributed computing environment, in these distributed computing environment
In, by executing task by the connected remote processing devices of communication network.In a distributed computing environment, program module
It can be located in the local and remote computer storage media including storage equipment.
Although depicting this specification by embodiment, it will be appreciated by the skilled addressee that there are many become for this specification
Shape and the spirit changed without departing from this specification, it is desirable to which the attached claims include these deformations and change without departing from this
The spirit of specification.