CN117875969A - Training method, payment route selection method, system, electronic equipment and medium - Google Patents

Training method, payment route selection method, system, electronic equipment and medium Download PDF

Info

Publication number
CN117875969A
CN117875969A CN202311673502.6A CN202311673502A CN117875969A CN 117875969 A CN117875969 A CN 117875969A CN 202311673502 A CN202311673502 A CN 202311673502A CN 117875969 A CN117875969 A CN 117875969A
Authority
CN
China
Prior art keywords
payment
training
channel
optimal
available
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311673502.6A
Other languages
Chinese (zh)
Inventor
林坦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhizeng Shanghai Technology Co ltd
Original Assignee
Zhizeng Shanghai Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhizeng Shanghai Technology Co ltd filed Critical Zhizeng Shanghai Technology Co ltd
Priority to CN202311673502.6A priority Critical patent/CN117875969A/en
Publication of CN117875969A publication Critical patent/CN117875969A/en
Pending legal-status Critical Current

Links

Landscapes

  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The application provides a training method, a payment route selection method, a system, electronic equipment and a medium, wherein the training method comprises the following steps: acquiring historical data of each available payment channel to form a sample data set; the historical data comprises payment risk, cost and success rate of each of the available payment channels; extracting for a plurality of times based on the sample data set by a sampling and replacing method to obtain a plurality of training data sets; performing base-Ni index comparison on each training data set, and selecting optimal characteristics; the selected optimal characteristic is a key characteristic index in the training data set; branching is carried out on the optimal characteristics to obtain decision trees of the training data sets after branching; and forming a random forest model based on the decision tree form of each training data set. The method and the device can help enterprises dynamically select payment channels for routing, reduce payment cost and risk, and reduce manual maintenance workload.

Description

