Summary of the invention
This specification embodiment provides and a kind of data processing method, device, server and computer readable storage medium.
In a first aspect, this specification embodiment provides a kind of data processing method, comprising:
The accounting request for being directed to target service is received, the target service includes N transaction, and the accounting request includes every
The parameter transaction of transaction, N are the positive integer greater than 1;
Based on the parameter transaction of every transaction, call computing system calculate the N transaction joint account as a result,
And receive the merging charging result of the computing system feedback;
According to the volume of services of every transaction, the merging charging result is split, obtains every transaction
Charging result.
Second aspect, this specification embodiment provide a kind of data processing equipment, and described device includes:
Receiving module, for receiving the accounting request for being directed to target service, the target service includes N transaction, described
Accounting request includes the parameter transaction of every transaction, and N is the positive integer greater than 1;
Merging treatment module calls computing system to calculate the N friendship for the parameter transaction based on every transaction
Easy joint account is as a result, and receive the merging charging result that the computing system is fed back;
Deconsolidation process module splits the merging charging result for the volume of services according to every transaction,
Obtain the charging result of every transaction.
The third aspect, this specification embodiment provide a kind of server, including memory, processor and are stored in memory
The step of computer program that is upper and can running on a processor, the processor executes any of the above-described the method.
Fourth aspect, this specification embodiment provide a kind of computer readable storage medium, are stored thereon with computer journey
Sequence, when which is executed by processor the step of realization any of the above-described the method.
This specification embodiment has the beneficial effect that:
In this specification embodiment, the accounting request for being directed to target service is received, the target service includes N friendships
Easily, the accounting request includes the parameter transaction of every transaction, and N is the positive integer greater than 1;Transaction based on every transaction
Parameter calls computing system to calculate the joint account of the N transaction as a result, and receiving the conjunction that the computing system is fed back
And charging result;According to the volume of services of every transaction and the merging charging result, the meter of every transaction is determined
Take result.In above scheme, the accounting request of more transactions is synthesized to the accounting request of a target service, is only handed over according to every
Easy parameter transaction calls computing system to merge the primary calculating of charging result, then by split merge charging result come
The charging result for determining every transaction is individually calculated without the accounting request for every transaction, reduces computing system
Call number, greatly reduce the expense of computing system, improve the batch calculated performance of computing system.
Specific embodiment
In order to better understand the above technical scheme, below by attached drawing and specific embodiment to this specification embodiment
Technical solution be described in detail, it should be understood that the specific features in this specification embodiment and embodiment are to this explanation
The 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 provides a kind of data processing method, as shown in Figure 1, implementing for this specification
A kind of flow chart for data processing method that example provides, method includes the following steps:
Step S11: the accounting request for being directed to target service is received, the target service includes N transaction, and the charging is asked
The parameter transaction comprising every transaction is sought, N is the positive integer greater than 1;
In this specification embodiment, the service charge that target service can be payment transaction on line calculates business, or electricity
Quotient returns servant's business, the business that returns the benefit etc. to trade company, and target service is made of more transactions.In terms of the service charge of payment transaction on line
For calculation business, user A is added to 5 commodity in the shopping cart of electric business platform, and disposably merges branch to this 5 commodity
It pays, wherein merging payment includes that corresponding 5 payment transactions of 5 commodity require to receive for every payment transaction
Take a payment procedure expense.Based on delivery operation is merged, an accounting request can be generated, which calculates every for requesting
The service charge of commodity transaction, that is to say, that the accounting request of 5 transactions is actually contained in the accounting request.
Parameter transaction may include charging relevant parameters, such as volume of services, business time of origin, channel of disbursement, payment user
Information etc..It should be understood that a transaction can correspond to one or more parameter transactions.For example, the parameter transaction of a transaction
It is volume of services and payment user information for volume of services or the parameter transaction of a transaction.
Step S12: the parameter transaction based on every transaction calls computing system to calculate the merging of the N transaction
Calculated result, and receive the merging charging result of the computing system feedback;
In this specification embodiment, the merging of N transaction is calculated according to one or more parameter transactions of every transaction
Charging result.In one embodiment, it can be determined according to the volume of services of every transaction and merge charging result, in another embodiment
In, merging charging result can be determined according to the volume of services of every transaction and channel of disbursement.
In this specification embodiment, merges charging result and can be by calling computing system and realize, in a reality
It applies in example, can first merge the transaction of N transaction, the parameter transaction being then based on after merging calls computing system only
Primary charging calculating is carried out, obtains merging charging result.
Step S13: according to the volume of services of every transaction, the merging charging result is split, described in acquisition
The charging result of every transaction.
It should be understood that volume of services can be the foundation of charging, different business scenarios can correspond to different volumes of services.
For example, volume of services is the transaction amount of every transaction, in the business for returning servant to trade company in the service charge business of payment transaction
In, volume of services can be effective transaction stroke count of each trade company.In one embodiment, it is based on volume of services, can determine every
The charging result of transaction realizes the fractionation to charging result is merged in total accounting merged in charging result, obtains every
The charging result of transaction.In this specification embodiment, merge the fractionation of charging result without calling computing system, therefore effectively
The expense for reducing computing system.
Optionally, the parameter transaction based on every transaction calls computing system to calculate the conjunction of the N transaction
And calculated result, and receive the merging charging result of the computing system feedback, comprising: by the transaction of every transaction
Parameter merges, and obtains and merges parameter transaction;The merging parameter transaction is sent to the computing system, so that the meter
Calculation system calculates the merging charging result according to the merging parameter transaction and default charging function;Receive the calculating
The joint account result of system feedback.
In this specification embodiment, the merging of parameter transaction can be configured according to actual needs.For example, at every
When the parameter transaction of transaction is volume of services, the corresponding volume of services of every transaction can be summed up, obtain total service
Amount, or the corresponding volume of services of every transaction is weighted summation.It for another example, include multiple in the parameter transaction of every transaction
When parameter, the calculating of parameter transaction can be merged according to preset parameter pooled function.It is, of course, also possible to using other
Mode calculates merging parameter transaction, here without limitation.
After obtaining merging parameter transaction, can will merge parameter transaction and be sent to computing system, computing system according to
Merge parameter transaction and default charging function to determine merging charging result, presetting charging function can be according to actual needs
It is set.In one embodiment, target service is the service charge business of payment transaction, and parameter transaction is the clothes of every transaction
Business amount, i.e., the transaction amount of every transaction.For example, the shopping cart of user houses 3 commodity from 3 shops, wherein A
The commodity in shop are 100 yuan, and the commodity in the shop B are 200 yuan, and the commodity in the shop C are 300 yuan, and total amount is 600 yuan, are being merged
When parameter transaction is the volume of services summation of every transaction, merging parameter transaction is 600.If user has selected overseas credit to stick into
Row payment, payment platform can collect the service charge that rate is 1%.Computing system determines merging charging according to default charging function
As a result, for example, default charging function are as follows: merge charging result=volume of services summation × rate, then the merging in the embodiment
Charging result be 600 × 1%, i.e., 6 yuan, that is to say, that total service charge of 3 transactions be 6 yuan.
Optionally, the volume of services according to every transaction splits the merging charging result, obtains institute
State the charging result of every transaction, comprising: summarize to the volume of services of every transaction, obtain the total of the target service
Volume of services;According to the ratio of the volume of services of every transaction and total volume of services, the merging charging result is torn open
Divide processing, obtains the charging result of every transaction.
In this specification embodiment, ratio fractionation is carried out to volume of services is calculated according to the volume of services of every transaction.Still continue to use
The example of the service charge business of payment transaction above, the commodity in the shop A are 100 yuan, then the clothes of payment transaction corresponding with the shop A
Business amount is that the commodity in the shop 100, B are 200 yuan, then the volume of services of payment transaction corresponding with the shop B is the commodity in the shop 200, C
It is 300 yuan, then the volume of services of payment transaction corresponding with the shop C is 300.According to total volume of services 600, the clothes of every transaction are determined
The ratio of the ratio of business amount and total volume of services, above-mentioned three transaction is respectively 100/600,200/600,300/600.According to ratio
It is split to charging result is merged, merging charging result is 6 yuan, then the charging result of payment transaction corresponding with the shop A
For 6 × 100/600=1, the charging result of payment transaction corresponding with the shop B is 6 × 200/600=2, corresponding with the shop C
The charging result of payment transaction is 6 × 300/600=3.
As shown in Fig. 2, be the flow chart of the charging result for the every transaction of determination that this specification embodiment provides, including with
Lower step:
Step S21: the N transaction is arranged according to the sequence of volume of services from small to large;
Step S22: for every transaction in preceding N-1 transaction, according to the volume of services of every transaction and described total
The ratio of volume of services, splits the merging charging result, and split result is rounded downwards as every transaction
Charging result amounts to and obtains N-1 charging result;
Step S23: subtracting the N-1 charging result in the merging charging result, obtains the charging of N transaction
As a result.
It, can be first by N transaction according to volume of services when being split to merging charging result in this specification embodiment
Sequence from small to large is arranged, and N-1 transaction are counted according to the ratio of volume of services and total volume of services to merging before coming
Expense result is split come to obtain charging result last transaction charging result pass through preceding N-1 of charging result with
And merges charging result and carry out netting acquisition.Due to being split with the ratio of total volume of services to charging result is merged according to volume of services
When, split result may not be integer, in order to guarantee that the netting amount of money of finishing touch is greater than zero, is rounded downwards using split result
Method come the charging result of N-1 transaction before obtaining.In this embodiment, the maximum transaction of volume of services is placed on finally
Processing, can reduce charging result amount of money gap as caused by netting of finishing touch.
In order to better understand the data processing method of this specification embodiment offer, referring to FIG. 3, illustrating to implement for this
The flow chart for the data processing method that example provides, in the embodiment, data processing method is related to user, operation system, merging
Computation processor and computing system.Referring to FIG. 3, user initiates one when operating to business item, to operation system
Secondary service request, for example, user initiates payment request when merging payment to N transaction, to operation system.Operation system
After receiving service request, since payment transaction is corresponding with collecting for service charge, service creation once includes N transaction
Call charge service request, for requesting to calculate the corresponding service charge of N transaction, the corresponding trading volume of N transaction be respectively S1,
Call charge service request is submitted to joint account processor by S2, S3, S4..., operation system.Joint account processor hands over N
Easy volume of services, which merges, to summarize, and obtains total volume of services S=S1+S2+S3+S4..., and joint account processor is to computing system
Primary merging accounting request is initiated, and total volume of services S is sent to computing system.Computing system is according to default charging function Y=
Fn (S) is calculated and is merged charging result, and returns to joint account processor for charging result Y is merged.Joint account processor is pressed
N transaction is ranked up according to the sequence of volume of services from big to small, to preceding N-1 transaction according to the volume of services of every transaction and always
The ratio of volume of services, splits to charging result Y is merged, and does netting processing to last transaction, obtains the meter of N transaction
Take as a result, and the charging result of N transaction and merging charging result are returned to operation system.Operation system will merge charging
As a result user is returned to.
It should be understood that default charging function Fn can be set according to actual needs, here not in above-described embodiment
It limits.
Second aspect, based on the same inventive concept, this specification embodiment provide a kind of data processing equipment, please refer to figure
4, comprising:
Receiving module 41, for receiving the accounting request for being directed to target service, the target service includes N transaction, institute
The parameter transaction that accounting request includes every transaction is stated, N is the positive integer greater than 1;
Merging treatment module 42 calls computing system to calculate described N for the parameter transaction based on every transaction
The joint account of transaction is as a result, and receive the merging charging result that the computing system is fed back;
Deconsolidation process module 43 tears the merging charging result open for the volume of services according to every transaction
Point, obtain the charging result of every transaction.
In a kind of optional implementation, merging treatment module 42 is used for:
The parameter transaction of every transaction in the N transaction is merged, obtains and merges parameter transaction;
The merging parameter transaction is sent to the computing system, so that the computing system is traded according to the merging
Parameter and default charging function, calculate the merging charging result;
Receive the joint account result of the computing system feedback.
In a kind of optional implementation, deconsolidation process module 43 is used for:
The volume of services of every transaction is summarized, total volume of services of the target service is obtained;
According to the ratio of the volume of services of every transaction and total volume of services, the merging charging result is torn open
Divide processing, obtains the charging result of every transaction.
In a kind of optional implementation, deconsolidation process module 43 is used for:
The N transaction is arranged according to the sequence of volume of services from small to large;
For every transaction in preceding N-1 transaction, according to the volume of services of every transaction and total volume of services
Ratio, splits the merging charging result, and split result is rounded downwards to the charging result as every transaction,
It is total to obtain N-1 charging result;
The N-1 charging result is subtracted in the merging charging result, obtains the charging result of N transaction.
About above-mentioned apparatus, wherein the concrete function of modules is in data processing side provided in an embodiment of the present invention
It is described in detail in the embodiment of method, no detailed explanation will be given here.
The third aspect is based on inventive concept same as data processing method in previous embodiment, and the present invention also provides one
Kind of server, as shown in figure 5, including memory 404, processor 402 and being stored on memory 404 and can be in processor 402
The computer program of upper operation, the processor 402 realize any of data processing method described previously when executing described program
The step of method.
Wherein, in Fig. 5, bus architecture (is represented) with bus 400, and bus 400 may include any number of interconnection
Bus and bridge, bus 400 will include the one or more processors represented by processor 402 and what memory 404 represented deposits
The various circuits of reservoir link together.Bus 400 can also will peripheral equipment, voltage-stablizer and management circuit etc. it
Various other circuits of class link together, and these are all it is known in the art, therefore, no longer carry out further to it herein
Description.Bus interface 406 provides interface between bus 400 and receiver 401 and transmitter 403.Receiver 401 and transmitter
403 can be the same element, i.e. transceiver, provide the unit for communicating over a transmission medium with various other devices.Place
It manages device 402 and is responsible for management bus 400 and common processing, and memory 404 can be used for storage processor 402 and execute behaviour
Used data when making.
Fourth aspect, based on, based on the inventive concept of data processing method, the present invention also provides one in previous embodiment
Kind computer readable storage medium, is stored thereon with computer program, which realizes base described previously when being executed by processor
In either data processing method method the step of.
This specification is referring to the method, equipment (system) and computer program product according to this specification embodiment
Flowchart 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 diagram
The combination of process and/or box in one process and/or box and flowchart and/or the block diagram.It can provide these computers
Processor of the program instruction to general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices
To generate a machine, so that generating use by the instruction that computer or the processor of other programmable data processing devices execute
In 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 diagram
It is standby.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy
Determine 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 or
The 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 counting
Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or
The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one
The step of function of being specified in a box or multiple boxes.
Although preferred embodiments of the present invention have been described, it is created once a person skilled in the art knows basic
Property concept, then additional changes and modifications may be made to these embodiments.So it includes excellent that the following claims are intended to be interpreted as
It selects embodiment and falls into all change and modification of 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 art
Mind 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 technologies
Within, then the present invention is also intended to include these modifications and variations.