Payment systems and methods

CN116957549BActive Publication Date: 2026-08-18CHINA MERCHANTS BANK
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202310948468.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-28
Publication Date
2026-08-18
Estimated Expiration
2043-07-28

AI Technical Summary

Technical Problem

[0005]本发明的主要目的在于提供一种支付系统及方法,旨在解决现有技术支付对接效果较差的技术问题

Benefits of technology

[0043] This invention establishes an interface layer and a business layer within the payment system. The interface layer acquires business information and generates an interface request during payment integration. It also processes the business information to obtain processed business information and sends the processed business information and the interface request to the corresponding sub-database. The business layer adds configuration information to the sub-database based on the interface request and the processed business information, completing the business integration. By further processing the business through the interface layer, a standardized integration process is provided, improving integration speed and achieving automated integration at the business layer.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116957549B_ABST
    Figure CN116957549B_ABST
Patent Text Reader

Abstract

The application discloses a payment system and method, and belongs to the technical field of payment. The application sets an interface layer and a business layer in the payment system, the interface layer is used for acquiring business information and generating an interface request when payment is interfaced, the interface layer is also used for processing the business information to obtain processed business information, and the processed business information and the interface request are sent to a corresponding sub-database of the business layer, the business layer is used for adding configuration information to the sub-database according to the interface request and the processed business information, completing business interfacing, continuously processing the business through the interface layer, providing a standardized interfacing process, improving the interfacing speed, and realizing automatic interfacing of the business layer.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of payment technology, and in particular to a payment system and method. Background Technology

[0002] In the information age, with the continuous development of technology, customers' demands for financial services provided by banks are constantly changing. Payment is a crucial link in various financial services, involving multiple functions and evolving needs. This requires banks to continuously develop customized payment systems for different customers and even different business scenarios to meet ever-changing demands. Therefore, this places higher demands on the efficiency and reliability of banks' system construction.

[0003] Currently, the conventional development approach involves each system repeatedly building upon its own needs and repeatedly interfacing with the underlying infrastructure systems of various banks to meet their business objectives. This results in a significant waste of human and physical resources and fails to provide customers with a consistently stable experience. When the underlying systems require upstream modifications, all systems must cooperate in the modification process, greatly increasing the cost and difficulty of later maintenance. Furthermore, since each business system is designed to meet the needs of a specific customer or even a specific business scenario, it cannot provide excessive resources; otherwise, it would lead to even greater waste. Therefore, if the system's workload suddenly increases, insufficient resources will make it difficult to guarantee operational efficiency and reliability under high concurrency scenarios, potentially leading to production incidents. To address this issue, major banks have developed some general-purpose payment systems.

[0004] The existing payment system relies too heavily on manual intervention in the integration process, with a low degree of automation. This increases communication costs and raises the risk of incorrect parameter configurations, resulting in poor payment integration performance. Summary of the Invention

[0005] The main objective of this invention is to provide a payment system and method that aims to solve the technical problem of poor payment integration performance in existing technologies.

[0006] To achieve the above objectives, the present invention provides a payment system, which includes an interface layer and a business layer;

[0007] The interface layer is used to obtain business information and generate an interface request when performing payment interface;

[0008] The interface layer is also used to process the business information to obtain processed business information, and send the processed business information and the interface request to the corresponding database of the business layer.

[0009] The business layer is used to add configuration information to the sub-database according to the connection request and the processed business information to complete the business connection.

[0010] Optionally, the business layer includes: a pre-inspection module, a business processing module, an export module, and a feedback module;

[0011] The pre-check module is used to perform a preliminary check on the configuration information when adding configuration information based on the docking request, and to determine whether the configuration information is compliant.

[0012] The business processing module is used to process the transaction request and send the processing result to the remittance module;

[0013] The export module is used to export the processing results for business purposes.

[0014] The feedback module is used to provide feedback on the results exported from the business process in order to complete the business processing flow.

[0015] Optionally, the payment system further includes: a gateway layer;

[0016] The gateway layer is used to obtain transaction requests and calculate business hash values ​​based on the transaction requests;

[0017] The gateway layer is also used to allocate each transaction to an application instance of the business layer based on the business hash value;

[0018] The business layer is also used to perform business processing on each of the transactions.

[0019] Optionally, the gateway layer is further configured to obtain the database sharding information of the business layer from the microservice center;

[0020] The gateway layer is also used to allocate a preset number of virtual nodes to each sub-database according to the sub-database information, calculate the hash value of each virtual node, and store the hash value and the corresponding sub-database.

