Payment request processing method and device, storage medium and electronic equipment
By receiving payment requests in the collection and payment system and intelligently selecting payment channels based on payment methods and channel information, the problem of low efficiency in execution of collection and payment by the collection and payment system is solved, and more efficient payment access and processing capabilities are achieved.
Patent Information
- Application Number
- CN202510119693.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-24
- Publication Date
- 2025-05-27
AI Technical Summary
In the prior art, the collection and payment system performs collection and payment inefficiently, and lacks the ability to intelligently select payment channels based on the characteristics of payment requests, resulting in high user development and maintenance costs and low payment access efficiency.
Receive payment requests through the collection and payment interface, select the target collection and payment channel according to the target payment method and the channel information of multiple collection and payment channels, convert the payment request into a payment instruction, and send it to the target payment platform through the channel interface to perform payment operations.
It realizes dynamic selection of the optimal payment channel and intelligent conversion of payment requests as payment instructions, simplifies the access process, improves payment access efficiency and payment processing capabilities of the collection and payment system.
Smart Images

Figure CN120047139A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computers. Specifically, the embodiments relate to a method and apparatus for processing payment requests, a storage medium, and an electronic device. Background Art
[0002] With the rapid development of e-commerce and digital payments, the diversity of payment channels has brought compatibility issues. Different payment channels may adopt different communication protocols, data formats, and security standards. Based on this, in the prior art, the processing method of collection and payment is limited by a single connection to the payment channel and lacks the ability to intelligently select a payment channel according to the characteristics of the payment request. Connecting to multiple channels requires separate connection to each payment channel, increasing the development and maintenance costs of users and resulting in low payment access efficiency. Summary of the Invention
[0003] The embodiments of the present application provide a method and apparatus for processing payment requests, a storage medium, and an electronic device, so as to at least solve the problem of low efficiency of the collection and payment system in performing collection and payment in the related art.
[0004] According to an embodiment of the present application, a method for processing a payment request is provided. The method is applied to a collection and payment system, where the collection and payment system is connected to a collection and payment platform through a collection and payment interface, and the collection and payment platform is connected to one or more of the N collection and payment channels included in the collection and payment system through a channel interface. The method includes: receiving, through the collection and payment interface, a payment request sent by the collection and payment platform, where the payment request includes target user information of a target user, amount information for purchasing a target commodity, and a selected target payment method; selecting a target collection and payment channel from the N collection and payment channels according to the target payment method and the channel information of the N collection and payment channels; converting the payment request into a first payment instruction, and sending the first payment instruction to a target payment platform through the channel interface, so as to respond to the first payment instruction through the target collection and payment channel and the target payment platform to perform a payment operation, where the target payment platform is configured to deduct a target amount corresponding to the amount information from the capital account of the target user and transfer the target amount to the account of the collection and payment platform.
[0005] In an exemplary embodiment, before receiving the payment request sent by the collection and payment platform through the collection and payment interface, the method further includes: obtaining the service requirements sent by the collection and payment platform; obtaining the channel information of N collection and payment channels according to the service requirements; generating the channel interfaces of N collection and payment channels and N exception handling mechanisms by using the channel information of N collection and payment channels, where N collection and payment channels correspond to one channel interface, one collection and payment channel corresponds to one exception handling mechanism, and each exception handling mechanism includes an exception threshold and a channel fusing strategy; integrating N collection and payment channels, the corresponding exception handling mechanisms, and the channel interfaces into the collection and payment system.
[0006] In an exemplary embodiment, generating the channel interfaces of N collection and payment channels and N exception handling mechanisms by using the channel information of N collection and payment channels includes: defining the access parameters of the channel interfaces and the service permissions of each collection and payment channel by using the channel information of N collection and payment channels, where the access parameters allow the collection and payment platform to access the channel interfaces, and the service permissions include allowed payment types and payment restrictions; generating the channel interfaces of N collection and payment channels and N exception handling mechanisms by using the access parameters of the channel interfaces and the service permissions of each collection and payment channel.
[0007] In an exemplary embodiment, according to the target payment method and the channel information of N collection and payment channels, selecting a target collection and payment channel from N collection and payment channels includes: retrieving a channel list that matches the target payment method from N collection and payment channels according to the channel information of N collection and payment channels, where the channel list includes M collection and payment channels, and each channel information includes the channel type of the corresponding collection and payment channel, supported payment methods, transaction limits, transaction fees, and transaction response times, and M is a natural number less than or equal to N; detecting the exception status and fusing status of the channel list; selecting the target collection and payment channel from M collection and payment channels based on the exception status and fusing status, where the exception value of the target collection and payment channel is less than the exception threshold, and the fusing status of the target collection and payment channel is not in the fusing period.
[0008] In an exemplary embodiment, before converting the payment request into a first payment instruction and sending the first payment instruction to a target payment platform through the channel interface to execute a payment operation in response to the first payment instruction through the target collection and payment channel and the target payment platform, the method further includes: obtaining N communication protocols of the N collection and payment channels, where the communication protocols include data formats, request-response modes, authentication mechanisms, and error code definitions of the collection and payment channels; setting, in the channel interface, adaptation components matching each of the communication protocols, where the adaptation components are used to convert the communication format of the collection and payment system into the communication format of the collection and payment channels; defining exception types for each of the collection and payment channels to execute the payment operation, and setting exception handling thresholds and exception triggering conditions for each of the collection and payment channels to obtain N exception handling mechanisms; and integrating the N exception handling mechanisms into the channel interface.
[0009] In an exemplary embodiment, converting the payment request into a first payment instruction and sending the first payment instruction to a target payment platform through the channel interface to execute a payment operation in response to the first payment instruction through the target collection and payment channel and the target payment platform includes: sending the payment request to the channel interface to execute a conversion operation on the payment request through the channel interface to obtain the first payment instruction, where the conversion operation includes: converting the payment request into the first payment instruction according to the channel protocol of the target collection and payment channel, where the instruction format of the first payment instruction allows the target collection and payment channel to identify; and in a case where the amount of funds in the target user's funds account is greater than or equal to the target amount, sending the first payment instruction to the target payment platform through the channel interface to execute a payment operation in response to the first payment instruction through the target collection and payment channel and the target payment platform.
[0010] In an exemplary embodiment, after sending the payment request to the channel interface to perform a conversion operation on the payment request through the channel interface to obtain the first payment instruction, the method further includes: when it is determined that the amount of funds in the target user's funds account is less than the target amount, generating a borrowing request according to the first payment instruction, where the borrowing request includes borrowing information and the credit information of the target user; sending the borrowing request to a lending platform to, in response to the borrowing request through the lending platform, send a target borrowing amount to the target user's funds account; when it is determined that the amount of funds in the target user's funds account is greater than or equal to the target amount, converting the payment request into a second payment instruction through the channel interface; sending the second payment instruction to the target payment platform through the channel interface to, in response to the second payment instruction through the target collection and payment channel and the target payment platform, perform the payment operation.
[0011] According to another embodiment of the present application, there is provided a processing device for a payment request, which is applied to a collection and payment system. The collection and payment system is connected to a collection and payment platform through a collection and payment interface. The collection and payment platform is connected to one or more of the N collection and payment channels included in the collection and payment system through a channel interface. The device includes: a first receiving module, configured to receive a payment request sent by the collection and payment platform through the collection and payment interface, where the payment request includes target user information of a target user, amount information for purchasing a target commodity, and a selected target payment method; a first selection module, configured to select a target collection and payment channel from the N collection and payment channels according to the target payment method and the channel information of the N collection and payment channels; a first processing module, configured to convert the payment request into a first payment instruction and send the first payment instruction to a target payment platform through the channel interface to, in response to the first payment instruction through the target collection and payment channel and the target payment platform, perform a payment operation, where the target payment platform is configured to deduct a target amount corresponding to the amount information from the target user's funds account and transfer the target amount to the account of the collection and payment platform.
[0012] According to still another embodiment of the present application, there is also provided a computer program product, including a computer program, where the computer program, when executed by a processor, implements the steps in any one of the above method embodiments.
[0013] According to still another embodiment of the present application, there is also provided a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and the computer program is configured to execute the steps in any one of the above method embodiments when running.
[0014] According to another embodiment of the present application, an electronic device is further provided, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0015] Through the present application, since the collection and payment system selects a target collection and payment channel from N collection and payment channels according to the target payment method and the channel information of the N collection and payment channels, that is, it can dynamically select the optimal payment channel and intelligently convert the payment request into a payment instruction. The access process is simplified, and the payment access efficiency and the payment processing ability of the collection and payment system are improved. Therefore, the problem of low efficiency of the collection and payment system in performing collection and payment in the related art can be solved, and the effect of improving the efficiency of the collection and payment system in performing collection and payment can be achieved. Description of the Drawings
[0016] Figure 1 is a hardware structure block diagram of a server device for a method of processing a payment request according to an embodiment of the present application;
[0017] Figure 2 is a flowchart of a method of processing a payment request according to an embodiment of the present application;
[0018] Figure 3 is a flowchart of an intelligent collection and payment processing method of a payment platform according to a specific embodiment of the present application;
[0019] Figure 4 is a structure block diagram of a device for processing a payment request according to an embodiment of the present application. Detailed Embodiments
[0020] In the following, embodiments of the present application will be described in detail with reference to the drawings and in conjunction with the embodiments.
[0021] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above drawings are used to distinguish similar objects, and do not necessarily need to describe a specific order or sequence.
[0022] The method embodiments provided in the embodiments of the present application can be executed in a server device or a similar computing device. Taking running on a server device as an example, Figure 1 is a hardware structure block diagram of a server device for a method of processing a payment request according to an embodiment of the present application. As Figure 1 shown, the server device may include one or more ( Figure 1Only one processor 102 is shown (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. Among them, the above server device may further include a transmission device 106 for communication functions and an input / output device 108. Those of ordinary skill in the art can understand that Figure 1 The structure shown is only schematic and does not limit the structure of the above server device. For example, the server device may further include more or fewer components than Figure 1 shown in, or have a different configuration from Figure 1 shown.
[0023] The memory 104 can be used to store computer programs. For example, software programs and modules of application software, such as the computer program corresponding to the payment request processing method in the embodiments of the present application. The processor 102 executes various functional applications and data processing by running the computer programs stored in the memory 104, that is, implements the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memories. In some instances, the memory 104 may further include a memory remotely set relative to the processor 102, and these remote memories can be connected to the server device through a network. Examples of the above network include, but are not limited to, the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.
[0024] The transmission device 106 is used to receive or send data via a network. Specific examples of the above network may include a wireless network provided by the communication provider of the server device. In one instance, the transmission device 106 includes a network adapter (abbreviated as NIC), which can be connected to other network devices through a base station and thus can communicate with the Internet. In one instance, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0025] In this embodiment, a method for processing a payment request is provided, which is applied to a collection and payment system. The collection and payment system is connected to a collection and payment platform through a collection and payment interface, and the collection and payment platform is connected to one or more of the N collection and payment channels included in the collection and payment system through a channel interface. Figure 2 is a flowchart of the method for processing a payment request according to the embodiments of the present application. As Figure 2 shown, the process includes the following steps:
[0026] Step S202: Receive a payment request sent by the collection and payment platform through the collection and payment interface. The payment request includes the target user information of the target user, the amount information for purchasing the target commodity, and the selected target payment method.
[0027] Optionally, the collection and payment interface in this embodiment is an interaction interface between the collection and payment system and the collection and payment platform, which is used to receive payment requests from the collection and payment platform and send payment instructions to the collection and payment channels to achieve the transfer of payment information.
[0028] Optionally, the collection and payment platform in this embodiment is an intermediate platform connecting consumers and merchants, which is used to process payment requests, manage transaction data, provide payment services, etc.
[0029] Optionally, the N collection and payment channels in this embodiment refer to multiple payment channels that the collection and payment system can access. For example, bank payment channels, third-party payment channels, digital wallet payment channels, etc. Each channel has its own communication protocol, processing capacity, and exception handling mechanism.
[0030] Optionally, the target payment method in this embodiment is the payment method selected by the user in the payment request. For example, credit card payment, Alipay, WeChat Pay, digital currency, etc.
[0031] Step S204: Select a target collection and payment channel from the N collection and payment channels according to the target payment method and the channel information of the N collection and payment channels.
[0032] Optionally, the channel information in this embodiment is the relevant information of each collection and payment channel, including channel status, channel fees, transaction success rate, response time, etc., which is used for the collection and payment system to select the optimal channel.
[0033] Step S206: Convert the payment request into a first payment instruction, and send the first payment instruction to the target payment platform through the channel interface, so as to respond to the first payment instruction through the target collection and payment channel and the target payment platform to perform the payment operation. The target payment platform is used to deduct the target amount corresponding to the amount information from the fund account of the target user and transfer the target amount to the account of the collection and payment platform.
[0034] Optionally, the first payment instruction in this embodiment is the instruction after the payment request is converted, and its format matches the communication protocol of the target collection and payment channel, and contains all the information required for payment. The target payment platform is the payment platform determined according to the target payment method and can perform payment operations, such as banks, third-party payment service providers, etc.
[0035] Optionally, the collection and payment system in this embodiment is a core component in the financial payment ecosystem, aiming to provide a unified interface to efficiently and securely process payment requests from different payment scenarios. The system interacts with the collection and payment platform through the designed collection and payment interface, and the collection and payment platform, as the direct contact point with merchants, consumers, and other payment service providers, is responsible for collecting thousands of payment requests and feedbacking payment results. The collection and payment interface plays the role of a bridge. It not only receives payment requests from the collection and payment platform but also is responsible for converting these requests into a standardized format for communication with N collection and payment channels within the system. Each collection and payment channel represents a specific payment channel, such as bank transfer, third-party payment, digital RMB payment, etc., and they each have different protocols, processing capabilities, and exception handling strategies.
[0036] In order to achieve flexible access to multiple channels and efficient payment processing in this embodiment, the channel interface in the collection and payment system undertakes the task of deep integration with different collection and payment channels. The channel interface is not only responsible for communicating with each channel but also stores detailed information about each channel, such as channel protocols, transaction fees, transaction limits, stability indicators, etc. When the collection and payment platform sends a payment request through the collection and payment interface, the collection and payment system will quickly screen and select the most suitable target channel from the N collection and payment channels according to the payment method, transaction amount, user preferences, and the current status of the channel in the request.
[0037] For example, for small-value and high-frequency cardless self-service transactions, the system may preferentially select third-party payment channels such as Alipay and WeChat Pay because these channels usually provide a more convenient payment experience and lower transaction latency; while if it involves cross-border payments or large-value transactions, the system may switch to using the direct connection channel between banks and enterprises to ensure the security and compliance of the transactions.
[0038] Through the dual mechanisms of the collection and payment interface and the channel interface, the collection and payment system can achieve flexible parsing and intelligent routing of payment requests, ensure that payment operations are executed on the most suitable channel, while ensuring the unity of the system's external interface and the flexibility of internal channel management. This design not only improves payment efficiency, reduces the transaction failure rate, but also simplifies the payment access process for merchants and consumers, providing strong technical support for the healthy development of the payment ecosystem.
[0039] This embodiment includes but is not limited to scenarios applied to e-commerce shopping payments, mobile phone recharge services, and cross-border payments.
[0040] For example, in the scenario of cross-border large-value payments, enterprise A needs to pay a $100,000 payment for goods to an overseas supplier and chooses to use the UnionPay International channel. The steps are as follows:
[0041] Step S302: Enterprise A sends a payment request to the collection and payment system through the enterprise payment platform. The request contains enterprise information, the payment amount ($100,000), and the target payment method (UnionPay International).
[0042] Step S304: The collection and payment system analyzes the capabilities and status of the UnionPay International channel and confirms that it is the best choice for processing large-scale cross-border payments.
[0043] Step S306: The system converts the payment request into a first payment instruction that conforms to the UnionPay International communication protocol and sends it to the UnionPay payment platform through the channel interface. The UnionPay payment platform executes the cross-border payment, deducts $100,000 from Enterprise A's bank account, and transfers the payment for goods to the overseas supplier's account through foreign exchange conversion and settlement, completing the cross-border payment.
[0044] Through the above steps, since the collection and payment system selects the target collection and payment channel from N collection and payment channels according to the target payment method and the channel information of the N collection and payment channels, it can dynamically select the optimal payment channel and intelligently convert the payment request into a payment instruction. This simplifies the access process, improves the payment access efficiency and the payment processing ability of the collection and payment system. Therefore, it can solve the problem of low efficiency of the collection and payment system in executing collection and payment in related technologies and achieve the effect of improving the efficiency of the collection and payment system in executing collection and payment.
[0045] In an exemplary embodiment, before receiving the payment request sent by the above collection and payment platform through the above collection and payment interface, the above method further includes: obtaining the service requirements sent by the above collection and payment platform; obtaining the channel information of N above collection and payment channels according to the above service requirements; generating the above channel interfaces and N exception handling mechanisms of N above collection and payment channels by using the channel information of N above collection and payment channels, where N above collection and payment channels correspond to one above channel interface, and one above collection and payment channel corresponds to one above exception handling mechanism, and each above exception handling mechanism includes an exception threshold and a channel fusing strategy; integrating N above collection and payment channels, the corresponding above exception handling mechanisms, and the above channel interfaces into the above collection and payment system.
[0046] Optionally, in the scenario of payment services, business requirements refer to the functional requirements put forward by the collection and payment platform or merchants to meet specific requirements of payment transactions. These requirements may involve aspects such as the diversity of payment methods, the optimization of payment success rate, the handling strategies for abnormal situations, and the minimization of transaction fees. For example, the collection and payment platform may hope to support multiple payment methods, such as credit card payment, bank transfer, third-party payment (Alipay, WeChat Pay, etc.), digital RMB payment, etc., to cover a wider user group. The platform may require the system to have strong abnormal monitoring and handling capabilities, be able to automatically identify abnormal situations during the payment process, such as network interruption, system failure, transaction failure, etc., and take corresponding fault tolerance measures, such as automatic retry, switching to an alternative channel, user notification, etc., to ensure the continuity and stability of payment services.
[0047] Optionally, the abnormal handling mechanism is a processing flow and strategy designed to handle various possible abnormal situations (such as transaction failure, network interruption, system failure, etc.) during the payment process. The abnormal handling mechanism usually includes the setting of abnormal thresholds, the detection of abnormal situations, the implementation of channel fusing strategies, and the automatic switching of backup channels.
[0048] Optionally, the abnormal threshold is an abnormal trigger threshold set for each collection and payment channel. For example, the transaction failure rate within a certain period, the upper limit of response time, the occurrence frequency of error codes, etc. When the abnormal situation of the channel exceeds the set threshold, the abnormal handling mechanism will be triggered.
[0049] Optionally, the channel fusing strategy is that when an abnormal situation occurs in the payment channel and reaches the abnormal threshold, the system automatically stops processing payment requests for that channel and enters the fusing state to prevent the spread of abnormalities and further losses. During the fusing period, the system will no longer use that channel for payment operations but switch to other available channels.
[0050] For example, in the payment processing scenario of the offline retail scenario, obtaining business requirements includes: offline retail stores hope to provide convenient contactless payment options, and at the same time be able to quickly respond to payment requests, reduce payment delays, and improve customer satisfaction.
[0051] Obtaining channel information includes: the collection and payment system obtains channel information of multiple collection and payment channels, including NFC payment channels, QR code payment channels, digital RMB payment channels, etc., and evaluates their response speeds and technical stabilities.
[0052] Generating channel interfaces and abnormal handling mechanisms includes: designing dedicated interfaces for each payment channel to ensure that the system can communicate with the channels quickly. At the same time, setting abnormal handling mechanisms for each channel. For example, when the NFC payment channel experiences multiple communication failures within a short period, automatically switch to the QR code payment channel to ensure the continuity of payment.
[0053] Integration into the collection and payment system includes: integrating these payment channels and their exception handling mechanisms into the collection and payment system. When customers choose NFC payment in retail stores, the system dynamically analyzes channel information and gives priority to NFC payment channels. However, when encountering an exception, it can immediately switch to the QR code payment channel to ensure that payment operations are completed quickly and improve payment efficiency.
[0054] Through the above embodiments, the collection and payment system obtains business needs and channel information in advance, generates corresponding channel interfaces and exception handling mechanisms, can intelligently select and switch payment channels, and effectively deal with abnormal situations that may occur during the payment process. It provides efficient, stable and secure payment services for different scenarios such as e-commerce platforms and offline retail, and significantly improves the payment experience.
[0055] In an exemplary embodiment, the channel information of the N agency collection and payment channels is used to generate the channel interfaces of the N agency collection and payment channels and N exception handling mechanisms, including:
[0056] Using the channel information of the N collection and payment channels, define the access parameters of the channel interface and the business authority of each of the collection and payment channels, wherein the access parameters allow the collection and payment platform to access the channel interface, and the business authority includes the allowed payment types and payment restrictions;
[0057] By using the access parameters of the channel interface and the business authority of each of the collection and payment channels, the channel interfaces of N of the collection and payment channels and N exception handling mechanisms are generated.
[0058] Optionally, the access parameters in this embodiment refer to a series of configuration information required by the channel interface in order for the collection and payment platform to communicate and interact with the collection and payment channel. These parameters may include the communication protocol type, port information, encryption method, authentication mechanism, etc., to ensure a secure, stable and efficient connection between the platform and the channel. For example, if the collection and payment channel is an HTTPS-based API interface, the access parameters may include the API URL, the data format of the request and response, the method of generating the authentication token, etc.
[0059] Optionally, the business permissions in this embodiment define the specific payment types and scope of operations that can be performed by the collection and payment channel, as well as restrictions on payment transactions. For example, a bank channel may only allow RMB transfers, with a daily transaction limit and transaction frequency limit; while a third-party payment channel such as Alipay may support multi-currency transactions, but has specific restrictions on cross-border payments. Business permissions also include the availability of specific payment methods (such as credit card payments, digital wallet payments, etc.) and related transaction rules (such as handling fee rates, arrival time, etc.).
[0060] Optionally, the exception handling mechanism in this embodiment is a coping strategy designed for various possible exceptions during the payment process. This includes setting exception thresholds (such as transaction failure rate, response time out, etc.). When the exception situation of a certain collection and payment channel is detected to reach or exceed the threshold, a fusing strategy is initiated, such as temporarily disabling the channel, automatically switching to a backup channel, or sending a warning notice to the system administrator. In addition, the exception handling mechanism also includes the recording, analysis, and reporting of exception situations for subsequent troubleshooting and system optimization.
[0061] For example, in the access management of bank channels and third-party payment channels, an e-commerce platform hopes to provide its users with multiple payment methods, including bank transfers and third-party payments. To ensure the diversity of payment channels and the reliability of the payment process, the e-commerce platform decides to access a collection and payment system with intelligent routing and exception management capabilities. The implementation steps include:
[0062] Step S402, obtain channel information: First, the collection and payment system needs to collect the channel information of bank payment channels and third-party payment channels (such as Alipay, WeChat Pay), which includes the technical specifications (such as API version, data format), business rules (such as transaction limits, handling fees), and current status (such as online, offline, under maintenance) of each channel.
[0063] Step S404, define access parameters and business permissions: Using this channel information, the system defines the access parameters of each channel interface to ensure that the e-commerce platform can establish a secure communication connection with these payment channels. At the same time, the system sets business permissions for each channel, clarifying payment types (such as instant payment, pre-authorization payment), payment limits, and handling fees, etc. For example, for the bank payment channel, the system may define that the supported payment types include instant transfer, the maximum transaction amount is 50,000 yuan, and a handling fee of 0.1% is charged for each transaction; for the Alipay channel, it is defined to support instant payment and QR code payment, with no transaction limit, and specific account types enjoy 0 handling fees.
[0064] Step S406, generate channel interfaces and exception handling mechanisms: Based on the above-defined access parameters and business permissions, the system generates the channel interfaces and exception handling mechanisms for each collection and payment channel. The channel interface is a standard interface for data exchange with each payment channel, and the exception handling mechanism includes the exception threshold setting and fusing strategy for each channel. For example, when the transaction failure rate of the bank payment channel reaches 5%, the system automatically fuses the channel, routes the payment request to a third-party payment channel such as Alipay for processing, and at the same time sends an alarm to the system administrator for troubleshooting and repair.
[0065] Step S408, Integration into the Collection and Payment System: Finally, integrate these channel interfaces and exception handling mechanisms into the collection and payment system to achieve unified management and intelligent routing of multiple payment channels. When the e-commerce platform receives a payment request from a user, the system dynamically selects the optimal payment channel based on the payment method, transaction amount, and the current status of the channels in the request. At the same time, the system can monitor the running status of each channel in real time. Once an exception is detected, the corresponding exception handling mechanism is immediately activated to ensure the continuity of the payment process and the user's payment experience.
[0066] Through the above embodiments, the collection and payment system customizes the access parameters of the channel interfaces and the business permissions of each collection and payment channel, not only realizing the flexible access of multiple payment channels, but also ensuring the intelligent selection of the optimal channel during the payment process, and being able to quickly respond and take appropriate measures in case of abnormal situations, thereby improving the reliability and efficiency of the payment service.
[0067] In an exemplary embodiment, according to the above target payment method and the channel information of N above-mentioned collection and payment channels, selecting a target collection and payment channel from the N above-mentioned collection and payment channels includes: retrieving a list of channels that match the above target payment method from the N above-mentioned collection and payment channels according to the channel information of the N above-mentioned collection and payment channels, where the above list of channels includes M above-mentioned collection and payment channels, and each of the above channel information includes the channel type, supported payment methods, transaction limit, transaction fee, and transaction response time of the corresponding collection and payment channel, and the above M is a natural number less than or equal to the above N; detecting the abnormal status and fuse status of the above list of channels; selecting the above target collection and payment channel from the M above-mentioned collection and payment channels based on the above abnormal status and fuse status, where the abnormal value of the above target collection and payment channel is less than the abnormal threshold, and the fuse status of the above target collection and payment channel is not in the fuse period.
[0068] Optionally, in the collection and payment system, the list of channels refers to a set of channels filtered from multiple available collection and payment channels that match the target payment method. For example, if the target payment method is Alipay, the list of channels will contain the information of all collection and payment channels that support Alipay payment.
[0069] Optionally, an abnormal state refers to any abnormal state that may occur during the operation of the collection and payment channel, including but not limited to an abnormal increase in the transaction failure rate, excessive response time, system crash, network connection problems, etc. The system will monitor the health of the channel based on the abnormal state to ensure the stability and security of the payment process. The fuse state is a protection measure automatically implemented by the system when the channel exhibits persistent or severe abnormalities. When the abnormal value of a certain collection and payment channel exceeds the set abnormal threshold, the system will mark it as the fuse state and temporarily stop the payment operation through this channel to prevent the abnormal situation from deteriorating further and affecting the payment success rate and user experience.
[0070] The abnormal threshold is the abnormal judgment standard set for each collection and payment channel. For example, when the transaction failure rate exceeds 3% or the response time exceeds 3 seconds, etc. When the abnormal value of the channel is detected to reach or exceed the abnormal threshold, the system will activate the fuse mechanism. After the channel is marked as the fuse state, the system will enter a predetermined fuse period. During this period, the system will no longer send payment requests through this channel until the channel returns to the normal state or the fuse period ends.
[0071] For example, assume an online shopping platform needs to process a WeChat payment transaction with an amount of 200 yuan. To ensure the speed, security, and success rate of the transaction, the platform decides to use the collection and payment system to intelligently select a target collection and payment channel from multiple collection and payment channels. The implementation steps include:
[0072] Step S502, retrieve the list of channels matching the target payment method: The collection and payment system first retrieves all the collection and payment channels that support WeChat payment from N collection and payment channels according to the target payment method of WeChat payment. Assume that among the N collection and payment channels, M channels support WeChat payment, and M ≤ N.
[0073] Step S504, detect the abnormal state and fuse state of the channel list: The system further monitors the current states of these M channels, including abnormal values such as their transaction failure rates and response times, and checks whether any channel is in the fuse period. For example, the system finds that the transaction failure rate of channel A, which supports WeChat payment, suddenly rises to 4% and the response time also exceeds the preset threshold, so it marks it as the abnormal state; while the transaction failure rate of channel B is 1% and the response time is 1 second, which is in the normal state, but channel C is currently in the fuse state because its previous transaction failure rate reached the set fuse threshold.
[0074] Step S506, select the target collection and payment channel: Finally, based on the evaluation of the abnormal status and fuse status of the M channels, the system selects the channel with the lowest transaction failure rate, the optimal response time, and not in the fuse status as the target collection and payment channel. In this example, Channel B will become the target collection and payment channel because its transaction failure rate is lower than the abnormal threshold, its response time is lower than the preset threshold, and it has not entered the fuse status.
[0075] Step S508, perform the payment operation: The system converts the collection and payment request into a first payment instruction that conforms to the communication protocol of Channel B, and sends it to Channel B through the channel interface. Channel B performs the payment operation, deducts 200 yuan from the user's WeChat wallet, and transfers it to the account of the online shopping platform.
[0076] Through the above intelligent selection process, the collection and payment system can ensure that the payment operation is carried out through the optimal channel. Even when some channels are abnormal or in the fuse state, it can quickly switch to other available channels, avoid the failure of payment requests, and improve the payment success rate and user experience.
[0077] In an exemplary embodiment, before converting the above payment request into a first payment instruction and sending the first payment instruction to the target payment platform through the above channel interface to perform the payment operation in response to the first payment instruction through the above target collection and payment channel and the above target payment platform, the method further includes: obtaining the N communication protocols of the N collection and payment channels, where the communication protocol includes the data format, request-response mode, authentication mechanism, and error code definition of the collection and payment channel; setting an adaptation component in the above channel interface that matches each of the above communication protocols, where the adaptation component is used to convert the communication format of the above collection and payment system into the communication format of the above collection and payment channel; defining the abnormal types for each of the above collection and payment channels to perform the above payment operation, and setting the abnormal handling threshold and abnormal trigger condition for each of the above collection and payment channels to obtain N abnormal handling mechanisms; integrating the N abnormal handling mechanisms into the above channel interface.
[0078] Optionally, in this embodiment, the communication protocol is the rule for data exchange between the collection and payment channel and the payment system, which details the data format, request-response mode of communication, authentication mechanism, and definition of error codes. Different payment channels may adopt different communication protocols. For example, bank payment channels may use the SOAP-based Web service protocol, while third-party payment channels such as Alipay may adopt the REST-based API protocol. The setting of the communication protocol ensures that payment instructions can be correctly transmitted and processed between different payment channels.
[0079] Optionally, in this embodiment, the adaptation component is a software module used for protocol conversion between the collection and payment system and the collection and payment channels. It converts the internal communication format of the system (such as JSON, XML) into a format that a specific payment channel can understand (such as the specific data format of a bank, the specific API call format of Alipay). With the adaptation component, the collection and payment system can maintain the unity of its internal communication without directly dealing with the complex communication details of each payment channel.
[0080] Optionally, in this embodiment, various abnormal situations may occur during the payment process, such as network failures, payment channel outages, transaction failures, exceeding transaction limits, etc. Defining the abnormal types is to quickly identify the problem when an abnormality occurs and take corresponding handling measures.
[0081] Optionally, in this embodiment, the abnormal handling threshold refers to the situation under which a payment channel is regarded as abnormal. For example, the transaction failure rate exceeds 5%, or it cannot respond continuously for 10 minutes, etc. The abnormal triggering condition refers to the condition when the system starts the abnormal handling mechanism when reaching or exceeding the abnormal handling threshold. For example, when the transaction failure rate of the bank payment channel exceeds 5% within 1 hour, the system automatically enables the alternative payment channel.
[0082] For example, a certain payment platform hopes to connect to the payment channels of multiple banks to improve the payment success rate and user experience, and at the same time needs to ensure that abnormal situations during the payment process can be handled in a timely manner. The implementation steps include:
[0083] Step S602, obtain the communication protocol: First, the payment platform development team collects the communication protocols of the payment channels of each bank, including data formats, request-response modes, authentication mechanisms, and error code definitions. These protocols may vary from bank to bank and need to be adapted one by one.
[0084] Step S604, set up the adaptation component: Set up the adaptation component for each bank payment channel in the channel interface. For example, for a bank using the SOAP protocol, the adaptation component will convert the JSON format request of the payment platform into the SOAP format; for a bank using the REST protocol, the adaptation component will convert the JSON format request into the REST API call format. The adaptation component ensures that the payment platform can communicate with each bank uniformly without caring about the communication details of each bank.
[0085] Step S606, Define an exception handling mechanism: The payment platform defines the exception types of the bank payment channels, such as network interruption, transaction failure, bank system maintenance, etc., and sets a processing threshold and a triggering condition for each exception type. For example, when a certain bank payment channel has more than 5 consecutive transaction failures within 1 hour, the system automatically switches to other bank payment channels and simultaneously sends an email to notify the system administrator to conduct a fault investigation.
[0086] Step S608, Integrate the exception handling mechanism: Integrate the defined exception handling mechanism into the channel interface so that once an exception is detected, the adaptation component can immediately initiate the corresponding exception handling strategy, such as switching channels, recording exception logs, sending alerts, etc.
[0087] Through the above steps, the payment platform can not only flexibly interact with the payment channels of multiple banks, but also effectively manage the exceptions in the payment process, providing a payment service with high reliability and high success rate.
[0088] In an exemplary embodiment, the above payment request is converted into a first payment instruction, and the first payment instruction is sent to the target payment platform through the above channel interface, so as to respond to the first payment instruction through the above target collection and payment channel and the target payment platform to perform a payment operation, including: sending the above payment request to the above channel interface to perform a conversion operation on the above payment request through the above channel interface to obtain the first payment instruction, where the conversion operation includes: converting the above payment request into the first payment instruction according to the channel protocol of the above target collection and payment channel, where the instruction format of the first payment instruction allows the above target collection and payment channel to identify; in the case where it is determined that the amount of funds in the target user's funds account is greater than or equal to the above target amount, sending the first payment instruction to the above target payment platform through the above channel interface, so as to respond to the first payment instruction through the above target collection and payment channel and the target payment platform to perform a payment operation.
[0089] Optionally, the first payment instruction is a standardized instruction format formed after the collection and payment system converts the payment request and matches the communication protocol of the target collection and payment channel. It contains all the necessary information required for the payment operation, such as user ID, payment amount, payee information, etc., so that the target payment platform can identify and execute the payment instruction.
[0090] Optionally, the funds account is an account of a bank or a third-party payment service provider where the user deposits payment funds. Before performing the payment operation, the system needs to verify whether the available funds in the user's funds account are sufficient to cover the payment amount to avoid transaction failures or insufficient funds.
[0091] For example, in the conversion and execution of payment instructions in a cardless payment scenario, a user on an e-commerce platform chooses to pay with digital yuan to purchase goods worth a total of 200 yuan. After the user submits a payment request, the collection and payment system needs to convert the payment request into a first payment instruction that can be recognized and executed by the corresponding payment channel (in this case, the digital yuan payment channel). The implementation steps include:
[0092] Step S702, receive the payment request: The collection and payment system receives the payment request from the e-commerce platform through the collection and payment interface. The request contains user information, the commodity amount (200 yuan), and the payment method (digital yuan).
[0093] Step S704, convert the payment request: The system converts the payment request into a first payment instruction according to the target payment method (digital yuan) and the channel protocol. The conversion operation involves reformatting the information in the request to conform to the communication standard of the digital yuan payment channel. For example, converting the commodity amount, user ID, payee information, etc. into a format that can be recognized by the digital yuan payment platform.
[0094] Step S706, verify the funds account: Before sending the first payment instruction, the system checks the funds account of the target user (in this case, the user on the e-commerce platform) to confirm whether the funds in the account are sufficient to pay for the 200-yuan commodity amount. If the account funds are sufficient, the payment instruction will continue to be sent; if the funds are insufficient, the system will return an error message to the collection and payment interface, prompting the user to replenish the funds.
[0095] Step S708, execute the payment operation: Once it is confirmed that the funds are sufficient, the collection and payment system sends the first payment instruction to the target payment platform (digital yuan payment platform) through the channel interface, requesting the execution of the payment operation. The target payment platform receives the first payment instruction, deducts 200 yuan from the user's digital yuan account, and transfers the funds to the digital yuan account of the e-commerce platform to complete the payment.
[0096] Through the above steps, the collection and payment system not only successfully converts the payment request into a first payment instruction that matches the target collection and payment channel, but also ensures the smooth execution of the payment operation. At the same time, it effectively verifies the user's funds account, avoiding payment failures caused by insufficient funds. This process reflects the efficiency, intelligence, and payment security of the collection and payment system when processing payment requests, providing users with a seamless payment experience.
[0097] In an exemplary embodiment, after sending the above payment request to the above channel interface to perform a conversion operation on the above payment request through the above channel interface to obtain the above first payment instruction, the method further includes: when it is determined that the amount of funds in the target user's funds account is less than the above target amount, generating a borrowing request according to the above first payment instruction, where the above borrowing request includes borrowing information and the credit information of the above target user; sending the above borrowing request to a borrowing platform, so that the borrowing platform responds to the above borrowing request and sends a target borrowing amount to the above target user's funds account; when it is determined that the amount of funds in the target user's funds account is greater than or equal to the above target amount, converting the above payment request into a second payment instruction through the above channel interface; sending the above second payment instruction to the above target payment platform through the above channel interface, so that the target collection and payment channel and the above target payment platform respond to the above second payment instruction to perform the above payment operation.
[0098] Optionally, the target user's funds account refers to the account information of the user's available funds recorded in the collection and payment system, including the funds balance of the user in a bank, a third-party payment platform (such as Alipay, WeChat Pay) or a digital currency wallet.
[0099] Optionally, the target amount refers to the specific amount that needs to be deducted from the user's funds account when the user initiates a payment request to complete the payment operation.
[0100] Optionally, the borrowing request is a request generated by the system when the balance of the user's funds account is insufficient to complete the payment, asking the borrowing platform to provide an instant credit loan to the user to supplement the funds required for the payment. The borrowing request contains borrowing information (such as borrowing amount, borrowing term, interest calculation method) and the credit information of the target user (such as credit score, credit history, income level).
[0101] Optionally, the borrowing platform is a financial institution or a third-party credit service provider that provides instant credit loan services. It can quickly evaluate the user's borrowing eligibility based on the borrowing request and credit information submitted by the user, decide whether to grant a loan, and the specific terms and interest rate of the loan.
[0102] The first payment instruction is an instruction generated when the user's funds are insufficient and borrowing is required, used to instruct the borrowing platform to grant a loan; while the second payment instruction is an instruction used to instruct the target payment platform to deduct the target amount from the user's funds account when the user's funds are sufficient. Both are standardized instruction formats for communication between the system and the payment platform or the borrowing platform, containing all the necessary information for performing payment or borrowing operations.
[0103] For example, a user purchases a commodity worth 800 yuan on an e-commerce platform, but the balance in the user's current fund account (such as an Alipay account) is only 500 yuan. To complete the payment, the user selects the "pay now, pay later" service, allowing the system to automatically provide an instant loan for the user. The implementation steps include:
[0104] Step S802, the user initiates a payment request: The user selects a commodity on the e-commerce platform and clicks to pay. The payment request includes user information, commodity information, and the payment method (using Alipay for payment).
[0105] Step S804, the system checks the fund balance: After receiving the payment request, the collection and payment system first checks the fund balance in the user's Alipay account and confirms that the balance is 500 yuan, which is less than the 800 yuan to be paid.
[0106] Step S806, generate a loan request: The system generates a loan request based on the payment request. The request includes loan information (loan amount of 300 yuan, loan term of 30 days, daily interest rate of 0.05%) and user credit information (credit score of 800 points, no overdue records, monthly income of 5000 yuan).
[0107] Step S808, send the loan request: The system sends the loan request to a preset loan platform (such as Huabei service of Ant Financial) to request an instant loan of 300 yuan.
[0108] Step S810, the loan platform responds: The loan platform evaluates the loan eligibility based on the user's credit information and decides to disburse 300 yuan of loan to the user's Alipay account. The total payment amount for the user becomes 800 yuan.
[0109] Step S812, convert the second payment instruction: The system confirms that the balance in the user's fund account is now sufficient to pay 800 yuan, generates a second payment instruction, and instructs Alipay to deduct 800 yuan from the user's account.
[0110] Step S814, execute the payment operation: The system sends the second payment instruction to the Alipay platform through the channel interface. Alipay deducts 800 yuan from the user's account to complete the payment operation, and at the same time, feeds back the payment success result to the e-commerce platform and the user.
[0111] Through the above embodiments, when the user's funds are insufficient, the collection and payment system can intelligently generate a loan request and provide an instant loan service for the user through the loan platform to ensure that the payment operation can be successfully completed. When the user has sufficient funds, the system directly generates a second payment instruction and executes the payment operation through the target payment platform to provide a smooth payment experience. This process design not only enhances the flexibility of the payment service but also improves the payment success rate, providing users with more choices and conveniences.
[0112] The present application will be described below in conjunction with a specific embodiment:
[0113] This specific embodiment provides an intelligent collection and payment processing system and method for a payment platform. The collection and payment processing system consists of multiple independent collection and payment channels, and each channel is connected to the channel interface and the collection and payment interface of the payment system. The channel interface implements the access protocol for each collection and payment channel, facilitating the management of multiple payment channels; the collection and payment interface is responsible for connecting to the collection and payment end such as the e-commerce platform, receiving payment requests and sending payment results.
[0114] The channel interface of the payment platform provides a unified access point, enabling the e-commerce platform to only need to meet the interface protocol of the payment system without separately docking with each collection and payment channel, simplifying the access process. In addition, the collection and payment processing system also has functions such as channel information management, access parameter management, channel business permissions, and channel status maintenance, ensuring the efficient management and stable operation of the payment channels.
[0115] This specific embodiment assumes that an e-commerce platform (collection and payment end) needs to process a transaction payment worth 5,000 yuan. The e-commerce platform has established connections with multiple payment systems (including bank transfer, Alipay, WeChat Pay, direct connection between banks and enterprises, and digital currency payment channels) to ensure the efficiency, stability, and security of payments. As Figure 3 shown, the implementation steps include:
[0116] Step S902, obtain the collection and payment request: The e-commerce platform sends a collection and payment request of 5,000 yuan to the payment platform, and the request specifies the payer information, payee information, and transaction amount.
[0117] Step S904, determine the current collection and payment channel: After receiving the request, the payment platform first uses an intelligent routing algorithm (considering factors such as cost-effectiveness, security, and convenience) to intelligently select a target channel from multiple collection and payment channels according to the payment method and amount in the request. For example, for a transaction of 5,000 yuan, assuming that the Alipay channel is in a normal state and has a lower cost in small transactions, the system will preferentially select the Alipay channel as the current collection and payment channel. The system will also check the abnormal state and fuse state of the Alipay channel. If the Alipay channel currently has an abnormality or reaches the fuse standard (such as the transaction failure rate exceeds the set threshold), the system will automatically switch to a backup channel, such as WeChat Pay or direct connection between banks and enterprises.
[0118] Step S906, Execute the transaction: The payment platform controls the current collection and payment channel (such as the Alipay channel) to conduct a transaction with the e-commerce platform. The payment platform converts the collection and payment request into a first payment instruction recognizable by the Alipay platform through the access protocol of the Alipay channel, and then sends it to the Alipay platform through the channel interface. After receiving the payment instruction, the Alipay platform deducts 5,000 yuan from the payer's Alipay account and transfers the funds to the receiving account of the e-commerce platform to complete the transaction.
[0119] Step S908, Transaction status monitoring and exception handling: The payment platform continuously monitors the transaction status to check whether the transaction is successful. If the transaction fails, the system will record this failure in the failure statistics and immediately determine whether the current collection and payment channel (Alipay channel) reaches the fuse standard. If the fuse standard is reached (such as the payment platform receiving three consecutive transaction failures), the Alipay channel will be marked as abnormal and the use of this channel will be temporarily stopped. Then, the system re-executes the transaction through the backup channel until the transaction is successful. After each transaction, the payment platform will count the transaction results and update the status information of the current collection and payment channel to ensure that subsequent transactions can be based on the latest channel information.
[0120] Through this specific embodiment, the payment platform provides stable and efficient payment services for the e-commerce platform by intelligently selecting the collection and payment channels and combining the exception status monitoring and switching mechanism. At the same time, the multi-channel architecture and unified interface design of the payment system greatly simplify the payment access process of the e-commerce platform and improve the efficiency and convenience of payment access.
[0121] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disc) and includes several instructions for causing a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in various embodiments of the present application.
[0122] In this embodiment, a processing device for payment requests is further provided, which is applied to a collection and payment system. In the collection and payment system, it is connected to a collection and payment platform through a collection and payment interface. The collection and payment platform is connected to one or more of the N collection and payment channels included in the collection and payment system through a channel interface. This device is used to implement the above embodiments and preferred implementation manners, and those that have been described will not be repeated. As used hereinafter, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.
[0123] Figure 4 is a structural block diagram of a processing device for payment requests according to an embodiment of the present application. As Figure 4 shown, the device includes:
[0124] A first receiving module 42, configured to receive a payment request sent by the collection and payment platform through the collection and payment interface. Among them, the payment request includes target user information of a target user, amount information for purchasing a target commodity, and a selected target payment method;
[0125] A first selection module 44, configured to select a target collection and payment channel from the N collection and payment channels according to the target payment method and the channel information of the N collection and payment channels;
[0126] A first processing module 46, configured to convert the payment request into a first payment instruction, and send the first payment instruction to a target payment platform through the channel interface, so as to respond to the first payment instruction with the target payment platform through the target collection and payment channel and perform a payment operation. Among them, the target payment platform is used to deduct a target amount corresponding to the amount information from the funds account of the target user and transfer the target amount to the account of the collection and payment platform.
[0127] In an exemplary embodiment, the above device further includes: a first acquisition module, configured to acquire a service requirement sent by the collection and payment platform before receiving the payment request sent by the collection and payment platform through the collection and payment interface; a second acquisition module, configured to acquire the channel information of the N collection and payment channels according to the service requirement; a first generation module, configured to generate the channel interfaces of the N collection and payment channels and N exception handling mechanisms by using the channel information of the N collection and payment channels. Among them, the N collection and payment channels correspond to one channel interface, and one collection and payment channel corresponds to one exception handling mechanism. Each exception handling mechanism includes an exception threshold and a channel fusing strategy; a first integration module, configured to integrate the N collection and payment channels and the corresponding exception handling mechanisms, as well as the channel interface, into the collection and payment system.
[0128] In an exemplary embodiment, the above-mentioned first generation module includes: a first definition unit, configured to define access parameters of the channel interface and business permissions of each of the N collection and payment channels by using the channel information of the N collection and payment channels, where the access parameters allow the collection and payment platform to access the channel interface, and the business permissions include permitted payment types and payment restrictions; a first generation unit, configured to generate the channel interface of the N collection and payment channels and N exception handling mechanisms by using the access parameters of the channel interface and the business permissions of each of the N collection and payment channels.
[0129] In an exemplary embodiment, the above-mentioned first selection module includes: a first retrieval unit, configured to retrieve a list of channels that match the target payment method from the N collection and payment channels according to the channel information of the N collection and payment channels, where the list of channels includes M collection and payment channels, and each piece of channel information includes the channel type, supported payment methods, transaction limit, transaction fee, and transaction response time of the corresponding collection and payment channel, and M is a natural number less than or equal to N; a first detection unit, configured to detect the abnormal state and fuse state of the list of channels; a first selection unit, configured to select the target collection and payment channel from the M collection and payment channels based on the abnormal state and fuse state, where the abnormal value of the target collection and payment channel is less than the abnormal threshold, and the fuse state of the target collection and payment channel is not in the fuse period.
[0130] In an exemplary embodiment, the above-mentioned device further includes: a third acquisition module, configured to convert the payment request into a first payment instruction, and send the first payment instruction to the target payment platform through the channel interface, so as to respond to the first payment instruction with the target payment platform through the target collection and payment channel and perform a payment operation. Before that, acquire N communication protocols of the N collection and payment channels, where the communication protocols include data formats, request-response modes, authentication mechanisms, and error code definitions of the collection and payment channels; a first setting module, configured to set an adaptation component matching each of the communication protocols in the channel interface, where the adaptation component is used to convert the communication format of the collection and payment system into the communication format of the collection and payment channel; a first definition module, configured to define the exception types for each of the collection and payment channels to perform the payment operation, and set the exception handling threshold and exception trigger condition for each of the collection and payment channels to obtain N exception handling mechanisms; a second integration module, configured to integrate the N exception handling mechanisms into the channel interface.
[0131] In an exemplary embodiment, the above-mentioned first processing module includes: a first sending module, configured to send the payment request to the channel interface to perform a conversion operation on the payment request through the channel interface to obtain the first payment instruction, where the conversion operation includes: converting the payment request into the first payment instruction according to the channel protocol of the target collection and payment channel, and the instruction format of the first payment instruction allows the target collection and payment channel to identify; a second sending module, configured to, when determining that the amount of funds in the target user's funds account is greater than or equal to the target amount, send the first payment instruction to the target payment platform through the channel interface, so as to respond to the first payment instruction through the target collection and payment channel and the target payment platform and perform a payment operation.
[0132] In an exemplary embodiment, the above-mentioned device further includes: a second generation module, configured to, after sending the payment request to the channel interface to perform a conversion operation on the payment request through the channel interface to obtain the first payment instruction, when determining that the amount of funds in the target user's funds account is less than the target amount, generate a borrowing request according to the first payment instruction, where the borrowing request includes borrowing information and the credit information of the target user; a third sending module, configured to send the borrowing request to a lending platform, so as to respond to the borrowing request through the lending platform and send a target borrowing amount to the target user's funds account; a first conversion module, configured to, when determining that the amount of funds in the target user's funds account is greater than or equal to the target amount, convert the payment request into a second payment instruction through the channel interface; a fourth sending module, configured to send the second payment instruction to the target payment platform through the channel interface, so as to respond to the second payment instruction through the target collection and payment channel and the target payment platform and perform the payment operation.
[0133] It should be noted that the above-mentioned each module can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: all the above-mentioned modules are located in the same processor; or, the above-mentioned each module is located in different processors in any combination form.
[0134] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, and the computer program is configured to execute the steps in any one of the above-mentioned method embodiments when running.
[0135] In an exemplary embodiment, the above computer-readable storage medium may include, but is not limited to: various media such as USB flash drives, read-only memory (ROM for short), random access memory (RAM for short), external hard drives, magnetic disks, or optical discs that can store computer programs.
[0136] An embodiment of the present application also provides an electronic device, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0137] In an exemplary embodiment, the above electronic device may further include a transmission device and input / output devices. Among them, the transmission device is connected to the above processor, and the input / output devices are connected to the above processor.
[0138] An embodiment of the present application also provides a computer program product. The above computer program product includes a computer program, and when the computer program is executed by a processor, it implements the steps in any one of the above method embodiments.
[0139] An embodiment of the present application also provides another computer program product, including a non-volatile computer-readable storage medium. The non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements the steps in any one of the above method embodiments.
[0140] An embodiment of the present application also provides a computer program. The computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the steps in any one of the above method embodiments.
[0141] Specific examples in this embodiment may refer to the examples described in the above embodiments and exemplary embodiments, and will not be repeated here.
[0142] Obviously, those skilled in the art should understand that the various modules or steps of the present application described above can be implemented by a general-purpose computing device. They can be concentrated on a single computing device or distributed over a network composed of multiple computing devices. They can be implemented by program codes executable by the computing device. Thus, they can be stored in a storage device and executed by the computing device. And in some cases, the steps shown or described can be executed in a sequence different from that here, or they can be separately fabricated into individual integrated circuit modules, or multiple modules or steps among them can be fabricated into a single integrated circuit module for implementation. In this way, the present application is not limited to any specific combination of hardware and software.
[0143] The foregoing is only a preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application can have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the principle of the present application shall be included within the protection scope of the present application.
Claims
1. A method for processing a payment request, characterized in that: Applied to a collection and payment system, the collection and payment system is connected to a collection and payment platform through a collection and payment interface, and the collection and payment platform is connected to one or more of N collection and payment channels included in the collection and payment system through a channel interface. The method includes: Receiving a payment request sent by the agency payment platform through the agency payment interface, wherein the payment request includes target user information of the target user, amount information of the target commodity purchased, and the selected target payment method; Selecting a target agency payment channel from the N agency payment channels according to the target payment method and the channel information of the N agency payment channels; The payment request is converted into a first payment instruction, and the first payment instruction is sent to the target payment platform through the channel interface, so as to respond to the first payment instruction through the target collection and payment channel and the target payment platform to perform a payment operation, wherein the target payment platform is used to deduct the target amount corresponding to the amount information from the target user's funds account, and transfer the target amount to the account of the collection and payment platform.
2. The method according to claim 1, characterized in that Before receiving the payment request sent by the agency collection and payment platform through the agency collection and payment interface, the method further includes: Obtaining the business requirements sent by the collection and payment platform; Obtain channel information of N collection and payment channels according to the business requirements; Generate the channel interfaces and N exception handling mechanisms of the N agency collection and payment channels using the channel information of the N agency collection and payment channels, wherein each of the N agency collection and payment channels corresponds to one channel interface, and each of the agency collection and payment channels corresponds to one exception handling mechanism, and each of the exception handling mechanisms includes an exception threshold and a channel fuse strategy; Integrate the N agency collection and payment channels and the corresponding exception handling mechanisms, as well as the channel interfaces, into the agency collection and payment system.
3. The method according to claim 2, characterized in that Generating the channel interfaces and N exception handling mechanisms of the N agency collection and payment channels by using the channel information of the N agency collection and payment channels, including: Using the channel information of the N collection and payment channels, define the access parameters of the channel interface and the service authority of each collection and payment channel, wherein the access parameters allow the collection and payment platform to access the channel interface, and the service authority includes the allowed payment types and payment restrictions; The channel interfaces of N agency payment channels and N exception handling mechanisms are generated by utilizing the access parameters of the channel interface and the service authority of each agency payment channel.
4. The method according to claim 1, characterized in that According to the target payment method and the channel information of the N agency collection and payment channels, selecting a target agency collection and payment channel from the N agency collection and payment channels includes: Retrieving a channel list matching the target payment method from the N collection and payment channels according to the channel information of the N collection and payment channels, wherein the channel list includes M collection and payment channels, and each of the channel information includes the channel type, supported payment method, transaction limit, transaction fee, and transaction response time of the corresponding collection and payment channel, and M is a natural number less than or equal to N; Detecting abnormal status and fuse status of the channel list; The target collection and payment channel is selected from the M collection and payment channels based on the abnormal state and the blown state, wherein the abnormal value of the target collection and payment channel is less than the abnormal threshold, and the blown state of the target collection and payment channel is not in the blown period.
5. The method according to claim 1, characterized in that The payment request is converted into a first payment instruction, and the first payment instruction is sent to the target payment platform through the channel interface, so that the target payment channel and the target payment platform respond to the first payment instruction, and before performing the payment operation, the method further includes: Obtaining N communication protocols of the N collection and payment channels, wherein the communication protocols include the data format, request response mode, authentication mechanism and error code definition of the collection and payment channels; An adapter component matching each of the communication protocols is provided in the channel interface, wherein the adapter component is used to convert the communication format of the agency collection and payment system into the communication format of the agency collection and payment channel; Defining the exception type of each of the collection and payment channels executing the payment operation, and setting the exception handling threshold and exception triggering condition of each of the collection and payment channels, to obtain N exception handling mechanisms; Integrate N of the exception handling mechanisms into the channel interface.
6. The method according to claim 5, characterized in that The payment request is converted into a first payment instruction, and the first payment instruction is sent to the target payment platform through the channel interface, so as to respond to the first payment instruction through the target collection and payment channel and the target payment platform to perform a payment operation, including: Sending the payment request to the channel interface, so as to perform a conversion operation on the payment request through the channel interface to obtain the first payment instruction, wherein the conversion operation includes: converting the payment request into the first payment instruction according to the channel protocol of the target collection and payment channel, wherein the instruction format of the first payment instruction allows the target collection and payment channel to recognize it; When it is determined that the amount of funds in the target user's fund account is greater than or equal to the target amount, the first payment instruction is sent to the target payment platform through the channel interface, so that the target collection and payment channel and the target payment platform respond to the first payment instruction and perform the payment operation.
7. The method according to claim 6, characterized in that The payment request is sent to the channel interface so as to perform a conversion operation on the payment request through the channel interface, and after obtaining the first payment instruction, the method further includes: If it is determined that the amount of funds in the target user's fund account is less than the target amount, generating a loan request according to the first payment instruction, wherein the loan request includes loan information and the credit information of the target user; Sending the loan request to the loan platform, so that the loan platform responds to the loan request and sends the target loan amount to the capital account of the target user; In the case where it is determined that the amount of funds in the target user's fund account is greater than or equal to the target amount, converting the payment request into a second payment instruction through the channel interface; The second payment instruction is sent to the target payment platform through the channel interface, so that the target payment collection channel and the target payment platform respond to the second payment instruction and execute the payment operation.
8. A payment request processing device, characterized in that: Applied to a collection and payment system, the collection and payment system is connected to a collection and payment platform through a collection and payment interface, and the collection and payment platform is connected to one or more of N collection and payment channels included in the collection and payment system through a channel interface. The device includes: A first receiving module, configured to receive a payment request sent by the agency payment platform through the agency payment interface, wherein the payment request includes target user information of the target user, amount information of the target commodity purchased, and a selected target payment method; A first selection module, configured to select a target agency collection and payment channel from the N agency collection and payment channels according to the target payment method and channel information of the N agency collection and payment channels; The first processing module is used to convert the payment request into a first payment instruction, and send the first payment instruction to the target payment platform through the channel interface, so as to respond to the first payment instruction through the target collection and payment channel and the target payment platform to perform a payment operation, wherein the target payment platform is used to deduct the target amount corresponding to the amount information from the target user's funds account and transfer the target amount to the account of the collection and payment platform.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 1 to 7 when executed by a processor.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method described in any one of claims 1 to 7 are implemented.