Summary of the invention
One or more embodiments of this specification describe a kind of two-way trade liquidation method based on billing data and
Two subsystems in trade clearing system are connected by carrying out bank settlement based on billing data, are two-way by system
Exchange settlement creates data basis, and clearly clear two-way trade clearance can be realized for complicated trading situation.
According in a first aspect, provide a kind of two-way trade liquidation method based on billing data, may include: in response to
The request that places an order of first sub- client generates order data in cargo data by the first sub-services end group;By the second son clothes
End group be engaged in order data generation billing data;Detailed data is generated in fund data by the second sub-services end group,
The fund data be it is received in response to fund transfer request by second sub-services end, the fund transfer request is
It is generated by the second sub- client end response in receiving the billing data;And when expiring the predetermined time, based on described
Cargo data, the order data, the billing data and the detailed data carry out two-way trade clearance.
In one embodiment, the two-way trade clearance may include positive exchange settlement and reverse a swap clearance: institute
Stating positive exchange settlement includes checking respectively the cargo data and the order data in order, to the order numbers
It is checked according to the billing data, and the billing data and the detailed data is checked;The reverse friendship
Easily clearance includes checking respectively the billing data and the detailed data in order, to the order data and described
Billing data is checked, and is checked the cargo data and the order data;Wherein, in the positive transaction
In clearance and reverse a swap clearance, latter verification will be carried out based on the result of previous verification.
It in one embodiment, may include Item Number and the corresponding cargo amount of money in the cargo data, by described
First sub-services end group includes by the first sub-services end in the step of cargo data generation order data: being generated based on pre-defined rule
Order number;And it is based respectively on the Item Number and the corresponding cargo amount of money, in the order data described in generation
Item Number and the order amount of money.
According to one embodiment, the step of checking the cargo data and the order data may include: pair
The Item Number in Item Number and the order data in the cargo data is checked;And to the cargo data
In the cargo amount of money and the order data in the order amount of money checked.
In one embodiment, include the step of the order data generates billing data by the second sub-services end group
It can be by the second sub-services end: the order number is generated in the billing data based on the order number;And based on described
The order amount of money generates total amount in the billing data, wherein the total amount is for determining the fund number to be transferred
According to.
According to a kind of embodiment, the step of checking the order data and the billing data may include:
Order number in order number and the billing data in the order data is checked;And to the order amount of money and
The total amount is checked.
According to one embodiment, the fund data are one or more fund data, and the detailed data includes difference
Corresponding to one or more detail subdatas of one or more of fund data, to the billing data and the detail number
It may include: to check the sum of one or more of detail subdatas with the total amount according to the step of being checked.
According to second aspect, a kind of two-way trade system for settling account based on billing data is provided, the system can wrap
Including the first subsystem and the second subsystem, first subsystem includes the first sub- client and the first sub-services end, and described the
Two subsystems include the second sub- client and the second sub-services end, first sub-services end include order data generation module,
First verification module and the second verification module, second sub-services end include billing data generation module, detailed data generation
Module and third check module, in which: the order data generation module is configured to respond to placing an order for the first sub- client
Request generates order data based on cargo data;The billing data generation module is configured as raw based on the order data
At billing data;The detailed data generation module is configured as generating detailed data, the fund data based on fund data
Be it is received in response to fund transfer request by second sub-services end, the fund transfer request is by the second sub- client
End is generated in response to receiving the billing data;And the first verification module, the second verification module and institute
It states third verification module to be configured as when expiring the predetermined time, is based on the cargo data, the order data, the bill
Data and the detailed data carry out two-way trade clearance.
According to the third aspect, a kind of two-way trade system for settling account based on billing data is provided, the system can wrap
The first subsystem, the second subsystem and checking device are included, first subsystem includes the first sub- client and the first sub-services
End, second subsystem include the second sub- client and the second sub-services end, and first sub-services end includes order data
Generation module, second sub-services end include billing data generation module, detailed data generation module, in which: the order
Data generation module is configured to respond to the request that places an order of the first sub- client, generates order data based on cargo data;Institute
Billing data generation module is stated to be configured as generating billing data based on the order data;The detailed data generation module quilt
It is configured to fund data and generates detailed data, the fund data are to be shifted by second sub-services end in response to fund
Request and it is received, the fund transfer request is to be generated by the second sub- client end response in receiving the billing data
's;And the checking device is configured as when expiring the predetermined time, is based on the cargo data, the order data, institute
It states billing data and the detailed data carries out two-way trade clearance
According to fourth aspect, a kind of computer readable storage medium is provided, computer program is stored thereon with, when described
When computer program executes in a computer, enable computer execute first aspect method.
According to the 5th aspect, a kind of calculating equipment, including memory and processor are provided, which is characterized in that described to deposit
It is stored with executable code in reservoir, when the processor executes the executable code, the method for realizing first aspect.
The present invention is contacted the two subsystems in trade clearing system by carrying out bank settlement based on billing data
Come, creates data basis for two-way trade clearance, clearly clear two-way trade can be realized for complicated trading situation
Clearance.
Specific embodiment
With reference to the accompanying drawing, the scheme provided this specification is described.
Here, thinking is changed into " money money two is clear " by the present invention from " collect on delivery ".In fact, public for businessman and the supply of material
For department, most concerned problem be respectively deal with how much and it is receivable how much, wherein cargo is only considered as series connection both sides relation
Medium.It is possible to which the process of exchange settlement is divided into two steps, the first step is by order for goods according to the factors Mass production such as account phase
Bill, order bearing goods attribute, and bill carries fund attribute, the content for needing to pay off for businessman is in bill
The amount of money, the core collected money for supply of material company are also to collect money according to bill;Second step is collected money when collecting money according to bill, each
Fund generates gathering detail, and the content for needing to check is gathering detail, even the situations such as payment in part and monthly payment plan, only
The cumulative last fund in bill of the amount of money of the gathering detail to be received matches, within an account phase according to bill into
Row gathering, in this way decouples fund and cargo, as long as finally ensuring that bill both sides settle, while can be according to bill
Associated order is traced to the source good commodity, although the difference among this by the way of batch payment with its core is for we
It is that the direct relation between money goods is decoupled by this centre association of bill, complicated " money goods is checked and write off " is changed into " money money
Check and write off ", the both sides' clearance allowed between deficient goods is changed into be completed a business transaction according to the pure fund of bill.
Fig. 1 is the flow chart according to the two-way trade liquidation method based on billing data of this specification embodiment.
In step 101, in response to the request that places an order of the first sub- client, generated by the first sub-services end group in cargo data
Order data.
It include Item Number and the corresponding cargo amount of money in the cargo data, by the first sub-services end group in transaction
The step of request generation order data includes: to generate order number based on pre-defined rule;And be based respectively on the Item Number and
The corresponding cargo amount of money, generates the Item Number and the order amount of money in the order data.
In step 102, billing data is generated in the order data by the second sub-services end group.
It specifically, include: based on described the step of the order data generates billing data by the second sub-services end group
Order number generates the order number in the billing data;And it is generated in the billing data based on the order amount of money
Total amount, wherein the total amount is for determining the fund data to be transferred.
In step 103, generate detailed data in fund data by the second sub-services end group, the fund data be by
Second sub-services end is received in response to fund transfer request, and the fund transfer request is rung by the second sub- client
Ying Yu receives the billing data and generates.
In step 104, when expiring the predetermined time, it is based on the cargo data, the order data, the billing data
Two-way trade clearance is carried out with the detailed data.
The two-way trade clearance includes positive exchange settlement and reverse a swap clearance:
The forward direction exchange settlement may include carrying out core to the cargo data and the order data respectively in order
It is right, the order data and the billing data are checked, and the billing data and the detailed data are carried out
Verification;The reverse a swap clearance may include checking respectively the billing data and the detailed data in order,
The order data and the billing data are checked, and core is carried out to the cargo data and the order data
It is right;Wherein, in the positive exchange settlement and reverse a swap clearance, latter verification will the result based on previous verification come
It carries out.
The step of checking the cargo data and the order data may include: in the cargo data
Item Number in Item Number and the order data is checked;And in the cargo data the cargo amount of money and institute
The order amount of money stated in order data is checked.
The step of checking the order data and the billing data may include: in the order data
Order number in order number and the billing data is checked;And core is carried out to the order amount of money and the total amount
It is right.
It should be pointed out that the fund data can include right respectively for one or more fund data, the detailed data
It should be in one or more detail subdatas of one or more of fund data, to the billing data and the detailed data
The step of being checked includes: to check the sum of one or more of detail subdatas with the total amount.
Fig. 2 is the two-way trade system for settling account block diagram based on billing data according to this specification one embodiment.
The two-way trade system for settling account based on billing data in Fig. 2 may include the first subsystem and the second subsystem,
First subsystem include the first sub- client and the first sub-services end, second subsystem include the second sub- client and
Second sub-services end, first sub-services end include order data generation module, first verification module and second verification module,
Second sub-services end includes billing data generation module, detailed data generation module and third verification module, in which: described
Order data generation module is configured to respond to the request that places an order of the first sub- client, by the first sub-services end group in cargo number
According to generation order data;The billing data generation module is configured as generating billing data based on the order data;It is described
Detailed data generation module is configured as generating detailed data based on fund data, and the fund data are by the second son clothes
Being engaged in, end is received in response to fund transfer request, and the fund transfer request is by the second sub- client end response in receiving
It states billing data and generates;And the first verification module, the second verification module and the third check module quilt
It is configured to when expiring the predetermined time, is based on the cargo data, the order data, the billing data and the detail number
According to progress two-way trade clearance.
In the following, each subsystem and its concrete function of functional module in detailed description system.
It include Item Number and the corresponding cargo amount of money in the cargo data, the order data generation module can be by
It is configured that and order number is generated based on pre-defined rule;And it is based respectively on the Item Number and the corresponding cargo amount of money,
The Item Number and the order amount of money are generated in the order data.Specifically, the first verification module can be configured as:
Item Number in Item Number and the order data in the cargo data is checked;And to the cargo number
The order amount of money in the cargo amount of money and the order data in is checked.
The billing data generation module can be configured as: institute is generated in the billing data based on the order number
State order number;And total amount is generated in the billing data based on the order amount of money, wherein the total amount is for true
The fixed fund data to be transferred.Specifically, the second verification module can be configured as: in the order data
Order number in order number and the billing data is checked;And core is carried out to the order amount of money and the total amount
It is right.
It should be pointed out that the fund data can be one or more fund data, the detailed data may include point
Not Dui Yingyu one or more of fund data one or more detail subdatas, third verification module can be matched
It is set to: the sum of one or more of detail subdatas is checked with the total amount.
Fig. 3 is the two-way trade system for settling account block diagram based on billing data according to another embodiment of this specification.
As shown in Figure 3, the two-way trade system for settling account based on billing data may include the first subsystem, the second subsystem
System and checking device, first subsystem include the first sub- client and the first sub-services end, and second subsystem includes
Second sub- client and the second sub-services end, first sub-services end include order data generation module, the second son clothes
Business end includes billing data generation module, detailed data generation module, in which: the order data generation module is configured as base
Order data is generated in the transaction request, the transaction request is by the first sub- client based on the goods in the first sub-services end
What object data generated;The billing data generation module is configured as generating billing data based on the order data;It is stated clearly
Thin data generation module is configured as generating detailed data based on fund data, and the fund data are by second sub-services
End is received in response to fund transfer request, and the fund transfer request is described in receiving by the second sub- client end response
Billing data and generate;And the checking device is configured as when expiring the predetermined time, is based on the cargo data, institute
It states order data, the billing data and the detailed data and carries out two-way trade clearance.
In the following, each subsystem and its concrete function of functional module in detailed description system.It should be pointed out that Fig. 3 is different from
It is in place of Fig. 2, checking device exists independently of the first subsystem and the second subsystem, and can pass through various wired or nothing
Gauze network and the first subsystem and the second subsystem communication and interaction.
It include Item Number and the corresponding cargo amount of money in the cargo data, the order data generation module can be by
It is configured that and order number is generated based on pre-defined rule;And it is based respectively on the Item Number and the corresponding cargo amount of money,
The Item Number and the order amount of money are generated in the order data.Specifically, the checking device can be configured as: to institute
The Item Number stated in the Item Number in cargo data and the order data is checked;And in the cargo data
The cargo amount of money and the order data in the order amount of money checked.
The billing data generation module can be configured as: institute is generated in the billing data based on the order number
State order number;And total amount is generated in the billing data based on the order amount of money, wherein the total amount is for true
The fixed fund data to be transferred.Specifically, the checking device can be additionally configured to: to ordering in the order data
Order number in odd numbers and the billing data is checked;And the order amount of money and the total amount are checked.
It should be pointed out that the fund data can be one or more fund data, the detailed data may include point
Not Dui Yingyu one or more of fund data one or more detail subdatas, the checking device can also be configured
Are as follows: the sum of one or more of detail subdatas are checked with the total amount.
Fig. 4 is the system flow chart according to the two-way trade liquidation method based on billing data of this specification embodiment.
As shown in Figure 4, the process of whole system is related to apparel CRM (lower to be known as crm system) and silver
Row deposits pipe fund management system (lower to be known as money guard system).It will be appreciated by those skilled in the art that crm system is to be mentioned above
The first subsystem preferred embodiment, and provide the preferred embodiment that guard system is the second subsystem being mentioned above.Further, it provides
The client and server-side of guard system can be described as the first client and first service end, and the client of crm system and server-side
It can be described as the second client and first service end.In addition, however not excluded that other have or phase similar with crm system and money guard system
The system of same function exists.In the following, describing the process of two-way trade clearance shown in Fig. 4 in detail.
By the way that the cargo data in crm system is browsed and selected, client can be satisfied with it by CRM client
Cargo carry out lower single operation, the server-side of crm system generates order data after the data of single operation in the case where receiving client.Tool
Body, it can be generated in order data based on the Item Number and cargo amount of money (not shown) that include in cargo data
The order amount of money and Item Number, while an order number can be generated in order data according to the rule preestablished.
In one embodiment, while generating order data, crm system can issue transaction triggering to money guard system
Signal informs that transaction has begun.Transaction trigger signal is received in money guard system and is fed back to crm system, that is, is carried out
After acknowledgement of orders, order data is sent to money guard system by crm system.It provides guard system and bill is generated according to the order data
Data, for example, billing data may include Invoice Number, order number, gathering number, total amount.For example, order data can be based on
In order number identical order number is generated in the billing data;And it can be existed based on the order amount of money in order data
Total amount is generated in the billing data, wherein the total amount is for determining the fund data to be transferred.It should refer to
Out, client can carry out placing an order in batches, i.e., once generate multiple order datas.Further, can by multiple order datas Lai
Billing data is generated, in this case, the order number in bill can be ordering for multiple order numbers in multiple order datas
Single-row table, and the total amount in bill can be the sum of multiple order amount of money in multiple order datas.In any case, bill number
Total amount in may be used to determine the numerical value of fund data to be transferred.In addition, money guard system for example can be in chronological order
A sequence number is generated as Invoice Number using certain queueing discipline.
Further, money guard system can generate dynamic gathering number according to the account of the seller so that buyer carries out fund
The transfer of data.The information of trade company associated with the order data can be received from crm system by providing guard system, be then based on
The information of the trade company is searched to obtain the account information, wherein is stored with merchant information and account in the money guard system
The one-to-one correspondence list of family information.The account information is about the account for being used to receive fund data in the money guard system
Information, and the order data is to be carried out lower single operation in response to its client by the crm system and generated.Here,
The account information, which can be, shown in figure deposits pipe account.Then, money guard system generates bill based on the account information
Gathering coding in data, the gathering number is different from the account information and has uniqueness, and the gathering is numbered
For determining the target account of the fund data to be transferred.For example, money guard system can such as breathe out account information
Uncommon etc algorithm generates a unique digital number.
Next, billing data is returned to client by money guard system.Specifically, after generating billing data, piping is provided
All information for including in billing data or billing data is sent to client by system.For example, providing guard system for billing data
It is sent to crm system, its client notification to the client to place an order is passed through by crm system.
Client, can be for the transfer (payment) of fund data after receiving billing data.Specifically, in response to
Client receives the billing data by the client of CRM, which can be generated by providing the client of guard system wait turn
The transfer request of the fund data of shifting, and money guard system is sent by the transfer request.
Note that started according to transaction/Xia Dan when the both parties agreements arranged, paying party can exist with various ways
Predetermined time/account is paid the bill in the phase.When receiving fund data, money guard system can generate detailed data.For example,
In the case where monthly payment plan, paying party can receive successively more funds using different time points of the money guard system within the account phase.
Every reception money item data, money guard system will correspondingly generate a corresponding detail subdata in detailed data.Though
Four loans (loan 1, loan 2, loan 3, loan 4) and corresponding four detail subdatas (detail are merely illustrated in right figure
Data 1, detail subdata 2, detail subdata 3, detail subdata 4) it should be appreciated that can have more than four or less than
Four corresponding loans and detail subdatas.
Finally, both sides can be carried out positive and reverse transaction when both parties expire agreement account phase/predetermined time
Clearance.Both parties positive can be checked two-by-two from cargo data, order data to billing data to detailed data,
It can inversely be checked two-by-two from detailed data to billing data, to order data, again to cargo data, realize two-way friendship
Easily clearance.
To sum up, collecting money when gathering according to billing data, each fund generates detail subdata, and even part is paid
The situations such as money and monthly payment plan, it is only necessary to check total gold on the cumulative last and billing data of the amount of money representated by detail subdata
Volume matches.In this way, the direct relation between money goods is decoupled by this centre association of bill, by complicated " money goods
Check and write off " it is changed into " money money is checked and write off ", the both sides' clearance allowed between deficient goods is changed into be completed a business transaction according to the pure fund of bill.
That is, entire exchange settlement is divided between the big system in three parts two and is checked: be first cargo and
Verification between order, the verification can carry out in businessman's crm system;The followed by verification of order and bill, this is quotient
Interactive key point is checked between family's crm system and fund management system, it is two-way by that can be carried out between order and bill
Comparison is traced to the source and checks and writes off, which can carry out in crm system;There are also between bill and fund and checking, buyer is to bill
Payment rather than order or cargo, completely disengage cargo attribute, simple carry out fund is completed a business transaction.
Embodiment according to another aspect also provides a kind of computer readable storage medium, is stored thereon with computer journey
Sequence enables computer execute method described in conjunction with Figure 1 when the computer program executes in a computer.
According to the embodiment of another further aspect, a kind of calculating equipment, including memory and processor, the memory are also provided
In be stored with executable code, when the processor executes the executable code, realize the method in conjunction with described in Fig. 1.
Those skilled in the art are it will be appreciated that in said one or multiple examples, function described in the invention
It can be realized with hardware, software, firmware or their any combination.It when implemented in software, can be by these functions
Storage in computer-readable medium or as on computer-readable medium one or more instructions or code transmitted.
Above-described specific embodiment has carried out further the purpose of the present invention, technical scheme and beneficial effects
It is described in detail, it should be understood that being not intended to limit the present invention the foregoing is merely a specific embodiment of the invention
Protection scope, all any modification, equivalent substitution, improvement and etc. on the basis of technical solution of the present invention, done should all
Including within protection scope of the present invention.