[0021] The gateway layer is also used to compare the business hash value with the hash value of the virtual node based on the transaction request to determine the target database shard;

[0022] The gateway layer is also used to send the transaction request to the application instance of the business layer of the target database for business processing.

[0023] Optionally, the gateway layer is further configured to obtain the business system code and business key value from the business information, and concatenate the business system code and the business key value to obtain a business hash value.

[0024] Optionally, the interface layer is further configured to identify a business scenario, and when the business scenario is a preset business scenario, to obtain a first transaction amount, a second transaction amount, and a desired amount, wherein the first transaction amount is greater than the second transaction amount;

[0025] The business layer is further configured to obtain a transaction range based on the first transaction amount, the second transaction amount, and the expected amount;

[0026] The business layer is also used to obtain a filtering range based on the transaction range and calculate the average value of the filtering range;

[0027] The business layer is also used to recursively obtain a parameter whose average value is a target value based on the average value of the filtering interval;

[0028] The business layer is also used to calculate a random amount using the parameters and to perform preset business processing using the random amount.

[0029] Optionally, the interface layer is further configured to obtain a preset format file and generate a data stream based on the business information;

[0030] The interface layer is also used to read the byte stream of the preset format file based on the data stream, and process the preset format file to obtain the processed business information of the target format file;

[0031] The interface layer is also used to send the target format file to the business layer.

[0032] Optionally, the payment system further includes: a data layer;

[0033] The interface layer is also used to initiate a probe request to the microservice center, so as to probe the number of database shards of the business layer in the microservice center according to the probe request;

[0034] The interface layer is also used to generate an interface request after detecting the number of database shards in the business layer, and send the interface request and the processed business information to the database shards in the business layer.

[0035] The business layer is also used to check the compliance of the business requirement configuration in the processed business information based on the connection request;

[0036] The business layer is also used to perform business configuration through the processed business information when the business requirement configuration is found to be compliant, obtain configuration information, and store the configuration information in the data layer.

[0037] Optionally, the payment system further includes: a configuration layer;

[0038] The configuration layer is also used to perform basic configuration of the service layer.

[0039] To achieve the above objectives, the present invention provides a payment method, which is applied to the payment system described above, and the payment method includes the following steps:

[0040] The interface layer obtains business information and generates an interface request when performing payment integration;

[0041] The interface layer processes the business information to obtain processed business information, and sends the processed business information and the interface request to the corresponding database of the business layer.

[0042] The business layer adds configuration information to the database based on the connection request and the processed business information to complete the business connection.

[0043] This invention establishes an interface layer and a business layer within the payment system. The interface layer acquires business information and generates an interface request during payment integration. It also processes the business information to obtain processed business information and sends the processed business information and the interface request to the corresponding sub-database. The business layer adds configuration information to the sub-database based on the interface request and the processed business information, completing the business integration. By further processing the business through the interface layer, a standardized integration process is provided, improving integration speed and achieving automated integration at the business layer. Attached Figure Description

[0044] Figure 1 This is a schematic diagram of the structure of the first embodiment of the payment system of the present invention;

[0045] Figure 2 This is a schematic diagram illustrating the connection between the payment system and other systems in one embodiment of the payment system of the present invention;

[0046] Figure 3 This is a schematic diagram of the structure of the second embodiment of the payment system of the present invention;

[0047] Figure 4 This is a schematic diagram of the business layer's business processing flow in one embodiment of the payment system of the present invention;

[0048] Figure 5 This is a schematic diagram of the structure of the third embodiment of the payment system of the present invention;

[0049] Figure 6 This is a flowchart illustrating the first embodiment of the payment method of the present invention.

[0050] Explanation of icon numbers:

[0051] 1 payment system 204 Feedback module 10 docking layer 30 Data layer 20 Business layer 40 Gateway layer 201 Pre-check module 50 Configuration layer 202 Business processing module 2 Business System 203 Export module 3 Bank underlying system

[0052] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0053] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the invention.

[0054] Reference Figure 1 , Figure 1 This is a schematic diagram of the structure of the first embodiment of the payment system of the present invention.

[0055] In this embodiment, the payment system 1 includes an interface layer 10 and a business layer 20.

[0056] It should be noted that the payment system 1 in this embodiment can be used for bank payments, as well as other types of payments. This embodiment takes bank payments as an example for explanation. This payment system is a customized and general-purpose payment system. Through layered design, the payment system 1 can connect to the front-end business system 2 and the back-end bank underlying system 3 to form a platform-based overall design, thereby ensuring that the business of the business system 2 can be smoothly connected to the payment system.

[0057] The payment system comprises an interface layer 10 and a business layer 20. Interface layer 10 is responsible for connecting upstream systems with payment system 1, such as business system 2 connecting with payment system 1. The business layer 20 of payment system 1 connects with the underlying bank system 3, which may include accounting systems, receipt systems, notification systems, account systems, and messaging systems, etc. Figure 2 As shown, Figure 2 This diagram illustrates the connection between the payment system and other systems. Payment system 1 connects upstream to business system 2, and downstream to the underlying bank system 3, including the accounting system, receipt system, notification system, account system, and messaging system, for business processing. By integrating the underlying functions of various banks, development and maintenance costs for technical personnel are reduced, resources are consolidated, and utilization is improved. Furthermore, if changes occur to the underlying systems later, requiring modifications to the upstream systems, only the integrated payment system 1 needs to be maintained, effectively reducing future maintenance costs.

[0058] In this embodiment, the interface layer 10 is used to obtain business information and generate an interface request when performing payment interface; the interface layer 10 is also used to process the business information to obtain processed business information, and send the processed business information and the interface request to the sub-database corresponding to the business layer 20.

[0059] It should be noted that when business system 2 needs to connect with payment system 1, the business personnel of business system 2 shall fill in the standard access document in accordance with the specifications and fill in the relevant business information, and upload the business information to the connection layer 10. When the connection layer 10 performs payment connection, it obtains the business information uploaded by business system 2 and generates a connection request. The connection request is a connection request between connection layer 10 and business layer 20, and the connection between connection layer 10 and business layer 20 can be carried out through the connection request.

[0060] After the interface layer 10 obtains the business information uploaded by the business system 2, the interface layer 10 can process the business information through the ExcelUtils utility class, and then send the processed business information to the business layer 20.

[0061] In this embodiment, the business layer 20 is used to add configuration information to the sub-database according to the docking request and the processed business information to complete the business docking.

[0062] It should be understood that the business layer 20 has multiple sub-databases. When the business layer 20 receives the docking request and processed business information sent by the docking layer 10, it can add configuration information to the sub-database based on the request information and the data in the processed business information, thereby ensuring the smooth access of the business system 2 and completing the business docking.

[0063] In this embodiment, the interface layer 10 is further configured to obtain a preset format file and generate a data stream based on the business information; the interface layer 10 is further configured to read the byte stream of the preset format file based on the data stream, and process the preset format file to obtain the processed business information of the target format file; the interface layer 10 is further configured to send the target format file to the business layer 20.

[0064] The business information includes the business system code, the scope of involved institutions, a business description, and configuration information for each business requirement. These configuration details may include whether a receipt needs to be printed and whether manual processing is allowed for business failures. When business system 2 needs to process a transaction, business personnel fill out a pre-formatted file, which includes the aforementioned business information, ensuring the customized processing flow of the subsequent payment system 1 for that transaction. The pre-formatted file can be in Excel format or other formats; this embodiment does not impose any restrictions.

[0065] After the business personnel fill out the document, they upload the document to the webpage of the interface layer 10. After the document is uploaded, it is stored in a fixed path in the interface layer 10 application. Subsequently, the interface layer 10 program can locate the document based on the fixed path and generate a data stream.

[0066] Understandably, when interface layer 10 needs to perform business integration, it obtains an Excel-formatted file based on the business information and generates a data stream. Interface layer 10 then reads the raw byte stream of the corresponding path file based on the data stream, using the FileInputStream method. After interface layer 10 reads the byte stream of the preset format file, it can use the ExcelUtils utility class to process the preset format file, obtaining the processed business information of the target format file. The target format file is a two-dimensional List file, and the data in the target format file is saved. Interface layer 10 can also iterate through the two-dimensional List using a double For loop to extract the data and assemble it into the corresponding interface entity class, thereby sending the processed business information of the target format file to business layer 20 through the interface entity.

[0067] Business system 2 only needs to upload the document, and payment system 1 can recognize the corresponding parameters and complete the corresponding configuration, ensuring that the upstream can quickly and clearly connect with payment system 1, reducing the connection cost of business system 2 and improving configuration reliability.

[0068] It should be noted that both the interface layer 10 and the business layer 20 are containerized and deployed on the same financial transaction cloud platform using microservices. When the instances are deployed, they are registered in the microservice center. Therefore, after the interface layer 10 completes the preprocessing and preparation for data interface, it is necessary to determine how many instances with different databases exist in the business layer 20.

