Detailed Description
The technical solutions of the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is apparent that the described embodiments are only some embodiments of the present specification, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are intended to be within the scope of the present disclosure.
Please refer to fig. 1, 2 and 3. Embodiments of the present specification provide a data processing system.
In this embodiment, the data processing system may include a client. The client may be, for example, a PC, a server, an industrial personal computer (industrial control computer), a mobile smart phone, a tablet electronic device, a portable computer (e.g., a notebook computer, etc.), a Personal Digital Assistant (PDA), or a desktop computer or smart wearable device, etc.
In this embodiment, the data processing system may further include a service server of a third party payment authority. The third party payment mechanism may include, for example, a payment treasures, a financial payment, a hundred degrees wallet, etc. The business server may be used to provide business services such as account recharging, loan, online shopping, etc. The service server may be one server, or may also be a server cluster including a plurality of servers.
In this embodiment, the data processing system may further include an accounting server of the third party payment mechanism. The accounting server may be used to provide billing and reconciliation services. The accounting server may be one server, or may also be a server cluster including a plurality of servers. The accounting server and the service server may be independent servers, or may be integrated in the same server. The accounting server may be provided with an accounting data table and a clearing data table.
The accounting data table may be used to hold accounting data for the third party payment mechanism. The accounting data table may have at least one field, and the accounting data may include an element value corresponding to the at least one field. For example, the accounting data table may include an order number field, a transaction amount field, a transaction channel field, a currency field, etc., and the accounting data may include element values of an order number, a transaction amount, a transaction channel, a currency, etc. The clearing data table may be used to hold clearing data for a clearing institution. The clearing house may include, for example, a bank, a silver-tie, etc. The clearing data table may have at least one field. The fields in the clearing data table and the fields in the accounting data table may be partially or wholly identical. The clearing data may include at least one element value. The kind of the element value in the clearing data and the kind of the element value in the accounting data may be partially or wholly the same. Furthermore, some or all of the fields of the clearing data table may be provided with a uniqueness constraint. The uniqueness constraint can ensure that the data in the field is unique in the clearing data table. In the actual process, it can be decided which fields to set a unique constraint according to the need for checking the clearing data and the accounting data. For example, only whether the order numbers agree is paid attention to in the collation process. Then, a uniqueness constraint may be set on the order number field in the clearing data table. For another example, in the verification process, attention is paid to whether the order number, the transaction amount, and the like match. Then, a unique constraint may be set in the clearing data table for the order number field, the transaction amount field, etc.
The number of the accounting data table and the clearing data table may be one, respectively. Alternatively, in the case of a large data size, a plurality of data tables may be used to store data to maintain performance in operating on the data in the data tables. Thus the number of the accounting data table and the clearing data table can be multiple. In particular, the accounting server may be provided with a plurality of data table groups, each of which may include an accounting data table and a clearing data table corresponding to each other. The accounting data tables and the clearing data tables in each data table group may each correspond to a table identification. For example, the accounting server may be provided with data table sets A, B and C. The data table set a may include an accounting data table a_zw and a clearing data table a_qs. The table identifier corresponding to the accounting data table a_zw may be a_zw; the table identification corresponding to the clearing data table a_qs may be a_qs. The data table group B may include an accounting data table b_zw and a clearing data table b_qs. The table identifier corresponding to the accounting data table b_zw may be b_zw; the table identification corresponding to the clearing data table b_qs may be b_qs. The data table group C may include an accounting data table c_zw and a clearing data table c_qs. The table identifier corresponding to the accounting data table c_zw may be c_zw; the table identification corresponding to the clearing data table c_qs may be c_qs.
In this embodiment, the data processing system may further include an institution server of the clearing institution. The clearing house may include, for example, a bank, a silver-tie, etc. The institution server may be used to provide payment services. The organization server may be one server or may also be a server cluster including a plurality of servers.
Based on the third party payment mechanism, the user can perform operations such as recharging (also known as transferring), settling (also known as presenting), paying, transferring, and the like. The following describes the technical solution of the embodiments of the present specification in detail using a recharging scenario as an example. The accounts involved in this scenario example may include a first account, a second account, and a third account. The first account may include an account opened by a user at a clearing house, such as an account opened by a user at a construction bank, an industrial and commercial bank, or the like. The second account may include an account opened by the user at a third party payment mechanism, for example, an account opened by the user at a third party payment mechanism such as a payment treasures, a financial payment, a hundred degree wallet, etc. The third account may include an account opened by a third party payment mechanism at a clearing institution, such as an account opened by a payment facilitator at a bank, such as a construction bank, an industrial and commercial bank, or the like.
In this scenario example, the user may perform a recharge operation at the client. And responding to the recharging operation, the client can send a recharging request to the service server, wherein the recharging request can carry information such as a first account, a recharging amount, a second account and the like. The service server may receive the recharge request; a payment request may be sent to the institution server through a financial channel to inform the clearing institution to deduct the recharge amount from the first account and to increase the recharge amount in the third account.
In this scenario example, the clearing house and the third party payment house may agree on a clearing mode. The clearing time between the clearing house and the third party payment house is typically later than the settling time between the third party payment house and the user, depending on the agreed clearing way. For example, the clearing house and the third party payment house may agree to take a clearing mode of "t+3", where "T" refers to the payment request submission date; "+3" refers to the third workday after the payment request was submitted. The institution server may thus receive a payment request; the recharge amount may be deducted from the first account; and feeding back a message of successful deduction to the service server. It should be noted that, according to the agreed clearing mode, the institution server will not increase the recharging amount in the third account at this time; but the recharge amount is increased in the third account after the contracted clearing time has been reached.
In this scenario example, the service server may receive a message that the deduction was successful; the recharge amount may be increased in a second account; information of successful recharging can be fed back to the client. The client may receive information that the recharge was successful. In addition, the service server can also send accounting data corresponding to the recharging service to the accounting server. The accounting server may receive the accounting data; the accounting data may be written to an accounting data table and a clearing data table, respectively. Writing the accounting data into the accounting data table and the clearing data table is understood herein to mean writing the element values in the accounting data into the accounting data table and the clearing data table.
Specifically, the number of the accounting data table and the clearing data table may be one. The accounting server may thus write the accounting data to the accounting data table and the clearing data table, respectively. Alternatively, the number of the accounting data table and the clearing data table may be plural. The accounting server may thus select a target accounting data table and a target clearing data table from them; the accounting data may be written into the selected target accounting data table and target clearing data table, respectively. The process of selecting the target accounting data table by the accounting server is described below, and the process of selecting the target clearing data table by the accounting server can be explained in comparison. The accounting server may provide N accounting data tables. The table identifiers corresponding to the N accounting data tables are A0, A1, A2, … and A (N-1) respectively. Then, the accounting server may calculate a hash value of one or more element values (e.g., order numbers) in the accounting data; when the remainder of dividing the hash value by N is 0, selecting an accounting data table corresponding to the table identifier A0 as a target accounting data table; when the remainder of dividing the hash value by N is 1, selecting an accounting data table corresponding to the table identifier A1 as a target accounting data table; and so on, when the remainder of dividing the hash value by N is N-1, the accounting data table corresponding to the table identifier A (N-1) can be selected as the target accounting data table. Of course, it should be understood by those skilled in the art that the above process of selecting the target accounting data table is merely an example, and that the accounting server may select the target accounting data table in other manners.
In this scenario example, the institution server may also send a clearing file to the accounting server after the contracted clearing time has arrived. The accounting server may receive a clearing file; the clearing file can be parsed to obtain clearing data; the clearing data may be written to the clearing data table. If the writing result shows that the clearing data meets the uniqueness constraint, the accounting server can determine that the account checking state of the clearing data is an abnormal state; the accounting state of the accounting data may be marked as an abnormal state in the accounting data table, or the accounting data may be written into a first data table, where the first data table is used to store accounting data whose accounting state is an abnormal state. If the writing result shows that the clearing data does not meet the unique constraint, the accounting server can determine that the accounting state of the clearing data is a normal state; the accounting data corresponding to the clearing data may be obtained from the clearing data table as target accounting data, and the accounting state of the target accounting data may be marked as a normal state, or the clearing data table may be written into a second data table, where the second data table is used to store clearing data whose accounting state is a normal state.
In this scenario example, the accounting server obtains the clearing data typically later than the accounting data, since the clearing time contracted between the clearing house and the third party payment house is typically later than the settlement time between the third party payment house and the user. By utilizing the characteristics, the scene example can realize the check between the accounting data and the clearing data when the clearing data falls to the ground, and avoid influencing the performance of the database.
Whereas the clearing time agreed between the clearing house and the third party payment house is typically later than the settling time between the third party payment house and the user, the accounting server typically obtains the clearing data later than the accounting data. Based on this feature, the present embodiment may provide a reconciliation method. The account checking method takes an accounting server as an execution main body. Please refer to fig. 1, 2 and 3. The reconciliation method may include the following steps.
Step S10: accounting data from the payment mechanism is written to the clearing data table.
In this embodiment, the clearing data table may correspond to a clearing house for storing clearing data of the clearing house. The clearing data table may include at least one field for which a unique constraint is set. The uniqueness constraint can ensure that the data in the field is unique in the clearing data table. In the actual process, which fields need to be set with the unique constraint can be determined according to the checking requirement of the clearing data and the accounting data. For example, only whether the order numbers agree is paid attention to in the collation process. Then, a uniqueness constraint may be set on the order number field in the clearing data table. For another example, in the verification process, attention is paid to whether the order number, the transaction amount, and the like match. Then, a unique constraint may be set in the clearing data table for the order number field, the transaction amount field, etc.
In this embodiment, the service server may send accounting data corresponding to each service to the accounting server. The accounting server may receive the accounting data; the accounting data may be written to a clearing data table. The accounting server writes the accounting data into the clearing data table, which may be understood as writing some or all of the element values in the accounting data into the clearing data table. In particular, the accounting data may include an element value corresponding to the unique constraint field being set. The accounting server may write the element value corresponding to the set unique constraint field to a clearing data table.
In this embodiment, the number of the clearing data tables may be one. The accounting server may thus write the accounting data to the clearing data table. Alternatively, the number of the clearing data tables may be plural. The accounting server may select a target clearing data table from the plurality of clearing data tables based on the accounting data; the accounting data may be written to a selected target clearing data table. The process of selecting the target clearing data table by the accounting server may refer to the foregoing scenario example, and will not be described herein.
Step S12: clearing data is received from a clearing house.
In this embodiment, the institution server of the clearing institution may send a clearing file to the accounting server. The accounting server may receive a clearing file; and analyzing the clearing file to obtain at least one clearing data. In particular, the institution server may send the clearing file directly to the accounting server, or may also send the clearing file indirectly to the accounting server via other servers. The clearing file may be a funds detail interaction file agreed between the third party payment mechanism and the clearing mechanism, and may specifically include clearing data corresponding to at least one service.
Step S14: writing the clearing data to the clearing data table.
In this embodiment, the accounting server may write each clearing data into a clearing data table. The accounting server writes the clearing data into the clearing data table, which may be understood as writing some or all of the element values in the clearing data into the clearing data table. In particular, the clearing data may include an element value corresponding to the unique constraint field being set. The accounting server may write the element value corresponding to the set unique constraint field to a clearing data table.
In this embodiment, the number of the clearing data tables may be one. The accounting server may thus write each clearing data to the clearing data table. Alternatively, the number of the clearing data tables may be plural. So that for each clearing data, the accounting server may select a target clearing data table from the plurality of clearing data tables based on the clearing data; the clearing data may be written to a selected target clearing data table. The process of selecting the target clearing data table by the accounting server may refer to the foregoing scenario example, and will not be described herein.
Step S16: and determining the reconciliation state of the clearing data according to the writing result of the clearing data.
In this embodiment, the clearing data table may be written with accounting data in advance, via step S10. The accounting data in the clearing data table corresponds to the accounting data in the accounting data table. The clearing data table may include at least one field for which a unique constraint is set. The clearing data may include an element value corresponding to the unique constraint field being set. So, for each clearing data, if the writing is successful, the clearing data is indicated to meet the unique constraint, namely, no accounting data corresponding to the clearing data exists, and the accounting server can determine that the accounting state of the clearing data is an abnormal state; if the writing fails, the accounting server can determine that the accounting state of the clearing data is normal, wherein the accounting state of the clearing data does not meet the unique constraint, namely the accounting server can determine that the accounting state of the clearing data is normal.
In one implementation of the present embodiment, after determining that the reconciliation status of the clearing data is an abnormal status, the accounting server may flag the reconciliation status of the clearing data as an abnormal status in the clearing data table; alternatively, the clearing data may also be written to the first data table. The first data table is used for storing clearing data with the reconciliation status being abnormal. After determining that the accounting state of the clearing data is a normal state, the accounting server may acquire accounting data corresponding to the clearing data from the clearing data table as target accounting data, and may mark the accounting state of the target accounting data as a normal state; alternatively, the clearing data table may also be written to a second data table. The second data table is used for storing clearing data with the checking state being a normal state. In one example scenario, both the clearing data and the accounting data may include element values (e.g., order numbers) that can uniquely identify a business. Then, the accounting server may acquire, from the clearing data table, accounting data having the same element value as the clearing data as target accounting data corresponding to the clearing data.
In this embodiment, the accounting server may write accounting data from the payment mechanism into a clearing data table; clearing data from a clearing institution may be received; the clearing data may be written to the clearing data table; the reconciliation status of the clearing data may be determined based on the written result of the clearing data. In this embodiment, the accounting server may write accounting data in the clearing data table in advance. When the clearing data arrives, the accounting server can check the clearing data piece by combining the unique constraint of the clearing data table, so that the influence of the accounting process on the performance of the database is avoided.
Please refer to fig. 4. The embodiment of the specification also provides a reconciliation device. The reconciliation device may include the following elements.
A first writing unit 20 for writing accounting data from the payment mechanism into a clearing data table; the clearing data table corresponds to a clearing house and comprises at least one field in which a unique constraint is set;
a receiving unit 22 for receiving clearing data from a clearing house;
a second writing unit 24 for writing the clearing data into the clearing data table;
a determining unit 26, configured to determine a reconciliation status of the clearing data according to a writing result of the clearing data.
Please refer to fig. 5. The embodiment of the specification also provides a server. The server may include a memory and a processor.
In this embodiment, the memory may be implemented in any suitable manner. For example, the memory may be a read-only memory, a mechanical hard disk, a solid state hard disk, or a usb disk. The memory may be used to store computer instructions.
In this embodiment, the processor may be implemented in any suitable manner. For example, the processor may take the form of, for example, a microprocessor or processor, and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a programmable logic controller, and an embedded microcontroller, among others. The processor may execute the computer instructions to implement the steps of: writing accounting data from the payment mechanism into a clearing data table; the clearing data table corresponds to a clearing house and comprises at least one field in which a unique constraint is set; receiving clearing data from a clearing house; writing the clearing data to the clearing data table; and determining the reconciliation state of the clearing data according to the writing result of the clearing data.
It should be noted that, in the present specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment is mainly described in a different point from other embodiments. In particular, for the server embodiment and the device embodiment, since they are substantially similar to the method embodiment, the description is relatively simple, and reference is made to the partial description of the method embodiment for relevant points.
In addition, it will be appreciated that those skilled in the art, upon reading the present specification, may readily devise some or all of the embodiments that, although still within the scope of the disclosure and protection herein, may be combined without undue effort.
In the 90 s of the 20 th century, improvements to one technology could clearly be distinguished as improvements in hardware (e.g., improvements to circuit structures such as diodes, transistors, switches, etc.) or software (improvements to the process flow). However, with the development of technology, many improvements of the current method flows can be regarded as direct improvements of hardware circuit structures. Designers almost always obtain corresponding hardware circuit structures by programming improved method flows into hardware circuits. Therefore, an improvement of a method flow cannot be said to be realized by a hardware entity module. For example, a programmable logic device (Programmable Logic Device, PLD) (e.g., field programmable gate array (Field Programmable Gate Array, FPGA)) is an integrated circuit whose logic function is determined by the programming of the device by a user. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips 2. Moreover, nowadays, instead of manually manufacturing integrated circuit chips, such programming is mostly implemented with "logic compiler" software, which is similar to the software compiler used in program development and writing, and the original code before the compiling is also written in a specific programming language, which is called hardware description language (Hardware Description Language, HDL), but HDL is not only one, but a plurality of kinds, 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 Integrated Circuit Hardware Description Language) and Verilog2 are most commonly used at present. It will also be apparent to those skilled in the art that a hardware circuit implementing the logic method flow can be readily obtained by merely slightly programming the method flow into an integrated circuit using several of the hardware description languages described above.
The system, apparatus, module or unit set forth in the above embodiments may be implemented in particular by a computer chip or entity, or by a product having a certain function. One typical implementation is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
From the above description of embodiments, it will be apparent to those skilled in the art that the present description may be implemented in software plus a necessary general purpose hardware platform. Based on this understanding, the technical solution of the present specification may be embodied in essence or a part contributing to the prior art in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the embodiments or some parts of the embodiments of the present specification.
The specification is operational with numerous general purpose or special purpose computer system environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like.
The description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
Although the present specification has been described by way of example, it will be appreciated by those skilled in the art that there are many variations and modifications to the specification without departing from the spirit of the specification, and it is intended that the appended claims encompass such variations and modifications as do not depart from the spirit of the specification.