Specific embodiment
In order to better understand the above technical scheme, below by attached drawing and specific embodiment to this specification embodimentTechnical solution be described in detail, it should be understood that the specific features in this specification embodiment and embodiment are to this explanationThe detailed description of book embodiment technical solution, rather than the restriction to this specification technical solution, in the absence of conflict,Technical characteristic in this specification embodiment and embodiment can be combined with each other.
In a first aspect, this specification embodiment, which provides one kind, declares document generating method, as shown in Figure 1, being this specificationThe flow chart for the graph model appraisal procedure that embodiment provides, method includes the following steps:
Step S11: the N transaction pair that previous working day carries out cross-border exchange payment business by target payment mechanism is obtainedAnswer it is N number of declare element table, N is positive integer;
In this specification embodiment, target payment mechanism can be Third-party payment mechanism, such as Alipay, wealth pay logical branchPay mechanism.User can carry out cross-border exchange payment industry by the payment application for the Third-party payment mechanism installed in clientBusiness.It should be understood that when user carries out an exchange payment transaction by target payment mechanism, the transaction system of target payment mechanismSystem can obtain the managing detailed catalogue of the transaction, and the managing detailed catalogue of transaction can be obtained automatically by transaction system, can also be led toThe input for crossing detection user operates to obtain.For example, when user is the registration user of target payment mechanism, when the user passes throughWhen target payment mechanism carries out foreign exchange transaction, by obtaining the basic registration information of user as the payment in foreign exchange transaction detailPeople's information, by contents such as the payee names of detection user's input as the receiver information in foreign exchange transaction detail.
In this specification embodiment, for each transaction, it can be generated and corresponding with the transaction declare element table.Declaring content included in element table can be configured according to actual needs, and declaring may include generation in element table and declareInformation required for file, for example, declaring can wrap in element table containing transaction amount, sender information, receiver information, friendshipThe easily contents such as coding.
It should be understood that target payment mechanism needs the first job day after the practical externally day of bank settlement, completeWork is reported and submitted to practical external bank settlement day.That is, it needs to carry out cross-border foreign exchange by target payment mechanism to previous working dayThe N transaction of payment transaction is reported and submitted, therefore, it is necessary to obtain it is corresponding with N transaction it is N number of declare element table, N is positive wholeNumber.
Step S12: declaring type according to target, determines to declare class with the target in element table in N number of declareType is corresponding to declare information, and described declare includes amount declared in information;
In this specification embodiment, target declare type may include concentrate declare, restore declare, forward direction business declare,Reverse business is declared.Different declares type, declares and declares information required for file and be also likely to be present difference, all kinds of to declare letterIt include amount declared in breath.Declaring information can directly or indirectly obtain in declaring element table, such as declare in information and wrapContaining receiver information, then receiver information can be directly extracted in declaring element table, declaring includes to summarize gold in informationVolume then can be added up to obtain and summarize the amount of money in multiple transaction amount for declaring determining more transactions in element table.
Step S13: declaring information according to described, and declares the corresponding default file format of type with the target, rawFile is declared at target.
In this specification embodiment, file is declared for every kind, can be corresponding with a default file format, presets textPart format may include declaring the line number for including, columns, declaring information position etc. in file.Default file format can be in advanceThe file template set, the information correspondence of declaring that will acquire are filled into template, can be obtained target and declare file.
Optionally, the method also includes: according to transaction details of every transaction in the N transaction and presetElement sheet format is declared, generation is corresponding with every transaction to declare element table, and total generation is N number of to declare element table.
It is default to declare element sheet format and be configured according to actual needs in this specification embodiment, in a realityIt applies in example, default element table of declaring is as shown in table 1, when often being carried on a deal by target transaction mechanism, wants according to declaringThe structure of plain table determines required content in transaction details, and determining fills will be declared to declaring in element tableThe content polishing of element table.In this specification embodiment, every transaction corresponds to one and declares element table.Certainly, element is declaredThe structure of table can also be other forms, here without limitation.
Table 1
| Column name | Type | Length | Precision | Scale | It whether is empty | Default value | Description |
| is_refund | varchar(1) | 1 | | | N | | Whether reimbursement |
| trade_code | varchar(256) | 256 | | | Y | | Transaction coding |
| remitter_account | varchar(256) | 256 | | | Y | | Remitter's account |
| remittee_name | varchar(256) | 256 | | | Y | | Payee's name |
| ... | ... | ... | ... | ... | ... | | ... |
Optionally, described that type is declared according to target when the target is declared type and declared to concentrate, described N number ofIt declares and determines to declare that type is corresponding to declare information in element table with the target, comprising: determine and described N number of declare element tableEach of declare transaction amount in element table;The transaction amount each declared in element table is subjected to netting remittanceAlways, netting result is obtained as concentration amount declared.
It should be understood that it is summarize declaring by the previous workaday All Activity amount of money that concentration, which is declared, therefore, according toN number of element table of declaring determines every transaction amount of money in N transaction.In one embodiment, determine that transaction amount can declaredIt inquires transaction amount field in element table to obtain, in addition, friendship can be inquired in declaring element table according to the difference of trade propertyEasy property field determines that the transaction is payment transaction or reimbursement transaction.It, can be by inquiring is_ by taking above-mentioned table 1 as an exampleRefund field come determine payment transaction or reimbursement transaction, if is_refund field be Y, be shown to be reimbursement transaction,If is_refund field is N, it is shown to be payment transaction.The N number of transaction amount inquired is rolled according to trade propertyDifference summarizes, and obtains one and summarizes the amount of money, as concentration amount declared.
In one embodiment, previous working day has occurred 3 transactions, i.e. N is 3, and corresponding 3 according to this 3 transactionElement table is declared, determines that this 3 transaction is respectively to pay 100 yuan, payment 50 yuan, 15 yuan of reimbursement, the then total gold obtained after nettingVolume is 135 yuan, by 135 yuan as concentration amount declared.
In addition, declaring information can also include other information, such as trade coding, currency type, business of collecting in addition to amount declaredObject type etc., these are declared information and can be determined according to the corresponding default file format of file is declared, that is, declare textWhich information part needs, and is just searched in declaring element table according to the corresponding field of these information.
Optionally, described that type is declared according to target when the target is declared type and declared for reduction, described N number ofIt declares and determines to declare that type is corresponding to declare information in element table with the target, comprising: determine and described N number of declare element tableEach of declare transaction amount in element table;According to each transaction coding declared in element table, the transaction is encoded into phaseThe transaction amount that the same and described transaction amount is less than first threshold carries out netting and summarizes, and obtains more than one netting as a result, makingAmount declared is restored for the first kind declared that restores;The transaction amount is greater than or equal to one of the first thresholdAbove transaction amount restores amount declared as second class declared that restores.
It should be understood that reduction is declared and declares with concentration corresponding, reduction is declared and can be understood as that amount declared will be concentratedCorresponding detail transaction restores.Since the characteristics of carrying out cross-border exchange payment business by target payment mechanism, is high for small amountFrequently, if all reporting and submitting each transaction detail to regulatory agency, the system of regulatory agency can face huge performance challenges, becauseThis, the transaction that the amount of money is less than threshold value can be summarized and be merged into one and report and submit.
In this specification embodiment, N can be inquired and declare the transaction amount field each declared in element table in element table,Determine the transaction amount of every transaction.It is less than the penny ante of first threshold for transaction amount, further determines that these small amountsThe transaction of transaction encodes, and transaction coding can also declare the transaction code field in element table by inquiry to determine.It can lead toIt crosses transaction coding to classify to these penny antes, i.e., transaction is encoded into identical transaction as a kind of transaction, for eachClass transaction, is payment or reimbursement further according to trade property, summarizes to transaction amount information.In this way, every a kind of transaction summarizesSummarize the amount of money to one, these summarize the amount of money as the first kind and restore amount declared, and the first kind restores amount declared and needs with meshThe name of structure is marked to be declared.It should be understood that transaction coding can be used to distinguish payment purposes, such as transaction coding122030 represent the trade of goods, and transaction coding 223022 represents individual and studies abroad expenditure etc..First threshold can be according to actual needsIt is set, here without limitation.
In one embodiment, previous working day target payment mechanism has carried out 4 transactions, N 4, according to 4 transactions4 are declared element table, determine that the transaction amount of 4 transactions is respectively 5001USD, 5002USD, 50USD, 45USD.If theOne threshold value is 5000USD, that one amount of money for being less than first threshold is 50USD, 45USD, further determines that 50USD is corresponding and declaresThe corresponding transaction coding declared in element table of transaction coding and 45USD in element table, if transaction coding is A,This two transaction is then aggregated into one, if the trade property of this two transaction is expenditure transaction, summarized results is95USD, the transaction after summarizing is encoded to A, and is declared with the name of target mechanism.
In addition, the transaction amount that transaction amount is greater than or equal to first threshold is restored into amount declared as the second class, theTwo classes reduction amount declared needs to be declared with one's own name.
Optionally, described to declare information according to, and the corresponding default file format of type is declared with the target,Generate target declare file, comprising: according to the first kind restore amount declared and with the target payment mechanism name intoThe first default file format that row reduction is declared generates first kind reduction and declares information;Gold is declared according to second class reductionVolume and the second default file format for declaring of reduction is carried out with user's name, generates the reduction of the second class and declares information;Wherein,Information is declared in the first kind reduction and second class reduction declares information composition reduction and declares file.
In this specification embodiment, the managing detailed catalogue of each transaction can not be indicated after summarizing due to more transactions,Amount declared is restored for the first kind, needs to declare the information after summarizing with the name of target payment mechanism.With targetPayment mechanism name carries out the information that the information for including in the first default file format that reduction is declared is target payment mechanism.?In one embodiment, target payment mechanism is Alipay, then the account for including in the first default file then extends this as AlipayAccount, sender information extends this as Alipay.Amount declared is restored for the second class, then is personally declared, theThe account that two default files include is the account of user, and sender information is address name.It should be understood that the first default fileFormat can be the format for filling target payment mechanism information, and the second default file format can be the lattice of non-fill substanceFormula is filled after obtaining corresponding content by declaring element table.
Continue to use the example that transaction amount above is respectively 5001USD, 5002USD, 50USD, 45USD, the first default fileComprising requestee, the amount of money, transaction coding in format and the second default file format, reduction is declared file and is believed including two classesBreath, one kind are the summary informations that target payment mechanism is declared, and one kind is the personal managing detailed catalogue declared, and are with target payment mechanismAlipay, for the transaction coding of four transactions is A, it is as follows that file is declared in the reduction of generation:
Zhang San, 5001USD, transaction coding A;
Li Si, 5002USD, transaction coding A;
Alipay, 955002USD, transaction coding A.
Wherein, Zhang San and the corresponding information of Li Si are that personal name is declared, and the corresponding information of Alipay is that target pays machineStructure name is declared.
Optionally, described that type is declared according to target when the target is declared type and declared for positive business, describedN number of declare determines to declare that type is corresponding to declare information with the target in element table, comprising: N number of declare element describedDetermine that positive trade corresponding K declares element table in table, wherein forward direction transaction is payment transaction, and K is positive integer;It determinesA transaction amount declaring each of element table and declaring in element table of the K;According to the transaction each declared in element tableThe transaction is encoded the identical and described transaction amount and summarized less than the transaction amount progress netting of second threshold, obtained by codingMore than one netting is as a result, the first kind forward direction business amount declared declared as the positive business;By the trade goldThe second class that the more than one transaction amount that volume is greater than or equal to the second threshold is declared as the positive business is positiveBusiness amount declared.
In this specification embodiment, can be determined by declaring in element table trade property field the transaction whether beForward direction transaction.It is exemplified by Table 1, positive transaction can be identified by is_refund field, when is_refund field is N,Indicate that transaction is payment transaction, i.e., positive transaction.Positive business to declare process similar with the process declared of reduction, i.e., in forward directionThe transaction that transaction amount is less than second threshold is fished in transaction, one is aggregated into according to transaction coding, with target payment mechanismName is declared, and the transaction that transaction amount is greater than or equal to second threshold is declared with one's own name chief editor.In addition, in addition toSummarized according to transaction coding, can also be summarized according to other parameters, in one embodiment, can be compiled according to transactionCode and currency type are summarized, i.e., transaction are encoded the identical transaction amount of identical and currency type and summarized.
In one embodiment, may include the following contents in the positive default file format for declaring file: business line number,Business batch number, transaction journal number, remittance bank, payment/collection days, business object of collecting type (C: to public family;D: rightPrivate Chinese residents;F: non-resident to private China;), organization mechanism code (when personal, can be empty), personalized identity documents number (mechanismWhen, can be empty), personal document type (when mechanism, can be empty), payee's name, currency type, the amount of money, clearing form (remittance: DH;TicketIt converges: PH;Mail transfer: XH), account of collecting, paying party title, paying party country origin, paying party Country Code, transaction coding, trade it is attachedSpeech, declarer, telephone number, date of declaration.
Optionally, described that type is declared according to target when it is that reverse business is declared that the target, which declares type, describedN number of declare determines to declare that type is corresponding to declare information with the target in element table, comprising: N number of declare element describedDetermine that corresponding S of reverse a swap is declared element table in table, wherein reverse a swap is reimbursement transaction, and S is positive integer;It determinesA transaction amount declaring each of element table and declaring in element table of the S;According to the transaction each declared in element tableThe transaction is encoded the identical and described transaction amount and summarized less than the transaction amount progress netting of third threshold value, obtained by codingMore than one netting is as a result, the reverse business amount declared of the first kind declared as the reverse business;By the trade goldThe second class that the more than one transaction amount that volume is greater than or equal to the third threshold value is declared as the reverse business is reverseBusiness amount declared.
In this specification embodiment, can be determined by declaring in element table trade property field the transaction whether beReverse a swap.It is exemplified by Table 1, reverse a swap can be identified by is_refund field, when is_refund field is Y,Indicate that transaction is that reimbursement is traded, i.e. reverse a swap.Reverse business to declare process similar with the process that above-mentioned forward direction business is declared,Here it just repeats no more.
Second aspect, based on the same inventive concept, this specification embodiment provide one kind and declare file creating apparatus, please joinExamine Fig. 2, comprising:
Module 21 is obtained, the N of cross-border exchange payment business is carried out for obtaining previous working day by target payment mechanismTransaction it is corresponding it is N number of declare element table, N is positive integer;
Processing module 22 is determined and the target for declaring type according to target in N number of declare in element tableDeclare that type is corresponding to declare information, described declare includes amount declared in information;
File generating module 23 is declared, for declaring information according to, and with the target to declare type correspondingDefault file format generates target and declares file.
In a kind of optional implementation, described device further include:
Element table generation module 24 is declared, for the transaction details according to every transaction in the N transaction, and it is pre-If declare element sheet format, generate it is corresponding with every transaction declares element table, total generation is N number of to declare element table.
In a kind of optional implementation, when the target is declared type and declared to concentrate, processing module 22 is used for:
Determine that described N number of each of element table of declaring declares transaction amount in element table;
The transaction amount each declared in element table is carried out netting to summarize, obtains netting result as concentrationAmount declared.
In a kind of optional implementation, when the target is declared type and declared for reduction, processing module 22 is used for:
Determine that described N number of each of element table of declaring declares transaction amount in element table;
The transaction is encoded the identical and described transaction amount less than the by the transaction coding declared in element table according to eachThe transaction amount of one threshold value carries out netting and summarizes, and obtains more than one netting as a result, as the first kind for restoring and declaringRestore amount declared;
The transaction amount is greater than or equal to the more than one transaction amount of the first threshold as the reductionThe the second class reduction amount declared declared.
In a kind of optional implementation, when the target is declared type and declared for positive business, processing module 22 is usedIn:
Determine that positive trade corresponding K declares element table in element table in N number of declare, wherein forward direction transactionFor payment transaction, K is positive integer;
Determine a transaction amount declaring each of element table and declaring in element table of the K;
According to the transaction coding each declared in element table, it is small that the transaction is encoded into the identical and described transaction amountNetting is carried out in the transaction amount of second threshold to summarize, and obtains more than one netting as a result, declaring as the positive businessFirst kind forward direction business amount declared;
For the transaction amount to be greater than or equal to the more than one transaction amount of the second threshold as described inThe second class forward direction business amount declared that positive business is declared.
In a kind of optional implementation, when it is that reverse business is declared that the target, which declares type, processing module 22 is usedIn:
Determine that corresponding S of reverse a swap is declared element table in element table in N number of declare, wherein reverse a swapFor reimbursement transaction, S is positive integer;
Determine a transaction amount declaring each of element table and declaring in element table of the S;
According to the transaction coding each declared in element table, it is small that the transaction is encoded into the identical and described transaction amountNetting is carried out in the transaction amount of third threshold value to summarize, and obtains more than one netting as a result, declaring as the reverse businessThe reverse business amount declared of the first kind;
The transaction amount is greater than or equal to the more than one transaction amount of the third threshold value as described reverseThe reverse business amount declared of the second class that business is declared.
In a kind of optional implementation, the file generating module 23 of declaring is used for:
Amount declared is restored according to the first kind and the first default file lattice that reduction is declared are carried out with mechanism nameFormula generates first kind reduction and declares information;
Amount declared is restored according to second class and the second default file lattice that reduction is declared are carried out with user's nameFormula generates the reduction of the second class and declares information;
Wherein, information is declared in the first kind reduction and second class reduction declares information composition reduction and declares textPart.
About above-mentioned apparatus, wherein the concrete function of modules declares file life provided in an embodiment of the present inventionAt being described in detail in the embodiment of method, no detailed explanation will be given here.
The third aspect, based on inventive concept same as document generating method is declared in previous embodiment, the present invention is also mentionedFor a kind of server, as shown in figure 3, including memory 404, processor 402 and being stored on memory 404 and can be in processorThe computer program run on 402, the processor 402 is realized when executing described program described previously declares document generating methodEither method the step of.
Wherein, in Fig. 3, bus architecture (is represented) with bus 400, and bus 400 may include any number of interconnectionBus and bridge, bus 400 will include the one or more processors represented by processor 402 and what memory 404 represented depositsThe various circuits of reservoir link together.Bus 400 can also will peripheral equipment, voltage-stablizer and management circuit etc. itVarious other circuits of class link together, and these are all it is known in the art, therefore, herein no longer carry out it into oneStep description.Bus interface 406 provides interface between bus 400 and receiver 401 and transmitter 403.Receiver 401 and transmissionDevice 403 can be the same element, i.e. transceiver, provide the unit for communicating over a transmission medium with various other devices.Processor 402 is responsible for management bus 400 and common processing, and memory 404 can be used for storage processor 402 and executeUsed data when operation.
Fourth aspect, based on, based on the inventive concept for declaring document generating method, the present invention also mentions in previous embodimentFor a kind of computer readable storage medium, it is stored thereon with computer program, institute above is realized when which is executed by processorIt states based on the step of declaring either document generating method method.
This specification is referring to the method, equipment (system) and computer program product according to this specification embodimentFlowchart and/or the block diagram describes.It should be understood that can be realized by computer program instructions every in flowchart and/or the block diagramThe combination of process and/or box in one process and/or box and flowchart and/or the block diagram.It can provide these computersProcessor of the program instruction to general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devicesTo generate a machine, so that generating use by the instruction that computer or the processor of other programmable data processing devices executeIn setting for the function that realization is specified in one or more flows of the flowchart and/or one or more blocks of the block diagramIt is standby.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spyDetermine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates,Enable the manufacture of equipment, the commander equipment realize in one box of one or more flows of the flowchart and/or block diagram orThe function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that countingSeries of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer orThe instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram oneThe step of function of being specified in a box or multiple boxes.
Although preferred embodiments of the present invention have been described, once a person skilled in the art knows basic woundsThe property made concept, then additional changes and modifications may be made to these embodiments.So the following claims are intended to be interpreted as includesPreferred embodiment and all change and modification for falling into the scope of the invention.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the artMind and range.In this way, if these modifications and changes of the present invention belongs to the range of the claims in the present invention and its equivalent technologiesWithin, then the present invention is also intended to include these modifications and variations.