[0069] In this embodiment, the interface layer 10 is further configured to initiate a probe request to the microservice center to probe the number of database shards of the business layer 20 in the microservice center according to the probe request; the interface layer 10 is further configured to generate an interface request after detecting the number of database shards of the business layer 20, and send the interface request and the processed business information to the database shards of the business layer 20.

[0070] It should be noted that after the data preprocessing is completed in the interface layer 10, a probe request will be initiated and sent to the microservice center to determine how many different database instances exist in the business layer 20, thus obtaining the number of databases in the business layer 20. After the probe is completed, the interface request will be broadcast to all databases in the business layer 20 to ensure that all different databases in the business layer 20 complete the business interface.

[0071] This embodiment sets up an interface layer 10 and a business layer 20 in the payment system 1. The interface layer 10 is used to obtain business information and generate an interface request when performing payment interface. The interface layer 10 is also used to process the business information to obtain processed business information, and send the processed business information and the interface request to the corresponding sub-database of the business layer 20. The business layer 20 is used to add configuration information to the sub-database according to the interface request and the processed business information to complete the business interface. The interface layer 10 continues to process the business, providing a standardized interface process, improving the interface speed, and realizing automated interface of the business layer 20.

[0072] refer to Figure 3 , Figure 3 This is a schematic diagram of the structure of the second embodiment of the payment system of the present invention.

[0073] Based on the first embodiment described above, the business layer 20 in this embodiment includes: a pre-check module 201, a business processing module 202, an outgoing module 203, and a feedback module 204;

[0074] It should be noted that when the business layer 20 receives the docking request sent by the docking layer 10, it will add corresponding configurations to its respective database based on the request information to ensure the smooth access of the business system 2. To ensure the correctness of the configuration, before the configuration is written to the table and stored, it is necessary to check whether the rules of each field in the configuration information are reasonable. Therefore, the business layer 20 is also used to check the compliance of the business requirement configuration in the processed business information according to the docking request.

[0075] When the business layer 20 receives a connection request, it checks the compliance of the business requirement configuration in the processed business information according to the connection request, thereby ensuring the smooth access of business system 2.

[0076] Therefore, a pre-check module 201 can be set in the business layer 20. The pre-check module 201 is used to perform a preliminary check on the configuration information when adding configuration information based on the docking request, and to determine whether the configuration information is compliant.

[0077] In practice, the pre-check module 201 initiates a preliminary check of the business to assess the configuration information, determine whether the transmitted data is reasonable and compliant, and check whether subsequent business operations can be completed normally. If an anomaly is detected, an error is returned directly, requesting manual intervention to avoid resource waste. If no anomaly is detected, the corresponding business data is stored in the data layer. After successful storage, a success message is synchronously returned to the upstream. Subsequent specific business operations are processed asynchronously. This transaction control not only ensures the success rate of subsequent business operations but also avoids excessively long connections from the upstream to the payment system, which could lead to resource waste, and significantly reduces the risk of timeout errors.

[0078] In this embodiment, the payment system 1 further includes: a data layer 30; the business layer 20 is also used to perform business configuration through the processed business information when the business requirement configuration is found to be compliant, obtain configuration information, and store the configuration information in the data layer 30.

[0079] It should be noted that when the configuration information in the business requirement configuration is found to be compliant, the processed business information can be configured in the sharded database to obtain the configuration information. The corresponding information is then written into each sharded database in data layer 20 to complete the automatic import of the configuration and store the configuration information in data layer 30.

[0080] In this embodiment, the business processing module 202 is used to perform business processing according to the transaction request and send the processing result to the outgoing module 203; the outgoing module 203 is used to outgoing the processing result; and the feedback module 204 is used to provide feedback on the outgoing result to complete the business processing flow.

[0081] It should be understood that after the configuration information is stored in the data layer 30, the business processing module 202 in the business layer will interface with the bank's underlying system to implement specific business processes (such as account management, accounting, receipts, notifications, etc.). During interaction with various underlying systems, TCC transaction control ensures data consistency and avoids risks such as duplicate remittances. The business processing module 202 processes the transaction requests sent by the business system 2 and sends the processing results to the remittance module 203, which then remits the results.

[0082] Business Layer 20 and the underlying systems of various banks are all uniformly deployed on the financial transaction cloud platform, and all adopt containerized multi-active and off-site disaster recovery deployment. Within the same region, each database partition deploys at least two live instances to ensure handling of high-concurrency scenarios. The off-site disaster recovery deployment adopted by each application ensures that applications will not completely stop due to abnormal events, guaranteeing system robustness. When Business Layer 20 applications communicate with other underlying systems of banks, they determine the current region and then initiate TCP communication with underlying system applications in the same region to reduce communication time and improve transaction processing efficiency. During the processing, the business layer can also customize accounting methods, receipt printing templates, notification templates, etc., based on documents imported during the application integration process, ensuring customizable services for upstream business systems.