Training method, payment route selection method, system, electronic equipment and medium
Technical Field
The application belongs to the technical field of science and technology finance, relates to a training method, and particularly relates to a training method, a payment route selection method, a system, electronic equipment and a medium.
Background
Payroll payment is a key element of employment, and since payment actions occur quite frequently, reducing payment costs and payment risks while improving the success rate of payment to employees or servers becomes one of the working centers of employment companies. However, in an actual business scenario, the situation that the high success rate, the low payment cost and the low risk are simultaneously satisfied is often not compatible, and for this situation, priorities of different payment channels need to be set, which is the payment route.
In the payment decision process, the selection is typically based on a series of hard rules including, but not limited to, static factors such as payment cost, business preference, channel acceptance, and dynamic factors such as payment success rate, payment risk, and the like. By making a single or parallel judgment of these rules, we can select the most appropriate payment channel.
Aiming at the BtoC scene of global salary payment, in order to save cost and control risks, service payment cost and payment risk are important points of more concern for enterprises, and the weight of the payment success rate is relatively back. Thus, in the actual business process, there is a clear preference for the choice of payment channel. At present, the priority judgment rule of the payment route depends on the configuration of a payment operator, and aiming at the dynamic change factor of the payment risk, the optimal path is difficult to select in time through manual configuration, and meanwhile, the change parameters of the payment risk are more complex because the global compensation payment has the payment requirements of different countries.
Disclosure of Invention
The purpose of the application is to provide a training method, a payment route selection method, a system, electronic equipment and a medium, which are used for solving the problems that the payment route cannot be dynamically selected in the prior art, the payment cost and risk are high, and the manual maintenance workload is large.
In a first aspect, the present application provides a payment model training method, including: acquiring historical data of each available payment channel to form a sample data set; the historical data comprises payment risk, cost and success rate of each of the available payment channels; the sample data set comprises a plurality of samples, each sample corresponding to different values of payment risk, cost and success rate of the available payment channels; extracting for a plurality of times based on the sample data set by a sampling and replacing method to obtain a plurality of training data sets; performing base-Ni index comparison on each training data set, and selecting optimal characteristics; the selected optimal characteristic is a key characteristic index in the training data set; branching is carried out on the optimal characteristics to obtain decision trees of the training data sets after branching; and forming a random forest model based on the decision tree form of each training data set.
In an implementation manner of the first aspect, the performing a base-ni index comparison on each training data set, and selecting the optimal feature includes: extracting the training data set for a plurality of times to obtain a plurality of training feature subsets; calculating a base index of each training feature subset; and selecting the feature corresponding to the training feature subset with the minimum base index as the optimal feature.
In an implementation manner of the first aspect, performing a branching process on the optimal feature to obtain a decision tree after the branching process on each training data set includes: calculating all possible segmentation points of the corresponding features of each training feature subset; selecting a segmentation point corresponding to the feature with the minimum base index as an optimal segmentation point based on the base index of each training feature subset and all possible segmentation points of the feature corresponding to each training feature subset; and taking the selected optimal features and the optimal segmentation points as two sub-nodes derived from the root node, further distributing the rest features into the two sub-nodes, and realizing branch processing to obtain a decision tree of each training data set after the branch processing.
In a second aspect, the present application provides a payment routing method, the method comprising: receiving a payment request sent by a user, and acquiring a plurality of available payment channels; based on the random forest model obtained by training by the payment model training method, selecting an optimal payment channel from a plurality of available payment channels, and taking the optimal payment channel as a target payment route; and carrying out payment according to the target payment route.
In an implementation manner of the second aspect, the selecting, by using the random forest model trained based on the payment model training method, an optimal payment channel from a plurality of available payment channels includes: inputting each available payment channel into the random forest model to obtain a prediction result of each available payment channel; and selecting the available payment channel with the largest occurrence number as an optimal payment channel based on the prediction result.
In an implementation manner of the second aspect, the receiving a payment request sent by a user, and acquiring a plurality of available payment channels includes: receiving a payment request sent by a user; acquiring an available payment channel of a user based on a payment request sent by the user and preset payment conditions; if the user available payment channel is a single payment channel, the user available payment channel is used as an optimal payment channel; otherwise, all the payment channels available to the user are obtained.
In one implementation manner of the second aspect, the preset payment condition includes one or more of the following: screening supported payment channels according to the country or region in which the user is located; screening supported payment channels according to payment limits of the payment channels; wherein the screening of the payment limit comprises a single limit and a total limit.
In a third aspect, the present application provides a payment routing system, the payment routing system comprising: the acquisition module is used for receiving a payment request sent by a user and acquiring a plurality of available payment channels; the selecting module is used for selecting an optimal payment channel from the plurality of available payment channels based on the random forest model obtained through training by the payment model training method, and taking the optimal payment channel as a target payment route; and the payment module is used for carrying out payment according to the target payment route.
In a fourth aspect, the present application provides an electronic device, including: a memory for storing a processor executable program; and the processor is used for executing the program to enable the electronic equipment to execute the payment model training method and the payment routing method.
In a fifth aspect, the present application provides a computer readable storage medium having stored thereon a computer program which, when executed by an electronic device, implements the payment model training method described above and the payment routing method described above.
As described above, the training method, the payment route selection method, the system, the electronic equipment and the medium have the following beneficial effects:
1. According to the payment model training method, in the training process of the random forest model, each training characteristic data subset is formed through random sampling, so that the problem that sample types are too concentrated is avoided through construction of each decision tree. The final decision making is performed not by one decision tree but by a plurality of decision tree votes, so that statistical errors possibly generated by a single decision tree are avoided, and optimal selection is ensured.
2. According to the method, based on the random forest algorithm strategy, the target payment route is selected through the trained random forest model, so that enterprises can be helped to dynamically select the payment channel for routing, the payment cost and risk are reduced, and the manual maintenance workload is reduced.
Drawings
Fig. 1 is a schematic application scenario diagram of a payment routing method according to an embodiment of the present application.
Fig. 2 is a schematic flow chart of a payment model training method according to an embodiment of the present application.
Fig. 3 is a schematic flow chart of an optimal feature selection process according to an embodiment of the present application.
FIG. 4 is a flow chart illustrating a decision tree construction process according to an embodiment of the present application.
Fig. 5 is a schematic diagram of a random forest model training process according to an embodiment of the present application.
Fig. 6 is a schematic flow chart of a payment routing method according to an embodiment of the present application.
Fig. 7 is a schematic flow chart of selecting an optimal payment channel based on a random forest model according to an embodiment of the application.
Fig. 8 is a schematic diagram of an available payment channel acquisition process according to an embodiment of the present application.
Fig. 9 is a schematic flow chart of a payment routing method according to another embodiment of the present application.
Fig. 10 is a schematic structural diagram of a payment routing system according to an embodiment of the present application.
Fig. 11 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Description of element reference numerals
100. Payment route selection system
110. Acquisition module
120. Selecting module
130. Payment module
200. Electronic equipment
210. Processor and method for controlling the same
220. Memory device
S1-Sn step
Detailed Description
Other advantages and effects of the present application will become apparent to those skilled in the art from the present disclosure, when the following description of the embodiments is taken in conjunction with the accompanying drawings. The present application may be embodied or carried out in other specific embodiments, and the details of the present application may be modified or changed from various points of view and applications without departing from the spirit of the present application. It should be noted that the following embodiments and features in the embodiments may be combined with each other without conflict.
It should be noted that, the illustrations provided in the following embodiments merely illustrate the basic concepts of the application by way of illustration, and only the components related to the application are shown in the drawings and are not drawn according to the number, shape and size of the components in actual implementation, and the form, number and proportion of the components in actual implementation may be arbitrarily changed, and the layout of the components may be more complex.
The application provides a training method, a payment route selection method, a system, electronic equipment and a medium, which solve the problems that the payment route cannot be dynamically selected in the prior art, the payment cost and risk are high, and the manual maintenance workload is large.
As shown in fig. 1, this embodiment provides an application scenario schematic diagram of a payment routing method, where an electronic device specifically includes a processor, a memory, a user interface, and a network interface: the processor, the memory, the user interface and the network interface are in communication connection through a communication bus; wherein a processor, such as a central processing unit (Central Processing Unit, CPU); the user interface may comprise a Display, an input unit such as a Keyboard (Keyboard), and the optional user interface may further comprise a standard wired interface, a wireless interface. The network interface may optionally include a standard wired interface, a WIreless interface (e.g., a WIreless-FIdelity (WI-FI) interface). The Memory may be a high-speed random access Memory (Random Access Memory, RAM) Memory or a stable Non-Volatile Memory (NVM), such as a disk Memory. The memory may alternatively be a storage device separate from the aforementioned processor.
In the electronic device shown in fig. 1, the network interface is mainly used for performing data communication with a background server; the user interface is mainly used for carrying out data interaction with a user; the processor and the memory in the electronic device can be arranged in the electronic device, and the electronic device invokes the executable program stored in the memory through the processor and executes the payment route selection method provided by the embodiment of the invention.
Those skilled in the art will appreciate that the structure shown in fig. 1 is not limiting of the electronic device and may include more or fewer components than shown, or may combine certain components, or may be arranged in different components.
The following describes the technical solutions in the embodiments of the present application in detail with reference to the drawings in the embodiments of the present application.
As shown in fig. 2, the present application provides a payment model training method, which includes:
step S11, acquiring historical data of each available payment channel to form a sample data set; the historical data comprises payment risk, cost and success rate of each of the available payment channels; the sample data set comprises a plurality of samples, each sample corresponding to different values of payment risk, cost and success rate of the available payment channels;
Step S12, extracting for a plurality of times based on the sample data set by a sampling and replacing method to obtain a plurality of training data sets;
s13, performing base-Ni index comparison on each training data set, and selecting optimal characteristics; the selected optimal characteristic is a key characteristic index in the training data set;
step S14, carrying out branch processing on the optimal characteristics to obtain decision trees of the training data sets after the branch processing;
and S15, forming a random forest model based on the decision tree form of each training data set. The random forest model is the payment model described in the application.
FIG. 3 is a flowchart of a method for selecting optimal features by performing a radix index comparison on each training data set according to an embodiment of the present application. As shown in fig. 3, the base-ni index comparison is performed on each training data set, and the selection of the optimal features includes:
step S131, extracting the training data set for a plurality of times to obtain a plurality of training feature subsets;
step S132, calculating the base index of each training feature subset;
and S133, selecting the feature corresponding to the training feature subset with the minimum base index as the optimal feature.
Fig. 4 is a flowchart of a method for branching the optimal feature to obtain a decision tree after branching each training dataset according to an embodiment of the present application. As shown in fig. 4, performing branching processing on the optimal feature to obtain a decision tree after branching processing on each training data set includes:
step S141, calculating all possible segmentation points of the corresponding features of each training feature subset;
step S142, selecting a segmentation point corresponding to a feature with the minimum base index as an optimal segmentation point based on the base index of each training feature subset and all possible segmentation points of the feature corresponding to each training feature subset;
and step S143, taking the selected optimal feature and the optimal segmentation point as two sub-nodes derived from the root node, further distributing the rest features to the two sub-nodes, and realizing branch processing to obtain a decision tree of each training data set after the branch processing.
Specifically, the random forest model is a model trained based on a random forest algorithm, which is an integrated learning method that generates a single result by integrating the outputs of multiple decision trees. As shown in fig. 5, the random forest model training steps are as follows:
1. And (3) data acquisition: historical data of payment risk, cost and success rate of different payment channels are obtained and combined into a sample data set. Each sample corresponds to a different value of cost payment risk, cost and success rate.
2. Training feature subset creation: the original sample data set is replaced by sampling through Bootstrap sampling to form a new data set, and the specific method is as follows:
according to the affected data dimension, a plurality of different original data sets are set, the number of the data sets is smaller than or equal to the original data dimension, channel payment risks, channel payment cost and channel payment success rate are present in the data, and therefore 3 data sets can be set.
Let the original dataset be D, comprising n samples, d= { x1, x 2. Xi in the sample represents specific values of payment risk, payment cost and payment success rate of a certain channel, and a new data set D' generated by Bootstrap sampling is as follows:
D={x1,x2,…,xn}
where x1 'is one sample randomly drawn from D', i=1, 2, n; these samples are identical to the features carried in the original dataset D. The basic idea of boottrap sampling is to resample from the samples and use the resampled data to infer the population.
A total of k (k=50) extractions are performed, resulting in 50 training feature subsets: d'. 1 ,D’ 2 ,D’ 3 ,…,D’ 50
3. Sample division (decision tree construction)
Because we have multiple subsets and each training feature contains multiple variables, the data belonging to the same category in the current decision tree is more and the prediction result is more accurate by dividing the samples, and the samples with optimal features in the current training feature subsets need to be found by dividing the samples. Aiming at different problem scenes, the method for finding the optimal characteristics is different, the problems are classified, and the calculation is carried out by using a radix index (gininiindex) or an Information gain (Information gain); for regression problems, a square error (Squared error) is typically employed.
Base index (base purity): representing the probability that a randomly selected sample in the sample set is misclassified. Note that: the smaller the Gini index, the smaller the probability that the selected sample in the collection is misclassified, that is, the higher the purity of the collection, and conversely, the less pure the collection. Information gain refers to the degree to which random variable uncertainty is reduced under certain conditions. The square error refers to the degree to which the predicted value and the actual value are often used to represent the difference in the machine learning by calculating the sum of squares of the difference between each predicted value and the actual value and then averaging.
Since different types of payment channels need to be selected as classification problems, taking the keni index as an example to select the optimal features:
step 1: the base index of the training feature subset D' is calculated as:
Gini(D’)=1-∑(p k ) 2
where D' is a training feature subset, p k Is the proportion of the kth class of samples in the dataset D'.
Expressed as:
step 2: for each feature a, i.e. one of the payment risks, costs or success rates mentioned above, and each possible value a, D ' is divided by D ' according to whether the test of sample point pair a=a is yes or no ' i And D' ii In two parts, the base index at a=a is calculated: gini (D ', a=a) = |d' i |/|D’|*Gini(D’ i )+|D’ ii |/|D’|*Gini(D’ ii ),
Obtaining a plurality of cut points with values of a1, a2 and a3 … … ai for each feature:
(1) Gini (payment risk, a=a) = |d' i Payment risk/D 'Payment risk Gini (D' i Risk of payment) +|d' ii Payment risk/D 'Payment risk Gini (D' ii Risk of payment
(2) Gini (payment, a=a) = |d' i Payment fee/D 'payment fee Gini (D' i Pay fee) +|d' ii Payment fee/D 'payment fee Gini (D' ii Payment fee
(3) Gini (payment success rate, a=a) = |d' i Payment success rate/|d 'payment success rate |gini (D' i Payment success) +|d' ii Payment success rate I/I D' Payment success rate ' Gini (D ' ii Success rate of payment
Step 3: selecting the feature with the smallest base index and the corresponding segmentation point from all features A and all possible segmentation points a as the optimal feature and the optimal segmentation point to obtain:
(1) Min { Gini (risk of payment, a=a) }
(2) Min { Gini (payment, a=a) }
(3) Min { Gini (payment success rate, a=a) }
Step 4: and cutting the training feature subset according to the optimal cutting point to generate 2 branches, distributing the training feature subset to two sub-nodes, and repeating the process until the number of samples in the nodes is smaller than a preset threshold value.
4. Random decision forest construction
And constructing a plurality of decision trees according to the repeated mode to form a random forest. When predicting, the new input samples are respectively predicted by all decision trees, and then the category with the largest occurrence number is selected as the final prediction result by voting, and the calculation method comprises the following steps:
Y=mode{Y1,Y2,...,Yn}
where Yi is the predicted outcome of the ith decision tree and mode is the mode operation.
Action of decision Tree: helping to make a selection from among a plurality of selections. The construction process of the decision tree comprises the following steps:
The decision tree consists of a plurality of branches, the top of which is the trunk node (or root node), containing all the current choices. At each bifurcation node, a part of the selection is divided into one bifurcation and the other part of the selection is divided into the other bifurcation according to the value of a feature, and one party is selected to continue bifurcation. The selection of the features is typically based on criteria such as information gain or genie non-purity, etc. of their predictive ability to the target variable. After multiple passes through the bifurcation node, the construction of the decision tree is completed once the depth requirement of the decision tree is reached, the data volume of a certain node is less than a predetermined threshold, or the data purity of the node is sufficiently high.
In the payment model training method, in the training process of the random forest model, each training characteristic data subset is formed by random sampling, so that the problem that sample types are too concentrated is avoided by constructing each decision tree. The final decision making is performed not by one decision tree but by a plurality of decision tree votes, so that statistical errors possibly generated by a single decision tree are avoided, and optimal selection is ensured.
As shown in fig. 6, an embodiment of the present application provides a payment routing method, which includes the following steps:
and S21, receiving a payment request sent by a user, and acquiring a plurality of available payment channels. Multiple available payment channels are supported for payment requests sent by a user.
Step S22, training the obtained random forest model based on the payment model training method, selecting an optimal payment channel from a plurality of available payment channels, and taking the optimal payment channel as a target payment route. The random forest model is a model trained based on a random forest algorithm, which is an integrated learning method that generates a single result by integrating the outputs of multiple decision trees.
And S23, paying according to the target payment route.
Fig. 7 shows a flowchart of a method for selecting an optimal payment channel from a plurality of available payment channels according to the random forest model obtained by training based on the payment model training method described above in the embodiment of the present application. As shown in fig. 7, the random forest model obtained by training based on the payment model training method described above, and selecting an optimal payment channel from a plurality of available payment channels includes the following steps:
Step S221, inputting each available payment channel into the random forest model to obtain a prediction result of each available payment channel. And predicting all available payment channels supported by the user through a random forest model, wherein each available payment channel is respectively predicted by all decision trees, and a prediction result of each available payment channel is obtained.
And step S222, selecting the available payment channel with the largest occurrence number as an optimal payment channel based on the prediction result.
Specifically, the available payment channels are predicted by training the obtained random forest model based on the payment model training method, each available payment channel is predicted by all decision trees respectively, then the available payment channel with the largest occurrence number is selected as a final prediction result in a voting mode, namely the available payment channel with the largest occurrence number is selected as an optimal payment channel, and the optimal payment channel is used as a target payment route.
The decision tree construction process is illustrated with the following example of data for several payment channels. Data displayed as six payment channels are as follows:
Channel a: 0.2% of payment rate, 45% of payment success rate and 1% of payment risk rate;
channel B: 0.6% of payment rate, 75% of payment success rate and 1% of payment risk rate;
channel C: 0.1% of payment rate, 35% of payment success rate and 3% of payment risk rate;
channel D: 0.4% of payment rate, 65% of payment success rate and 1.2% of payment risk rate;
channel E: 0.3% of payment rate, 55% of payment success rate and 1% of payment risk rate;
channel F: the payment rate is 0.5%, the payment success rate is 61%, and the payment risk rate is 0.02%.
First, because of three features (payment cost, payment risk and payment success rate), the first two and three layers of the decision tree are constructed first. Specifically, the method comprises the following steps:
first layer-pay fee:
this is the first decision point, and as a company for Btoc, payment is first considered. Depending on the cost, the branch is divided into two branches, for example, one branch is that the cost is below a certain threshold (e.g. 5%) and the other branch is that the cost is above the threshold.
Second tier-risk of payment:
under each branch on the cost, the next consideration is the risk of payment. Likewise, this layer may be further divided into two branches based on the level of risk of payment, e.g., one is that the risk is below a certain threshold (e.g., 50%) and the other is that the risk is above this threshold.
Third layer-payment success rate:
the last layer considers the success rate of payment. Based on the first two features, this layer will make the final selection further based on the success rate. For example, one branch may have a success rate above a certain threshold (e.g., 45%) and another below this threshold.
The calculation of the threshold value is to select the feature with the minimum base index and the corresponding segmentation point as the optimal feature and the optimal segmentation point through the feature data of the payment channel which has been selected in the dataset and through different segmentation point values a1, a2, a3 and the like.
By the decision tree construction of the above three layers, we recursively go on each branch until the most suitable payment channel is found.
The construction of the decision forest is similar to that of a decision tree, and after a plurality of decision trees are constructed, the final decision is selected according to the votes of the decision trees.
As shown in fig. 8, a flowchart of a method for obtaining a plurality of available payment channels for receiving a payment request sent by a user according to an embodiment of the present application is shown. As shown in fig. 8, the receiving the payment request sent by the user, and obtaining several available payment channels includes:
step S211, receiving a payment request sent by a user;
Step S212, based on the payment request sent by the user and preset payment conditions, obtaining an available payment channel of the user;
step S213, if the user available payment channel is a single payment channel, the user available payment channel is used as an optimal payment channel;
step S214, otherwise, obtaining all payment channels available to the user.
Specifically, if the available payment channel supported by the country or region in which the user is located is a single payment channel, the current available payment channel of the user is used as an optimal payment channel; and if the country or region where the user is located supports a plurality of payment channels, acquiring all available payment channels of the user, and selecting an optimal payment channel through the trained random forest model.
In an embodiment of the present application, the preset payment condition includes one or more of the following:
screening supported payment channels according to the country or region in which the user is located;
screening supported payment channels according to payment limits of the payment channels; wherein the screening of the payment limit comprises a single limit and a total limit.
In an embodiment of the present application, when a plurality of payment channels are selected for supporting in a country or region where a user is located, selecting the payment channels for supporting according to a payment allowance of the payment channels includes:
Filtering a payment channel with a single payment allowance smaller than the payment amount according to the single payment allowance of the payment channel and the payment amount of the order in the payment request;
and filtering out the payment channels with the remaining payment limit smaller than the payment amount according to the paid limit and the payment amount of the order and the total payment limit of the payment channels.
Specifically, the acquisition of the available payment channels of the user needs to meet preset payment conditions, wherein the preset payment conditions are as follows: screening supported payment channels according to the country or region in which the user is located; and screening the supported payment channels according to the payment limits of the payment channels.
When a country or region in which a user is located supports a plurality of payment channels; screening payment channels according to payment limits, wherein the screening of the payment limits comprises a single limit and a total limit. The priorities are arranged from high to low, and the smaller the number after the priority is, the higher the priority is.
Priority 1: filtering a payment channel with a single payment limit smaller than the payment amount according to the single payment limit of the payment channel and the payment amount of the order;
priority 2: filtering out the payment channels with the remaining payment limit smaller than the payment amount according to the paid limit, the payment amount of the order and the total payment limit of the payment channels;
When a plurality of payment channels are screened through payment quota, automatically selecting the payment channels according to the payment conditions; the payment conditions include one or more of the following: payment cost, payment risk, payment success rate:
selecting a payment channel from low to high according to the cost of the payment channel;
selecting payment channels from low to high according to the cost payment risk of each channel;
and selecting the payment channels from high to low according to the success rate of the payment channels.
The characteristics of the three payment channels are not generally met at the same time, and the payment risk and the payment success rate are in the process of dynamic change, so that the automatic selection of the payment channels according to the payment conditions is realized by the random forest model obtained through training by the payment model training method.
In an embodiment of the present application, as shown in fig. 9, a specific flowchart of the payment routing method according to the embodiment of the present application is shown to complete the routing of a plurality of payment channels, and in the following, 6 payment channels are taken as an example, and detailed description is given with reference to fig. 9.
Channel a: 0.2% of payment rate, 45% of payment success rate and 1% of payment risk rate;
channel B: 0.6% of payment rate, 75% of payment success rate and 1% of payment risk rate;
Channel C: 0.1% of payment rate, 35% of payment success rate and 3% of payment risk rate;
channel D: 0.4% of payment rate, 65% of payment success rate and 1.2% of payment risk rate;
channel E: 0.3% of payment rate, 55% of payment success rate and 1% of payment risk rate;
channel F: the payment rate is 0.5%, the payment success rate is 61%, and the payment risk rate is 0.02%.
Firstly, receiving a payment request sent by a user, judging whether the country or region where the user is located supports multi-channel payment, if not, the unique channel is the optimal channel, and selecting the corresponding single channel for payment.
If the country or region where the user is located supports multi-channel payment, judging whether the amount of payment reaches the lowest payment threshold of the payment channel, if the channel meeting the condition is the only one, the only channel is the best channel, and selecting the corresponding channel for payment; if the payment channel meeting the condition is multi-channel, continuing to judge in the next step.
If the amount paid by the user reaches the lowest payment threshold of the payment channel, judging whether the amount paid by the user in the channel reaches the limit of the channel, and if so, not paying through the channel. If the channel meeting the condition is the only channel, the only channel is the optimal channel, and the corresponding channel is selected for payment; if the payment channel meeting the condition is multi-channel, continuing to judge in the next step.
If the amount paid by the user does not reach the total quota of the channel, judging according to the total quota paid by the enterprise in the channel, if the amount paid by the enterprise in the channel reaches the quota, the enterprise can not pay through the channel any more. If the channel meeting the condition is the only channel, the only channel is the optimal channel, and the corresponding channel is selected for payment; and if the channels meeting the conditions are a plurality of channels, continuing to judge in the next step.
If the amount paid by the enterprise does not reach the total limit of the channels and a plurality of channels meeting the conditions are provided, decision voting is carried out according to the payment cost, the payment risk rate and the payment success rate of the channels and the random forest algorithm. Taking the 6 payment channels mentioned above as an example:
channel a: 0.2% of payment rate, 45% of payment success rate and 1% of payment risk rate;
channel B: 0.6% of payment rate, 75% of payment success rate and 1% of payment risk rate;
channel C: 0.1% of payment rate, 35% of payment success rate and 3% of payment risk rate;
channel D: 0.4% of payment rate, 65% of payment success rate and 1.2% of payment risk rate;
channel E: 0.3% of payment rate, 55% of payment success rate and 1% of payment risk rate;
Channel F: 0.5 percent of payment rate, 61 percent of payment success rate and 0.02 percent of payment risk rate
Finally, 5 channels A are selected, 15 channels D are selected, 30 channels E are selected in the 50 decision trees, and finally the channels E are selected for payment.
In summary, the training method, the payment route selection method, the system, the electronic equipment and the medium provided by the embodiment of the application are based on the random forest algorithm strategy, and the random forest model obtained through training by the payment model training method is used for selecting the target payment route, so that enterprises can be helped to dynamically select the payment channel for routing, the payment cost and risk are reduced, and the manual maintenance workload is reduced. In the training process of the random forest model, as each training feature data subset is formed by random sampling, the problem that sample types are too concentrated is avoided by constructing each decision tree. The final decision making is performed not by one decision tree but by a plurality of decision tree votes, so that statistical errors possibly generated by a single decision tree are avoided, and optimal selection is ensured.
The protection scope of the payment routing method described in the embodiments of the present application is not limited to the execution sequence of the steps listed in the embodiments, and all the schemes implemented by adding or removing steps and replacing steps according to the principles of the present application in the prior art are included in the protection scope of the present application.
The embodiment of the application also provides a payment routing system, which can realize the payment routing method described in the application, but the implementation device of the payment routing method described in the application includes, but is not limited to, the structure of the payment routing system enumerated in the embodiment, and all structural modifications and substitutions of the prior art made according to the principles of the application are included in the protection scope of the application.
As shown in fig. 10, the present embodiment provides a payment routing system, where the payment routing system 100 includes an obtaining module 110, a selecting module 120, and a payment module 130; the acquiring module 110 is configured to receive a payment request sent by a user, and acquire a plurality of available payment channels; the selecting module 120 is configured to select an optimal payment channel from the plurality of available payment channels based on the random forest model obtained by training by the payment model training method, and take the optimal payment channel as a target payment route; the payment module 130 is configured to make a payment according to the target payment route.
In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, or methods may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of modules/units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple modules or units may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or modules or units, which may be in electrical, mechanical or other forms.
The modules/units illustrated as separate components may or may not be physically separate, and components shown as modules/units may or may not be physical modules, i.e., may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules/units may be selected according to actual needs to achieve the purposes of the embodiments of the present application. For example, functional modules/units in various embodiments of the present application may be integrated into one processing module, or each module/unit may exist alone physically, or two or more modules/units may be integrated into one module/unit.
Those of ordinary skill would further appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, in computer software, or in a combination of the two, and that the elements and steps of the examples have been generally described in terms of function in the foregoing description to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
As shown in fig. 11, the present embodiment provides an electronic device, the electronic device 200 includes a memory 210 and a processor 220; the memory 210 is configured to store a program executable by the processor 220; the processor 220 is configured to execute the program to cause the electronic device 200 to perform the payment model training method and the payment routing method described above.
The embodiment of the application also provides a computer readable storage medium, on which a computer program is stored, which when executed by an electronic device, implements the payment model training method and the payment routing method described above. Those of ordinary skill in the art will appreciate that all or part of the steps in the method implementing the above embodiments may be implemented by a program to instruct a processor, where the program may be stored in a computer readable storage medium, where the storage medium is a non-transitory (non-transitory) medium, such as a random access memory, a read only memory, a flash memory, a hard disk, a solid state disk, a magnetic tape (magnetic tape), a floppy disk (floppy disk), an optical disk (optical disk), and any combination thereof. The storage media may be any available media that can be accessed by a computer or a data storage device such as a server, data center, or the like that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a digital video disc (digital video disc, DVD)), or a semiconductor medium (e.g., a Solid State Disk (SSD)), or the like.
Embodiments of the present application may also provide a computer program product comprising one or more computer instructions. When the computer instructions are loaded and executed on a computing device, the processes or functions described in accordance with the embodiments of the present application are produced in whole or in part. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website, computer, or data center to another website, computer, or data center by a wired (e.g., coaxial cable, fiber optic, digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.).
The computer program product is executed by a computer, which performs the method according to the preceding method embodiment. The computer program product may be a software installation package, which may be downloaded and executed on a computer in case the aforementioned method is required.
The descriptions of the processes or structures corresponding to the drawings have emphasis, and the descriptions of other processes or structures may be referred to for the parts of a certain process or structure that are not described in detail.
The foregoing embodiments are merely illustrative of the principles of the present application and their effectiveness, and are not intended to limit the application. Modifications and variations may be made to the above-described embodiments by those of ordinary skill in the art without departing from the spirit and scope of the present application. Accordingly, it is intended that all equivalent modifications and variations which may be accomplished by persons skilled in the art without departing from the spirit and technical spirit of the disclosure be covered by the claims of this application.

Claims (10)

1. A payment model training method, characterized in that the payment model training method comprises:
acquiring historical data of each available payment channel to form a sample data set; the historical data comprises payment risk, cost and success rate of each of the available payment channels; the sample data set comprises a plurality of samples, each sample corresponding to different values of payment risk, cost and success rate of the available payment channels;
extracting for a plurality of times based on the sample data set by a sampling and replacing method to obtain a plurality of training data sets;
performing base-Ni index comparison on each training data set, and selecting optimal characteristics; the selected optimal characteristic is a key characteristic index in the training data set;
Branching is carried out on the optimal characteristics to obtain decision trees of the training data sets after branching;
and forming a random forest model based on the decision tree form of each training data set.
2. The payment model training method of claim 1, wherein the base-to-noise index comparison of each training dataset, selecting optimal features comprises:
extracting the training data set for a plurality of times to obtain a plurality of training feature subsets;
calculating a base index of each training feature subset;
and selecting the feature corresponding to the training feature subset with the minimum base index as the optimal feature.
3. The payment model training method of claim 2, wherein branching the optimal feature to obtain a branched decision tree for each of the training data sets comprises:
calculating all possible segmentation points of the corresponding features of each training feature subset;
selecting a segmentation point corresponding to the feature with the minimum base index as an optimal segmentation point based on the base index of each training feature subset and all possible segmentation points of the feature corresponding to each training feature subset;
and taking the selected optimal features and the optimal segmentation points as two sub-nodes derived from the root node, further distributing the rest features into the two sub-nodes, and realizing branch processing to obtain a decision tree of each training data set after the branch processing.
4. A method of payment routing, the method comprising:
receiving a payment request sent by a user, and acquiring a plurality of available payment channels;
selecting an optimal payment channel from a plurality of available payment channels based on a random forest model obtained by training the payment model training method according to any one of claims 1 to 3, and taking the optimal payment channel as a target payment route;
and carrying out payment according to the target payment route.
5. The payment routing method of claim 4, wherein selecting an optimal payment channel from a plurality of the available payment channels based on a training derived random forest model comprises:
inputting each available payment channel into the random forest model to obtain a prediction result of each available payment channel;
and selecting the available payment channel with the largest occurrence number as an optimal payment channel based on the prediction result.
6. The method for selecting a payment route according to claim 4, wherein receiving a payment request sent by a user, and obtaining a plurality of available payment channels comprises:
receiving a payment request sent by a user;
acquiring an available payment channel of a user based on a payment request sent by the user and preset payment conditions;
If the user available payment channel is a single payment channel, the user available payment channel is used as an optimal payment channel;
otherwise, all the payment channels available to the user are obtained.
7. The payment routing method of claim 6, wherein the preset payment conditions include one or more of:
screening supported payment channels according to the country or region in which the user is located;
screening supported payment channels according to payment limits of the payment channels; wherein the screening of the payment limit comprises a single limit and a total limit.
8. A payment routing system, the payment routing system comprising:
the acquisition module is used for receiving a payment request sent by a user and acquiring a plurality of available payment channels;
a selecting module, configured to select an optimal payment channel from the plurality of available payment channels based on the random forest model obtained by training according to the payment model training method of any one of claims 1 to 3, and use the optimal payment channel as a target payment route;
and the payment module is used for carrying out payment according to the target payment route.
9. An electronic device, the electronic device comprising:
A memory for storing a processor executable program;
a processor for executing the program to cause the electronic device to perform the payment model training method according to any one of claims 1 to 3 and the payment routing method according to any one of claims 4 to 7.
10. A computer-readable storage medium, on which a computer program is stored, characterized in that the program, when executed by an electronic device, implements the payment model training method of any one of claims 1 to 3 and the payment routing method of any one of claims 4 to 7.
CN202311673502.6A 2023-12-07 2023-12-07 Training method, payment route selection method, system, electronic equipment and medium Pending CN117875969A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311673502.6A CN117875969A (en) 2023-12-07 2023-12-07 Training method, payment route selection method, system, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311673502.6A CN117875969A (en) 2023-12-07 2023-12-07 Training method, payment route selection method, system, electronic equipment and medium

Publications (1)

Publication Number Publication Date
CN117875969A true CN117875969A (en) 2024-04-12

Family

ID=90580192

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311673502.6A Pending CN117875969A (en) 2023-12-07 2023-12-07 Training method, payment route selection method, system, electronic equipment and medium

Country Status (1)

Country Link
CN (1) CN117875969A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111105305A (en) * 2019-12-06 2020-05-05 安徽海汇金融投资集团有限公司 Machine learning-based receivable and receivable cash cashing risk control method and system
CN113627900A (en) * 2021-08-10 2021-11-09 未鲲(上海)科技服务有限公司 Model training method, device and storage medium
CN114997879A (en) * 2022-07-18 2022-09-02 南京希音电子商务有限公司 Payment routing method, device, equipment and storage medium
CN115659177A (en) * 2022-10-25 2023-01-31 招联消费金融有限公司 Method and device for generating data recommendation model and computer equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111105305A (en) * 2019-12-06 2020-05-05 安徽海汇金融投资集团有限公司 Machine learning-based receivable and receivable cash cashing risk control method and system
CN113627900A (en) * 2021-08-10 2021-11-09 未鲲(上海)科技服务有限公司 Model training method, device and storage medium
CN114997879A (en) * 2022-07-18 2022-09-02 南京希音电子商务有限公司 Payment routing method, device, equipment and storage medium
CN115659177A (en) * 2022-10-25 2023-01-31 招联消费金融有限公司 Method and device for generating data recommendation model and computer equipment

Similar Documents

Publication Publication Date Title
RU2556374C2 (en) Network computing system and method of solving computational task
RU2541105C2 (en) Network computer system (versions) and method for computational task
US20180046493A1 (en) Semantic-aware and user-aware admission control for performance management in data analytics and data storage systems
WO2020168851A1 (en) Behavior recognition
CN112163963B (en) Service recommendation method, device, computer equipment and storage medium
CN116501711A (en) Computing power network task scheduling method based on 'memory computing separation' architecture
CN106202092A (en) The method and system that data process
CN110796485A (en) Method and device for improving prediction precision of prediction model
CN112184005A (en) Operation task classification method, device, equipment and storage medium
CN111179055B (en) Credit line adjusting method and device and electronic equipment
CN112634062B (en) Hadoop-based data processing method, device, equipment and storage medium
EP3764310A1 (en) Prediction task assistance device and prediction task assistance method
WO2023185125A1 (en) Product resource data processing method and apparatus, electronic device and storage medium
CN117875969A (en) Training method, payment route selection method, system, electronic equipment and medium
CN112966968B (en) List distribution method based on artificial intelligence and related equipment
CN108961071B (en) Method for automatically predicting combined service income and terminal equipment
CN115759742A (en) Enterprise risk assessment method and device, computer equipment and storage medium
CN114881761A (en) Determination method of similar sample and determination method of credit limit
CN114625894A (en) Appreciation evaluation method, model training method, appreciation evaluation apparatus, model training medium, and computing apparatus
CN113656046A (en) Application deployment method and device
CN112419025A (en) User data processing method and device, storage medium and electronic equipment
CN112348657A (en) Method and device for determining target credit user, computer equipment and storage medium
CN112926892A (en) Capital matching method and device, electronic equipment and storage medium
CN112001787A (en) User distribution method, device, server and storage medium
CN112600756B (en) Service data processing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination