Summary of the invention
In order to solve the above technical problems, the present invention provides a kind of payment limit system, method, apparatus and storage medium,It solves the problems, such as current means of payment extension difference and control ability is low.
According to a first aspect of the embodiments of the present invention, a kind of payment limit system is provided, the system comprises:
Data module, library and configuration file, the database are described for recording customer transaction information for storing dataConfiguration file is for recording limit process flow;
Configuration module, includes Command Line Parsing device and configuration manager, and the Command Line Parsing device is described for reading and parsingThe data information of configuration file simultaneously generates parsing result, and the configuration manager is for being managed the parsing result;WithAnd
Processing module is connected the intercept process chain to be formed comprising multiple limit blockers, and each limit blocker is logicalIt crosses the configuration module and inquires the configuration file, to configure the limit information of each limit blocker, the customer transaction letterBreath passes sequentially through each limit blocker on the intercept process chain, and according to the limit information of each limit blockerCarry out trading limit processing.
According to a second aspect of the embodiments of the present invention, a kind of payment limit method is provided, which comprises
Data module storing data library and configuration file, the database is for recording customer transaction information, the configurationFile is for recording limit process flow;
Configuration module includes Command Line Parsing device and configuration manager, and the Command Line Parsing device is for reading and parsing described matchIt sets the data information of file and generates parsing result, the configuration manager is for being managed the parsing result;And
Processing module includes that multiple limit blockers are connected the intercept process chain to be formed, and each limit blocker passes throughThe configuration module inquires the configuration file, to configure the limit information of each limit blocker, the customer transaction informationPass sequentially through each limit blocker on the intercept process chain, and according to the limit information of each limit blocker intoThe processing of row trading limit.
According to a third aspect of the embodiments of the present invention, a kind of computer readable storage medium, the computer storage are providedMedium includes computer program, wherein the computer program makes described one when being executed by one or more computersA or multiple computers perform the following operations:
The operation include the steps that it is any one of as above described in payment limit method included.
According to a fourth aspect of the embodiments of the present invention, a kind of payment limit device is provided, described device includes:
Memory is stored with computer-readable instruction;
Processor executes the computer-readable instruction to execute the step that payment limit method as described above is includedSuddenly.
Implement a kind of payment limit system, method, apparatus and storage medium provided in an embodiment of the present invention, has following excellentPoint: by one kind in payment limit mode, greatly promotion data-handling efficiency, scalability and accuracy are improved.
Specific embodiment
To keep the purposes, technical schemes and advantages of the embodiment of the present invention clearer, below in conjunction with attached drawing to this hairIt is bright to be described in further detail.
Fig. 1 is a kind of structural schematic diagram of payment limit system 1 of the embodiment of the present invention, and referring to Fig. 1, the system 1 is wrappedIt includes:
Data module 100, library and configuration file, the database are used to record customer transaction information for storing data,The configuration file is for recording limit process flow.
Configuration module 200 includes Command Line Parsing device and configuration manager, and the Command Line Parsing device is for reading and parsing instituteIt states the data information of configuration file and generates parsing result, the configuration manager is used to be managed the parsing result,So that process layer quickly searches corresponding limit configuration.
Processing module 300 is connected the intercept process chain to be formed comprising multiple limit blockers, each limit blockerThe configuration file is inquired by the configuration module, to configure the limit information of each limit blocker, the customer transactionInformation passes sequentially through each limit blocker on the intercept process chain, and is believed according to the limit of each limit blockerBreath carries out trading limit processing.
In embodiments of the present invention, each limit blocker is inquired and is configured by the configuration module eachThe limit information of limit blocker includes: that element of transaction calculates limit mark to each limit blocker based on the received,It is identified again by the limit in configuration module inquiry and allocation limit information.
In embodiments of the present invention, the customer transaction information passes sequentially through each limit on the intercept process chainVolume blocker, carrying out trading limit processing according to the limit information of each limit blocker includes: by an intercept processDevice judges whether the customer transaction information exceeds the trading limit of the intercept process device, if it is reports excess, otherwise byNext limit blocker continues to judge and handle.
In embodiments of the present invention, the limit information of each limit blocker includes: limit type, limit valueWith database table information, wherein the limit type includes single limit and accumulative limit.
It should be noted that processing module 300 reads the configuration of each limit blocker from configuration layer, corresponding limit is generatedBlocker.And described according to configuration, each limit blocker is together in series, a process chain is formed.Blocker wants transactionLimit mark is calculated in element, is then identified by limit and finds corresponding limit information, including limit type in configuration layer,Limit value, the limits information such as database table name.If limit type is single limit, directly compare transaction amount and limitValue, if transaction amount is bigger than limit value, reports mistake in excess of the quota, otherwise continues with.If limit type is accumulativeLimit then inquires the transaction amount and accumulative stroke count that the client has added up by database table name, if the accumulative amount of moneyIn addition current transaction amount and be greater than limit value, then report mistake in excess of the quota, and termination;Otherwise it goes successively to nextA limit blocker is handled.Each transaction is successively handled in each limit blocker in process chain, once at someWhen blocker processing, discovery transaction has been more than limit, then, the processing of process chain will terminate, and directly export in excess of the quotaIt reports an error.
In practical applications, need to specify following element in the limit configuration: 1. channel transaction codes, it indicates flow controlMake the particular transactions to be acted on.2. element of transaction calculation expression group, to describe the calculating process of specific limit mark.SystemSome common mathematical functions and operation method are united built-in, for example, seeking substring method substr.Calculation expression cardbin=Substr (accout_no, 0,6) indicates that first 6 of interception account accout_no are assigned to cardbin variable.
The present invention is a kind of configurable method for carrying out fine-grained limit processing according to element of transaction, is adopted in configurationThe treatment process to element of transaction is described with calculation expression and mapping relations, limit is calculated according to description in limit blockerMark.The present invention is formed each limit processing unit --- limit blocker is together in series with chain, is carried out one by one to limitProcessing.Chain structure can effectively support the extension of processing unit, meet business fast development demand.
Trade company, Account Type etc. can only be handled a few element of transaction for existing limit processing method,The information such as mechanism, Client handset, ID card No. that cannot contract for credit rating, client carry out the limit of differentiation,The element of control is single.In embodiments of the present invention, it supports to calculate any element of transaction, supports complicated processingLogic carries out fine-grained accurately limit to transaction and handles.For example, carrying out following precisely limit control: to Web bank's canal6 are 123456 before the bank card account number sent on road, and it is 1000 that single limit value is specified in the transaction of hair fastener behavior xx row.ThisThe embodiment of invention uses the structure of process chain, convenient for the extension of processing unit.For example, after trade company's limit blockerClient's limit blocker is added on side.
Fig. 2 is a kind of flow chart of payment limit method of the embodiment of the present invention, referring to fig. 2, which comprises
Step S1, data module storing data library and configuration file, the database is for recording customer transaction information, instituteConfiguration file is stated for recording limit process flow;
Step S2, configuration module include Command Line Parsing device and configuration manager, and the Command Line Parsing device is for reading reconciliationIt analyses the data information of the configuration file and generates parsing result, the configuration manager is for carrying out pipe to the parsing resultReason;And
Step S3, processing module include that multiple limit blockers are connected the intercept process chain to be formed, and each limit is blockedIt cuts device and the configuration file is inquired by the configuration module, to configure the limit information of each limit blocker, the userTransaction Information passes sequentially through each limit blocker on the intercept process chain, and according to the limit of each limit blockerVolume information carries out trading limit processing.
In embodiments of the present invention, each limit blocker is inquired and is configured by the configuration module eachThe limit information of limit blocker includes: that element of transaction calculates limit mark to each limit blocker based on the received,It is identified again by the limit in configuration module inquiry and allocation limit information.
In embodiments of the present invention, the customer transaction information passes sequentially through each limit on the intercept process chainVolume blocker, carrying out trading limit processing according to the limit information of each limit blocker includes: by an intercept processDevice judges whether the customer transaction information exceeds the trading limit of the intercept process device, if it is reports excess, otherwise byNext limit blocker continues to judge and handle.
In embodiments of the present invention, the limit information of each limit blocker includes: limit type, limit valueWith database table information, wherein the limit type includes single limit and accumulative limit.
Fig. 3 is the flow chart of limit blocker processing method described in the method for the embodiment of the present invention;Referring to Fig. 3,In embodiments of the present invention, the process of the processing method of limit blocker described in the method includes the following steps:
11, the result of element of transaction and the processing of a upper limit blocker is received;
12, element of transaction and processing result will be received as input, limit is calculated according to the description of calculation expressionVolume mark;
13, corresponding limit information is obtained by limit mark;
14, according to limit type in limit information, accumulative limit is judged whether it is, if so, going to accumulative limit processingSub-process, i.e. step 15;Otherwise single limit sub-process, i.e. step 16 are gone to;
15, add up limit and handle sub-process: if the amount of money added up+current transaction amount is not more than limit value, locatingIt manages successfully, and adds up the current amount of money;Otherwise processing failure generates message in excess of the quota;
16, single limit handles sub-process: if current transaction amount is not more than limit value, handling success;Otherwise locateReason failure, generates message in excess of the quota;
17, the processing result of sub-process is judged, if it exceeds limit, then go to output processing result, i.e. step 19;OtherwiseGo to step 18;
18, judge whether continue with there are also next limit blocker if so, then going to step 11 in process chain;Otherwise step 19 is gone to;
19, the result of export quota processing.
Fig. 4 is the flow chart for adding up limit processing method in the method for the embodiment of the present invention;Referring to fig. 4, in the present inventionEmbodiment in, described in the method add up limit processing method process include the following steps:
21, it according to limit information, searches obtain the transaction amount that client has added up in the database;
22, whether accumulating sum+current transaction amount value is greater than limit value for judgement, if so, processing failure is gone to,That is step 23;Otherwise, the current amount of money is accumulated to accumulating sum, i.e. step 24;
23, it generates limit and handles excess message;
24, processing success message is generated.
Fig. 5 is the flow chart of single limit processing method in the method for the embodiment of the present invention;Referring to Fig. 5, in the present inventionEmbodiment in, the process of the processing method of single limit described in the method includes the following steps:
31, judge whether current transaction amount is greater than limit value, if it is step 32 is gone to, otherwise go to step 33;
32, it generates limit and handles excess message;
33, processing success message is generated.
It should be noted that the operation of the payment limit method include the steps that include as described above and above-mentioned branchThe mode of operation for paying limit system is identical, and details are not described herein for particular content.
In addition, the computer storage medium includes to calculate the present invention also provides a kind of computer readable storage mediumMachine program, the computer program execute one or more of computers such asLower operation: the operation includes the steps that paying limit method as described above is included that details are not described herein.It needs to illustrateIt is that the computer readable storage medium may include the multi storage such as ROM/RAM, magnetic disk, CD, disk, flash memory,To store the storage medium that above-mentioned computer program can be performed.
In addition, the present invention also provides a kind of payment limit device, described device includes:
Memory is stored with computer-readable instruction;
Processor executes the computer-readable instruction to execute the step that payment limit method as described above is includedSuddenly.It should be noted that the payment limit device includes: for example, intelligent terminal, mobile device, laptop, desk-top meterA variety of devices such as calculation machine, server or the network equipment.
Through the above description of the embodiments, those skilled in the art can be understood that the present invention can be byThe mode of software combination hardware platform is realized.Based on this understanding, technical solution of the present invention makes tribute to background techniqueThat offers can be embodied in the form of software products in whole or in part, which can store is situated between in storageIn matter, such as ROM/RAM, magnetic disk, CD, including some instructions use is so that a computer equipment (can be individual calculusMachine, server or network equipment etc.) execute method described in certain parts of each embodiment of the present invention or embodiment.
The above disclosure is only a preferred embodiment of the invention, cannot limit protection of the invention certainly with thisRange, therefore is still fallen within by right of the present invention and is wanted for equivalent variations made by above-described embodiment according to the introduction of the claims in the present inventionIt asks in the range of being covered.