[0083] After the business processing module 202 in the business layer 20 completes the business operation, the remittance module 203 determines the specific message to be submitted based on the customized configuration, and then connects with the People's Bank of China to complete the remittance. It sends the relevant funds or other information requests to the People's Bank of China to complete the remittance operation.

[0084] Once the People's Bank of China returns the processing result, the feedback module 204 receives the corresponding feedback, performs identification based on the processing result, completes the corresponding operation after identification, and notifies the business system 2, thus completing the entire business processing flow.

[0085] like Figure 4 As shown, Figure 4 The business layer processes transactions through the following modules: Pre-check module: performs input data checks, account transaction checks, and financial transaction pre-checks; once checks are complete, the data is entered into the data layer. Business processing module: performs specific business operations such as accounting processing, receipt printing, and transaction notification. Outbound module: sends all transactions to the People's Bank of China (PBOC) to complete the outbound operation. Feedback module: receives feedback from the PBOC, completes the final business processing, and notifies the business system.

[0086] This embodiment sets up a pre-check module 201, a business processing module 202, an export module 203, and a feedback module 204 in the business layer 20. The pre-check module 201 is used to perform a preliminary check on the configuration information when adding configuration information based on the docking request to determine whether the configuration information is compliant. The business processing module 202 is used to perform business processing according to the transaction request and send the processing result to the export module. The export module is used to export the processing result. The feedback module 204 is used to provide feedback on the export result to complete the business processing flow. By docking with the payment system 1 through the business layer 20, all functions can be realized, ensuring the rapid completion of transaction business.

[0087] refer to Figure 5 , Figure 5 This is a schematic diagram of the third embodiment of the payment system of the present invention.

[0088] Based on the first embodiment described above, the payment system 1 in this embodiment further includes: a gateway layer 40;

[0089] The gateway layer 40 is used to obtain transaction requests and calculate business hash values ​​based on the transaction requests; the gateway layer 40 is also used to allocate each transaction to the application instance of the business layer 20 based on the business hash values; the business layer 20 is also used to perform business processing on each transaction.

[0090] In practice, once the business layer 20 completes the business connection through the connection layer 10, it can send the relevant transaction requests to the gateway layer 40. The gateway layer 40 supports multiple connection methods and can connect with various external platforms, such as mobile banking, corporate online banking, intermediary business platforms, and direct bank-enterprise connections.

[0091] After receiving a transaction request, the gateway layer 40 calculates the business hash value based on the transaction request, and then processes each transaction based on the business hash value. The hash algorithm is used to achieve load balancing, and the corresponding business request is sent to the business layer 20 to complete the actual business processing.

[0092] In this embodiment, the gateway layer 40 is further configured to obtain the business system code and business key value in the business information, and concatenate the business system code and the business key value to obtain a business hash value.

[0093] The business information includes business system code and business key-value pairs. The gateway layer 40 concatenates the two unique fields of business system code and business key-value pairs. After concatenation, it obtains the corresponding hash value based on the HashCode / HashFunction utility class to get the business hash value.

[0094] In this embodiment, the gateway layer 40 is further configured to obtain the database sharding information of the business layer 20 from the microservice center; the gateway layer 40 is further configured to allocate a preset number of virtual nodes to each database sharding information, calculate the hash value of each virtual node, and store the hash value and the corresponding database sharding; the gateway layer 40 is further configured to compare the business hash value with the hash value of the virtual node based on the transaction request to determine the target database sharding; the gateway layer 40 is further configured to send the transaction request to the application instance of the business layer 20 of the target database sharding for business processing.

[0095] It should be noted that since the business layer instances are deployed on the financial transaction cloud platform via microservices, and each instance is registered in the microservice center during deployment, a request can be directly sent to the microservice center to obtain the corresponding database shard name. Therefore, gateway layer 40 can obtain the database shard information of business layer 20 through the microservice center, including the names of each database shard.

[0096] In practical implementation, after obtaining the database sharding information, the gateway layer 40 allocates a preset number of virtual nodes to each database shard. The preset number can be 10,000 or 100,000, etc. This embodiment does not impose any restrictions. By allocating 10,000 virtual nodes to each database shard, they are organized into a virtual ring in a clockwise direction. Each virtual node obtains its corresponding hash value based on the HashCode / HashFunction utility class, thus obtaining the hash value of each virtual node. Then, the data is stored using the TreeMap class in the format of business hash value - database name.

