Payment channel switching method, device, terminal and storage medium

By selecting the main and backup payment channel based on the client's regional information and using greedy algorithms and heartbeat detection, the intelligent senseless switching of third-party payment channels is achieved, and the payment failure problem caused by abnormal third-party payment channels is solved, which improves the stability of the payment system. Sex and user experience.

CN117408683BActive Publication Date: 2024-11-29JIANGSU HUANXUN INFORMATION TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202311434405.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-31
Publication Date
2024-11-29
Estimated Expiration
2043-10-31

AI Technical Summary

Technical Problem

Existing e-commerce companies rely on the stability of third-party payment channels, resulting in the payment business being prone to failure when there are abnormalities in third-party payment channels, which affects the user experience and leads to churn and economic losses.

Method used

By selecting the primary and backup payment channels based on the client's geographical attribute information, and using greedy algorithms and heartbeat detection technologies, intelligent senseless switching to backup channels is achieved to ensure the stability of the payment process.

Benefits of technology

When there is an abnormality in a third-party payment channel, the system can automatically switch to the backup channel to ensure that users complete payment smoothly and improve the stability and user satisfaction of the payment system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117408683B_ABST
    Figure CN117408683B_ABST
Patent Text Reader

Abstract

The present invention discloses a payment channel switching method, device, terminal and storage medium, which belongs to the field of computer technology, wherein the method comprises: selecting one from a plurality of third-party payment channels as the main payment channel of the current client according to the regional affiliation information of the client, and the rest as the backup payment channels of the current client; receiving a payment request from the current client, marking the unresponded payment request as an abnormal payment request, recording all the payment data of the abnormal payment request as abnormal payment data, judging the abnormal payment data according to a preset channel switching standard, switching the channel according to the judgment result, and sending an alarm message corresponding to the abnormal payment data when the payment channel of the client is switched from the main payment channel to the backup payment channel. The present application realizes the intelligent and senseless switching of the third-party payment channel, so that the user can successfully complete the payment without perception, and avoids the poor user experience caused by payment failure.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a payment channel switching method, device, terminal and storage medium. Background Art

[0002] In recent years, with the rapid development of mobile payment and e-commerce, the payment system has become an indispensable part of the digital economy. Among them, electronic payment channels carry payment services and greatly facilitate online payments for end customers.

[0003] There are many payment companies on the market, but most e-commerce companies do not have acquiring qualifications, and there are very few companies with their own payment licenses. Most of them access third-party payment channels to make payments. Therefore, the stability of payment is very dependent on the service stability of the third-party payment channel. Once the third-party payment channel service is abnormal, the service stability is poor, or the network fluctuates, it will cause large-scale payment failures, leading to problems in the company's own payment business, thus affecting users, making the user experience bad, resulting in user loss, and ultimately causing huge economic and reputation losses to the company.

[0004] Therefore, in order to avoid the adverse effects caused by the instability of third-party payment channels, current e-commerce companies generally adopt a multi-channel aggregation method to aggregate multiple third-party payment channels so that when one payment channel is unstable, the backup payment channel can be immediately activated, which improves the system stability to a certain extent. Therefore, how to automatically switch to another backup payment channel to complete the payment smoothly when a service abnormality occurs in the third-party payment channel has become a problem that needs to be solved urgently by technicians in this field. Summary of the invention

[0005] In order to ensure that the system can intelligently and seamlessly switch to other third-party payment channels when the current third-party payment channel is unstable, so that users can successfully complete payment, the present application provides a payment channel switching method, device, terminal and storage medium.

[0006] In the first aspect, the present application provides a payment channel switching method, which adopts the following technical solution:

[0007] A payment channel switching method comprises the following steps:

[0008] According to the regional affiliation information of the client, one of the multiple third-party payment channels is selected as the primary payment channel of the current client, and the rest are selected as backup payment channels of the current client;

[0009] Receive a payment request from the current client, mark the payment request that has not been responded to as an abnormal payment request, record all payment data of the abnormal payment request as abnormal payment data, judge the abnormal payment data according to a preset channel switching standard, switch channels according to the judgment result, and send alarm information corresponding to the abnormal payment data when the payment channel of the client is switched from the main payment channel to the backup payment channel;

[0010] The step of judging the abnormal payment data according to a preset channel switching standard and switching the channel according to the judgment result includes:

