Deployment method and system for reconstructing payment service
By deploying the existing and reconstructed payment servers simultaneously in the production environment and using proxy services to verify and cache results, we solved the stability and reliability issues when switching between the old and new systems, achieved a smooth launch of the new service, and reduced risks and repair costs.
Patent Information
- Application Number
- CN202510714642.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-30
- Publication Date
- 2025-09-16
AI Technical Summary
The existing payment system has stability and reliability issues when switching between the old and new systems. Directly launching the new version may lead to payment failures, data loss or deterioration of user experience. There is also a lack of effective methods to evaluate the impact of the new version on transaction flows, and the cost of repair is high.
Deploy the existing payment server and the reconstructed payment server simultaneously in the production environment. Copy the client requests and send them to both servers. Generate and save orders to their respective databases. Verify payment credentials and cache the results through the proxy service. Finally, switch to the reconstructed payment server after reconciliation confirmation.
It achieves smooth switching of the new service launch process, reduces risks and cycles, ensures system stability and reliability, and avoids problems caused by direct launch.
Smart Images

Figure CN120655296A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a deployment method and system for reconstructing a payment service, a computing device, and a computer-readable storage medium. Background Art
[0002] In existing payment system architectures, ensuring stability and reliability during the transition between legacy and new systems is a persistent challenge. Existing update or upgrade deployment solutions suffer from multiple issues. Directly rolling out a new or restructured payment system from a test environment to production can lead to unforeseen issues, impacting the overall stability of the system. Defects in the new system can lead to payment failures, data loss, or a degraded user experience. Furthermore, there's a lack of effective methods for assessing the impact of new system versions on existing transaction flows. Problems only become apparent after full rollout, and once a failure occurs, repairs are costly and time-consuming. Summary of the Invention
[0003] In view of this, embodiments of the present application provide a deployment method and system for reconstructing a payment service, a computing device, and a computer-readable storage medium to address the technical defects in the prior art.
[0004] According to a first aspect of an embodiment of the present application, a deployment method for reconstructing a payment service is provided, comprising:
[0005] When the client initiates a payment request, the payment request is copied and sent to the payment server and the reconstruction payment server respectively; the payment server generates and saves a first payment order to the first database, and the reconstruction payment server generates and saves a second payment order to the second database;
[0006] The client initiates payment to the payment provider according to the first payment order, and obtains the payment credential after the payment is completed; then the client initiates a verification request to the payment server according to the first payment order and the payment credential;
[0007] The payment server sends a verification request for the payment credential to the payment provider through a proxy service, and caches the credential verification result returned by the payment provider in the proxy service;
[0008] The reconstructed payment server obtains the credential verification result of the first payment order from the cache of the proxy service and stores it in a second database;
[0009] Reconcile the order-related information in the first database and the second database, and complete the switching between the payment server and the reconstructed payment server when the reconciliation results are consistent.
[0010] According to a second aspect of an embodiment of the present application, a deployment system for reconstructing a payment service is provided, including:
[0011] Payment server, business gateway, reconstruction of payment server and proxy service;
[0012] The payment server receives the payment request initiated by the client, generates and saves the first payment order; receives the payment credential sent by the client, and sends a verification request for the payment credential to the proxy service;
[0013] The business gateway copies the payment request initiated by the client and sends it to the payment server and the reconstruction payment server respectively;
[0014] The proxy service forwards the payment credential verification request to the payment provider and caches the credential verification result returned by the payment provider;
[0015] The reconstructed payment server generates and saves a second payment order according to the payment request; and obtains and saves the credential verification result of the first payment order from the cache of the proxy service.
[0016] According to a third aspect of an embodiment of the present application, a computing device is provided, comprising a memory, a processor, and computer instructions stored in the memory and executable on the processor, wherein when the processor executes the instructions, the steps of the method for reconstructing the deployment of a payment service are implemented.
[0017] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, which stores computer instructions, and when the instructions are executed by a processor, the steps of the deployment method for reconstructing a payment service are implemented.
[0018] In an embodiment of the present application, the reconstructed payment server and the existing payment server are deployed in the production environment at the same time; when a payment request is generated, it is copied and sent to the payment server and the reconstructed payment server, and the payment orders are generated and saved in their respective databases. Then, the client uses the first payment order and the corresponding payment credentials to verify with the payment server, and the payment server verifies the payment credentials with the payment provider through the proxy service and caches the verification results. The reconstructed payment server retrieves the verification result from the cache of the proxy service and saves it. Finally, by comparing the order information in the two databases to reconcile and confirm that the two are consistent, the switching between the payment server and the reconstructed payment server is realized. The reconstructed payment service in the embodiment of the present application only performs calculations and archiving for real payment requests, and has no actual impact on actual business. After the data acceptance is passed, the official traffic is forwarded to the reconstructed payment service, which realizes a smooth online switching process for the new service, with a short cycle and low risk. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 is a structural block diagram of a computing device provided in an embodiment of the present application;
[0020] Figure 2 This is a flow chart of a deployment method for reconstructing a payment service provided in an embodiment of the present application;
[0021] Figure 3 This is a structural diagram of a deployment system for reconstructing payment services provided in an embodiment of the present application. DETAILED DESCRIPTION
[0022] The following description sets forth many specific details to facilitate a thorough understanding of the present application. However, the present application can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the scope of the present application. Therefore, the present application is not limited to the specific implementations disclosed below.
[0023] The terms used in one or more embodiments of the present application are for the purpose of describing specific embodiments only and are not intended to limit one or more embodiments of the present application. The singular forms "a", "the" and "the" used in one or more embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used in one or more embodiments of the present application refers to and includes any or all possible combinations of one or more associated listed items.
[0024] It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of the present application, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of one or more embodiments of the present application, first may also be referred to as second, and similarly, second may also be referred to as first. Depending on the context, the word "if" as used herein may be interpreted as "in response to determining."
[0025] In this application, a deployment method and system for reconstructing a payment service, a computing device, and a computer-readable storage medium are provided, which are described in detail one by one in the following embodiments.
[0026] Figure 1 1 shows a block diagram of a computing device 100 according to an embodiment of the present application. Components of the computing device 100 include, but are not limited to, a memory 110 and a processor 120. The processor 120 is connected to the memory 110 via a bus 130, and a database 150 is used to store data.
[0027] The computing device 100 also includes an access device 140 that enables the computing device 100 to communicate via one or more networks 160. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 140 may include one or more of any type of network interface (e.g., a network interface card (NIC)), whether wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a Worldwide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, and the like.
[0028] In one embodiment of the present application, the above components of the computing device 100 and Figure 1 Other components not shown in the figure may also be connected to each other, for example, via a bus. Figure 1 The computing device structure block diagram shown is for illustrative purposes only and is not intended to limit the scope of the present application. Those skilled in the art may add or replace other components as needed.
[0029] The computing device 100 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook computer, etc.), a mobile phone (e.g., a smartphone), a wearable computing device (e.g., a smartwatch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or PC. The computing device 100 may also be a mobile or stationary server.
[0030] Next, a deployment method for reconstructing a payment service provided by an embodiment of the present application is described. Figure 2 , Figure 2 A flowchart of a deployment method for reconstructing a payment service provided according to an embodiment of the present application is shown, including steps 202 to 210.
[0031] Step 202: When the client initiates a payment request, the payment request is copied and sent to the payment server and the reconstruction payment server respectively; the payment server generates and saves a first payment order to the first database, and the reconstruction payment server generates and saves a second payment order to the second database.
[0032] In an embodiment of the present application, a normally operating payment server and a reconstructed payment server are deployed simultaneously in a production environment. When a normal payment request occurs, it is copied and sent to the payment server and the reconstructed payment server respectively.
[0033] In one feasible implementation, before the client initiates a payment request to the payment server, the user initiates a purchase request for virtual goods within the app running on the client, which the client then sends to the gaming service server. For example, if a user clicks a button to purchase an item in a game running on a smartphone, the smartphone will send the purchase request to the gaming service server. Furthermore, the purchase request includes information about the virtual goods. After receiving the purchase request from the client, the gaming service server generates a product order and returns it to the client. The product order includes an order identifier and a description of the virtual goods.
[0034] Furthermore, the client initiates a payment request to the payment server based on the product order. In this embodiment of the present application, when the client initiates a payment request, the payment request passes through a service gateway, which copies the payment request and sends it to the payment server and the reconstructed payment server, respectively.
[0035] The payment server calculates the payable amount for the virtual goods based on the payment request, generates a first payment order, and returns it to the client. The first payment order includes a payment order identifier, the payable amount, and / or the corresponding billing point. Furthermore, the payment server stores each payment order in a first database. The reconstructed payment server similarly calculates the payable amount for the virtual goods based on the payment request it receives, generates a second payment order, and stores it in a second database.
[0036] Step 204: The client initiates payment to the payment provider according to the first payment order, and obtains the payment credential after the payment is completed; then the client initiates a verification request to the payment server according to the first payment order and the payment credential.
[0037] In an embodiment of the present application, after receiving the first payment order, the client initiates payment to the payment provider according to the first payment order, and obtains the payment credential returned by the payment provider after completing the payment.
[0038] Furthermore, the client sends the first payment order and the corresponding payment credential to the payment server for payment verification; after receiving the payment credential sent by the client, the payment server forwards the payment credential to the payment provider for verification.
[0039] Step 206: The payment server sends a payment credential verification request to the payment provider via the proxy service, and caches the credential verification result returned by the payment provider in the proxy service.
[0040] In an embodiment of the present application, when verifying the first payment order and its corresponding payment voucher, the payment server sends a payment credential verification request to the proxy service, which forwards the payment voucher to the payment provider and receives the voucher verification result returned by the payment provider.
[0041] Furthermore, the proxy service caches the credential verification results returned by the payment provider.
[0042] Specifically, in a feasible implementation, a cache system such as Redis or Memcached is implemented in a proxy service such as an HTTP proxy service, and a unique transaction identifier (e.g., order number) is used as a cache key to cache the credential verification results returned by the payment provider.
[0043] Step 208: The reconstructed payment server obtains the credential verification result of the first payment order from the cache of the proxy service and saves it in the second database.
[0044] In this step, the reconstructed payment service retrieves the credential verification result of the first payment order from the cache system configured in the proxy service, associates and pairs the second payment order with the credential verification result, and stores it in the second database. Because the payment request received by the reconstructed payment server is the same as the payment server, the transaction identifiers in the first and second payment orders should also be consistent.
[0045] Specifically, the reconstructed payment server sends a request to the proxy service based on the transaction identifier of the second payment order, and retrieves the corresponding credential verification result from its cache system. Furthermore, the second payment order is associated with the retrieved credential verification result using the transaction identifier and stored in the second database.
[0046] Preferably, the reconstructed payment server further verifies the credential verification result according to the second payment order and stores the verification result in the second database. Specific verification includes but is not limited to:
[0047] Verify that the status returned in the credential verification result is correct;
[0048] Verify that the bundle_id in the credential verification result is consistent with the bundle ID of the client application, that is, determine whether the products in the payment order are from the same application;
[0049] Verify whether the product_id in the credential verification result matches the billing point in the second payment order. If the billing point matches the product_id, it means that the credential verification result and the second payment order are consistent and the verification passes. Otherwise, the verification fails.
[0050] Verify whether the original_transaction_id in the credential verification result is unique among the completed orders on the payment server, that is, determine whether the currently received payment credential has been used before. If it has been used, the verification fails;
[0051] Get the payment time original_purchase_date in the voucher verification result, and determine the order sequence between the payment time and the order time in the second payment order. If the payment time is before the order time, the verification fails.
[0052] Since the payment request received by the reconstructed payment server is consistent with the payment server, the verification result between the second payment order and the voucher verification result obtained on the reconstructed payment server should also be consistent with the verification result between the first payment order and the voucher verification result obtained on the payment server.
[0053] Step 210: reconcile the order-related information in the first database and the second database, and complete the switching between the payment server and the reconstructed payment server when the reconciliation results are consistent.
[0054] In this step, the order-related information generated by the payment server stored in the first database and the order-related information generated by the reconstructed payment server stored in the second database are reconciled. When the reconciliation results are consistent, the switch from the payment server to the reconstructed payment server is completed, and all client payment requests are sent to the reconstructed payment server.
[0055] Specifically, during the reconciliation, when the order-related information in the first database should be completely consistent with the order-related information in the second database, the switching from the payment server to the reconstructed payment server is completed.
[0056] Preferably, the order-related information in the first and second databases is reconciled continuously within a preset time threshold. When the reconciliation results are completely consistent within the preset time threshold, the switch from the payment server to the reconstructed payment server is completed. For example, within a week, all order-related information in the first and second databases is reconciled. When the reconciliation results are completely consistent, the switch from the payment server to the reconstructed payment server is completed.
[0057] In the above-mentioned embodiment of the present application, in order to address the problem of high risk in the prior art of directly launching the payment service after reconstruction, the reconstructed payment server and the existing payment server are deployed in the production environment at the same time; when a payment request is generated, it is copied and sent to the payment server and the reconstructed payment server, and the payment order is generated and saved in their respective databases. Afterwards, the client uses the first payment order and the corresponding payment credentials to verify with the payment server, and the payment server verifies the payment credentials with the payment provider through the proxy service and caches the verification result. The reconstructed payment server retrieves the verification result from the cache of the proxy service and saves it. Finally, by comparing the order information in the two databases to reconcile and confirm that the two are consistent, the switching between the payment server and the reconstructed payment server is realized. The reconstructed payment service in the embodiment of the present application only performs calculations and archiving for real payment requests, and has no actual impact on actual business. After the data acceptance is passed, the official traffic is forwarded to the reconstructed payment service, which realizes a smooth online switching process for the new service, with a short cycle and low risk.
[0058] Corresponding to the above method embodiment, the present application also provides an embodiment of a deployment system for reconstructing a payment service, such as Figure 3 As shown, the system includes:
[0059] Payment server, business gateway, reconstruction of payment server and proxy service;
[0060] The payment server receives the payment request initiated by the client, generates and saves the first payment order; receives the payment credential sent by the client, and sends a verification request for the payment credential to the proxy service;
[0061] The business gateway copies the payment request initiated by the client and sends it to the payment server and the reconstruction payment server respectively;
[0062] The proxy service forwards the payment credential verification request to the payment provider and caches the credential verification result returned by the payment provider;
[0063] The reconstructed payment server generates and saves a second payment order according to the payment request; and obtains and saves the credential verification result of the first payment order from the cache of the proxy service.
[0064] The above is a schematic diagram of a system for reconfiguring a payment service deployment according to this embodiment. It should be noted that the technical solution of this system and the technical solution of the aforementioned method for reconfiguring a payment service deployment are based on the same concept. For details not described in detail in the technical solution of this system, please refer to the description of the technical solution of the aforementioned method for reconfiguring a payment service deployment.
[0065] In one embodiment of the present application, a computing device is also provided, including a memory, a processor, and computer instructions stored in the memory and executable on the processor. When the processor executes the instructions, the steps of the deployment method for reconstructing the payment service are implemented.
[0066] The above is a schematic diagram of a computing device according to this embodiment. It should be noted that the technical solution of this computing device and the technical solution of the aforementioned method for reconfiguring the deployment of a payment service are based on the same concept. For details not described in detail in the technical solution of the computing device, please refer to the description of the technical solution of the aforementioned method for reconfiguring the deployment of a payment service.
[0067] An embodiment of the present application further provides a computer-readable storage medium storing computer instructions, which, when executed by a processor, implement the steps of the deployment method for reconstructing a payment service as described above.
[0068] The above is a schematic diagram of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of this storage medium and the technical solution of the aforementioned method for reconfiguring the deployment of a payment service are based on the same concept. For details not described in detail in the technical solution of the storage medium, please refer to the description of the technical solution of the aforementioned method for reconfiguring the deployment of a payment service.
[0069] The foregoing description describes specific embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that described in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order shown or the sequential order to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0070] The computer instructions include computer program code, which may be in source code form, object code form, executable file, or some intermediate form. The computer-readable medium may include: any entity or system capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal, and software distribution medium. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0071] It should be noted that for the aforementioned method embodiments, for ease of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this application.
[0072] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0073] The preferred embodiments of the present application disclosed above are intended only to help illustrate the present application. The optional embodiments do not describe all details in detail, nor do they limit the invention to the specific embodiments described. Obviously, many modifications and variations can be made based on the content of this application. This application selects and describes these embodiments in detail in order to better explain the principles and practical applications of this application, so that those skilled in the art can better understand and utilize this application. This application is limited only by the claims and their full scope and equivalents.
Claims
1. A deployment method for reconstructing a payment service, characterized in that: include: When the client initiates a payment request, the payment request is copied and sent to the payment server and the reconstruction payment server respectively; the payment server generates and saves a first payment order to the first database, and the reconstruction payment server generates and saves a second payment order to the second database; The client initiates payment to the payment provider according to the first payment order, and obtains the payment credential after the payment is completed; then the client initiates a verification request to the payment server according to the first payment order and the payment credential; The payment server sends a verification request for the payment credential to the payment provider through a proxy service, and caches the credential verification result returned by the payment provider in the proxy service; The reconstructed payment server obtains the credential verification result of the first payment order from the cache of the proxy service and stores it in a second database; Reconcile the order-related information in the first database and the second database, and complete the switching between the payment server and the reconstructed payment server when the reconciliation results are consistent.
2. The method according to claim 1, wherein The step of copying the payment request and sending the copy to the payment server and the step of reconstructing the payment server comprises: The payment request is copied through the business gateway and sent to the payment server and the reconstructed payment server respectively.
3. The method according to claim 1, wherein Caching the credential verification result returned by the payment provider in the proxy service includes: Implement a cache system in the HTTP proxy service and use the unique transaction identifier as the cache key to cache the credential verification results returned by the payment provider.
4. The method according to claim 3, wherein: The reconstructed payment server obtains the credential verification result of the first payment order from the cache of the proxy service and stores the result in the second database, including: The reconstructed payment service sends a request with the transaction identifier of the second payment order to the HTTP proxy service, and queries the corresponding credential verification result from its cache system; after associating the second payment order with the credential verification result through the transaction identifier, it is stored in the second database.
5. The method according to claim 4, wherein After associating the second payment order with the credential verification result through the transaction identifier, storing the result in the second database further includes: The reconstructed payment server verifies the credential verification result according to the second payment order, and stores the verification result in a second database.
6. The method according to claim 1, wherein Reconciling the order-related information in the first database and the second database, and completing the switching between the payment server and the reconstructed payment server when the reconciliation results are consistent, includes: The order-related information in the first database and the second database are continuously reconciled within a preset time threshold, and when the reconciliation results are completely consistent, the switching from the payment server to the reconstructed payment server is completed.
7. A deployment system for reconstructing payment services, characterized in that: The system includes: Payment server, business gateway, reconstruction of payment server and proxy service; The payment server receives the payment request initiated by the client, generates and saves the first payment order; receives the payment credential sent by the client, and sends a verification request for the payment credential to the proxy service; The business gateway copies the payment request initiated by the client and sends it to the payment server and the reconstruction payment server respectively; The proxy service forwards the payment credential verification request to the payment provider and caches the credential verification result returned by the payment provider; The reconstructed payment server generates and saves a second payment order according to the payment request; and obtains and saves the credential verification result of the first payment order from the cache of the proxy service.
8. A computing device comprising a memory, a processor, and computer instructions stored in the memory and executable on the processor, wherein: When the processor executes the instructions, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium storing computer instructions, characterized in that: When the instruction is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.