[0097] Understandably, once the gateway layer 40 obtains the hash value of each virtual node, it can compare the hash value of the virtual node with the business hash value. If the business hash value is the same as the hash value of a virtual node, it is directly determined that the virtual node belongs to the corresponding shard and this shard is used as the target shard. If the business hash value is different from the hash value of the current virtual node, the nearest virtual node is obtained in a clockwise direction, and it is determined whether the request belongs to the shard corresponding to this virtual node. If the hash value of the nearest virtual node is the same as the business hash value, this virtual node's shard is used as the target shard.

[0098] The judgment process can be implemented using the `.tailMap()` method of the `TreeMap` class. The `tailMap()` method returns a view of the portion of the map that is greater than or equal to the business system code and the business key-value hash value. If the returned view is not empty, the first virtual node in the view is taken. Otherwise, it means that the data for that circle has been retrieved, and the first virtual node of that virtual circle should be taken. After retrieval, the transaction request is sent to the corresponding business layer instance in the database shard to complete the actual business processing. At this point, the load balancing of the payment system has been successfully completed, ensuring that the business is evenly distributed across multiple database business layer applications.

[0099] This virtual ring contains only a regular transaction database. To avoid issues in special business scenarios, a separate grayscale database can be prepared to achieve precise data distribution. To determine whether a transaction needs to be sent to the grayscale database, a common configuration layer can be deployed on the same financial transaction cloud platform to store configuration data. When business traffic is too high or concurrency is too high, the configuration layer can retrieve the corresponding configuration based on business system code, amount, payee / payer account number, etc., via microservice TCP communication. It can then determine if the business elements meet the conditions. If they do, the transaction can be directly sent to the grayscale database application layer, achieving precise data distribution. A switch can be used to distribute some transactions to the grayscale database, ensuring normal transaction processing and improving the high availability of the payment system.

[0100] In this embodiment, the payment system further includes a configuration layer 50; the configuration layer 50 is also used to perform basic configuration on the business layer 20.

[0101] It should be noted that when payment is required, the relevant data of the business layer 20 can be configured in advance. By obtaining relevant information from the configuration layer 50, the basic configuration of the business layer 20 can be performed.

[0102] This embodiment further includes a gateway layer 40 in the payment system 1. The gateway layer 40 is used to acquire transaction requests and calculate business hash values ​​based on the transaction requests. The gateway layer 40 is also used to allocate each transaction to an application instance in the business layer 20 based on the business hash values. The business layer 20 is also used to perform business processing on each transaction. By further balancing the distribution of business through the gateway layer, load balancing is ensured, which greatly improves the ability to handle high-concurrency scenarios.

[0103] Based on the first embodiment described above, a fourth embodiment of the payment system of the present invention is proposed.

[0104] In this embodiment, the interface layer 10 is also used to identify business scenarios, and when the business scenario is a preset business scenario, to obtain a first transaction amount, a second transaction amount, and an expected amount, wherein the first transaction amount is greater than the second transaction amount.

[0105] It should be noted that this business layer 20 can also provide random payment functionality for certain special business scenarios, such as red envelope distribution, customer lottery, and transaction testing, while ensuring the customizability of the service.

[0106] The preset business scenario is a random payment business scenario. Therefore, when the interface layer 10 recognizes that the business scenario is the preset business scenario, it completes the import of the corresponding parameters and obtains the first transaction amount, the second transaction amount and the expected amount. The first transaction amount is the required maximum amount max, the second transaction amount is the required minimum amount min, the expected amount is avg, and the discrete function y=f(x) is obtained, x∈[min,max], y≥0, and the expected value of y is avg.

[0107] In this embodiment, the business layer 20 is further configured to obtain a transaction range based on the first transaction amount, the second transaction amount, and the expected amount; the business layer 20 is further configured to obtain a filtering range based on the transaction range and calculate the average value of the filtering range;

[0108] It should be noted that after the business layer 20 connects with the interface layer 10, it obtains the first transaction amount, the second transaction amount, and the expected amount, and obtains the transaction range [min, max] based on the first transaction amount, the second transaction amount, and the expected amount. Then, it randomly selects a value from the transaction range to obtain the filtering range [m, 1], with the maximum value being f(m), the minimum value being 0, and the average value being avg / (max-min)*f(m).

[0109] In this embodiment, the business layer 20 is further configured to recursively obtain a parameter whose average value is a target value based on the average value of the filtering interval; the business layer 20 is further configured to calculate a random amount using the parameter and perform preset business processing using the random amount.