[0011] When the abnormal payment data does not meet the first channel switching standard, determine whether the abnormal payment data meets the second channel switching standard. If the second channel switching standard is still not met, determine whether the abnormal payment data meets the third channel switching standard. If any one of the channel switching standards is met, switch the main payment channel of the client to the backup payment channel.

[0012] By adopting the above technical solution, intelligent and seamless switching of third-party payment channels is achieved. When an abnormality occurs in the main payment channel of the current client, the system can automatically switch to the backup payment channel in the background, allowing the user to complete the payment smoothly.

[0013] Preferably, the step of selecting one of the plurality of third-party payment channels as the current primary payment channel of the client according to the regional affiliation information of the client specifically comprises the following steps:

[0014] Based on the regional affiliation information of the current client, test the network request response time of multiple times of all the third-party payment channels to the region in the regional affiliation information, determine the optimal network of the client based on the network request response time, and select the third-party payment channel that best suits the current client from all the third-party payment channels in combination with the greedy algorithm as the main payment channel.

[0015] By adopting the above technical solution, a third-party channel that is most suitable for the current client is calculated through a greedy algorithm, thereby ensuring the stability of the main payment channel to the greatest extent.

[0016] Preferably, after selecting one from a plurality of third-party payment channels as the current main payment channel of the client according to the regional affiliation information of the client, the following steps are also included:

[0017] Perform heartbeat detection on the primary payment channel according to a preset heartbeat detection cycle, and receive and store the returned heartbeat detection result;

[0018] The heartbeat detection result is judged according to a preset fourth channel switching standard, and the channel switching is performed according to the judgment result.

[0019] Preferably, judging the heartbeat detection result according to a preset fourth channel switching standard, and switching the channel according to the judgment result, specifically comprises the following steps:

[0020] The number of abnormal heartbeat detection results that have not received a response in the heartbeat detection results is counted and analyzed to determine whether the analysis results meet the fourth channel switching standard; when the number of abnormal heartbeat detection results obtained within the heartbeat detection cycle is higher than a preset alarm threshold, the main payment channel of the client is switched to the backup payment channel.

[0021] By adopting the above technical solution, the system continuously performs heartbeat detection on the main payment channel to prevent abnormalities in the main payment channel during low-peak payment periods and prevent them from being processed in a timely manner.

[0022] Preferably, after the payment channel of the client is switched from the main payment channel to the backup payment channel, the following steps are further included:

[0023] Performing a stability test on the primary payment channel, and when the primary payment channel passes the stability test, switching the payment channel of the client from the backup payment channel back to the primary payment channel,

[0024] Among them, the stability test of the main payment channel includes performing a heartbeat detection test on the main payment channel according to a preset heartbeat detection test cycle, obtaining the heartbeat detection test result within the heartbeat detection cycle, and taking the heartbeat detection test result that has not received a response as an abnormal test result. When the number of abnormal test results is lower than a preset test alarm threshold, it is determined that the main payment channel has passed the stability test.

[0025] By adopting the above technical solution, after the main payment channel has an abnormality and is switched to the backup payment channel, a heartbeat detection is performed on it, with the aim of being able to switch back as soon as possible after the main payment channel stabilizes.

[0026] Preferably, when the abnormal payment data does not meet the first channel switching standard, it is determined whether the abnormal payment data meets the second channel switching standard. If the second channel switching standard is still not met, it is determined whether the abnormal payment data meets the third channel switching standard. If any one of the channel switching standards is met, the main payment channel of the client is switched to the backup payment channel, which specifically includes the following steps:

[0027] In a preset payment detection cycle, the number of occurrences of the total payment data, the number of occurrences of the abnormal payment data, the number of consecutive occurrences of the abnormal payment data, and the maximum number of consecutive occurrences of the abnormal payment data are counted.

[0028] Compare the number of occurrences of the abnormal payment data with a preset first switching threshold, and when the number of occurrences of the abnormal payment data is not less than the first switching threshold, switch the main payment channel to the backup payment channel;

[0029] When the number of occurrences of the abnormal payment data is less than the first switching threshold, comparing the maximum number of consecutive occurrences of the abnormal payment data with a preset second switching threshold, and when the maximum value is not less than the second switching threshold, switching the main payment channel to the backup payment channel;

