Disclosure of Invention
One or more embodiments of the present disclosure describe a recommendation method and apparatus for a payment channel, which follow the payment preference of a user as much as possible on the premise of ensuring that payment is successful, and gives a good payment experience to the user.
In a first aspect, a recommendation method of a payment channel is provided, the method including:
acquiring the original preference ordering of each user for each payment channel;
acquiring expected proportions of each user using each payment channel;
according to the expected proportion of each payment channel, the original preference ordering of each payment channel is allocated to each user, and the preferred payment channel of each user preference after allocation is obtained;
and determining the payment channels respectively recommended to the users according to the preferred payment channels preferred by the users after allocation.
In one possible implementation, the obtaining the original preference ranking of each user for each payment channel includes:
acquiring historical payment behavior data of each user; the historical payment behavior data at least comprise each historical payment channel and corresponding payment results, and the payment results comprise payment success and payment failure;
and predicting the original preference ordering of each user for each payment channel according to each historical payment channel and the corresponding payment result of each user.
Further, predicting the original preference ranking of each user for each payment channel according to each historical payment channel and the corresponding payment result of each user, including:
screening out each corresponding historical payment channel when the payment result of the target user is successful payment according to each historical payment channel and the corresponding payment result of the target user;
counting the times of each historical payment channel screened by the target user;
and determining the original preference ordering of the target user for each payment channel according to the order of the times from big to small.
In one possible implementation manner, the obtaining the expected proportion of each user to use each payment channel includes:
and determining the expected proportion of each user using each payment channel according to the total payment request amount which can be born by each payment channel in unit time and the expected total payment request amount in unit time.
In one possible implementation manner, the allocating the original preference ranking of each payment channel by each user according to the expected ratio of each payment channel to obtain the preferred payment channel with each user preference after allocation includes:
determining the current proportion of each payment channel according to the proportion of each payment channel in the preferred payment channels currently preferred by each user;
judging whether the current proportion of the non-preferred payment channel is smaller than the expected proportion of the non-preferred payment channel according to the non-preferred payment channel of each user;
when the current proportion of the non-preferred payment channel is smaller than the expected proportion of the non-preferred payment channel, the original preference ordering of the user for each payment channel is adjusted, so that the non-preferred payment channel is allocated as the preferred payment channel preferred by the user.
Further, the method further comprises:
after traversing all non-preferred payment channels of each user, judging whether the current proportion of each payment channel is consistent with the expected proportion of each payment channel;
and if the current proportion of each payment channel is not consistent with the expected proportion of each payment channel, outputting alarm information, wherein the alarm information is used for informing that the expected proportion of each payment channel needs to be adjusted.
Further, before the user adjusts the original preference ranking of the payment channels so that the non-preferred payment channel is configured as the preferred payment channel preferred by the user, the method further comprises:
it is determined that the preferred payment channel currently preferred by the user is not a pre-specified priority-assigned payment channel.
In one possible implementation manner, the allocating the original preference ranking of each payment channel by each user according to the expected ratio of each payment channel to obtain the preferred payment channel with each user preference after allocation includes:
and distributing the users to a plurality of machines, respectively executing the expected proportion according to the payment channels by each machine, and allocating the original preference ordering of the users to the payment channels to obtain the preferred payment channels with the allocated user preferences.
In a second aspect, there is provided a recommendation device for a payment channel, the device comprising:
the first acquisition unit is used for acquiring the original preference ordering of each user for each payment channel;
the second acquisition unit is used for acquiring the expected proportion of each payment channel used by each user;
the allocation unit is used for allocating the original preference orders of the users to the payment channels acquired by the first acquisition unit according to the expected proportion of the payment channels acquired by the second acquisition unit, so as to acquire the preferred payment channels of the allocated user preferences;
and the recommending unit is used for determining the payment channels respectively recommended to the users according to the preferred payment channels of the users after the allocation by the allocating unit.
In a third aspect, there is provided a computer readable storage medium having stored thereon a computer program which, when executed in a computer, causes the computer to perform the method of the first aspect.
In a fourth aspect, there is provided a computing device comprising a memory having executable code stored therein and a processor which, when executing the executable code, implements the method of the first aspect.
According to the method and the device provided by the embodiment of the specification, the original preference ordering of each user for each payment channel is firstly obtained, the expected proportion of each user for each payment channel is obtained, then the original preference ordering of each user for each payment channel is allocated according to the expected proportion of each payment channel, the preferred payment channels of each allocated user preference are obtained, and finally the payment channels respectively recommended to each user are determined according to the preferred payment channels of each allocated user preference. Therefore, in the embodiment of the specification, when recommending the payment channels to the user, the user preference is considered, and the user preference is allocated according to the expected proportion of each payment channel, so that the user payment preference is followed as much as possible under the precondition of ensuring the successful payment, and good payment experience is provided for the user.
Detailed Description
The following describes the scheme provided in the present specification with reference to the drawings.
Fig. 1 is a schematic diagram of an implementation scenario of an embodiment disclosed in the present specification. This implementation scenario relates to recommendation of payment channels, that is, to static payment channel proportioning. The implementation scene comprises a first stage, a second stage and a third stage, wherein the first stage adopts a gradient iteration decision tree (gradient boosting decision tree, GBDT) prediction model according to the payment behavior characteristics of a user to perform offline preference learning so as to acquire payment channel preferences of the user; and in the second stage, according to the static proportioning configuration file, the payment channel preference of the user is allocated based on a random matching algorithm of MapReduce.
It is understood that the payment channel is a channel for the use of funds and may include, but is not limited to, channels such as bank cards, balances, balance treasures, flowers, coupons, credits, red packages, prepaid cards, and the like.
Wherein the primary funds originate from primary payment channels, such as bank cards, balances, balance treasures, flowers, etc.
In the embodiment of the present disclosure, the flow may be distributed to the channels according to a certain proportion, where this proportion is referred to as a ratio in this scheme, for example: in the peak period, different values of bank card flow x%, bar y%, balance z%, balance m%, x+y+z+m=100% and x, y, z, m are expected to be different ratios. The first payment instrument defaulted by the e-commerce platform is called the preferred payment instrument. The desired proportions for each payment channel may be included in a static proportion profile. The user payment behavior characteristics may be obtained from the user's historical payment behavior data, which may include, for example, but not limited to, historical payment channels and payment results, etc., including payment success and payment failure.
It should be noted that the GBDT prediction model and the MapReduce-based random matching algorithm are merely examples, and are not intended to limit the method provided in the embodiments of the present disclosure.
According to the embodiment of the specification, when the payment channels are recommended to the user, the user preference is considered, and the user preference is allocated according to the expected proportion of each payment channel, so that the user payment preference is followed as much as possible on the premise of ensuring successful payment, and good payment experience is provided for the user.
Fig. 2 shows a flow chart of a recommendation method of a payment channel according to an embodiment, which may be based on the application scenario shown in fig. 1. As shown in fig. 2, the recommendation method of the payment channel in this embodiment includes the following steps: step 21, obtaining the original preference ordering of each user for each payment channel; step 22, obtaining expected proportions of each user using each payment channel; step 23, according to the expected proportion of each payment channel, allocating the original preference ordering of each payment channel by each user to obtain the preferred payment channel of each allocated user preference; and step 24, determining the payment channels respectively recommended to the users according to the preferred payment channels preferred by the users after allocation. Specific implementations of the above steps are described below.
First, in step 21, the original preference ranking of each user for each payment channel is obtained. It will be appreciated that the original preference ranking for each payment channel may be determined separately for each user.
In one example, historical payment behavior data for each user is obtained; the historical payment behavior data at least comprise each historical payment channel and corresponding payment results, and the payment results comprise payment success and payment failure; and predicting the original preference ordering of each user for each payment channel according to each historical payment channel and the corresponding payment result of each user. For example, according to each historical payment channel and corresponding payment result of a target user, screening out each corresponding historical payment channel when the payment result of the target user is successful payment; counting the times of each historical payment channel screened by the target user; and determining the original preference ordering of the target user for each payment channel according to the order of the times from big to small.
Wherein, the historical payment behavior data of the user embody the payment behavior characteristics of the user, for example, the historical payment behavior data of the user can be shown in the table one.
Table one: historical payment behavior data for a user
It should be noted that the actual bank card may also distinguish which bank, and is collectively referred to herein as a bank card for convenience of understanding.
The user's preference ranking for each payment channel may be determined based solely on the payment channel and the payment result, or may be determined in combination with other historical payment behavior data (e.g., payment scenario, payment time, payment amount, etc.).
For example, the payment channel preference ranking output in combination with the user's historical payment behavior data may be as shown in table two.
And (II) table: user's payment channel preference ordering
Next, at step 22, the desired proportions of each user's usage of each payment channel are obtained. It will be appreciated that the desired proportions for each payment channel may be manually set or may be automatically generated by the machine according to preset rules.
In one example, the expected proportion of each user's usage of each payment channel is determined based on the total amount of payment requests that each payment channel can withstand per unit time, and the total amount of payment requests expected per unit time.
Such as: the peak value of the total amount of the second-level payment request is 30w, the maximum value of the bank card is 5w, the transaction is 20w, the balance is 15w, and the balance is 15w. In order to ensure that the user payment request can go to the channel with payment capability, the desired channel proportion (such as 50% in the flower, 10% in the balance, 20% in the balance and 20% in the bank card) needs to be set in advance.
Then, in step 23, according to the expected proportion of each payment channel, the original preference ordering of each payment channel by each user is allocated, so as to obtain the preferred payment channel of each user preference after allocation. It will be appreciated that in the embodiment of the present disclosure, the original preference ranking of each payment channel is allocated for each user, and the main purpose is to adjust the preferred payment channel of each user's preference.
In one example, the current proportion of each payment channel is determined according to the proportion of each payment channel in the preferred payment channels currently preferred by each user; judging whether the current proportion of the non-preferred payment channel is smaller than the expected proportion of the non-preferred payment channel according to the non-preferred payment channel of each user; when the current proportion of the non-preferred payment channel is smaller than the expected proportion of the non-preferred payment channel, the original preference ordering of the user for each payment channel is adjusted, so that the non-preferred payment channel is allocated as the preferred payment channel preferred by the user.
Further, after traversing all non-preferred payment channels of each user, judging whether the current proportion of each payment channel is consistent with the expected proportion of each payment channel; and if the current proportion of each payment channel is not consistent with the expected proportion of each payment channel, outputting alarm information, wherein the alarm information is used for informing that the expected proportion of each payment channel needs to be adjusted.
Further, the preferred payment channel currently preferred by the user is determined not to be a pre-specified preferred payment channel, and then the original preference ordering of the user for each payment channel is adjusted so that the non-preferred payment channel is allocated as the preferred payment channel preferred by the user.
In one example, a distributed processing manner is adopted to distribute each user to a plurality of machines, each machine executes the process of allocating the original preference order of each user to each payment channel according to the expected proportion of each payment channel, and the allocated preferred payment channel of each user preference is obtained.
In order to provide a clear understanding of the compounding process, a specific example will be described below. The list of preferences of the daily user payment channels is shown in the third table, and for simplicity, preference scores are omitted, and only preference ordering of each payment channel is shown.
Table three: daily user payment channel preference list
Referring to table three, the actual first payment tool proportion of the user can be obtained through statistics of payment channels, wherein the actual first payment tool proportion is 3/10=30%, the bank card=5/10=50%, the balance is precious=1/10=10%, and the balance is 1/10=10%.
In this example, the desired payment channel preference may be specified externally, such as:
flower: 50%, balance 20%, balance 10% and bank card 20%.
The user payment channel preferences after deployment in combination with the desired payment channel ratios may be as shown in table four.
Table four: user payment channel preferences after deployment
User ID
|
Payment channel preference
|
Id1
|
And (5) washing and shopping: bank card
|
Id2
|
And (5) washing and shopping: flower-shaped card and bank card
|
Id3
|
And (5) washing and shopping: balance of balance
|
Id4
|
And (5) washing and shopping: balance device
|
Id5
|
And (5) washing and shopping: flower-shaped flower
|
Id6
|
And (5) washing and shopping: flower-shaped card and bank card
|
Id7
|
And (5) washing and shopping: balance treasuring and bank card
|
Id8
|
And (5) washing and shopping: bank card, balance
|
Id9
|
And (5) washing and shopping: flower-shaped flower
|
Id10
|
And (5) washing and shopping: flower-shaped flower |
Referring to table four, the ratio of each payment channel after the blending: 50% of Beibei, 20% of balance, 10% of balance and 20% of bank card, and is consistent with the expected proportion.
The embodiment of the specification also provides a specific logic allocation process: (flower = HB, balance treasure = YEs, balance = YE, bank card = YHK)
1. A counter, denoted by C (), is initialized for each payment channel, such as:
C(HB)=C(YEB)=C(YE)=C(YHK)=100
2. distribution function:
traversing all users:
the current proportion of each payment channel is calculated,
D(HB)=a
D(YEB)=b
D(YE)=c
D(YHK)d
if the current proportion is inconsistent with the expected proportion, traversing all payment channels of the target user:
judging whether the current proportion of the current payment channel is smaller than the expected proportion corresponding to the payment channel, and if so:
modifying user first-pushed payment channels
Corresponding counter +1
After traversing all payment channels of all users, if the current proportion is still inconsistent with the expected proportion, it may happen that the user has no payment channel available, alarm information is output, errors are reported, and the offline given proportion is notified to be checked.
It can be understood that after each time the payment channel preferred by the user is allocated, the current proportion can be recalculated according to the numerical value of the counter, if the current proportion is consistent with the expected proportion, the allocation process is ended, otherwise, the allocation process for the next user is continued until the current proportion is consistent with the expected proportion.
In one example, the deployment process may be implemented based on MapReduce:
the user specifies the number of machines N of the input, reduce.
1. Map terminal
A random number n is assigned to the user, representing the channel assignment of the user to the nth Reduce machine.
2. Reduce end
And (3) distributing m users of the nth machine, executing a distribution function and re-distributing channels.
The implementation based on MapReduce can also increase the Combiner stage, and the efficiency can be improved.
In addition, some rules can be added to modify the proportioning function, such as: the flower is preferentially distributed.
Finally, in step 24, payment channels respectively recommended to the users are determined according to the preferred payment channels preferred by the users after allocation. It will be appreciated that the specific form of recommending payment channels to the user may be by default, or by ranking the recommended payment channels first in a linked order of a plurality of payment channels.
According to the method provided by the embodiment of the specification, the original preference ordering of each user for each payment channel is firstly obtained, the expected proportion of each user for each payment channel is obtained, then the original preference ordering of each user for each payment channel is allocated according to the expected proportion of each payment channel, the preferred payment channels of each allocated user preference are obtained, and finally the payment channels respectively recommended to each user are determined according to the preferred payment channels of each allocated user preference. Therefore, in the embodiment of the specification, when recommending the payment channels to the user, the user preference is considered, and the user preference is allocated according to the expected proportion of each payment channel, so that the user payment preference is followed as much as possible under the precondition of ensuring the successful payment, and good payment experience is provided for the user.
According to an embodiment of another aspect, there is further provided a recommendation device for a payment channel, where the device is configured to execute the recommendation method for a payment channel provided in the embodiment of the present disclosure. Fig. 3 shows a schematic block diagram of a recommendation device of a payment channel according to one embodiment. As shown in fig. 3, the apparatus 300 includes:
a first obtaining unit 31, configured to obtain an original preference ranking of each user for each payment channel;
a second acquiring unit 32 for acquiring a desired ratio of each user to use each payment channel;
a deployment unit 33, configured to deploy the original preference ranking of each payment channel by each user acquired by the first acquisition unit 31 according to the expected proportion of each payment channel acquired by the second acquisition unit 32, so as to obtain a preferred payment channel preferred by each user after deployment;
and a recommending unit 34, configured to determine payment channels respectively recommended to each user according to the preferred payment channels of each user after the allocating unit 33 allocates.
Alternatively, as an embodiment, the first obtaining unit 31 includes:
the acquisition subunit is used for acquiring historical payment behavior data of each user; the historical payment behavior data at least comprise each historical payment channel and corresponding payment results, and the payment results comprise payment success and payment failure;
and the prediction subunit is used for predicting the original preference ordering of each user for each payment channel according to each historical payment channel of each user and the corresponding payment result acquired by the acquisition subunit.
Further, the prediction subunit is specifically configured to:
screening out each corresponding historical payment channel when the payment result of the target user is successful payment according to each historical payment channel and the corresponding payment result of the target user;
counting the times of each historical payment channel screened by the target user;
and determining the original preference ordering of the target user for each payment channel according to the order of the times from big to small.
Optionally, as an embodiment, the second obtaining unit 32 is specifically configured to determine the expected ratio of each user to use each payment channel according to the total amount of payment requests that can be born by each payment channel in unit time and the total amount of payment requests that are expected in unit time.
Optionally, as an embodiment, the allocating unit 33 includes:
the determining subunit is used for determining the current proportion of each payment channel according to the proportion of each payment channel in the preferred payment channels currently preferred by each user;
a judging subunit, configured to judge, for each non-preferred payment channel of the user, whether a current ratio of the non-preferred payment channel is less than an expected ratio of the non-preferred payment channel;
and the allocation subunit is used for adjusting the original preference ordering of the user for each payment channel when the judging subunit judges that the current proportion of the non-preferred payment channel is smaller than the expected proportion of the non-preferred payment channel, so that the non-preferred payment channel is allocated as the preferred payment channel preferred by the user.
Further, the apparatus further comprises:
the judging unit is used for judging whether the current proportion of each payment channel is consistent with the expected proportion of each payment channel after the allocating unit traverses all the non-preferred payment channels of each user;
and the output unit is used for outputting alarm information if the judging unit judges that the current proportion of each payment channel is inconsistent with the expected proportion of each payment channel, and the alarm information is used for informing that the expected proportion of each payment channel needs to be adjusted.
Further, the allocating subunit is further configured to determine, before the adjusting the original preference ranking of the user for each payment channel so that the non-preferred payment channel is allocated as the preferred payment channel preferred by the user, that the preferred payment channel currently preferred by the user is not a pre-specified payment channel with preferential allocation.
Optionally, as an embodiment, the allocating unit 33 is specifically configured to allocate each user to a plurality of machines, and each machine executes the allocating, according to the expected matching ratio of each payment channel, the allocating unit to allocate the user to the original preference ranking of each payment channel, so as to obtain the preferred payment channel preferred by each user after allocation.
Through the device provided in this embodiment of the present disclosure, first, the first obtaining unit 31 obtains the original preference ranking of each user for each payment channel, the second obtaining unit 32 obtains the expected proportion of each user for each payment channel, then the allocating unit 33 allocates the original preference ranking of each user for each payment channel according to the expected proportion of each payment channel, so as to obtain the preferred payment channel of each allocated user preference, and finally the recommending unit 34 determines the payment channel recommended to each user according to the preferred payment channel of each allocated user preference. Therefore, in the embodiment of the specification, when recommending the payment channels to the user, the user preference is considered, and the user preference is allocated according to the expected proportion of each payment channel, so that the user payment preference is followed as much as possible under the precondition of ensuring the successful payment, and good payment experience is provided for the user.
According to an embodiment of another aspect, there is also provided a computer-readable storage medium having stored thereon a computer program which, when executed in a computer, causes the computer to perform the method described in connection with fig. 2.
According to an embodiment of yet another aspect, there is also provided a computing device including a memory having executable code stored therein and a processor that, when executing the executable code, implements the method described in connection with fig. 2.
Those skilled in the art will appreciate that in one or more of the examples described above, the functions described in the present invention may be implemented in hardware, software, firmware, or any combination thereof. When implemented in software, these functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium.
The foregoing embodiments have been provided for the purpose of illustrating the general principles of the present invention in further detail, and are not to be construed as limiting the scope of the invention, but are merely intended to cover any modifications, equivalents, improvements, etc. based on the teachings of the invention.