[0110] The ratio (average - min) / (max - min) can be obtained, and a random value can be generated using the `Math` function: `random = Math`. The algorithm `random() * (1 - m) + m` works as follows: If the ratio is greater than 0.5, the actual value is the maximum value minus the random value: `actual value = int(max - (1 / random - 1) * (max - min) / (1 / m - 1) + 0.5)`. If the ratio is less than 0.5, the average value is directly added to the random value: `actual value = int((1 / random - 1) * (max - min) / (1 / m - 1) + min + 0.5)`. To prevent the actual value from being less than the minimum or greater than the maximum, if the actual value is greater than the maximum, it is assigned `actual value = max`; if the actual value is less than the minimum, it is assigned `actual value = min`. Since the entire calculation process uses integers, the actual output amount needs to be converted to two decimal places. The random amount generated by the algorithm is now complete. This allows for the processing of special business transactions using the random amount.

[0111] The interface layer 10 described in this embodiment is further used to identify business scenarios. When the business scenario is a preset business scenario, it obtains a first transaction amount, a second transaction amount, and a desired amount, wherein the first transaction amount is greater than the second transaction amount. The business layer 20 is further used to obtain a transaction range based on the first transaction amount, the second transaction amount, and the desired amount. The business layer 20 is further used to obtain a filtering range based on the transaction range and calculate the average value of the filtering range. The business layer 20 is further used to recursively obtain a parameter whose average value is a target value. The business layer 20 is further used to calculate a random amount using the parameter and perform preset business processing using the random amount to ensure the randomness of customizability and meet different customer needs.

[0112] This invention provides a payment method, referring to... Figure 6 , Figure 6 This is a flowchart illustrating the first embodiment of the payment method of the present invention.

[0113] In this embodiment, the payment method is applied to the payment system described above, and the payment method includes the following steps:

[0114] Step S10: The integration layer obtains business information and generates an integration request when performing payment integration.

[0115] Step S20: The interface layer processes the business information to obtain processed business information, and sends the processed business information and the interface request to the corresponding database of the business layer.

[0116] It should be noted that when a business system needs to interface with a payment system, the business personnel of the business system should fill in the standard access document and relevant business information in a standardized manner, and upload the business information to the interface layer. When the interface layer performs payment integration, it obtains the business information uploaded by the business system and generates an integration request. The integration request is an integration request between the interface layer and the business layer, and the integration between the interface layer and the business layer can be carried out through the integration request.

[0117] After the interface layer obtains the business information uploaded by the business system, it can process the business information through the ExcelUtils utility class, and then send the processed business information to the business layer.

[0118] Step S30: The business layer adds configuration information to the sub-database according to the connection request and the processed business information to complete the business connection.

[0119] It should be understood that the business layer has multiple sub-databases. When the business layer receives the docking request and processed business information sent by the docking layer, it can add configuration information to its respective sub-database based on the request information and the data in the processed business information, thereby ensuring the smooth access of the business system and completing the business docking.

[0120] This embodiment obtains business information and generates a connection request during payment integration via an interface layer. The interface layer processes the business information to obtain processed business information, and then sends the processed business information and the connection request to the corresponding database sub-database of the business layer. The business layer adds configuration information to the database sub-database based on the connection request and the processed business information, completing the business integration. The interface layer further processes the business, providing a standardized integration process, improving integration speed, and achieving automated integration at the business layer.

[0121] It should be understood that the above are merely illustrative examples and do not constitute any limitation on the technical solutions of the present invention. In specific applications, those skilled in the art can make settings as needed, and the present invention does not impose any restrictions on this.

[0122] It should be noted that the workflow described above is merely illustrative and does not limit the scope of protection of this invention. In practical applications, those skilled in the art can select some or all of the workflow to achieve the purpose of this embodiment according to actual needs, and no restrictions are imposed here.

[0123] In addition, for technical details not described in detail in this embodiment, please refer to the payment method provided in any embodiment of the present invention, which will not be repeated here.

[0124] Furthermore, it should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.

[0125] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0126] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as read-only memory (ROM) / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0127] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.

Claims