[0030] When the maximum value is less than the second switching threshold, calculate the abnormal frequency of the abnormal payment data within the payment detection cycle, where the abnormal frequency is the percentage of the abnormal payment data to the total payment data, and compare the abnormal frequency with a preset third switching threshold. When the abnormal frequency is not less than the third switching threshold, switch the main payment channel to the backup payment channel.

[0031] By adopting the above technical solution, the channel switching standards are clarified when the system monitors payment data in real time, realizing intelligent and seamless payment channel switching.

[0032] In the second aspect, the present application provides a payment channel switching device, which adopts the following technical solution:

[0033] A payment channel switching device, comprising the following modules:

[0034] A main channel determination module, used to select one from a plurality of third-party payment channels as the main payment channel of the current client and the rest as backup payment channels of the current client according to the regional affiliation information of the client;

[0035] A payment channel switching module, used for receiving a payment request from the current client, marking the payment request that has not been responded to as an abnormal payment request, recording all payment data of the abnormal payment request as abnormal payment data, judging the abnormal payment data according to a preset channel switching standard, switching the channel according to the judgment result, and sending an alarm message corresponding to the abnormal payment data when the payment channel of the client is switched from the main payment channel to the backup payment channel;

[0036] Wherein, the payment channel switching module includes the following units:

[0037] The payment channel switching unit is used to determine whether the abnormal payment data meets the second channel switching standard when the abnormal payment data does not meet the first channel switching standard. If the second channel switching standard is still not met, determine whether the abnormal payment data meets the third channel switching standard. If any one of the channel switching standards is met, switch the main payment channel of the client to the backup payment channel.

[0038] By adopting the above technical solutions, a complete payment channel switching and detection system has been built, which provides the necessary software technical support for improving the stability of the payment system, significantly improves the intelligence and automation level of the payment channel seamless switching technology, and meets the requirements of technological progress.

[0039] In a third aspect, the present application provides a smart terminal, which adopts the following technical solution:

[0040] A smart terminal includes a memory and a processor, wherein the memory stores at least one instruction, at least one program, code set or instruction set, and the at least one instruction, at least one program, code set or instruction set is loaded and executed by the processor to implement the payment channel switching method as described above.

[0041] In a fourth aspect, the present application provides a computer-readable storage medium, which adopts the following technical solution:

[0042] A computer-readable storage medium, wherein at least one instruction, at least one program, code set or instruction set is stored in the readable storage medium, and the at least one instruction, at least one program, code set or instruction set is loaded and executed by a processor to implement the payment channel switching method as described above.

[0043] In summary, this application has at least the following beneficial effects:

[0044] 1. This application uses technical means such as greedy algorithms and heartbeat detection to achieve intelligent and seamless switching of third-party payment channels. When selecting and switching payment channels, the greedy algorithm is used to obtain the payment channel that best suits the current client. At the same time, heartbeat detection is used to continuously monitor abnormal situations in third-party payment channels so that abnormal situations can be handled in a timely manner. During the switching process, users can successfully complete the payment without noticing, avoiding adverse consequences such as poor user experience caused by payment failure.

[0045] 2. This application improves the intelligence and automation level of payment channel switching technology, and aims to improve the stability, availability and user satisfaction of online payment systems through intelligent and real-time payment channel selection and switching mechanisms, which has important technical effects and benefits in the fields of e-commerce and digital payments. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 It is a flowchart of the payment channel switching method of an embodiment of the present application;

[0047] Figure 2 It is a schematic diagram of the payment channel switching judgment process of S2 in the payment channel switching method of an embodiment of the present application;

[0048] Figure 3 It is a schematic diagram of the architecture of the payment channel switching device according to an embodiment of the present application. DETAILED DESCRIPTION

[0049] The present application provides a payment channel switching method, device, terminal and storage medium. In order to make the purpose, technical solution and advantages of the present application clearer, the implementation method of the present application will be further described in detail below.

[0050] The following is a further detailed description of an embodiment of a payment channel switching method of the present application in conjunction with the drawings in the specification.

[0051] A payment channel switching method of this application, the process is as follows Figure 1 As shown, the following steps are included:

[0052] S1. According to the client's regional affiliation information, one is selected from multiple third-party payment channels as the main payment channel of the current client, and the rest are used as backup payment channels of the current client. This step specifically includes the following process.

[0053] S11. The system is connected to multiple domestic third-party payment channels at the same time, and is deployed remotely in server rooms in various regions of the country.

[0054] S12. When the merchant establishes a connection with the system, based on the current client's regional affiliation information, the merchant tests the multiple network request response times of all third-party payment channels to the region in the regional affiliation information, and determines the optimal network for the client based on the network request response time.

[0055] S13. Combine the greedy algorithm to select the third-party payment channel that best suits the current client from all third-party payment channels as the main payment channel, and use the other third-party payment channels as the client's backup payment channels. After all third-party payment channels are connected to the current client, set four channel switching standards, including various thresholds, as an important basis for judging whether to switch payment channels in the future. The thresholds can also be adjusted at any time in the system background.

[0056] S2. Receive payment requests from the current client, mark unanswered payment requests as abnormal payment requests, record all payment data of the abnormal payment requests as abnormal payment data, judge the abnormal payment data according to preset channel switching standards, and switch channels according to the judgment results. When the payment channel of the client is switched from the main payment channel to the backup payment channel, send an alarm message corresponding to the abnormal payment data. This step specifically includes the following process.

[0057] S21. Receive a payment request from the current client, monitor abnormal payment data of abnormal payment requests and store them in a distributed search and analysis engine in the form of logs.

[0058] S22, judging the abnormal payment data according to the channel switching standard, when the abnormal payment data does not meet the first channel switching standard, judging whether the abnormal payment data meets the second channel switching standard, if it still does not meet the second channel switching standard, judging whether the abnormal payment data meets the third channel switching standard, if it meets any channel switching standard, switching the client's main payment channel to the backup payment channel, further, if Figure 2 As shown, the specific basis of the judgment process here is as follows.

[0059] Within a preset payment detection cycle, the total number of payment data occurrences, the number of abnormal payment data occurrences, the number of consecutive abnormal payment data occurrences, and the maximum number of consecutive abnormal payment data occurrences are counted.

[0060] Compare the number of occurrences of abnormal payment data with a preset first switching threshold, and when the number of occurrences of abnormal payment data is not less than the first switching threshold, switch the main payment channel to the backup payment channel;

[0061] When the number of occurrences of abnormal payment data is less than the first switching threshold, the maximum number of consecutive occurrences of abnormal payment data is compared with a preset second switching threshold, and when the maximum value is not less than the second switching threshold, the main payment channel is switched to the backup payment channel;

[0062] When the maximum value is less than the second switching threshold, the abnormal frequency of abnormal payment data in the payment detection cycle is calculated, and the abnormal frequency is the percentage value of abnormal payment data to total payment data. The abnormal frequency is compared with a preset third switching threshold. When the abnormal frequency is not less than the third switching threshold, the main payment channel is switched to the backup payment channel;

[0063] When the abnormal frequency is less than the third switching threshold, continue to use the current main payment channel.

[0064] In a specific implementation scheme, the payment detection cycle is set to one minute, the first switching threshold is set to 50, the second switching threshold is set to 10, and the third switching threshold is set to 4%. The above judgment process is as follows:

[0065] When 50 or more abnormal payment data appear within one minute, the main payment channel will be intelligently switched to the client's backup payment channel.

[0066] If there are no 50 or more consecutive abnormal payment data, then determine whether 10 or more consecutive abnormal payment data appear in the main payment channel within one minute. If so, the main payment channel will be intelligently switched to the client's backup payment channel.

[0067] If there are no 10 or more consecutive abnormal payment data, the frequency of abnormal payment data within one minute will be calculated to determine whether the abnormal frequency is not less than 4%. When the abnormal frequency is not less than 4%, the main payment channel will be intelligently switched to the client's backup payment channel. When the abnormal frequency is less than 4%, continue to use the current main payment channel.

[0068] In another embodiment, the above switching process may result in the following possibility: during the off-peak payment period, the payment data within the preset payment detection cycle may not meet the judgment quantity standard, which will cause the statistical results of abnormal payment data to be less than ideal. At this time, the payment detection cycle can be changed from a time period to a frequency period according to the situation, and the number and frequency of abnormal payment data occurring within the preset number of times are calculated. Accordingly, the above channel switching standards can also make some adaptive changes.

