技术领域technical field
本发明涉及金融科技(Fintech)技术领域,尤其涉及分布式账单处理方法、装置、设备与计算机可读存储介质。The present invention relates to the technical field of financial technology (Fintech), and in particular to a distributed bill processing method, device, equipment and computer-readable storage medium.
背景技术Background technique
近年来,随着金融科技(Fintech),尤其是互联网金融的不断发展,线上支付技术被引入银行等金融机构的日常服务中。在金融机构日常交易的过程中,分布式账单处理系统根据账单中的付款/扣款信息,在不同的支付渠道进行付款/扣款处理。In recent years, with the continuous development of financial technology (Fintech), especially Internet finance, online payment technology has been introduced into the daily services of financial institutions such as banks. During the daily transactions of financial institutions, the distributed bill processing system performs payment/deduction processing in different payment channels according to the payment/deduction information in the bill.
然而,现有的付款/扣款处理方式无法对支付渠道的健康状况进行探测,导致支付失败、支付延时或重复支付等问题,如无法对支付渠道的可用性进行评估等,也无法针对当前各支付渠道的处理能力做出调整,如降低交易请求频次等,也无法在当前支付渠道发生故障时进行自动熔断等,如支付渠道不可用时,停止处理等。即现有的线上支付方式无法智能选择可用的支付渠道,导致支付成功率较低的问题。However, the existing payment/debit processing methods cannot detect the health status of the payment channel, resulting in payment failure, payment delay or repeated payment, etc. Adjust the processing capacity of the payment channel, such as reducing the frequency of transaction requests, etc., and cannot automatically fuse when the current payment channel fails, such as stopping processing when the payment channel is unavailable. That is, the existing online payment methods cannot intelligently select available payment channels, resulting in a low payment success rate.
发明内容Contents of the invention
本发明的主要目的在于提出一种分布式账单处理方法、装置、设备与计算机可读存储介质,旨在提高支付成功率。The main purpose of the present invention is to provide a distributed bill processing method, device, equipment and computer-readable storage medium, aiming at improving the payment success rate.
为实现上述目的,本发明提供一种分布式账单处理方法,所述分布式账单处理方法包括如下步骤:In order to achieve the above object, the present invention provides a distributed bill processing method, which includes the following steps:
当接收到支付请求时,基于所述支付请求对应的文件地址,下载所述文件地址对应的账单文件;When a payment request is received, downloading a bill file corresponding to the file address based on the file address corresponding to the payment request;
读取所述账单文件中各交易信息的交易要素,并基于所述交易要素,确定所述账单文件中各交易信息对应的第一支付渠道,并将所述账单文件拆分成所述第一支付渠道对应的子账单文件;reading the transaction elements of each transaction information in the bill file, and based on the transaction elements, determining the first payment channel corresponding to each transaction information in the bill file, and splitting the bill file into the first The sub-bill file corresponding to the payment channel;
对所述第一支付渠道进行探测,确定所述第一支付渠道是否可用;Detecting the first payment channel to determine whether the first payment channel is available;
若可用,则将所述子账单文件发送至所述第一支付渠道。If available, the sub-bill file is sent to the first payment channel.
优选地,所述当接收到支付请求时,基于所述支付请求对应的文件地址,下载所述文件地址对应的账单文件的步骤包括:Preferably, when the payment request is received, the step of downloading the bill file corresponding to the file address based on the file address corresponding to the payment request includes:
当接收到支付请求时,获取所述支付请求对应的文件地址和文件哈希值;When a payment request is received, obtain the file address and file hash value corresponding to the payment request;
下载所述文件地址对应的账单文件,并基于所述文件哈希值,对所述账单文件的完整性进行检验;downloading the bill file corresponding to the file address, and checking the integrity of the bill file based on the hash value of the file;
若确定所述账单文件完整,则执行读取所述账单文件中各交易信息的交易要素,并基于所述交易要素,确定所述账单文件中各交易信息对应的第一支付渠道,并将所述账单文件拆分成所述第一支付渠道对应的子账单文件的步骤。If it is determined that the bill file is complete, read the transaction elements of each transaction information in the bill file, and based on the transaction elements, determine the first payment channel corresponding to each transaction information in the bill file, and send the The step of splitting the bill file into sub-bill files corresponding to the first payment channel.
优选地,所述读取所述账单文件中各交易信息的交易要素,并基于所述交易要素,确定所述账单文件中各交易信息对应的第一支付渠道,并将所述账单文件拆分成所述第一支付渠道对应的子账单文件的步骤包括:Preferably, reading the transaction elements of each transaction information in the bill file, and based on the transaction elements, determining the first payment channel corresponding to each transaction information in the bill file, and splitting the bill file The steps of forming a sub-bill file corresponding to the first payment channel include:
读取所述账单文件中各交易信息的交易要素,所述交易要素包括产品代码和金额;Read the transaction elements of each transaction information in the bill file, the transaction elements include product code and amount;
基于所述产品代码和所述金额,确定所述账单文件中各交易信息对应的第一支付渠道,并将所述账单文件拆分成所述第一支付渠道对应的子账单文件。Based on the product code and the amount, determine the first payment channel corresponding to each transaction information in the bill file, and split the bill file into sub-bill files corresponding to the first payment channel.
优选地,所述基于所述产品代码和所述金额,确定所述账单文件中各交易信息对应的第一支付渠道的步骤包括:Preferably, the step of determining the first payment channel corresponding to each transaction information in the bill file based on the product code and the amount includes:
基于所述产品代码,确定所述账单文件中各交易信息所属的产品类别;Based on the product code, determine the product category to which each transaction information in the bill file belongs;
基于所述金额和所述产品类别的限额金额,确定所述账单文件中各交易信息对应的第一支付渠道。Based on the amount and the limit amount of the product category, determine the first payment channel corresponding to each transaction information in the bill file.
优选地,所述对所述第一支付渠道进行探测,确定所述第一支付渠道是否可用的步骤包括:Preferably, the step of detecting the first payment channel and determining whether the first payment channel is available includes:
获取所述第一支付渠道的历史可用性,基于所述历史可用性,确定所述第一支付渠道中的待探测渠道;Acquiring historical availability of the first payment channel, and determining channels to be detected in the first payment channel based on the historical availability;
向所述待探测渠道发送预设探测包,并基于所述待探测渠道返回的探测结果,判断所述待探测渠道是否可用。Sending a preset detection packet to the channel to be detected, and judging whether the channel to be detected is available based on a detection result returned by the channel to be detected.
优选地,所述若可用,则将所述子账单文件发送至所述第一支付渠道的步骤之后,所述方法还包括:Preferably, after the step of sending the sub-bill file to the first payment channel if available, the method further includes:
监控所述第一支付渠道的健康状态,并执行所述健康状态对应的执行策略;monitoring the health status of the first payment channel, and executing an execution policy corresponding to the health status;
其中,当监测到所述健康状态为单位时间成功率低于预设阈值时,确定所述健康状态对应的所述执行策略为熔断处理,并基于所述执行策略,将第一支付渠道熔断。Wherein, when it is detected that the health status is such that the success rate per unit time is lower than a preset threshold, it is determined that the execution policy corresponding to the health status is circuit breaker processing, and the first payment channel is circuit breaker based on the execution policy.
优选地,所述对所述第一支付渠道进行探测,确定所述第一支付渠道是否可用的步骤之后,所述方法还包括:Preferably, after the step of detecting the first payment channel and determining whether the first payment channel is available, the method further includes:
若不可用,则将所述子账单文件发送至差错通道;If not available, sending the sub-bill file to an error channel;
当接收到所述差错通道基于所述子账单文件发送的标识信息时,基于所述标识信息,确定所述子账单文件对应的第二支付渠道;When receiving the identification information sent by the error channel based on the sub-bill file, based on the identification information, determine the second payment channel corresponding to the sub-bill file;
将子账单文件发送至所述第二支付渠道。Send the sub-bill file to the second payment channel.
此外,为实现上述目的,本发明还提供一种分布式账单处理装置,所述分布式账单处理装置包括:In addition, in order to achieve the above object, the present invention also provides a distributed bill processing device, which includes:
下载模块,用于当接收到支付请求时,基于所述支付请求对应的文件地址,下载所述文件地址对应的账单文件;A download module, configured to download the bill file corresponding to the file address based on the file address corresponding to the payment request when the payment request is received;
确定模块,用于读取所述账单文件中各交易信息的交易要素,并基于所述交易要素,确定所述账单文件中各交易信息对应的第一支付渠道,并将所述账单文件拆分成所述第一支付渠道对应的子账单文件;A determination module, configured to read the transaction elements of each transaction information in the bill file, and based on the transaction elements, determine the first payment channel corresponding to each transaction information in the bill file, and split the bill file Create a sub-bill file corresponding to the first payment channel;
探测模块,用于对所述第一支付渠道进行探测,确定所述第一支付渠道是否可用;A detection module, configured to detect the first payment channel and determine whether the first payment channel is available;
发送模块,用于若可用,则将所述子账单文件发送至所述第一支付渠道。A sending module, configured to send the sub-bill file to the first payment channel if available.
优选地,所述下载模块还用于:Preferably, the download module is also used for:
当接收到支付请求时,获取所述支付请求对应的文件地址和文件哈希值;When a payment request is received, obtain the file address and file hash value corresponding to the payment request;
下载所述文件地址对应的账单文件,并基于所述文件哈希值,对所述账单文件的完整性进行检验;downloading the bill file corresponding to the file address, and checking the integrity of the bill file based on the hash value of the file;
若确定所述账单文件完整,则执行读取所述账单文件中各交易信息的交易要素,并基于所述交易要素,确定所述账单文件中各交易信息对应的第一支付渠道,并将所述账单文件拆分成所述第一支付渠道对应的子账单文件的步骤。If it is determined that the bill file is complete, read the transaction elements of each transaction information in the bill file, and based on the transaction elements, determine the first payment channel corresponding to each transaction information in the bill file, and send the The step of splitting the bill file into sub-bill files corresponding to the first payment channel.
优选地,所述确定模块还用于:Preferably, the determination module is also used for:
读取所述账单文件中各交易信息的交易要素,所述交易要素包括产品代码和金额;Read the transaction elements of each transaction information in the bill file, the transaction elements include product code and amount;
基于所述产品代码和所述金额,确定所述账单文件中各交易信息对应的第一支付渠道,并将所述账单文件拆分成所述第一支付渠道对应的子账单文件。Based on the product code and the amount, determine the first payment channel corresponding to each transaction information in the bill file, and split the bill file into sub-bill files corresponding to the first payment channel.
优选地,所述确定模块还用于:Preferably, the determination module is also used for:
基于所述产品代码,确定所述账单文件中各交易信息所属的产品类别;Based on the product code, determine the product category to which each transaction information in the bill file belongs;
基于所述金额和所述产品类别的限额金额,确定所述账单文件中各交易信息对应的第一支付渠道。Based on the amount and the limit amount of the product category, determine the first payment channel corresponding to each transaction information in the bill file.
优选地,所述探测模块还用于:Preferably, the detection module is also used for:
获取所述第一支付渠道的历史可用性,基于所述历史可用性,确定所述第一支付渠道中的待探测渠道;Acquiring historical availability of the first payment channel, and determining channels to be detected in the first payment channel based on the historical availability;
向所述待探测渠道发送预设探测包,并基于所述待探测渠道返回的探测结果,判断所述待探测渠道是否可用。Sending a preset detection packet to the channel to be detected, and judging whether the channel to be detected is available based on a detection result returned by the channel to be detected.
优选地,所述分布式账单处理装置还包括监控模块,所述监控模块用于:Preferably, the distributed bill processing device further includes a monitoring module, and the monitoring module is used for:
监控所述第一支付渠道的健康状态,并执行所述健康状态对应的执行策略;monitoring the health status of the first payment channel, and executing an execution policy corresponding to the health status;
其中,当监测到所述健康状态为单位时间成功率低于预设阈值时,确定所述健康状态对应的所述执行策略为熔断处理,并基于所述执行策略,将第一支付渠道熔断。Wherein, when it is detected that the health status is such that the success rate per unit time is lower than a preset threshold, it is determined that the execution policy corresponding to the health status is circuit breaker processing, and the first payment channel is circuit breaker based on the execution policy.
优选地,所述发送模块还用于:Preferably, the sending module is also used for:
若不可用,则将所述子账单文件发送至差错通道;If not available, sending the sub-bill file to an error channel;
当接收到所述差错通道基于所述子账单文件发送的标识信息时,基于所述标识信息,确定所述子账单文件对应的第二支付渠道;When receiving the identification information sent by the error channel based on the sub-bill file, based on the identification information, determine the second payment channel corresponding to the sub-bill file;
将所述子账单文件发送至所述第二支付渠道。Sending the sub-bill file to the second payment channel.
此外,为实现上述目的,本发明还提供一种分布式账单处理设备,所述分布式账单处理设备包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的分布式账单处理程序,所述分布式账单处理程序被所述处理器执行时实现如上所述的分布式账单处理方法的步骤。In addition, in order to achieve the above object, the present invention also provides a distributed bill processing device, which includes: a memory, a processor, and a distribution stored on the memory and operable on the processor. A bill processing program, when the distributed bill processing program is executed by the processor, implements the steps of the above-mentioned distributed bill processing method.
此外,为实现上述目的,本发明还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有分布式账单处理程序,所述分布式账单处理程序被处理器执行时实现如上所述的分布式账单处理方法的步骤。In addition, in order to achieve the above object, the present invention also provides a computer-readable storage medium, on which a distributed bill processing program is stored, and when the distributed bill processing program is executed by a processor, the above-mentioned The steps of the distributed bill processing method described above.
本发明提出的分布式账单处理方法,当接收到支付请求时,基于所述支付请求对应的文件地址,下载所述文件地址对应的账单文件;读取所述账单文件中各交易信息的交易要素,并基于所述交易要素,确定所述账单文件中各交易信息对应的第一支付渠道,并将所述账单文件拆分成所述第一支付渠道对应的子账单文件;对所述第一支付渠道进行探测,确定所述第一支付渠道是否可用;若可用,则将所述子账单文件发送至所述第一支付渠道。本发明通过交易要素选择可用的支付渠道,提高支付成功率。The distributed bill processing method proposed by the present invention, when receiving a payment request, downloads the bill file corresponding to the file address based on the file address corresponding to the payment request; reads the transaction elements of each transaction information in the bill file , and based on the transaction elements, determine the first payment channel corresponding to each transaction information in the bill file, and split the bill file into sub-bill files corresponding to the first payment channel; The payment channel is detected to determine whether the first payment channel is available; if available, the sub-bill file is sent to the first payment channel. The present invention selects available payment channels through transaction elements to improve the success rate of payment.
附图说明Description of drawings
图1是本发明实施例方案涉及的硬件运行环境的设备结构示意图;Fig. 1 is a schematic diagram of the device structure of the hardware operating environment involved in the solution of the embodiment of the present invention;
图2为本发明分布式账单处理方法第一实施例的流程示意图;FIG. 2 is a schematic flowchart of the first embodiment of the distributed bill processing method of the present invention;
图3为本发明分布式账单处理方法第二实施例的流程示意图。FIG. 3 is a schematic flowchart of a second embodiment of the distributed bill processing method of the present invention.
本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The realization of the purpose of the present invention, functional characteristics and advantages will be further described in conjunction with the embodiments and with reference to the accompanying drawings.
具体实施方式Detailed ways
应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention.
如图1所示,图1是本发明实施例方案涉及的硬件运行环境的设备结构示意图。As shown in FIG. 1 , FIG. 1 is a schematic diagram of the equipment structure of the hardware operating environment involved in the solution of the embodiment of the present invention.
本发明实施例终端可以是PC机或服务器设备。The terminal in this embodiment of the present invention may be a PC or a server device.
如图1所示,该终端可以包括:处理器1001,例如CPU,网络接口1004,用户接口1003,存储器1005,通信总线1002。其中,通信总线1002用于实现这些组件之间的连接通信。用户接口1003可以包括显示屏(Display)、输入单元比如键盘(Keyboard),可选用户接口1003还可以包括标准的有线接口、无线接口。网络接口1004可选的可以包括标准的有线接口、无线接口(如WI-FI接口)。存储器1005可以是高速RAM存储器,也可以是稳定的存储器(non-volatile memory),例如磁盘存储器。存储器1005可选的还可以是独立于前述处理器1001的存储装置。As shown in FIG. 1 , the terminal may include: a processor 1001 , such as a CPU, a network interface 1004 , a user interface 1003 , a memory 1005 , and a communication bus 1002 . Wherein, the communication bus 1002 is used to realize connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. Optionally, the network interface 1004 may include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 can be a high-speed RAM memory, or a stable memory (non-volatile memory), such as a disk memory. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001 .
本领域技术人员可以理解,图1中示出的设备结构并不构成对设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。Those skilled in the art can understand that the device structure shown in FIG. 1 does not constitute a limitation to the device, and may include more or less components than shown in the figure, or combine some components, or arrange different components.
如图1所示,作为一种计算机存储介质的存储器1005中可以包括操作系统、网络通信模块、用户接口模块以及分布式账单处理程序。As shown in FIG. 1 , the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a distributed bill processing program.
其中,操作系统是管理和控制分布式账单处理设备与软件资源的程序,支持网络通信模块、用户接口模块、分布式账单处理程序以及其他程序或软件的运行;网络通信模块用于管理和控制网络接口1002;用户接口模块用于管理和控制用户接口1003。Among them, the operating system is a program that manages and controls distributed bill processing equipment and software resources, and supports the operation of network communication modules, user interface modules, distributed bill processing programs, and other programs or software; the network communication module is used to manage and control network Interface 1002; the user interface module is used to manage and control the user interface 1003.
在图1所示的分布式账单处理设备中,所述分布式账单处理设备通过处理器1001调用存储器1005中存储的分布式账单处理程序,并执行下述分布式账单处理方法各个实施例中的操作。In the distributed bill processing device shown in Figure 1, the distributed bill processing device calls the distributed bill processing program stored in the memory 1005 through the processor 1001, and executes the following distributed bill processing methods in various embodiments operate.
基于上述硬件结构,提出本发明分布式账单处理方法实施例。Based on the above hardware structure, an embodiment of the distributed bill processing method of the present invention is proposed.
参照图2,图2为本发明分布式账单处理方法第一实施例的流程示意图,所述方法包括:Referring to FIG. 2, FIG. 2 is a schematic flowchart of the first embodiment of the distributed bill processing method of the present invention, the method includes:
步骤S10,当接收到支付请求时,基于所述支付请求对应的文件地址,下载所述文件地址对应的账单文件;Step S10, when a payment request is received, based on the file address corresponding to the payment request, download the bill file corresponding to the file address;
步骤S20,读取所述账单文件中各交易信息的交易要素,并基于所述交易要素,确定所述账单文件中各交易信息对应的第一支付渠道,并将所述账单文件拆分成所述第一支付渠道对应的子账单文件;Step S20, read the transaction elements of each transaction information in the bill file, and determine the first payment channel corresponding to each transaction information in the bill file based on the transaction elements, and split the bill file into all The sub-bill file corresponding to the first payment channel;
步骤S30,对所述第一支付渠道进行探测,确定所述第一支付渠道是否可用;Step S30, detecting the first payment channel to determine whether the first payment channel is available;
步骤S40,若可用,则将所述子账单文件发送至所述第一支付渠道。Step S40, if applicable, sending the sub-bill file to the first payment channel.
本实施例在对分布式账单进行处理的过程中,通过账单文件中各交易信息的交易要素,确定对应的可用的支付渠道,从而使用可用的支付渠道完成线上支付,提高支付成功率。In this embodiment, in the process of processing the distributed bill, the corresponding available payment channels are determined through the transaction elements of each transaction information in the bill file, so that the available payment channels are used to complete online payment and improve the payment success rate.
以下将对各个步骤进行详细说明:Each step will be described in detail below:
步骤S10,当接收到支付请求时,基于所述支付请求对应的文件地址,下载所述文件地址对应的账单文件。Step S10, when a payment request is received, based on the file address corresponding to the payment request, download the bill file corresponding to the file address.
本实施例分布式账单处理方法应用于理财机构或者银行系统等金融机构的分布式账单处理设备中,为描述方便,分布式账单处理设备以下简称处理设备,其中,处理设备用于接收上游系统通过信息中间件发送的支付请求,并根据支付请求完成线上支付。上游系统指各个分布式部署的账单接收系统,用于接入处理设备,如对账平台,并向处理设备发送支付请求,其中,支付请求包含接入本处理设备的渠道号、文件批次号、文件地址、文件哈希值、文件笔数、文件金额和文件类型(付款/扣款)等信息。The distributed bill processing method of this embodiment is applied to the distributed bill processing equipment of financial institutions such as wealth management institutions or banking systems. For the convenience of description, the distributed bill processing equipment is hereinafter referred to as processing equipment. The payment request sent by the information middleware, and complete the online payment according to the payment request. The upstream system refers to each distributed bill receiving system, which is used to access the processing equipment, such as the account reconciliation platform, and send a payment request to the processing equipment. The payment request includes the channel number and file batch number of the processing equipment. , file address, file hash value, file number, file amount, file type (payment/debit) and other information.
当处理设备接收到支付请求时,通过读取支付请求中的文件地址,并根据文件地址,去相应的数据库中下载对应的账单文件。When the processing device receives the payment request, it reads the file address in the payment request, and downloads the corresponding bill file from the corresponding database according to the file address.
具体的,步骤S10包括:Specifically, step S10 includes:
当接收到支付请求时,获取所述支付请求对应的文件地址和文件哈希值;When a payment request is received, obtain the file address and file hash value corresponding to the payment request;
在该步骤中,处理设备在接收到支付请求时,获取支付请求对应的文件地址和文件哈希值,即处理设备先确定支付请求对应的账单文件的来源。In this step, when the processing device receives the payment request, it obtains the file address and file hash value corresponding to the payment request, that is, the processing device first determines the source of the bill file corresponding to the payment request.
下载所述文件地址对应的账单文件,并基于所述文件哈希值,对所述账单文件的完整性进行检验;downloading the bill file corresponding to the file address, and checking the integrity of the bill file based on the hash value of the file;
在该步骤中,处理设备根据文件地址,在相应的数据库中下载对应的账单文件,并基于文件哈希值对账单文件的完整性进行验证。In this step, the processing device downloads the corresponding bill file in the corresponding database according to the file address, and verifies the integrity of the bill file based on the file hash value.
其中由于文件哈希值的不可更改特性,可确定当前账单文件是否被修改,未被修改的账单文件即确定为完整。Wherein, due to the unchangeable characteristic of the file hash value, it can be determined whether the current bill file has been modified, and the bill file that has not been modified is determined to be complete.
此外,也可通过确定当前账单文件的格式是否与预设的文件格式一致,用以校验当前账单文件的完整性,如预设的文件格式中包含有金额和文件类型等信息,那么只需确定当前账单文件中是否包含金额和文件类型等信息即可确定当前账单文件是否完整。In addition, the integrity of the current bill file can also be verified by determining whether the format of the current bill file is consistent with the preset file format. If the preset file format contains information such as amount and file type, then only Whether the current bill file is complete can be determined by determining whether the current bill file contains information such as amount and file type.
若确定所述账单文件完整,则执行读取所述账单文件中各交易信息的交易要素,并基于所述交易要素,确定所述账单文件中各交易信息对应的第一支付渠道,并将所述账单文件拆分成所述第一支付渠道对应的子账单文件的步骤。If it is determined that the bill file is complete, read the transaction elements of each transaction information in the bill file, and based on the transaction elements, determine the first payment channel corresponding to each transaction information in the bill file, and send the The step of splitting the bill file into sub-bill files corresponding to the first payment channel.
在该步骤中,只有确定当前账单文件完整,才继续执行步骤S20;若确定当前账单文件不完整,则将当前账单文件标记为残缺文件,并将当前账单文件发送至差错通道,由相关人员对其进行补全。In this step, only if it is determined that the current bill file is complete, step S20 is continued; if it is determined that the current bill file is incomplete, the current bill file is marked as an incomplete file, and the current bill file is sent to the error channel, and relevant personnel check It completes.
步骤S20,读取所述账单文件中各交易信息的交易要素,并基于所述交易要素,确定所述账单文件中各交易信息对应的第一支付渠道,并将所述账单文件拆分成所述第一支付渠道对应的子账单文件。Step S20, read the transaction elements of each transaction information in the bill file, and determine the first payment channel corresponding to each transaction information in the bill file based on the transaction elements, and split the bill file into all The sub-bill file corresponding to the first payment channel mentioned above.
在本实施例中,处理设备读取当前账单文件中各交易信息的交易要素,其中,交易要素包括产品代码、银行、金额和交易类型等,处理设备根据交易要素,确定当前账单文件中各交易信息对应的第一支付渠道,即处理设备通过读取当前账单文件中各交易信息的交易要素,为账单文件中每条交易信息选择最优支付渠道。此时,当前账单文件中每一条交易信息都对应有自己的支付渠道,而每一条支付渠道可以对应多条交易信息,因此,第一支付渠道具体数量与当前账单文件中的交易信息对应,并将当前账单文件拆分成第一支付渠道对应的若干子账单文件,即每一个子账单文件都对应一条支付渠道。In this embodiment, the processing device reads the transaction elements of each transaction information in the current bill file, wherein the transaction elements include product code, bank, amount, and transaction type, etc., and the processing device determines the value of each transaction in the current bill file according to the transaction elements. The first payment channel corresponding to the information, that is, the processing device selects the optimal payment channel for each transaction information in the bill file by reading the transaction elements of each transaction information in the current bill file. At this time, each transaction information in the current bill file corresponds to its own payment channel, and each payment channel can correspond to multiple transaction information. Therefore, the specific number of the first payment channel corresponds to the transaction information in the current bill file, and The current bill file is split into several sub-bill files corresponding to the first payment channel, that is, each sub-bill file corresponds to a payment channel.
具体的,步骤S20包括:Specifically, step S20 includes:
步骤a,读取所述账单文件中各交易信息的交易要素,所述交易要素包括产品代码和金额;Step a, reading the transaction elements of each transaction information in the bill file, the transaction elements include product code and amount;
在该步骤中,处理设备读取当前账单文件中各交易信息的交易要素,该交易要素包括产品代码和金额,作为处理设备为每条交易信息选择最优支付渠道的依据。In this step, the processing device reads the transaction elements of each transaction information in the current bill file, the transaction elements include product code and amount, as the basis for the processing device to select the optimal payment channel for each transaction information.
步骤b,基于所述产品代码和所述金额,确定所述账单文件中各交易信息对应的第一支付渠道,并将所述账单文件拆分成所述第一支付渠道对应的子账单文件。Step b, based on the product code and the amount, determine the first payment channel corresponding to each transaction information in the bill file, and split the bill file into sub-bill files corresponding to the first payment channel.
在该步骤中,处理设备基于产品代码和金额,确定当前账单文件中各交易信息对应的第一支付渠道,如产品代码为1,金额低于5000的交易信息,其对应的支付渠道为A支付渠道,产品代码为2,金额高于5000的交易信息,其对应的支付渠道为B支付渠道等,并将当前账单文件拆分成第一支付渠道对应的子账单文件,即,将当前账单文件中所属同一支付渠道的交易信息归纳在一起,如当前账单文件中包含有甲、乙、丙和丁四条交易信息,甲和乙对应A支付渠道,丙和丁对应B支付渠道,则将当前账单文件拆分为两个子账单文件,其中一个子账单文件包含甲和乙,对应的支付渠道为A支付渠道,另一个子账单文件包含丙和丁,对应的支付渠道为B支付渠道。In this step, the processing device determines the first payment channel corresponding to each transaction information in the current bill file based on the product code and amount. For example, if the product code is 1 and the transaction amount is less than 5000, the corresponding payment channel is Payment A channel, the product code is 2, and the transaction information with an amount higher than 5000, the corresponding payment channel is B payment channel, etc., and the current bill file is split into sub-bill files corresponding to the first payment channel, that is, the current bill file The transaction information belonging to the same payment channel in . The file is split into two sub-bill files, one of which contains A and B, and the corresponding payment channel is A payment channel, and the other sub-bill file contains C and D, and the corresponding payment channel is B payment channel.
可以理解的,处理设备也可以读取当前账单文件中各交易信息的交易类型,依据交易类型选择相应的支付渠道,如付款类交易信息选择A支付渠道,而扣款类交易信息选择B支付渠道等。It is understandable that the processing device can also read the transaction type of each transaction information in the current bill file, and select the corresponding payment channel according to the transaction type, for example, select A payment channel for payment transaction information, and select B payment channel for deduction transaction information Wait.
也可以读取当前账单文件中各交易信息所属的银行,依据银行选择相应的支付渠道,如工商银行、中国银行和建设银行等由于有限额规定,选择C支付渠道,而中信银行、招商银行和广发银行等由于没有限额规定,选择D支付渠道等。It is also possible to read the bank to which each transaction information in the current bill file belongs, and select the corresponding payment channel according to the bank, such as Industrial and Commercial Bank of China, Bank of China, and China Construction Bank, etc. due to limited quota regulations, choose C payment channel, while China CITIC Bank, China Merchants Bank and Since China Guangfa Bank and others have no limit regulations, they choose D payment channel and so on.
进一步地,步骤b包括:Further, step b includes:
基于所述产品代码,确定所述账单文件中各交易信息所属的产品类别;Based on the product code, determine the product category to which each transaction information in the bill file belongs;
在该步骤中,处理设备基于产品代码,确定当前账单文件中各交易信息所属的产品类别,具体的,预设一套产品代码-产品类别的关联表,在处理设备读取到当前账单文件各交易信息的产品代码后,即可通过产品代码和预设的产品代码-产品类别关联表确定各交易信息所属的产品类型。In this step, the processing device determines the product category to which each transaction information in the current bill file belongs based on the product code. Specifically, a set of product code-product category association tables is preset, and the processing device reads the current bill file. After the product code of the transaction information is entered, the product type to which each transaction information belongs can be determined through the product code and the preset product code-product category association table.
基于所述金额和所述产品类别的限额金额,确定所述账单文件中各交易信息对应的第一支付渠道。Based on the amount and the limit amount of the product category, determine the first payment channel corresponding to each transaction information in the bill file.
在该步骤中,处理设备根据各交易信息的金额,以及各交易信息所属的产品类别的限额金额,确定当前账单文件中各交易信息对应的第一支付渠道,如E产品的限额金额为5000,当前账单文件中的交易信息中有两条关于E产品的,其中一条为1万,一条为3000,1万的交易信息由于超过了限额金额,属于大额交易,应当走大额支付渠道,而3000的交易信息由于未超过限额金额,属于小额交易,应当走小额支付渠道等。In this step, the processing device determines the first payment channel corresponding to each transaction information in the current bill file according to the amount of each transaction information and the limit amount of the product category to which each transaction information belongs, for example, the limit amount of E product is 5000, Among the transaction information in the current bill file, there are two items about E products, one of which is 10,000, and the other is 3,000. Since the transaction information of 10,000 exceeds the limit amount, it is a large-value transaction and should be paid through a large-value payment channel. Since the transaction information of 3000 does not exceed the limit amount, it is a small-value transaction and should go through the small-value payment channel.
进一步地,交易要素还包括交易时效,确定第一支付渠道的步骤还可以包括:Further, the transaction elements also include transaction timeliness, and the step of determining the first payment channel may also include:
读取当前账单文件中各交易信息的交易时效,基于交易时效,确定账单文件中各交易信息对应的第一支付渠道。The transaction timeliness of each transaction information in the current bill file is read, and based on the transaction timeliness, the first payment channel corresponding to each transaction information in the bill file is determined.
即考虑交易的时效性,为交易时效比较紧张的交易信息选择快速支付渠道,为交易时效不紧张的交易信息选择普通支付渠道等。That is to consider the timeliness of transactions, choose fast payment channels for transaction information with relatively tight transaction timeliness, and choose ordinary payment channels for transaction information with less timeliness.
进一步地,交易要素包括金额,确定第一支付渠道的步骤还可以包括:Further, the transaction elements include the amount, and the step of determining the first payment channel may also include:
读取当前账单文件中各交易信息的金额,并确定当前处理设备对接的支付渠道的渠道费,可以理解的,每一种支付渠道,都对应有渠道费,渠道费的计算主要是依据当前交易信息的金额以及各支付渠道的收费规则所得出,因此,可通过计算每一条交易信息通过每一条支付渠道的渠道费,进而选择渠道费低的支付渠道作为当前交易信息的支付渠道。Read the amount of each transaction information in the current bill file, and determine the channel fee of the payment channel connected to the current processing device. It is understandable that each payment channel corresponds to a channel fee, and the calculation of the channel fee is mainly based on the current transaction Therefore, by calculating the channel fee for each transaction information passing through each payment channel, the payment channel with the lowest channel fee can be selected as the payment channel for the current transaction information.
步骤S30,对所述第一支付渠道进行探测,确定所述第一支付渠道是否可用。Step S30, detecting the first payment channel to determine whether the first payment channel is available.
在本实施例中,在确定了当前账单文件中各交易信息对应的第一支付渠道后,对第一支付渠道进行探测,也即对当前账单文件中各交易信息所对应的支付渠道一一进行探测,从而确定第一支付渠道是否可用,可以理解的,由于第一支付渠道的数量与当前账单文件中包含的交易信息对应,因此,当交易信息有多条时,且各自对应不同的支付渠道的时候,第一支付渠道至少包括两条支付渠道,在对第一支付渠道进行探测时,只有所有的支付渠道都可用,才确定第一支付渠道可用;若其中有一条支付渠道不可用,则第一支付渠道不可用。In this embodiment, after the first payment channel corresponding to each transaction information in the current bill file is determined, the first payment channel is detected, that is, the payment channels corresponding to each transaction information in the current bill file are detected one by one. Detection, so as to determine whether the first payment channel is available. It can be understood that since the number of the first payment channel corresponds to the transaction information contained in the current bill file, when there are multiple transaction information, and each corresponds to a different payment channel When , the first payment channel includes at least two payment channels. When detecting the first payment channel, it is determined that the first payment channel is available only when all payment channels are available; if one of the payment channels is not available, then The first payment channel is not available.
具体探测方式包括:Specific detection methods include:
向所述第一支付渠道发送预设探测包,并基于所述第一支付渠道返回的探测结果和预设规则,判断所述第一支付渠道是否可用。Sending a preset detection packet to the first payment channel, and judging whether the first payment channel is available based on the detection result returned by the first payment channel and preset rules.
在该步骤中,向第一支付渠道发送预设探测包,也即向当前账单文件中各交易信息对应的支付渠道发送预设探测包,其中,预设探测包为模拟交易信息的账单信息,具体包括金额,银行和交易类型等交易要素,将预设探测包发送至第一支付渠道,检测是否支付成功,若是,则确定第一支付渠道可用。In this step, a preset detection packet is sent to the first payment channel, that is, a preset detection packet is sent to the payment channel corresponding to each transaction information in the current bill file, wherein the preset detection packet is the bill information of the simulated transaction information, Specifically including transaction elements such as amount, bank, and transaction type, the preset detection packet is sent to the first payment channel to detect whether the payment is successful, and if so, it is determined that the first payment channel is available.
步骤S40,若可用,则将所述子账单文件发送至所述第一支付渠道。Step S40, if applicable, sending the sub-bill file to the first payment channel.
在本实施例中,若确定第一支付渠道可用,则将子账单文件发送至第一支付渠道,以完成线上支付。In this embodiment, if it is determined that the first payment channel is available, the sub-bill file is sent to the first payment channel to complete online payment.
进一步地,若不可用,则将所述子账单文件发送至差错通道;Further, if not available, the sub-bill file is sent to the error channel;
在该步骤中,若确定第一支付渠道不可用,则将对应的子账单文件发送至差错通道,其中,差错通道即为人工判断通道,在处理设备无法确定子账单文件对应的支付渠道时,交由人工判断通道,由相应的维护人员对其进行手动选择并标记。In this step, if it is determined that the first payment channel is unavailable, the corresponding sub-bill file is sent to the error channel, wherein the error channel is a manual judgment channel, and when the processing device cannot determine the payment channel corresponding to the sub-bill file, The channels are handed over to manual judgment, and the corresponding maintenance personnel manually select and mark them.
当接收到所述差错通道基于所述子账单文件发送的标识信息时,基于所述标识信息,确定所述子账单文件对应的第二支付渠道;When receiving the identification information sent by the error channel based on the sub-bill file, based on the identification information, determine the second payment channel corresponding to the sub-bill file;
在该步骤中,当接收到差错通道基于子账单文件发送的标识信息时,根据标识信息,确定子账单文件对应的第二支付渠道,即在差错通道中,由相应的维护人员手动对子账单文件进行匹配支付渠道,并生成对应的标识信息,处理设备在接收到标识信息后,即可确定子账单文件对应的第二支付渠道,需要说明的是,第一支付渠道和第二支付渠道可以是相同的,即处理设备确定第一支付渠道不可用后,相应的维护人员还是选择了第一支付渠道。当然,第一支付渠道和第二支付渠道也可以是部分相同的,或者完全不同。In this step, when receiving the identification information sent by the error channel based on the sub-bill file, according to the identification information, determine the second payment channel corresponding to the sub-bill file, that is, in the error channel, the corresponding maintenance personnel manually check the sub-bill The file matches the payment channel and generates the corresponding identification information. After receiving the identification information, the processing device can determine the second payment channel corresponding to the sub-bill file. It should be noted that the first payment channel and the second payment channel can be are the same, that is, after the processing device determines that the first payment channel is unavailable, the corresponding maintenance personnel still selects the first payment channel. Of course, the first payment channel and the second payment channel may also be partially the same, or completely different.
将所述子账单文件发送至所述第二支付渠道。Sending the sub-bill file to the second payment channel.
在该步骤中,在根据标识信息确定子账单对应的第二支付渠道后,将子账单文件发送至第二支付渠道,以完成线上支付。In this step, after the second payment channel corresponding to the sub-bill is determined according to the identification information, the sub-bill file is sent to the second payment channel to complete online payment.
本实施例当接收到支付请求时,基于所述支付请求对应的文件地址,下载所述文件地址对应的账单文件;读取所述账单文件中各交易信息的交易要素,并基于所述交易要素,确定所述账单文件中各交易信息对应的第一支付渠道,并将所述账单文件拆分成所述第一支付渠道对应的子账单文件;对所述第一支付渠道进行探测,确定所述第一支付渠道是否可用;若可用,则将所述子账单文件发送至所述第一支付渠道。本发明通过交易要素选择可用的支付渠道,提高支付成功率。In this embodiment, when a payment request is received, based on the file address corresponding to the payment request, download the bill file corresponding to the file address; read the transaction elements of each transaction information in the bill file, and based on the transaction elements , determine the first payment channel corresponding to each transaction information in the bill file, and split the bill file into sub-bill files corresponding to the first payment channel; detect the first payment channel, and determine the Whether the first payment channel is available; if available, send the sub-bill file to the first payment channel. The present invention selects available payment channels through transaction elements to improve the success rate of payment.
进一步地,基于本发明分布式账单处理方法第一实施例,提出本发明分布式账单处理方法第二实施例。Further, based on the first embodiment of the distributed bill processing method of the present invention, a second embodiment of the distributed bill processing method of the present invention is proposed.
分布式账单处理方法的第二实施例与分布式账单处理方法的第一实施例的区别在于,参照图3,步骤S30包括:The difference between the second embodiment of the distributed bill processing method and the first embodiment of the distributed bill processing method is that, referring to FIG. 3 , step S30 includes:
步骤S31,获取所述第一支付渠道的历史可用性,基于所述历史可用性,确定所述第一支付渠道中的待探测渠道;Step S31, acquiring the historical availability of the first payment channel, and determining channels to be detected in the first payment channel based on the historical availability;
步骤S32,向所述待探测渠道发送预设探测包,并基于所述待探测渠道返回的探测结果,判断所述待探测渠道是否可用。Step S32, sending a preset detection packet to the channel to be detected, and judging whether the channel to be detected is available based on the detection result returned by the channel to be detected.
本实施例在对第一支付渠道进行探测时,只需探测第一支付渠道中需要探测的待探测渠道,减少探测成本,提高探测效率。In this embodiment, when detecting the first payment channel, only the channels to be detected in the first payment channel that need to be detected need to be detected, so as to reduce the detection cost and improve the detection efficiency.
以下将对各个步骤进行详细说明:Each step will be described in detail below:
步骤S31,获取所述第一支付渠道的历史可用性,基于所述历史可用性,确定所述第一支付渠道中的待探测渠道;Step S31, acquiring the historical availability of the first payment channel, and determining channels to be detected in the first payment channel based on the historical availability;
在本实施例中,处理设备获取第一支付渠道的历史可用性,根据历史可用性,确定第一支付渠道中需要探测的待探测渠道,即在本实施例中,不需要对当前账单文件中各交易信息对应的所有支付渠道进行探测,而是先从所有的支付渠道中,依据各个支付渠道的历史可用性,找到需要探测的待探测渠道。In this embodiment, the processing device acquires the historical availability of the first payment channel, and according to the historical availability, determines the channels to be detected in the first payment channel that need to be detected, that is, in this embodiment, there is no need to check each transaction in the current bill file Instead of detecting all payment channels corresponding to the information, first find the channel to be detected that needs to be detected from all payment channels and based on the historical availability of each payment channel.
具体的,从以往的支付记录中确定第一支付渠道的支付成功率,如A支付渠道支付过100次,成功了30次,则其支付成功率为30%,也即A支付渠道的可用性为30%,将其与预设可用性进行比较,如预设可用性为50%,显然,A支付渠道的历史可用性低于预设可用性,则A支付渠道为待探测渠道;若A支付渠道的历史可用性不低于预设可用性,则A支付渠道不需要进行探测。Specifically, the payment success rate of the first payment channel is determined from the previous payment records. For example, payment channel A has paid 100 times and succeeded 30 times, then its payment success rate is 30%, that is, the availability of payment channel A is 30%, compare it with the preset availability, if the preset availability is 50%, obviously, the historical availability of A payment channel is lower than the preset availability, then A payment channel is the channel to be detected; if the historical availability of A payment channel Not lower than the preset availability, then A payment channel does not need to be detected.
进一步地,获取所述第一支付渠道预设时间内的历史可用性,并基于所述历史可用性,确定所述第一支付渠道中需要探测的待探测渠道。Further, the historical availability of the first payment channel within a preset time is obtained, and based on the historical availability, the channels to be detected among the first payment channels that need to be detected are determined.
在该步骤中,为避免第一支付渠道的历史记录较多,导致处理设备需要花费较长的时间去统计,因此,可获取第一支付渠道预设时间内的历史可用性,在具体实施时,预设时间为三天,即只需获取第一支付渠道三天内的历史可用性即可确定第一支付渠道中需要探测的待探测渠道,具体探测方式与上述相似,在此不再赘述。In this step, in order to avoid the large number of historical records of the first payment channel, it takes a long time for the processing equipment to collect statistics. Therefore, the historical availability of the first payment channel within a preset time can be obtained. In specific implementation, The preset time is three days, that is, it only needs to obtain the historical availability of the first payment channel within three days to determine the channels to be detected in the first payment channel. The specific detection method is similar to the above, and will not be repeated here.
步骤S32,向所述待探测渠道发送预设探测包,并基于所述待探测渠道返回的探测结果,判断所述待探测渠道是否可用。Step S32, sending a preset detection packet to the channel to be detected, and judging whether the channel to be detected is available based on the detection result returned by the channel to be detected.
在该步骤中,处理设备向待探测渠道,即需要探测的支付渠道发送预设探测包,其中,预设探测包为模拟交易信息的账单信息,具体包括金额,银行和交易类型等交易要素,将预设探测包发送至待探测渠道,若支付成功,则待探测渠道返回支付成功的探测结果,从而确定待探测渠道可用。In this step, the processing device sends a preset detection packet to the channel to be detected, that is, the payment channel that needs to be detected, wherein the preset detection packet is bill information of simulated transaction information, specifically including transaction elements such as amount, bank, and transaction type, Send the preset detection package to the channel to be detected. If the payment is successful, the channel to be detected will return the detection result of successful payment, so as to determine that the channel to be detected is available.
进一步的,步骤S32包括:Further, step S32 includes:
向所述待探测渠道发送预设次数的预设探测包,并统计所述待探测渠道返回的探测结果;基于所述探测结果和预设规则,判断所述待探测渠道是否可用。Sending preset detection packets for a preset number of times to the channel to be detected, and counting the detection results returned by the channel to be detected; based on the detection results and preset rules, judging whether the channel to be detected is available.
在该步骤中,处理设备向待探测渠道发送预设次数的预设探测包,并统计待探测渠道返回的探测结果,其中,探测结果为支付成功和支付失败,在具体实施时,预设次数为20次。基于探测结果和预设规则,判断待探测渠是否可用,具体的预设规则可为,连续支付成功6次视为可用,即处理设备向待探测渠道发送20次预设探测包,并统计探测结果,若探测结果中存在连续6次支付成功,则确定待探测渠道可用;若探测结果中未存在连续6次支付成功,则确定待探测渠道不可用。In this step, the processing device sends a preset number of preset detection packets to the channel to be detected, and counts the detection results returned by the channel to be detected, wherein the detection results are payment success and payment failure. In specific implementation, the preset times for 20 times. Based on the detection results and the preset rules, it is judged whether the channel to be detected is available. The specific preset rule can be, if the payment is successful 6 times in a row, it is considered available, that is, the processing device sends 20 preset detection packets to the channel to be detected, and counts the detection As a result, if there are 6 consecutive payment successes in the detection results, it is determined that the channel to be detected is available; if there are no 6 consecutive payment successes in the detection results, it is determined that the channel to be detected is unavailable.
本实施例在对第一支付渠道的可用性进行探测时,只需探测需要探测的待探测渠道,减少探测成本,提高探测效率,可以快速定位可用的支付渠道,从而提高支付成功率。In this embodiment, when detecting the availability of the first payment channel, only the channels to be detected that need to be detected need to be detected, which reduces the detection cost and improves the detection efficiency, and can quickly locate the available payment channels, thereby improving the payment success rate.
进一步地,基于本发明分布式账单处理方法第一、第二实施例,提出本发明分布式账单处理方法第三实施例。Further, based on the first and second embodiments of the distributed bill processing method of the present invention, a third embodiment of the distributed bill processing method of the present invention is proposed.
分布式账单处理方法的第三实施例与分布式账单处理方法的第一、第二实施例的区别在于,所述方法还包括:The difference between the third embodiment of the distributed bill processing method and the first and second embodiments of the distributed bill processing method is that the method further includes:
监控所述第一支付渠道的健康状态,并执行所述健康状态对应的执行策略;monitoring the health status of the first payment channel, and executing an execution policy corresponding to the health status;
其中,当监测到所述健康状态为单位时间成功率低于预设阈值时,确定所述健康状态对应的所述执行策略为熔断处理,并基于所述执行策略,将第一支付渠道熔断。Wherein, when it is detected that the health status is such that the success rate per unit time is lower than a preset threshold, it is determined that the execution policy corresponding to the health status is circuit breaker processing, and the first payment channel is circuit breaker based on the execution policy.
本实施例在将账单文件中的各交易信息发送至第一支付渠道之后,处理设备还继续监控第一支付渠道的监控状态,避免第一支付渠道在支付过程中出现故障,如不可用和延迟等问题,时,无法及时作出调整。In this embodiment, after the transaction information in the bill file is sent to the first payment channel, the processing device continues to monitor the monitoring status of the first payment channel, so as to avoid failures, such as unavailability and delay, of the first payment channel during the payment process And other problems, sometimes, can not make timely adjustments.
因此,处理设备监控第一支付渠道的健康状态,并执行健康状态对应的执行策略。其中,当处理设备监测到第一支付渠道的健康状态为单位时间成功较低时,具体低于预设阈值,如30%,确定当前的健康状态对应的执行策略为熔断处理,则处理设备基于确定的执行策略,将第一支付渠道熔断。Therefore, the processing device monitors the health status of the first payment channel, and executes an execution strategy corresponding to the health status. Wherein, when the processing device monitors that the health status of the first payment channel is lower than the success per unit time, specifically lower than the preset threshold, such as 30%, it is determined that the execution strategy corresponding to the current health status is fuse processing, and the processing device based on The determined execution strategy will fuse the first payment channel.
可以理解的,在将第一支付渠道熔断后,第一支付渠道将不可用,那么此时,还未完成线上支付的交易信息将重新被配到新的支付渠道,分配方式也是基于交易要素进行,与上述相似,在此不再赘述。It is understandable that after the first payment channel is blown, the first payment channel will be unavailable. At this time, the transaction information that has not completed the online payment will be reassigned to the new payment channel. The distribution method is also based on transaction elements The procedure is similar to that described above and will not be repeated here.
或者,当处理设备监测到第一支付渠道的健康状态为当前排队支付的交易信息超过阈值时,确定当前的健康状态对应的执行策略为降低将账单文件发送至第一支付渠道的频次等。Or, when the processing device monitors that the health status of the first payment channel is that the transaction information queued for payment exceeds the threshold, it determines that the execution strategy corresponding to the current health status is to reduce the frequency of sending bill files to the first payment channel.
本实施例在将账单文件发送至支付渠道后,还对支付渠道的健康状态进行监控,确保账单文件中各交易信息都有可用的支付渠道完成线上支付,即使当前的支付渠道出现如延迟等故障,也可及时采用相应的执行策略,提高支付成功率。In this embodiment, after the bill file is sent to the payment channel, the health status of the payment channel is also monitored to ensure that each transaction information in the bill file has an available payment channel to complete the online payment, even if the current payment channel is delayed, etc. If there is a failure, the corresponding execution strategy can also be adopted in time to improve the payment success rate.
本发明还提供一种分布式账单处理装置。本发明分布式账单处理装置包括:The invention also provides a distributed bill processing device. The distributed bill processing device of the present invention includes:
下载模块,用于当接收到支付请求时,基于所述支付请求对应的文件地址,下载所述文件地址对应的账单文件;A download module, configured to download the bill file corresponding to the file address based on the file address corresponding to the payment request when the payment request is received;
确定模块,用于读取所述账单文件中各交易信息的交易要素,并基于所述交易要素,确定所述账单文件中各交易信息对应的第一支付渠道,并将所述账单文件拆分成所述第一支付渠道对应的子账单文件;A determination module, configured to read the transaction elements of each transaction information in the bill file, and based on the transaction elements, determine the first payment channel corresponding to each transaction information in the bill file, and split the bill file Create a sub-bill file corresponding to the first payment channel;
探测模块,用于对所述第一支付渠道进行探测,确定所述第一支付渠道是否可用;A detection module, configured to detect the first payment channel and determine whether the first payment channel is available;
发送模块,用于若可用,则将所述子账单文件发送至所述第一支付渠道。A sending module, configured to send the sub-bill file to the first payment channel if available.
进一步地,所述下载模块还用于:Further, the download module is also used for:
当接收到支付请求时,获取所述支付请求对应的文件地址和文件哈希值;When a payment request is received, obtain the file address and file hash value corresponding to the payment request;
下载所述文件地址对应的账单文件,并基于所述文件哈希值,对所述账单文件的完整性进行检验;downloading the bill file corresponding to the file address, and checking the integrity of the bill file based on the hash value of the file;
若确定所述账单文件完整,则执行读取所述账单文件中各交易信息的交易要素,并基于所述交易要素,确定所述账单文件中各交易信息对应的第一支付渠道,并将所述账单文件拆分成所述第一支付渠道对应的子账单文件的步骤。If it is determined that the bill file is complete, read the transaction elements of each transaction information in the bill file, and based on the transaction elements, determine the first payment channel corresponding to each transaction information in the bill file, and send the The step of splitting the bill file into sub-bill files corresponding to the first payment channel.
进一步地,所述确定模块还用于:Further, the determining module is also used for:
读取所述账单文件中各交易信息的交易要素,所述交易要素包括产品代码和金额;Read the transaction elements of each transaction information in the bill file, the transaction elements include product code and amount;
基于所述产品代码和所述金额,确定所述账单文件中各交易信息对应的第一支付渠道。Based on the product code and the amount, determine the first payment channel corresponding to each transaction information in the bill file.
进一步地,所述确定模块还用于:Further, the determining module is also used for:
基于所述产品代码,确定所述账单文件中各交易信息所属的产品类别;Based on the product code, determine the product category to which each transaction information in the bill file belongs;
基于所述金额和所述产品类别的限额金额,确定所述账单文件中各交易信息对应的第一支付渠道。Based on the amount and the limit amount of the product category, determine the first payment channel corresponding to each transaction information in the bill file.
进一步地,所述探测模块还用于:Further, the detection module is also used for:
获取所述第一支付渠道的历史可用性,基于所述历史可用性,确定所述第一支付渠道中的待探测渠道;Acquiring historical availability of the first payment channel, and determining channels to be detected in the first payment channel based on the historical availability;
向所述待探测渠道发送预设探测包,并基于所述待探测渠道返回的探测结果,判断所述待探测渠道是否可用。Sending a preset detection packet to the channel to be detected, and judging whether the channel to be detected is available based on a detection result returned by the channel to be detected.
进一步地,所述分布式账单处理装置还包括监控模块,所述监控模块用于:Further, the distributed bill processing device also includes a monitoring module, and the monitoring module is used for:
监控所述第一支付渠道的健康状态,并执行所述健康状态对应的执行策略;monitoring the health status of the first payment channel, and executing an execution policy corresponding to the health status;
其中,当监测到所述健康状态为单位时间成功率低于预设阈值时,确定所述健康状态对应的所述执行策略为熔断处理,并基于所述执行策略,将第一支付渠道熔断。Wherein, when it is detected that the health status is such that the success rate per unit time is lower than a preset threshold, it is determined that the execution policy corresponding to the health status is circuit breaker processing, and the first payment channel is circuit breaker based on the execution policy.
进一步地,所述发送模块还用于:Further, the sending module is also used for:
若不可用,则将所述子账单文件发送至差错通道;If not available, sending the sub-bill file to an error channel;
当接收到所述差错通道基于所述子账单文件发送的标识信息时,基于所述标识信息,确定所述子账单文件对应的第二支付渠道;When receiving the identification information sent by the error channel based on the sub-bill file, based on the identification information, determine the second payment channel corresponding to the sub-bill file;
将所述子账单文件发送至所述第二支付渠道。Sending the sub-bill file to the second payment channel.
本发明还提供一种计算机可读存储介质。The present invention also provides a computer-readable storage medium.
本发明计算机可读存储介质上存储有分布式账单处理程序,所述分布式账单处理程序被处理器执行时实现如上所述的分布式账单处理方法的步骤。A distributed bill processing program is stored on the computer-readable storage medium of the present invention, and when the distributed bill processing program is executed by a processor, the steps of the above-mentioned distributed bill processing method are implemented.
其中,在所述处理器上运行的分布式账单处理程序被执行时所实现的方法可参照本发明分布式账单处理方法各个实施例,此处不再赘述。For the method implemented when the distributed bill processing program running on the processor is executed, reference may be made to various embodiments of the distributed bill processing method of the present invention, which will not be repeated here.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者系统不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者系统所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者系统中还存在另外的相同要素。It should be noted that, as used herein, the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article or system comprising a set of elements includes not only those elements, It also includes other elements not expressly listed, or elements inherent in the process, method, article, or system. Without further limitations, an element defined by the phrase "comprising a..." does not preclude the presence of additional identical elements in the process, method, article or system comprising that element.
上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the above embodiments of the present invention are for description only, and do not represent the advantages and disadvantages of the embodiments.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在如上所述的一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本发明各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus a necessary general-purpose hardware platform, and of course also by hardware, but in many cases the former is better implementation. Based on such an understanding, the technical solution of the present invention can be embodied in the form of a software product in essence or in other words, the part that contributes to the prior art, and the computer software product is stored in a storage medium (such as ROM/RAM) as described above. , magnetic disk, optical disk), including several instructions to make a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) execute the method described in each embodiment of the present invention.
以上仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书与附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the description of the present invention and the contents of the accompanying drawings, or directly or indirectly used in other related technical fields , are all included in the scope of patent protection of the present invention in the same way.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910504141.XACN110264171B (en) | 2019-06-06 | 2019-06-06 | Distributed bill processing method, device, equipment and computer readable storage medium |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910504141.XACN110264171B (en) | 2019-06-06 | 2019-06-06 | Distributed bill processing method, device, equipment and computer readable storage medium |
| Publication Number | Publication Date |
|---|---|
| CN110264171Atrue CN110264171A (en) | 2019-09-20 |
| CN110264171B CN110264171B (en) | 2023-04-18 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201910504141.XAActiveCN110264171B (en) | 2019-06-06 | 2019-06-06 | Distributed bill processing method, device, equipment and computer readable storage medium |
| Country | Link |
|---|---|
| CN (1) | CN110264171B (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111736995A (en)* | 2020-06-15 | 2020-10-02 | 北京三快在线科技有限公司 | Resource channel state switching method, device, equipment and storage medium |
| CN113554509A (en)* | 2021-07-29 | 2021-10-26 | 上海浦东发展银行股份有限公司 | Processing method, device, medium and electronic equipment for online payment service |
| CN114626839A (en)* | 2022-03-15 | 2022-06-14 | 携程旅游网络技术(上海)有限公司 | Payment channel monitoring method, system, electronic device and storage medium |
| WO2022271096A3 (en)* | 2021-06-24 | 2023-03-02 | Gp Network Asia Pte. Ltd. | A communications server, a method, a user device and a payment gateway |
| CN119784485A (en)* | 2024-12-26 | 2025-04-08 | 中国建设银行股份有限公司 | Multi-channel reconciliation method, device, processor, storage medium and program product |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1234892A (en)* | 1996-09-04 | 1999-11-10 | 英特托拉斯技术公司 | Trusted Architecture Support Systems, Methods and Techniques for Secure Electronic Commerce, Electronic Transactions, Business Process Control and Automation, Distributed Computing and Rights Management |
| CA2322409A1 (en)* | 1999-10-08 | 2001-04-08 | Checkfree Services Corporation | Electronic billing with flexible biller controlled electronic bill presentment |
| CN1539122A (en)* | 2000-10-27 | 2004-10-20 | ������ķ���ƶ� | Remote payment method and system |
| CN102341817A (en)* | 2009-01-06 | 2012-02-01 | Visa欧洲有限公司 | Payment system |
| CN103177361A (en)* | 2011-12-21 | 2013-06-26 | 上海博路信息技术有限公司 | Unified bill and payment system |
| CN105512894A (en)* | 2015-11-26 | 2016-04-20 | 珠海多玩信息技术有限公司 | Cooperation-channel-based payment method and apparatus |
| CN106056372A (en)* | 2016-06-02 | 2016-10-26 | 广东工业大学 | Secure electronic payment method based on four parties |
| CN106899519A (en)* | 2016-08-26 | 2017-06-27 | 阿里巴巴集团控股有限公司 | Channel of disbursement flow collocation method and device |
| CN107705118A (en)* | 2017-09-19 | 2018-02-16 | 深圳金融电子结算中心有限公司 | Transaction payment method, system, server and storage medium based on channel route |
| CN107748985A (en)* | 2017-11-07 | 2018-03-02 | 苏州比可网络科技有限公司 | Network method of payment and network payment server |
| CN108985731A (en)* | 2018-07-13 | 2018-12-11 | 北京京东金融科技控股有限公司 | Pay method for routing and device |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1234892A (en)* | 1996-09-04 | 1999-11-10 | 英特托拉斯技术公司 | Trusted Architecture Support Systems, Methods and Techniques for Secure Electronic Commerce, Electronic Transactions, Business Process Control and Automation, Distributed Computing and Rights Management |
| CA2322409A1 (en)* | 1999-10-08 | 2001-04-08 | Checkfree Services Corporation | Electronic billing with flexible biller controlled electronic bill presentment |
| CN1539122A (en)* | 2000-10-27 | 2004-10-20 | ������ķ���ƶ� | Remote payment method and system |
| CN102341817A (en)* | 2009-01-06 | 2012-02-01 | Visa欧洲有限公司 | Payment system |
| CN103177361A (en)* | 2011-12-21 | 2013-06-26 | 上海博路信息技术有限公司 | Unified bill and payment system |
| CN105512894A (en)* | 2015-11-26 | 2016-04-20 | 珠海多玩信息技术有限公司 | Cooperation-channel-based payment method and apparatus |
| CN106056372A (en)* | 2016-06-02 | 2016-10-26 | 广东工业大学 | Secure electronic payment method based on four parties |
| CN106899519A (en)* | 2016-08-26 | 2017-06-27 | 阿里巴巴集团控股有限公司 | Channel of disbursement flow collocation method and device |
| CN107705118A (en)* | 2017-09-19 | 2018-02-16 | 深圳金融电子结算中心有限公司 | Transaction payment method, system, server and storage medium based on channel route |
| CN107748985A (en)* | 2017-11-07 | 2018-03-02 | 苏州比可网络科技有限公司 | Network method of payment and network payment server |
| CN108985731A (en)* | 2018-07-13 | 2018-12-11 | 北京京东金融科技控股有限公司 | Pay method for routing and device |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111736995A (en)* | 2020-06-15 | 2020-10-02 | 北京三快在线科技有限公司 | Resource channel state switching method, device, equipment and storage medium |
| WO2022271096A3 (en)* | 2021-06-24 | 2023-03-02 | Gp Network Asia Pte. Ltd. | A communications server, a method, a user device and a payment gateway |
| CN113554509A (en)* | 2021-07-29 | 2021-10-26 | 上海浦东发展银行股份有限公司 | Processing method, device, medium and electronic equipment for online payment service |
| CN114626839A (en)* | 2022-03-15 | 2022-06-14 | 携程旅游网络技术(上海)有限公司 | Payment channel monitoring method, system, electronic device and storage medium |
| CN119784485A (en)* | 2024-12-26 | 2025-04-08 | 中国建设银行股份有限公司 | Multi-channel reconciliation method, device, processor, storage medium and program product |
| Publication number | Publication date |
|---|---|
| CN110264171B (en) | 2023-04-18 |
| Publication | Publication Date | Title |
|---|---|---|
| CN110264171B (en) | Distributed bill processing method, device, equipment and computer readable storage medium | |
| CN107392722B (en) | Order processing method and device, electronic equipment and storage medium | |
| CN109729131B (en) | Application request processing method and device and router | |
| US7840517B2 (en) | Performance evaluating apparatus, method, and computer-readable medium | |
| US20160316029A1 (en) | Distributed flow control | |
| CN108112038B (en) | Method and device for controlling access flow | |
| WO2020077836A1 (en) | Service data management method, apparatus and device, and computer-readable storage medium | |
| CN107977457A (en) | Data liquidation method, system and computer-readable recording medium | |
| CN111523849A (en) | Resource transaction auditing method and device and server | |
| CN113919829A (en) | Account transaction request processing method, device, system and electronic device | |
| CN113326061B (en) | Fuse configuration modification method, device, equipment and readable storage medium | |
| CN110610340A (en) | Spare parts management method, device, device and computer-readable storage medium | |
| WO2019174185A1 (en) | Electronic device, dynamic code request processing method and storage medium | |
| CN113760554A (en) | Batch switching-on-line service processing method and device | |
| KR20190127134A (en) | Consultation quality management system and method based on text | |
| CN110471966B (en) | Information data verification method, device, computer equipment and storage medium | |
| US20150058068A1 (en) | Methods and systems for managing suppliers and flow of goods on an ecommerce platform | |
| CN108718285A (en) | Flow control methods, device and the server of cloud computing cluster | |
| CN110263044B (en) | Data storage method, device, equipment and computer readable storage medium | |
| CN115499492A (en) | Application service exception handling method, device, equipment and readable storage medium | |
| CN115001976A (en) | Intelligent ordering method and device for network slices and computer storage medium | |
| CN115271861A (en) | Request filtering method, device, equipment and storage medium | |
| CN112654005A (en) | Short message channel configuration method and short message issuing method, device and system | |
| CN110400226A (en) | Stop loss request triggering method, device, equipment, system and readable storage medium | |
| CN111639085B (en) | Data asynchronous checking method and device |
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |