Method and device for determining routing channel and nonvolatile storage medium
By querying in the payment system and adjusting the priority of the payment routing channel according to the routing process strategy, the problem of low payment stability caused by static routing channels in the prior art is solved, and a more efficient and stable payment process is achieved.
Patent Information
- Application Number
- CN202411754428.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-02
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2044-12-02
AI Technical Summary
The existing payment system uses static routing channels and cannot be adjusted according to the actual operation of the routing channels, resulting in low payment stability.
By receiving the payment request from the client, in response to the payment request, query the routing process in the local cache, the channel list is determined according to the filtering policy, and the target payment routing channel with the highest priority is determined in the channel list to realize the transmission of the payment request.
Adjusting its priority according to the actual operating status of the routing channel improves the stability of payment and solves the problem of low payment stability caused by fixed routing channels.
Smart Images

Figure CN119762056A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular, to a method and device for determining a routing channel, and a non-volatile storage medium. Background Art
[0002] With the development and popularization of Internet technology, people's travel, shopping, consumption and other activities are increasingly dependent on the Internet. While network applications such as mobile payment and e-commerce have brought great convenience to people's lives, they have also posed challenges to the security, stability and efficiency of network services. At present, payment systems usually use static routing channels, that is, the routing channels are pre-configured in the system and fixedly used during operation. It is impossible to dynamically adjust according to the operating status of the routing channels, which makes the priority, security and stability of the payment channels have great limitations. Therefore, the existing payment system has the problem that the payment channels cannot be dynamically adjusted.
[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0004] The embodiments of the present application provide a method and device for determining a routing channel, and a non-volatile storage medium, so as to at least solve the technical problem that the routing channel cannot be adjusted according to the actual operation of the routing channel due to the use of a fixed routing channel to implement payment, resulting in low payment stability.
[0005] According to one aspect of an embodiment of the present application, a method for determining a routing channel is provided, comprising: receiving a payment request sent by a client, wherein the payment request is used to request access to a payment server; in response to the payment request, querying a routing process in a local cache, wherein the routing process is used to record a screening policy of a payment routing channel, and the payment routing channel is used to transmit the payment request to the payment server; when the routing process is queried, determining a channel list according to the screening policy, and determining a target payment routing channel with the highest priority in the channel list, wherein the channel list is used to record multiple payment routing channels, and the target payment routing channel is used to transmit the payment request to the payment server; when the routing process is not queried, outputting a prompt message of routing abnormality to the client.
[0006] Optionally, querying the routing process in the local cache includes: parsing the payment request to obtain key parameters for querying the routing process, wherein the key parameters include at least: request system identification information for indicating the system that initiates the payment request in the client; querying the local cache for historical payment information associated with the key parameters, and extracting the routing process recorded in the historical payment information.
[0007] Optionally, the channel list is obtained by filtering in the local cache according to the filtering strategy recorded in the target routing process, wherein the target routing process is a routing process obtained in response to the payment request query, and filtering the channel list in the local cache according to the filtering strategy recorded in the target routing process includes: sequentially executing the query parameter filtering process, the channel filtering process, and the channel sorting process contained in the filtering strategy to obtain the channel list, wherein the query parameter filtering process is used to filter the first type of payment routing channels that meet the query conditions in the payment routing channels stored in the local cache, and the query conditions are generated according to the parameters recorded in the payment request, and the channel filtering process is used to filter the second type of payment routing channels that meet the business requirements in the first type of payment routing channels, wherein the business requirements are recorded in the payment request, and the channel sorting process is used to determine the priority of each second type of payment routing channel, and sort the second type of payment routing channels according to the priority to obtain the channel list.
[0008] Optionally, the first type of payment routing channel is obtained by the following method: parsing the payment request to obtain a channel capability parameter and a business type parameter, wherein the channel capability parameter is used to describe the payment method supported by the payment routing channel, and the business type parameter is used to describe the transaction type corresponding to the payment request, and the transaction types include: purchase transaction and recharge transaction; splicing the channel capability parameter and the business type parameter as a query condition, and querying the target payment protocol type that meets the query condition in a preset mapping table according to the query condition, wherein the preset mapping table is used to record the association relationship between the channel capability parameter and the business type parameter and the payment protocol type; when the target payment protocol type is queried, the payment routing channel whose protocol type is the target payment protocol type is filtered out from the payment routing channels stored in the local cache as the first type of payment routing channel; when the target payment protocol type is not queried, the payment routing channel that meets the channel capability parameter is filtered out from the payment routing channels stored in the local cache as the first type of payment routing channel.
[0009] Optionally, the second type of payment routing channel is determined by the following method: parsing the payment request to obtain a business type parameter, wherein the business type parameter is used to describe the transaction type corresponding to the payment request, and the transaction types include: purchase transaction, recharge transaction; querying the filter factors associated with the business type parameters in the structured database Redis, wherein the filter factors include: payment success rate, transaction limit, and transaction time; and screening the second type of payment routing channel in the first type of payment routing channel according to the filter factors.
[0010] Optionally, determining the priority of each second-class payment routing channel includes: obtaining a ranking factor, wherein the ranking factor includes: a payment success rate of each second-class payment routing channel, and a transaction time of each second-class payment routing channel; determining a score value of each second-class payment routing channel according to the ranking factor of each second-class payment routing channel, wherein the score value is used to indicate the priority of the second-class payment routing channel, and the score value is positively correlated with the priority.
[0011] Optionally, after obtaining the channel list, it also includes: recording the operation information of each second-category payment routing channel in the channel list within the detection period, wherein the operation information at least includes: the total number of payments and the number of successful payments; for each second-category payment routing channel, determining the target payment success rate of the second-category payment routing channel within the detection period according to the operation information; when the target payment success rate is less than the maximum value of a preset success rate interval, reducing the priority of the second-category payment routing channel to the lowest level; when the target payment success rate is less than the minimum value of the preset success rate interval, performing fuse processing on the second-category payment routing channel.
[0012] According to another aspect of an embodiment of the present application, a device for determining a routing channel is also provided, including: a receiving module, used to receive a payment request sent by a client, wherein the payment request is used to request access to a payment server; a query module, used to query a routing process in a local cache in response to the payment request, wherein the routing process is used to record a screening policy of a payment routing channel, and the payment routing channel is used to transmit the payment request to the payment server; a determination module, used to determine a channel list according to the screening policy when the routing process is queried, and determine a target payment routing channel with the highest priority in the channel list, wherein the channel list is used to record multiple payment routing channels, and the target payment routing channel is used to transmit the payment request to the payment server; an output module, used to output a prompt message of routing abnormality to the client when the routing process is not queried.
[0013] According to another aspect of an embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to execute the above-mentioned method for determining a routing channel through the computer program.
[0014] According to another aspect of an embodiment of the present application, a computer program product is further provided, including computer instructions, which implement the steps of the above-mentioned method for determining a routing channel when the computer instructions are executed by a processor.
[0015] In an embodiment of the present application, a payment request sent by a client is received, wherein the payment request is used to request access to a payment server; in response to the payment request, a routing process is queried in a local cache, wherein the routing process is used to record a screening strategy of a payment routing channel, and the payment routing channel is used to transmit the payment request to the payment server; when the routing process is queried, a channel list is determined according to the screening strategy, and a target payment routing channel with the highest priority is determined in the channel list, wherein the channel list is used to record multiple payment routing channels, and the target payment routing channel is used to transmit the payment request to the payment server; when the routing process is not queried, a prompt message of routing abnormality is output to the client, and the priority of each payment routing channel is adjusted according to the actual operating status of the payment routing channel through the screening strategy corresponding to the payment request, a channel list is generated, and a routing channel for implementing the payment request is determined in the channel list, so as to achieve the purpose of adjusting the priority of the routing channel according to the actual operating status of the routing channel, thereby achieving the technical effect of improving the stability of payment, and further solving the technical problem of low payment stability caused by the use of a fixed routing channel to implement payment and being unable to adjust according to the actual operating status of the routing channel. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0017] Figure 1 is a hardware structure block diagram of a computer terminal for implementing a method for determining a routing channel according to an embodiment of the present application;
[0018] Figure 2 is a flowchart of a method for determining a routing channel according to an embodiment of the present application;
[0019] Figure 3 It is a structural diagram of a device for determining a routing channel according to an embodiment of the present application. DETAILED DESCRIPTION
[0020] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0021] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0022] In order to better understand the embodiments of the present application, the technical terms involved in the embodiments of the present application are explained as follows:
[0023] Redis database: widely used as cache, message middleware and database.
[0024] In the related art, the payment system usually adopts a static routing channel, that is, the routing channel is pre-configured in the system and the channel is fixedly used during operation; when the fixed routing channel fails, it cannot be switched in time, resulting in payment failure, and there is a problem of low payment stability. In addition, if the payment system fails, the payment request is usually sent to multiple servers at the same time by broadcast routing channels, resulting in low efficiency in payment request processing, hidden dangers in payment security, and therefore, poor user experience. In order to solve this problem, the relevant solution is provided in the embodiment of the present application, which is described in detail below.
[0025] According to an embodiment of the present application, a method embodiment for determining a routing channel is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0026] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 FIG. 1 shows a hardware structure block diagram of a computer terminal for implementing a method for determining a routing channel. Figure 1As shown, the computer terminal 10 may include one or more (102a, 102b, ..., 102n are used to illustrate) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0027] It should be noted that the one or more processors 102 and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 10. As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).
[0028] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the method for determining the routing channel in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, the above-mentioned method for determining the routing channel is realized. 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 memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0029] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0030] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10 .
[0031] The method provided in the embodiment of the present application can also be implemented using a neural network model. In step S202, the neural network model can be loaded into the memory. For example, the raw data of the neural network model can be loaded from the non-volatile memory into the volatile memory so that the processor can run the neural network model. The raw data of the neural network model refers to unprocessed data, which usually includes parameters and structural data of the neural network model. The structural data can be a calculation relationship based on the parameters, such as the forward propagation calculation relationship between the intermediate layers and between the neurons. Specifically, the structural data can include code related to the structure of the neural network model, such as code for performing related calculations between the intermediate layers and between the neurons.
[0032] In one embodiment, an area for loading a neural network model can be divided in the memory, which may include a structure data storage area and a parameter storage area. The structure data storage area is used to store structure-related codes, and the parameters referenced by it can point to the address of a specific parameter in the parameter storage area through a pointer. During the training process of the neural network model, it may be necessary to frequently update the parameters, and the parameter values in the parameter storage area can be updated.
[0033] The embodiment of the present application provides a method for determining a routing channel that can be run in the above-mentioned operating environment. Figure 2 is a flowchart of the steps of the method for determining a routing channel provided in an embodiment of the present application, such as Figure 2 As shown, the method comprises the following steps:
[0034] Step S202, receiving a payment request sent by the client, wherein the payment request is used to request access to the payment server; in response to the payment request, querying a routing process in a local cache, wherein the routing process is used to record a screening strategy of a payment routing channel, and the payment routing channel is used to transmit the payment request to the payment server.
[0035] The method provided by the embodiment of the present application can be applied in the scenario of online payment, for example, it can be applied in the scenario of e-commerce platform payment and online financial services; when the scheme of the present application is cited in the above scenario of online payment, in step S202, after the method / system provided by the embodiment of the present application receives the request information (i.e., payment request) sent by the client for requesting access to the payment service end, it starts to query the routing process for supporting the implementation of the payment function in the local cache, wherein the routing process records the screening strategy for screening the payment routing channel that satisfies the payment request; the payment request can be sent to the payment service end through the payment routing channel, thereby realizing the payment. The above-mentioned client can be various front ends (for example: merchant website, mobile application, point of sale ((Point of Sale terminal, POS) terminal, etc.), and the above-mentioned payment service end is the back-end system responsible for processing payment logic and services, including: an application server running the application for payment processing, a database server for storing transaction records, a cache server, a message queue server, etc.
[0036] Optionally, querying the routing process in the local cache includes: parsing the payment request to obtain key parameters for querying the routing process, wherein the key parameters include at least: request system identification information for indicating the system that initiates the payment request in the client; querying the local cache for historical payment information associated with the key parameters, and extracting the routing process recorded in the historical payment information.
[0037] When the method provided by the embodiment of the present application is initially executed, various configuration information will be loaded into the local cache, such as: filter factor configuration information, routing process rule configuration information, channel access information, channel business information, channel business details, etc.; and, during the execution process, the relevant operation process for each payment is recorded, for example, the system sending the payment request, the payment routing channel called, etc. Therefore, in this embodiment, it is possible to determine whether the payment request sent by the system has been processed by querying the historical payment information of the system sending the payment request; specifically, by parsing the payment request, the identification information (i.e., the request system identification information) for uniquely indicating the system sending the payment request is obtained, and the request system identification information is used as the key parameter for querying the routing process, and the request system identification information can be used to query the routing process. If the historical payment information is queried, the routing process of the system sending the payment request is extracted from the historical payment information as the routing process for implementing the payment request. The above-mentioned system sending the payment request runs in the client, which can be the system corresponding to the application supporting the payment function in the client.
[0038] Step S204, when the routing process is queried, determine the channel list according to the screening strategy, and determine the target payment routing channel with the highest priority in the channel list, wherein the channel list is used to record multiple payment routing channels, and the target payment routing channel is used to transmit the payment request to the payment server.
[0039] If the result of querying the routing process in the local cache in step S202 is found, in step S204, the channel list is determined according to the queried screening strategy. Specifically, the payment routing channels are screened in the payment routing channels stored in the local cache according to the screening strategy, and a channel list is further generated for recording the screened payment routing channels. The above channel list also records the priority of each payment routing channel. In this embodiment, the payment routing channel with the highest priority among all the payment routing channels recorded in the channel list is determined as the target payment routing channel for transmitting the current payment request, and the payment request is transmitted to the payment service end through the above target payment routing channel to implement the payment service corresponding to the current payment request.
[0040] According to some optional embodiments of the present application, the channel list is obtained by filtering in the local cache according to the filtering strategy recorded in the target routing process, wherein the target routing process is a routing process obtained in response to a payment request query, and the channel list is filtered in the local cache according to the filtering strategy recorded in the target routing process, including: sequentially executing the query parameter filtering process, the channel filtering process, and the channel sorting process contained in the filtering strategy to obtain the channel list, wherein the query parameter filtering process is used to filter the first type of payment routing channels that meet the query conditions in the payment routing channels stored in the local cache, and the query conditions are generated according to the parameters recorded in the payment request, and the channel filtering process is used to filter the second type of payment routing channels that meet the business requirements in the first type of payment routing channels, wherein the business requirements are recorded in the payment request, and the channel sorting process is used to determine the priority of each second type of payment routing channel, and sort the second type of payment routing channels according to the priority to obtain the channel list.
[0041] The historical payment information associated with the identification information of the request system that sends the payment request information includes an operation process for implementing the payment. In this embodiment, when the payment request is triggered, after the system that sends the payment request is determined, the routing process recorded in the historical payment information obtained by querying the identification information of the system is the routing process for implementing the payment request (i.e., the target routing process), wherein the target routing process records the screening strategy for determining the payment routing channel. In this embodiment, the screening strategy records the multi-stage screening process for determining the payment routing channel, for example, a parameter query filtering process for screening the (first category) payment routing channels that meet the query conditions in the payment routing channels stored in the local cache; a parameter query filtering process for filtering the (first category) payment routing channels that meet the query conditions in the query; A channel filtering process for filtering (second category) payment routing channels that meet business requirements from the screening results of the query parameter process (i.e., first category payment routing channels); a channel sorting process for determining the priority of each payment routing channel (i.e., second category payment routing channel) obtained by the screening of the above channel filtering process; in this embodiment, by sequentially executing each filtering process in the screening strategy according to the execution order defined by the screening strategy, multiple payment routing channels that meet the requirements of the screening strategy can be screened out from all routing channels recorded in the local cache, and these multiple payment routing channels that meet the requirements of the screening strategy are arranged according to priority through the screening strategy to generate a channel list that records multiple payment routing channels according to priority. The query conditions in the above query parameter process are generated based on the performance requirements for the payment channel recorded in the payment request (e.g., execution speed, concurrency, etc.); the business requirements in the above channel filtering process are generated based on the business-related parameters recorded in the payment request (e.g., the type of business corresponding to the payment request, etc.).
[0042] Optionally, the first type of payment routing channel is obtained by the following method: parsing the payment request to obtain a channel capability parameter and a business type parameter, wherein the channel capability parameter is used to describe the payment method supported by the payment routing channel, and the business type parameter is used to describe the transaction type corresponding to the payment request, and the transaction types include: purchase transaction and recharge transaction; splicing the channel capability parameter and the business type parameter as a query condition, and querying the target payment protocol type that meets the query condition in a preset mapping table according to the query condition, wherein the preset mapping table is used to record the association relationship between the channel capability parameter and the business type parameter and the payment protocol type; when the target payment protocol type is queried, the payment routing channel whose protocol type is the target payment protocol type is filtered out from the payment routing channels stored in the local cache as the first type of payment routing channel; when the target payment protocol type is not queried, the payment routing channel that meets the channel capability parameter is filtered out from the payment routing channels stored in the local cache as the first type of payment routing channel.
[0043] When screening the payment routing channel through the query parameter filtering process, the process described below in the embodiment of the present application is executed. As mentioned in the above embodiment, when the query parameter filtering process is executed, the result obtained by screening is the (first type) payment routing channel that meets the query condition, and the query condition is generated according to the payment request. Then the first step of executing the query parameter filtering process is to generate the query condition. In this embodiment, the channel capability parameter and the business type parameter used to generate the query condition are obtained by parsing the payment request, wherein the channel capability parameter is a relevant parameter used to describe the payment request for the payment method supported by the payment routing channel (such as supporting payment based on software A, supporting payment based on software B, and supporting payment based on software A and software B at the same time), and the business type parameter is a relevant parameter used to describe the transaction type supported by the payment request for the payment routing channel (such as supporting purchase transactions generated by shopping, supporting recharge transactions). Next, the channel capability parameter and the business type parameter obtained by parsing are spliced into the query condition (key). For example, the above two parameters can be spliced into the query condition (key) in a front-to-back arrangement, or the valid information can be spliced after filtering out the valid information according to the rules. Furthermore, according to the generated query conditions, the payment agreement type that meets the query conditions is matched in the preset mapping table that records the association between the payment agreement type and the query condition parameters (channel capability parameters and business type parameters). If the payment agreement type that meets the query conditions (i.e., the target payment agreement type) is matched, the payment routing channel that follows the target payment agreement type in the local cache is determined as the screening result of the query parameter filtering process (i.e., the first type of payment routing channel); if the target payment agreement type is not associated with the preset mapping table, only the channel capability parameter is used as the query condition, and the channel capability parameter is used to screen the payment routing channels stored in the local cache. For example, the channel capability type (channel capability parameter) and account type (business type parameter) sent down by the interface are mapped to the internal channel business type as the query condition. If the protocol type set sent down is empty, the channel capability type is set to the protocol category. The interface corresponding to the query process is mapped according to the protocol type. Here, aggregate payment is taken as an example: if the protocol type is not an aggregate type, the interface of the corresponding protocol type is queried to obtain each transaction parameter. If the protocol type is an aggregate, it is determined whether the transaction element cache key in the input parameter is empty. If it is not empty, the cache center is queried to obtain the channel detail number. Aggregate payment queries the merchant submission information based on the merchant number and solution, converts the transaction element results and returns the results.
[0044] According to some other optional embodiments of the present application, the second type of payment routing channel is determined by the following method: parsing the payment request to obtain a business type parameter, wherein the business type parameter is used to describe the transaction type corresponding to the payment request, and the transaction types include: purchase transaction, recharge transaction; querying the filter factors associated with the business type parameters in the structured database Redis, wherein the filter factors include: payment success rate, transaction limit, and transaction time; and screening the second type of payment routing channel in the first type of payment routing channel according to the filter factors.
[0045] In some embodiments, the channel filtering process is executed for the result output by the query parameter filtering process (i.e., the first type of payment routing channel) to screen the payment routing channels that meet the business requirements in the first type of payment routing channels. Specifically, the filtering factor adopted by the channel filtering process is determined according to the business type parameter obtained by parsing the payment request: the filtering factor associated with the business type parameter is queried in the structured database (Redis). For example, the business type parameter is associated with the payment success rate, transaction limit, and transaction time in Redis and is stored, and the payment success rate, transaction limit, and transaction time are determined as the filtering factors; the payment routing channels that meet the filtering requirements represented by the above filtering factors are screened in the first type of payment routing channels to obtain the payment routing channels that meet both the filtering conditions corresponding to the query parameter filtering process and the filtering conditions corresponding to the channel filtering process. Taking quick payment as an example, when the payment request is quick payment, the above query parameter filtering process and channel filtering process can be expressed as follows: after product code binding routing channel filtering, secondary merchant number routing filtering, protocol support routing filtering, channel limit routing filtering, transaction element filtering and verification, channel service time filtering, merchant binding channel filtering, monitoring fuse channel filtering and other filtering are completed, the remaining final available channels are obtained.
[0046] According to some optional embodiments of the present application, determining the priority of each second-class payment routing channel includes: obtaining a ranking factor, wherein the ranking factor includes: the payment success rate of each second-class payment routing channel, and the transaction time of each second-class payment routing channel; determining a score value of each second-class payment routing channel according to the ranking factor of each second-class payment routing channel, wherein the score value is used to indicate the priority of the second-class payment routing channel, and the score value is positively correlated with the priority.
[0047] After the payment routing channel screening is completed through the query parameter filtering process and the channel filtering process, the payment routing channels (i.e., the second type of payment routing channels) that meet the channel requirements corresponding to the payment request are sorted. In this embodiment, the payment routing channels are sorted in descending order according to the score values of the payment routing channels to generate a final channel list. In this embodiment, each payment routing channel is scored according to the sorting factor, wherein the payment success rate and transaction time are used as sorting factors in the embodiment of the present application, and the score value of each payment routing channel is determined by the scoring factor. For example, the score of the payment success rate is determined according to the numerical value of the payment success rate, and the score of the transaction time is determined according to the transaction time. After that, the score value (score) of each payment routing channel is determined according to the formula score = payment success rate weight * payment success rate score + transaction time weight * transaction time score; the priority of each payment routing channel is determined according to the score value, and the channel list is generated according to the priority sorting, wherein, in this embodiment, the priority of the payment routing channel with a high score value is higher.
[0048] According to some other optional embodiments of the present application, after obtaining the channel list, it also includes: recording the operation information of each second-category payment routing channel in the channel list within the detection period, wherein the operation information at least includes: the total number of payments and the number of successful payments; for each second-category payment routing channel, determining the target payment success rate of the second-category payment routing channel within the detection period according to the operation information; when the target payment success rate is less than the maximum value of a preset success rate interval, reducing the priority of the second-category payment routing channel to the lowest level; when the target payment success rate is less than the minimum value of the preset success rate interval, performing fuse processing on the second-category payment routing channel.
[0049] The method provided in the embodiment of the present application adjusts the priority of the payment routing channel according to the actual operation status of the payment routing channel. Therefore, after determining the channel list corresponding to the payment request according to the method provided in the above embodiment, the total number of payments, the number of successful payments and other operation information of each payment routing channel (i.e., the second type of payment routing channel) recorded in the channel list are detected in real time in the preset detection cycle; the payment success rate (i.e., the target success rate) of each second type of payment routing channel in the detection cycle is determined according to the detected operation information; the priority of the payment routing channel is adjusted according to the target success rate, for example, the range of the lowest success rate that can be received is set to the preset success rate interval, if the success rate (i.e., the target success rate) of a certain payment routing channel in the detection cycle is only less than the maximum value of the preset success rate interval, it is only downgraded and its priority is adjusted to the lowest level of all payment routing channels recorded in the channel list; if the success rate (i.e., the target success rate) of a certain payment routing channel in the detection cycle is less than the minimum value of the preset success rate interval, it is subjected to fuse processing, and the specific method of fuse processing is: deleting this payment routing channel from the channel list and no longer sending payment requests to it.
[0050] Step S206: if no routing process is found, output a prompt message indicating routing anomaly to the client.
[0051] If the result of querying the routing process in the local cache in step S202 is that no routing process is found, step S206 is executed; a prompt message for prompting a routing abnormality is output to the client; wherein, the failure to query the routing process in the local cache indicates that the request to send the payment may be a client that has not been authorized or verified for payment.
[0052] Through the above steps, it is possible to select a payment routing channel for transmitting payment requests based on a screening strategy, thereby realizing payment. The screening strategy selects and sorts the optimal channel at this time based on multiple factors such as the real-time operating status and success rate of the channel, and transmits the payment request through the optimal channel, thereby improving the degree of payment realization. In addition, by real-time detection of the current success rate and usage of each channel, the system can automatically fuse or downgrade unavailable channels in a timely manner, reload the restored channels into the list of available channels, and intelligently and dynamically adjust the availability of each channel and the channel usage priority, thereby improving the stability of payment and meeting the high concurrency and high availability performance requirements of the payment system.
[0053] Figure 3 is a structural diagram of a device for determining a routing channel provided according to an embodiment of the present application, such as Figure 3As shown, the routing channel determination device includes: a receiving module 30, which is used to receive a payment request sent by a client, wherein the payment request is used to request access to a payment server; a query module 32, which is used to query a routing process in a local cache in response to the payment request, wherein the routing process is used to record a screening strategy of a payment routing channel, and the payment routing channel is used to transmit the payment request to the payment server; a determination module 34, which is used to determine a channel list according to the screening strategy when the routing process is queried, and determine a target payment routing channel with the highest priority in the channel list, wherein the channel list is used to record multiple payment routing channels, and the target payment routing channel is used to transmit the payment request to the payment server; an output module 36, which is used to output a prompt message of routing abnormality to the client when the routing process is not queried.
[0054] It should be noted that Figure 3 The preferred implementation of the illustrated embodiment can be found in Figure 2 The relevant description of the illustrated embodiment will not be repeated here.
[0055] An embodiment of the present application further provides a non-volatile storage medium, in which a computer program is stored, wherein the above method for determining a routing channel is executed by running the computer program on a device where the non-volatile storage medium is located.
[0056] The above-mentioned non-volatile storage medium is used to store a program that performs the following functions: receiving a payment request sent by a client, wherein the payment request is used to request access to a payment server; in response to the payment request, querying a routing process in a local cache, wherein the routing process is used to record a screening strategy for a payment routing channel, and the payment routing channel is used to transmit the payment request to the payment server; when the routing process is queried, determining a channel list according to the screening strategy, and determining a target payment routing channel with the highest priority in the channel list, wherein the channel list is used to record multiple payment routing channels, and the target payment routing channel is used to transmit the payment request to the payment server; when the routing process is not queried, outputting a prompt message of routing abnormality to the client.
[0057] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to execute the above method for determining a routing channel through the computer program.
[0058] The processor in the above-mentioned electronic device is used to run a program that performs the following functions: receiving a payment request sent by a client, wherein the payment request is used to request access to a payment server; in response to the payment request, querying a routing process in a local cache, wherein the routing process is used to record a screening strategy for a payment routing channel, and the payment routing channel is used to transmit the payment request to the payment server; when the routing process is queried, determining a channel list according to the screening strategy, and determining a target payment routing channel with the highest priority in the channel list, wherein the channel list is used to record multiple payment routing channels, and the target payment routing channel is used to transmit the payment request to the payment server; when the routing process is not queried, outputting a prompt message of routing abnormality to the client.
[0059] The embodiment of the present application also provides a computer program product, including computer instructions, which implement the steps of the above method for determining a routing channel when the computer instructions are executed by a processor.
[0060] It should be noted that the various modules in the above-mentioned routing channel determination device can be program modules (for example, a set of program instructions that implement a certain specific function) or hardware modules. For the latter, it can be expressed in the following forms, but is not limited to this: the expression form of each of the above-mentioned modules is a processor, or the functions of each of the above-mentioned modules are implemented by a processor.
[0061] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0062] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0063] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0064] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0065] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0066] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the relevant technology or all or part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk, etc. Various media that can store program codes.
[0067] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for determining a routing channel, characterized in that: include: Receiving a payment request sent by a client, wherein the payment request is used to request access to a payment server; In response to the payment request, querying a routing process in a local cache, wherein the routing process is used to record a screening strategy of a payment routing channel, and the payment routing channel is used to transmit the payment request to the payment service end; In the case where the routing process is queried, a channel list is determined according to the screening strategy, and a target payment routing channel with the highest priority is determined in the channel list, wherein the channel list is used to record multiple payment routing channels, and the target payment routing channel is used to transmit the payment request to the payment service end; When the routing process is not found, a prompt message indicating routing anomaly is output to the client.
2. The method according to claim 1, characterized in that Query the routing process in the local cache, including: Parsing the payment request to obtain key parameters for querying the routing process, wherein the key parameters at least include: request system identification information for indicating the system initiating the payment request in the client; The historical payment information associated with the key parameter is queried in the local cache, and the routing process recorded in the historical payment information is extracted.
3. The method according to claim 1, characterized in that The channel list is obtained by filtering in the local cache according to the filtering strategy recorded in the target routing process, wherein the target routing process is a routing process obtained in response to the payment request query, and filtering the channel list in the local cache according to the filtering strategy recorded in the target routing process includes: The query parameter filtering process, the channel filtering process, and the channel sorting process included in the screening strategy are sequentially executed to obtain the channel list, wherein the query parameter filtering process is used to screen the first type of payment routing channels that meet the query conditions in the payment routing channels stored in the local cache, and the query conditions are generated according to the parameters recorded in the payment request; the channel filtering process is used to screen the second type of payment routing channels that meet the business requirements in the first type of payment routing channels, wherein the business requirements are recorded in the payment request; the channel sorting process is used to determine the priority of each of the second type of payment routing channels, and sort the second type of payment routing channels according to the priority to obtain the channel list.
4. The method according to claim 3, characterized in that The first type of payment routing channel is obtained by the following method: Parsing the payment request to obtain a channel capability parameter and a business type parameter, wherein the channel capability parameter is used to describe the payment method supported by the payment routing channel, and the business type parameter is used to describe the transaction type corresponding to the payment request, and the transaction type includes: purchase transaction and recharge transaction; splicing the channel capability parameter and the business type parameter into the query condition, and searching for a target payment protocol type that meets the query condition in a preset mapping table according to the query condition, wherein the preset mapping table is used to record the association relationship between the channel capability parameter and the business type parameter and the payment protocol type; In the case where the target payment protocol type is queried, selecting payment routing channels whose protocol type is the target payment protocol type from the payment routing channels stored in the local cache as the first type of payment routing channels; In the case where the target payment protocol type is not found, a payment routing channel that meets the channel capability parameters is screened from the payment routing channels stored in the local cache as the first type of payment routing channel.
5. The method according to claim 3, characterized in that: The second type of payment routing channel is determined by the following method: Parsing the payment request to obtain a business type parameter, wherein the business type parameter is used to describe a transaction type corresponding to the payment request, and the transaction type includes: a purchase transaction and a recharge transaction; Querying the filter factors associated with the business type parameters in the structured database Redis, wherein the filter factors include: payment success rate, transaction limit, and transaction time; The second type of payment routing channel is screened from the first type of payment routing channel according to the filter factor.
6. The method according to claim 3, characterized in that Determine the priority of each of the second-category payment routing channels, including: Obtaining a ranking factor, wherein the ranking factor includes: a payment success rate of each of the second-type payment routing channels, and a transaction time consumption of each of the second-type payment routing channels; A scoring value of each second-class payment routing channel is determined according to the ranking factor of each second-class payment routing channel, wherein the scoring value is used to indicate the priority of the second-class payment routing channel, and the scoring value is positively correlated with the priority.
7. The method according to claim 3, characterized in that After obtaining the channel list, the method further includes: Recording the operation information of each second-category payment routing channel in the channel list within the detection period, wherein the operation information at least includes: the total number of payments and the number of successful payments; For each of the second-type payment routing channels, determining a target payment success rate of the second-type payment routing channel within the detection period according to the operation information; When the target payment success rate is less than the maximum value of the preset success rate interval, the priority of the second type of payment routing channel is reduced to the lowest level; When the target payment success rate is less than the minimum value of the preset success rate interval, the second type of payment routing channel is fused.
8. A device for determining a routing channel, characterized in that: include: A receiving module, used to receive a payment request sent by a client, wherein the payment request is used to request access to a payment server; A query module, configured to query a routing process in a local cache in response to the payment request, wherein the routing process is used to record a screening strategy of a payment routing channel, and the payment routing channel is used to transmit the payment request to the payment service end; A determination module, configured to determine a channel list according to the screening strategy when the routing process is queried, and determine a target payment routing channel with the highest priority in the channel list, wherein the channel list is used to record a plurality of payment routing channels, and the target payment routing channel is used to transmit the payment request to the payment service end; The output module is used to output a prompt message of routing anomaly to the client when the routing process is not found.
9. An electronic device, comprising a memory and a processor, characterized in that: The memory stores a computer program, and the processor is configured to execute the method for determining a routing channel according to any one of claims 1 to 7 through the computer program.
10. A computer program product comprising computer instructions, characterized in that When the computer instructions are executed by a processor, the steps of the method for determining a routing channel according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Personalized recommendation payment method, device and equipment based on payment mode
CN114625957A
Processing method and device applied to payment routing system and storage medium
CN115689556A
Unified payment dynamic routing method and device and storage medium
CN116032826A
Payment channel selection method, equipment, storage medium and device
CN116976878A
Channel routing processing method and device and electronic equipment
CN118413481A
Cited By
3DS multi-channel intelligent control method, system and terminal for cross-border payment
CN120450707A