[0069] S23. After the payment channel is switched, the alarm system will send alarm information corresponding to the abnormal payment data to the backend.

[0070] In this embodiment, when the main payment channel switches to the backup payment channel, the greedy algorithm is also used to select the most suitable payment channel for the current client from all backup payment channels. The method is the same as that for determining the main payment channel, and will not be elaborated here.

[0071] The above steps adopt multiple judgment criteria, and count and calculate the number and frequency of abnormal data occurrences, which can make the judgment of payment channel switching more comprehensive and accurate.

[0072] S3. Perform heartbeat detection on the main payment channel according to the preset heartbeat detection cycle, receive and store the returned heartbeat detection result, judge the heartbeat detection result according to the preset fourth channel switching standard, and switch the channel according to the judgment result. This step specifically includes the following process.

[0073] S31. Send a request to the interface of the third-party payment channel corresponding to the current client according to the preset heartbeat detection frequency, and store the heartbeat detection result returned by each request in the distributed search analysis engine.

[0074] S32. Count and analyze the number of abnormal heartbeat detection results that have not received a response in the heartbeat detection results, and determine whether the analysis results meet the fourth channel switching standard. When the number of abnormal heartbeat detection results obtained within the heartbeat detection cycle is higher than the preset alarm threshold, the client's main payment channel is switched to the backup payment channel.

[0075] In this embodiment, the heartbeat detection frequency is once every 5 seconds, the heartbeat detection period is one minute, and the alarm threshold is 5, that is, a request is sent to the main payment channel every 5 seconds. If 5 or more abnormal heartbeat detection results occur within one minute, the main payment channel will be intelligently switched to the client's backup payment channel.

[0076] The purpose of heartbeat detection is to detect problems in time and ensure autonomous switching of payment channels when problems occur in the main payment channel during time periods such as early morning when there are almost no payment transactions, making the system more stable and comprehensive.

[0077] In other feasible specific solutions, the order of S2 and S3 can be exchanged according to actual application conditions.

[0078] S4. Perform a stability test on the main payment channel. When the main payment channel passes the stability test, switch the client's payment channel from the backup payment channel back to the main payment channel. This step specifically includes the following process.

[0079] S41. Perform a heartbeat detection test on the main payment channel according to a preset heartbeat detection test cycle to obtain the heartbeat detection test results within the heartbeat detection cycle. The heartbeat detection test results that do not receive a response are regarded as abnormal test results. When the number of abnormal test results is lower than the preset test alarm threshold, the main payment channel is deemed to have passed the stability test.

[0080] The stability test method is actually to use the heartbeat detection method to test the main payment channel. The interfaces of the third-party payment channel include balance query interface, payment interface and refund interface. The server can send requests to any of the above interfaces for heartbeat detection.

[0081] S42. When the primary payment channel passes the stability test, the client's payment channel is switched from the backup payment channel back to the primary payment channel.

[0082] In this embodiment, before the stability test is performed, the backend management personnel receive the alarm information issued by the system and can go online to check the problem in time. The technician communicates with the third-party payment channel service provider to clarify the cause of the failure and the time of recovery, so as to prepare specific response measures and notify the relevant departments to handle it. After the technicians learn that the third-party payment channel recovery system has returned to normal, the backend system and technicians continue to wait and see and perform stability tests, which plays a double role in switching back to the main payment channel. If for some reason the technicians are unable to check and handle the problem in time, the system will automatically perform a stability test.

[0083] The above method improves system stability and security by switching multiple payment channels, solves system risks caused by excessive reliance on a single payment channel, and realizes the needs of informatization and intelligence. At the same time, it can provide users with the payment channels that best meet their needs and improve their experience and satisfaction.

[0084] Based on the same inventive concept as above, the present application also discloses a payment channel switching device, the architecture of which is as follows: Figure 2 As shown, the device includes the following modules:

[0085] The main channel determination module is used to select one from multiple third-party payment channels as the main payment channel of the current client according to the client's regional affiliation information, and the rest as backup payment channels of the current client.

[0086] The payment channel switching module is used to receive payment requests from the current client, mark unresponsive payment requests as abnormal payment requests, record all payment data of the abnormal payment requests as abnormal payment data, judge the abnormal payment data according to preset channel switching standards, switch channels according to the judgment results, and send alarm information corresponding to the abnormal payment data when the client's payment channel is switched from the main payment channel to the backup payment channel.