1. A payment system, characterized in that, The payment system includes: an interface layer and a business layer; The interface layer is used to obtain business information and generate an interface request when performing payment interface; The interface layer is also used to process the business information to obtain processed business information, and send the processed business information and the interface request to the corresponding database of the business layer. The business layer is used to add configuration information to the database based on the connection request and the processed business information to complete the business connection. The business layer includes: a pre-check module, a business processing module, an export module, and a feedback module; The pre-check module is used to perform a preliminary check on the configuration information when adding configuration information based on the docking request, and to determine whether the configuration information is compliant. The business processing module is used to process the transaction request and send the processing result to the remittance module; The export module is used to export the processing results for business purposes. The feedback module is used to provide feedback on the results exported from the business process in order to complete the business processing flow. The payment system also includes: a data layer; The interface layer is also used to initiate a probe request to the microservice center, so as to probe the number of database shards of the business layer in the microservice center according to the probe request; The interface layer is also used to generate an interface request after detecting the number of database shards in the business layer, and send the interface request and the processed business information to the database shards in the business layer. The business layer is also used to check the compliance of the business requirement configuration in the processed business information based on the connection request; The business layer is also used to perform business configuration through the processed business information when the business requirement configuration is found to be compliant, obtain configuration information, and store the configuration information in the data layer.

2. The payment system as described in claim 1, characterized in that, The payment system also includes: a gateway layer; The gateway layer is used to obtain transaction requests and calculate business hash values ​​based on the transaction requests; The gateway layer is also used to allocate each transaction to an application instance of the business layer based on the business hash value; The business layer is also used to perform business processing on each of the transactions.

3. The payment system as described in claim 2, characterized in that, The gateway layer is also used to obtain the database sharding information of the business layer from the microservice center; The gateway layer is also used to allocate a preset number of virtual nodes to each sub-database according to the sub-database information, calculate the hash value of each virtual node, and store the hash value and the corresponding sub-database. The gateway layer is also used to compare the business hash value with the hash value of the virtual node based on the transaction request to determine the target database shard; The gateway layer is also used to send the transaction request to the application instance of the business layer of the target database for business processing.

4. The payment system as described in claim 2, characterized in that, The gateway layer is also used to obtain the business system code and business key value in the business information, and concatenate the business system code and the business key value to obtain the business hash value.

5. The payment system as described in claim 1, characterized in that, The interface layer is also used to identify business scenarios, and when the business scenario is a preset business scenario, to obtain a first transaction amount, a second transaction amount, and a desired amount, wherein the first transaction amount is greater than the second transaction amount; The business layer is further configured to obtain a transaction range based on the first transaction amount, the second transaction amount, and the expected amount; The business layer is also used to obtain a filtering range based on the transaction range and calculate the average value of the filtering range; The business layer is also used to recursively obtain a parameter whose average value is a target value based on the average value of the filtering interval; The business layer is also used to calculate a random amount using the parameters and to perform preset business processing using the random amount.

6. The payment system as described in claim 1, characterized in that, The interface layer is also used to obtain a preset format file and generate a data stream based on the business information; The interface layer is also used to read the byte stream of the preset format file based on the data stream, and process the preset format file to obtain the processed business information of the target format file; The interface layer is also used to send the target format file to the business layer.

7. The payment system as described in any one of claims 1 to 6, characterized in that, The payment system also includes: a configuration layer; The configuration layer is also used to perform basic configuration of the service layer.

8. A payment method, characterized in that, The payment method is applied to the payment system according to any one of claims 1 to 7, and the payment method includes: The interface layer obtains business information and generates an interface request when performing payment integration; The interface layer processes the business information to obtain processed business information, and sends the processed business information and the interface request to the corresponding database of the business layer. The business layer adds configuration information to the sharded database according to the connection request and the processed business information to complete the business connection. The business layer includes: a pre-check module, a business processing module, an export module, and a feedback module; When adding configuration information based on the docking request, the pre-check module performs a preliminary check on the configuration information to determine whether the configuration information is compliant. The business processing module processes the transaction request and sends the processing result to the outgoing module. The export module exports the processing results for business purposes. The feedback module returns the results exported by the business to complete the business processing flow; The payment system also includes: a data layer; The interface layer initiates a probe request to the microservice center to probe the number of database shards of the business layer in the microservice center according to the probe request; After detecting the number of database shards in the business layer, the interface layer generates an interface request and sends the interface request and the processed business information to the database shards in the business layer. The business layer checks the compliance of the business requirement configuration in the processed business information based on the connection request; When the business layer detects that the business requirement configuration is compliant, it performs business configuration through the processed business information to obtain configuration information, and stores the configuration information in the data layer.

Citation Information

Patent Citations

  • Database partitioning and table partitioning method and device, medium and computer equipment

    CN111339088A

  • Aggregated payment background architecture method and system, computer equipment and storage medium

    CN111383022A

  • Business financial data processing method and device and computer equipment

    CN112950345A