[0087] In a specific implementation scheme, the main channel determination module includes the following units:

[0088] The main channel determination unit is used to test the multiple network request response times of all third-party payment channels to the region in the regional affiliation information according to the regional affiliation information of the current client, determine the optimal network for the client according to the network request response time, and select the third-party payment channel that best suits the current client from all third-party payment channels in combination with the greedy algorithm as the main payment channel.

[0089] In a specific implementation scheme, the payment channel switching module includes the following units:

[0090] The payment channel switching unit is used to determine whether the abnormal payment data meets the second channel switching standard when the abnormal payment data does not meet the first channel switching standard. If the second channel switching standard is still not met, determine whether the abnormal payment data meets the third channel switching standard. If any channel switching standard is met, switch the client's main payment channel to the backup payment channel.

[0091] The alarm prompt unit is used to send alarm information corresponding to abnormal payment data when the client's payment channel is switched from the main payment channel to the backup payment channel.

[0092] In a specific implementation scheme, the payment channel switching unit includes the following sub-units:

[0093] The first payment channel switching subunit is used to compare the number of times the abnormal payment data occurs with a preset first switching threshold, and when the number of times the abnormal payment data occurs is not less than the first switching threshold, the main payment channel is switched to the backup payment channel.

[0094] The second payment channel switching subunit is used to compare the maximum number of consecutive occurrences of abnormal payment data with a preset second switching threshold when the number of occurrences of abnormal payment data is less than the first switching threshold, and to switch the main payment channel to the backup payment channel when the maximum value is not less than the second switching threshold.

[0095] The third payment channel switching subunit is used to calculate the abnormal frequency of abnormal payment data within the payment detection cycle when the maximum value is less than the second switching threshold, the abnormal frequency is the percentage value of the abnormal payment data to the total payment data, and compare the abnormal frequency with the preset third switching threshold. When the abnormal frequency is not less than the third switching threshold, the main payment channel is switched to the backup payment channel.

[0096] In a specific possible implementation scheme, a payment channel switching device further includes the following modules:

[0097] The heartbeat detection module is used to perform heartbeat detection on the main payment channel according to a preset heartbeat detection cycle, receive and store the returned heartbeat detection results; judge the heartbeat detection results according to the preset fourth channel switching standard, and switch channels according to the judgment results.

[0098] The stability test module is used to perform stability test on the main payment channel. When the main payment channel passes the stability test, the client's payment channel is switched from the backup payment channel back to the main payment channel.

[0099] In a specific implementation scheme, the heartbeat detection module includes the following units:

[0100] The heartbeat detection unit is used to count and analyze the number of abnormal heartbeat detection results that have not received a response in the heartbeat detection results, and determine whether the analysis results meet the fourth channel switching standard. When the number of abnormal heartbeat detection results obtained within the heartbeat detection cycle is higher than the preset alarm threshold, the client's main payment channel is switched to the backup payment channel.

[0101] In a specific implementation scheme, the stability testing module includes the following units:

[0102] The stability testing unit is used to perform a heartbeat detection test on the main payment channel according to a preset heartbeat detection test cycle, obtain the heartbeat detection test results within the heartbeat detection cycle, and use the heartbeat detection test results that have not received a response as abnormal test results. When the number of abnormal test results is lower than the preset test alarm threshold, the main payment channel is deemed to have passed the stability test.

[0103] From the above functional introduction, it can be seen that a payment channel switching device in this application has built a complete payment channel switching system, improved the intelligence and automation level of payment channel switching technology, enhanced the stability, availability and user satisfaction of the online payment system, and promoted the sustained, rapid and healthy development of the economy and society.

[0104] Based on the same inventive concept mentioned above, an embodiment of the present application also discloses a computer-readable storage medium, which stores at least one instruction, at least one program, code set or instruction set, and the at least one instruction, at least one program, code set or instruction set can be loaded and executed by a processor to implement the payment channel switching device method provided in the above method embodiment.

[0105] It should be understood that the "plurality" mentioned in this article refers to two or more. "And / or" describes the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects are in an "or" relationship.

[0106] Also based on the same inventive concept mentioned above, an embodiment of the present application also discloses a computer-readable storage medium, in which at least one instruction, at least one program, code set or instruction set is stored, and the at least one instruction, at least one program, code set or instruction set is loaded and executed by a processor to implement the payment channel switching device method as described above.

[0107] Those skilled in the art will appreciate that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in the computer-readable storage medium, which may include, for example, various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0108] It should be understood that the steps of the above methods and processes of the present disclosure are merely illustrative and not restrictive. It should be understood that these steps or processes may be performed in any reasonable order, and any step may be combined or divided into other sub-steps for execution, all of which are covered within the scope of protection of the present disclosure.

[0109] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A payment channel switching method, It is characterized in that The steps include: According to the regional affiliation information of the client, one of the plurality of third-party payment channels is selected as the main payment channel of the current client, and the rest are used as backup payment channels of the current client, specifically including the following steps: According to the region affiliation information of the current client, test the network request response time of all the third-party payment channels to the region in the region affiliation information, determine the optimal network of the client according to the network request response time, and select the third-party payment channel that best suits the current client from all the third-party payment channels in combination with the greedy algorithm as the main payment channel; Receive a payment request from the current client, mark the payment request that has not been responded to as an abnormal payment request, record all payment data of the abnormal payment request as abnormal payment data, judge the abnormal payment data according to a preset channel switching standard, switch channels according to the judgment result, and send alarm information corresponding to the abnormal payment data when the payment channel of the client is switched from the main payment channel to the backup payment channel; The step of judging the abnormal payment data according to a preset channel switching standard and switching the channel according to the judgment result includes: When the abnormal payment data does not meet the first channel switching standard, determine whether the abnormal payment data meets the second channel switching standard. If the second channel switching standard is still not met, determine whether the abnormal payment data meets the third channel switching standard. If any one of the channel switching standards is met, switch the main payment channel of the client to the backup payment channel, which specifically includes the following steps: In a preset payment detection cycle, the number of occurrences of the total payment data, the number of occurrences of the abnormal payment data, the number of consecutive occurrences of the abnormal payment data, and the maximum number of consecutive occurrences of the abnormal payment data are counted. The number of occurrences of the abnormal payment data is compared with a preset first switching threshold, and when the number of occurrences of the abnormal payment data is not less than the first switching threshold, the main payment channel is switched to the backup payment channel, When the number of occurrences of the abnormal payment data is less than the first switching threshold, the maximum number of consecutive occurrences of the abnormal payment data is compared with a preset second switching threshold, and when the maximum value is not less than the second switching threshold, the main payment channel is switched to the backup payment channel. When the maximum value is less than the second switching threshold, the abnormal frequency of the abnormal payment data in the payment detection cycle is calculated, the abnormal frequency being the percentage value of the abnormal payment data to the total payment data, and the abnormal frequency is compared with a preset third switching threshold. When the abnormal frequency is not less than the third switching threshold, the main payment channel is switched to the backup payment channel; After selecting one from a plurality of third-party payment channels as the current main payment channel of the client according to the regional affiliation information of the client, the following steps are also included: performing heartbeat detection on the main payment channel according to a preset heartbeat detection period, receiving and storing the returned heartbeat detection result, specifically including sending a request to the interface of the third-party payment channel corresponding to the current client according to the preset heartbeat detection frequency, the interface of the third-party payment channel includes a balance query interface, a payment interface and a refund interface, and the server can send a request to any of the above interfaces to perform heartbeat detection; The heartbeat detection result is judged according to a preset fourth channel switching standard, and the channel switching is performed according to the judgment result.

2. The payment channel switching method according to claim 1, It is characterized in that The step of judging the heartbeat detection result according to a preset fourth channel switching standard and switching the channel according to the judgment result specifically includes the following steps: The number of abnormal heartbeat detection results that have not received a response in the heartbeat detection results is counted and analyzed to determine whether the analysis results meet the fourth channel switching standard; when the number of abnormal heartbeat detection results obtained within the heartbeat detection cycle is higher than a preset alarm threshold, the main payment channel of the client is switched to the backup payment channel.

3. The payment channel switching method according to claim 1, It is characterized in that After the payment channel of the client is switched from the main payment channel to the backup payment channel, the following steps are also included: Performing a stability test on the primary payment channel, and when the primary payment channel passes the stability test, switching the payment channel of the client from the backup payment channel back to the primary payment channel, Among them, the stability test of the main payment channel includes performing a heartbeat detection test on the main payment channel according to a preset heartbeat detection test cycle, obtaining the heartbeat detection test result within the heartbeat detection cycle, and taking the heartbeat detection test result that has not received a response as an abnormal test result. When the number of abnormal test results is lower than a preset test alarm threshold, it is determined that the main payment channel has passed the stability test.

4. A payment channel switching device, It is characterized in that Includes the following modules: The main channel determination module is used to select one from multiple third-party payment channels as the main payment channel of the current client and the rest as the backup payment channels of the current client according to the regional affiliation information of the client, and specifically includes the following units: The main channel determination unit is used to test the network request response time of all third-party payment channels to the region in the region attribution information according to the region attribution information of the current client, determine the optimal network of the client according to the network request response time, and select the most suitable third-party payment channel for the current client from all third-party payment channels in combination with the greedy algorithm as the main payment channel; A payment channel switching module, used for receiving a payment request from the current client, marking the payment request that has not been responded to as an abnormal payment request, recording all payment data of the abnormal payment request as abnormal payment data, judging the abnormal payment data according to a preset channel switching standard, switching the channel according to the judgment result, and sending an alarm message corresponding to the abnormal payment data when the payment channel of the client is switched from the main payment channel to the backup payment channel; Wherein, the payment channel switching module includes the following units: The payment channel switching unit is used to determine whether the abnormal payment data meets the second channel switching standard when the abnormal payment data does not meet the first channel switching standard. If the second channel switching standard is still not met, determine whether the abnormal payment data meets the third channel switching standard. If any one of the channel switching standards is met, switch the main payment channel of the client to the backup payment channel. Within a preset payment detection cycle, count the number of occurrences of total payment data, the number of occurrences of the abnormal payment data, the number of consecutive occurrences of the abnormal payment data, and the maximum number of consecutive occurrences of the abnormal payment data. The payment channel switching unit includes the following sub-units: The first payment channel switching subunit is used to compare the number of occurrences of abnormal payment data with a preset first switching threshold, and when the number of occurrences of abnormal payment data is not less than the first switching threshold, switch the main payment channel to the backup payment channel, The second payment channel switching subunit is used to compare the maximum number of consecutive occurrences of the abnormal payment data with a preset second switching threshold when the number of occurrences of the abnormal payment data is less than the first switching threshold, and when the maximum value is not less than the second switching threshold, switch the main payment channel to the backup payment channel, The third payment channel switching subunit is used to calculate the abnormal frequency of abnormal payment data in the payment detection cycle when the maximum value is less than the second switching threshold, the abnormal frequency is the percentage value of abnormal payment data to total payment data, compare the abnormal frequency with a preset third switching threshold, and switch the main payment channel to the backup payment channel when the abnormal frequency is not less than the third switching threshold; It also includes the following modules: a heartbeat detection module, which is used to perform heartbeat detection on the main payment channel according to a preset heartbeat detection period, receive and store the returned heartbeat detection results, specifically including: sending a request to the interface of the third-party payment channel corresponding to the current client according to the preset heartbeat detection frequency, the interface of the third-party payment channel includes a balance query interface, a payment interface and a refund interface, and the server can send a request to any of the above interfaces to perform heartbeat detection; judging the heartbeat detection result according to the preset fourth channel switching standard, and switching the channel according to the judgment result.

5. A smart terminal, It is characterized in that It includes a memory and a processor, wherein the memory stores at least one instruction, at least one program, code set or instruction set, and the at least one instruction, at least one program, code set or instruction set is loaded and executed by the processor to implement the payment channel switching method as described in any one of claims 1 to 3.

6. A computer-readable storage medium, It is characterized in that The readable storage medium stores at least one instruction, at least one program, code set or instruction set, and the at least one instruction, at least one program, code set or instruction set is loaded and executed by the processor to implement the payment channel switching method as described in any one of claims 1 to 3.

Citation Information

Patent Citations

  • Processing method and device for recovery of payment channel

    CN108665251A

  • Payment channel fusing method and device, equipment and storage medium

    CN115099802A

  • Channel interface exception management method and device, terminal and storage medium

    CN117435446A