Payment processing method and device, equipment and storage medium
By caching on the gateway server and the mobile payment territorial server, the problems of long time consumption and high cost in obtaining territorial information in the prior art are solved, efficient territorial information acquisition is achieved and system costs are reduced.
Patent Information
- Application Number
- CN202410286360.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-12
- Publication Date
- 2025-09-12
AI Technical Summary
In the existing mobile payment process, the local server needs to query the local information of the user object, which requires a long call link and takes a long time, resulting in high machine and maintenance costs, and excessive dependence on the local server.
Through the instant messaging client's gateway server and the mobile payment local server for caching, the local information is first queried locally. If not found, the local data of the full object is obtained from the mobile payment local server, reducing dependence on the local server and shortening the call link.
It improves the performance and availability of local information acquisition, reduces machine costs and maintenance costs, and reduces dependence on local servers.
Smart Images

Figure CN120634548A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of Internet technology, and in particular to a payment processing method, apparatus, device, and storage medium. Background Art
[0002] Instant messaging clients currently provide convenient mobile payment functions, such as red envelope forwarding, money transfer, and face-to-face payment.
[0003] Currently, the mobile payment process includes placing an order, pulling up the cashier and making a payment. Each payment process is as follows: the gateway server corresponding to the instant messaging client receives the payment service request (carrying the user object identifier) sent by the social payment server, and the gateway server queries the local information of the user object from the local server. The gateway server routes the payment service request to the corresponding payment processing server based on the obtained local information.
[0004] However, each payment process requires querying the local information of the object from the local server. The call link is long and time-consuming, and the local server needs to deploy a large number of machines, which has high machine and maintenance costs. Summary of the Invention
[0005] The embodiments of the present application provide a payment processing method, apparatus, device, and storage medium, which can shorten the time for obtaining local information and the length of the call link, improve the performance and availability of obtaining local information, avoid strong dependence on local servers, avoid deploying a large number of machines on local servers, and reduce machine costs and maintenance costs.
[0006] In a first aspect, an embodiment of the present application provides a payment processing method, which is applied to a gateway server corresponding to an instant messaging client, and includes:
[0007] receiving a payment request for a target payment item sent by a payment server corresponding to the instant messaging client, wherein the payment request includes an identifier of a first object;
[0008] querying, from a first storage unit of the gateway server, the location information of the first object according to the identifier of the first object;
[0009] If the location information of the first object is not found from the first storage unit, the location information of the first object is obtained from the second storage unit of the mobile payment location server corresponding to the instant messaging client, where the second storage unit stores the location data of all objects currently stored in the location server;
[0010] According to the territorial information of the first object, the payment is routed to the corresponding payment processing server for payment processing.
[0011] In a second aspect, an embodiment of the present application provides a payment processing method, which is applied to a mobile payment territorial server corresponding to an instant messaging client, and includes:
[0012] receiving a query request sent by a gateway server corresponding to the instant messaging client, the query request carrying an identifier of a first object, the query request being sent by the gateway server upon receiving a payment request for a target payment item sent by a payment server corresponding to the instant messaging client, and upon failing to find location information of the first object in a first storage unit of the gateway server based on the identifier of the first object carried in the payment request;
[0013] According to the identifier of the first object, obtaining the location information of the first object from the second storage unit of the mobile payment location server, the second storage unit storing the location data of all objects currently stored in the location server;
[0014] The location information of the first object is sent to the gateway server, so that the gateway server can route the first object to a corresponding payment processing server for payment processing according to the location information of the first object.
[0015] In a third aspect, an embodiment of the present application provides a payment processing device, comprising:
[0016] a receiving module, configured to receive a payment request for a target payment item sent by a payment server corresponding to the instant messaging client, wherein the payment request includes an identifier of the first object;
[0017] an acquisition module, configured to query the location information of the first object from a first storage unit of a gateway server based on the identifier of the first object; if the location information of the first object is not found from the first storage unit, obtain the location information of the first object from a second storage unit of a mobile payment location server corresponding to the instant messaging client, where the second storage unit stores location data of all objects currently stored on the location server;
[0018] The processing module is used to route the first object to a corresponding payment processing server for payment processing according to the location information of the first object.
[0019] In a fourth aspect, an embodiment of the present application provides a payment processing device, including:
[0020] a receiving module, configured to receive a query request sent by a gateway server corresponding to an instant messaging client, the query request carrying an identifier of a first object, the query request being sent by the gateway server upon receiving a payment request for a target payment item sent by a payment server corresponding to the instant messaging client, and upon failing to find location information of the first object from a first storage unit of the gateway server based on the identifier of the first object carried in the payment request;
[0021] a processing module, configured to obtain, based on the identifier of the first object, the location information of the first object from a second storage unit of the mobile payment location server, wherein the second storage unit stores the location data of all objects currently stored in the location server;
[0022] The sending module is used to send the location information of the first object to the gateway server, so that the gateway server can route the location information of the first object to the corresponding payment processing server for payment processing.
[0023] In a fifth aspect, a computer device is provided, comprising: a processor and a memory, the memory being used to store a computer program, the processor being used to call and run the computer program stored in the memory, and executing the method as in any one of the first to second aspects or their respective implementations.
[0024] In a sixth aspect, a computer-readable storage medium is provided for storing a computer program, wherein the computer program enables a computer to execute the method of any one of the first to second aspects or their respective implementations.
[0025] In a seventh aspect, a computer program product is provided, comprising computer program instructions, which enable a computer to execute the method of any one of the first to second aspects or their respective implementations.
[0026] In an eighth aspect, a computer program is provided, which enables a computer to execute the method in any one of the first to second aspects or their respective implementations.
[0027] The technical solution provided by the present application is that when the gateway server receives a payment request, the payment request includes the identifier of the first object, and first queries the first object's territorial information from the first storage unit of the gateway server. If the territorial information of the first object is not found from the first storage unit, the territorial information of the first object is obtained from the second storage unit of the mobile payment territorial server corresponding to the instant messaging client. The second storage unit stores the territorial data of all objects stored in the current territorial server, and then routes the payment to the corresponding payment processing server for payment processing based on the territorial information of the first object. By caching the territorial information required for each payment request in both the gateway server and the mobile payment territorial server, when a payment request is received, the territorial information can be first obtained from the local cache. If the territorial information is not in the local cache, it is obtained from the second storage unit of the mobile payment territorial server. This shortens the time for obtaining the territorial information and the length of the call link, improves the performance and availability of obtaining the territorial information, avoids strong dependence on the territorial server, avoids deploying a large number of machines on the territorial server, and reduces machine costs and maintenance costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0029] Figure 1 A schematic diagram of a system architecture involved in an embodiment of the present application;
[0030] Figure 2 A schematic diagram of a mobile social payment provided in an embodiment of the present application;
[0031] Figure 3 A flowchart of a payment processing method provided in an embodiment of the present application;
[0032] Figure 4 A flowchart of a payment processing method provided in an embodiment of the present application;
[0033] Figure 5 An interactive flow chart of a payment processing method provided in an embodiment of the present application;
[0034] Figure 6 A schematic diagram of a territorial data storage provided in an embodiment of the present application;
[0035] Figure 7 A schematic diagram of a process for updating territorial data provided in an embodiment of the present application;
[0036] Figure 8 A flowchart of a payment processing method provided in an embodiment of the present application;
[0037] Figure 9 A flowchart of a payment processing method provided in an embodiment of the present application;
[0038] Figure 10 A schematic diagram of a payment processing device provided in an embodiment of the present application;
[0039] Figure 11 A schematic diagram of a payment processing device provided in an embodiment of the present application;
[0040] Figure 12 It is a schematic block diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0041] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative efforts shall fall within the scope of protection of the present invention.
[0042] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way are interchangeable where appropriate so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0043] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program that has a predetermined function and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories) or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.
[0044] The embodiments of the present application may relate to mobile payment in Internet technology.
[0045] Among them, Internet technology refers to an information technology developed and established on the basis of computer technology. It connects individual computers or networks together to form a specific network system and realizes the transmission and sharing of information.
[0046] Mobile payment refers to electronic currency payments made by mobile clients using electronic devices such as mobile phones. Mobile payment effectively integrates the internet, terminal devices, and financial institutions to form a new payment system. Mobile payment has created a new payment method and promoted the popularization of electronic currency.
[0047] Among them, in the embodiment of the present application, terminal devices such as mobile phones and tablet computers are installed with instant messaging clients, and mobile payments can be realized using the instant messaging clients.
[0048] It should be understood that an instant messaging client is a communication tool based on Internet technology that allows users to communicate with each other in real time through text, voice, video, etc. These communication tools generally provide instant messaging, voice calls, video calls, file transfers and other functions, allowing users to communicate and collaborate conveniently.
[0049] The following is an explanation of the relevant knowledge involved in this application:
[0050] 1. Multi-site active-active: A system disaster recovery architecture in which multiple data centers in multiple cities can provide peer-to-peer services.
[0051] 2. Territory routing: Routes to the corresponding city and data center based on the user's location information.
[0052] 3. Multi-level cache: Multi-level cache is achieved by combining the cache of the server and the client.
[0053] 4. Message Queue (MQ): Used for messaging between different applications and services. By placing messages in MQ, producers (i.e., manufacturers or publishers) and consumers (i.e., subscribers) can be decoupled. Producers do not need to wait for consumers to process messages, while consumers can obtain messages when needed. This model can improve system scalability and reliability while also reducing application coupling. Producers can be considered callers, and consumers can be considered callees.
[0054] The following describes the technical problems, inventive concepts, and system architecture to be solved by the embodiments of the present application:
[0055] As mentioned above, in the current mobile payment process, each payment process needs to query the local information of the user from the local server. The call link is long and time-consuming, and the local server needs to deploy a large number of machines. The machine cost and maintenance cost are high, and there is a strong dependence on the local server.
[0056] In order to solve the above technical problems, in an embodiment of the present application, when a payment request is received by a gateway server corresponding to an instant messaging client, the payment request includes an identifier of a first object. The gateway server first queries the first object's location information from the first storage unit of the gateway server. If the location information of the first object is not found from the first storage unit, the location information of the first object is obtained from the second storage unit of the mobile payment location server corresponding to the instant messaging client. The second storage unit stores the location data of all objects stored in the current location server. Then, according to the location information of the first object, the location information is routed to the corresponding payment processing server for payment processing. By caching the location information required for each payment request in both the gateway server and the mobile payment location server, when a payment request is received, the location information can be first obtained from the local cache. If the location information is not in the local cache, it is obtained from the second storage unit of the mobile payment location server. Therefore, the time for obtaining the location information and the length of the call link are shortened, the performance and availability of obtaining the location information are improved, a strong dependence on the location server is avoided, and a large number of machines are avoided from being deployed on the location server, thereby reducing machine costs and maintenance costs.
[0057] In some implementations, the system architecture of the embodiment of the present application is as follows: Figure 1 shown.
[0058] Figure 1 This is a schematic diagram of a system architecture involved in an embodiment of the present application, such as Figure 1 As shown, the system architecture of this embodiment includes: a terminal device 100, a payment server 110 corresponding to the instant messaging client, a gateway server 120 corresponding to the instant messaging client, a mobile payment territorial server 130 corresponding to the instant messaging client, a territorial server 140 and a payment processing server 150.
[0059] Among them, the terminal device 100 can be installed with an instant messaging client to perform mobile payment through the instant messaging client, such as red envelope forwarding, transfer, face-to-face payment, etc.
[0060] It should be understood that the instant messaging client can be any communication tool based on Internet technology that allows users to communicate with each other in real time through text, voice, video, etc., but is not limited thereto.
[0061] In some implementations, the terminal device 100 may be a smart phone, a tablet computer, a smart watch, virtual reality (VR), augmented reality (AR), etc., but is not limited thereto.
[0062] In some possible implementations, the terminal device 100 includes but is not limited to a mobile phone, a computer, an intelligent voice interaction device, a smart home appliance, a vehicle-mounted terminal, an aircraft, etc.
[0063] The terminal device 100 and the payment server 110 may be connected directly or indirectly via wired or wireless communication, which is not limited in this application.
[0064] The terminal device 100 and the gateway server 120 can be connected directly or indirectly via wired or wireless communication, which is not limited in this application.
[0065] The payment server 110 and the gateway server 120 may be connected directly or indirectly via wired or wireless communication, which is not limited in this application.
[0066] The gateway server 120 and the mobile payment local server 130 may be connected directly or indirectly via wired or wireless communication, which is not limited in this application.
[0067] The mobile payment local server 130 may be directly or indirectly connected to the local server 140 or the payment processing server 150 via wired or wireless communication, which is not limited in this application.
[0068] In some possible implementations, any of the gateway server 120, mobile payment resident server 130, resident server 140, and payment processing server 150 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It may also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.
[0069] It should be understood that in the embodiment of the present application, the payment server 110 is a server that receives payment service requests sent by instant messaging clients. Payment service requests may include requests for placing orders, pulling up cashiers, making payments, and account inquiries. Payment services may include red envelope forwarding services, transfer services, face-to-face payment services, etc.
[0070] The gateway server 120 is also called a proxy server, and receives the payment request sent by the payment server 110 .
[0071] The mobile payment territorial server 130 is a new server deployed on the mobile payment side in the embodiment of the present application. The mobile payment territorial server 130 is used to write, store, and read territorial data (including the identifier of each object and the territorial information of each object). The mobile payment territorial server 130 can be deployed in multiple computer rooms. For example, computer room 1 and computer room 2 respectively deploy the first mobile payment territorial server and the second mobile payment territorial server. The territorial information of all current objects is fully stored in the first mobile payment territorial server and the second mobile payment territorial server. The first mobile payment territorial server and the second mobile payment territorial server can also update the stored territorial data.
[0072] The local server 140 is a server for managing local data, and can be deployed independently or in different computer rooms.
[0073] The payment processing server 150 is a server that performs corresponding payment processing after receiving the location information of the object. The payment processing server 150 can perform business processing such as placing orders, pulling cashiers and making payments.
[0074] It should be noted that Figure 1 This is only a schematic diagram of a system architecture provided by the embodiment of the present application. The system architecture involved in the embodiment of the present application is not limited to Figure 1 The system architecture shown, for example, in some implementations, Figure 1 Based on the system architecture shown, the system architecture involved in the embodiment of the present application may also include: a terminal device corresponding to the payee, which can be connected to the local server 140 and the payment processing server 150.
[0075] The payment processing method provided in the embodiment of the present application can be applied to scenarios such as mobile social payment and commercial payment. Mobile social payment generally has a large flow rate, among which mobile social payment includes sending red envelopes, transferring money and face-to-face payment, etc. Each payment, including placing an order, pulling the cashier, paying, checking the order, and closing the order, must first obtain the user's location information, and then route it according to the location information and request to the corresponding interface. In the embodiment of the present application, the location information is also called the location information, which can be the address information of the location, and this embodiment does not limit this. The mobile social payment scenario is generally under the system architecture of multi-active payment in different locations, Figure 2 A schematic diagram of a mobile social payment provided in an embodiment of the present application is shown as follows: Figure 2 As shown, Figure 2The scenario shown involves city A and city B. City A deploys computer rooms 1 and 2. The territorial information corresponding to computer room 1 is territorial 1, and the territorial information corresponding to computer room 2 is territorial 2. City B deploys computer rooms 3 and 4. The territorial information corresponding to computer room 3 is territorial 3, and the territorial information corresponding to computer room 4 is territorial 4. In the high-traffic mobile social payment business scenario, the payment processing method provided in this embodiment can achieve caching and faster acquisition of the territorial information required for routing through multi-level caching technology, ensuring correct routing to the corresponding city and computer room according to the territorial information.
[0076] The following is a detailed description of the embodiments of the present application:
[0077] Figure 3 A flowchart of a payment processing method provided in an embodiment of the present application. The execution subject of the method may be a payment processing device. The execution subject of this embodiment may be, for example, a gateway server corresponding to an instant messaging client. The gateway server is also called a proxy server, such as Figure 3 As shown, the method may include:
[0078] S201: Receive a payment request for a target payment item sent by a payment server corresponding to an instant messaging client, where the payment request includes an identifier of a first object.
[0079] Specifically, the user of mobile payment (e.g., a user) triggers a target payment item through an instant messaging client. The target payment item may be, for example, a red envelope, a transfer, a face-to-face payment, or a commercial payment. Each payment may include placing an order, pulling up the cashier, paying, checking orders, closing orders, etc., and the user's location information must first be obtained. Then, routing is performed based on the location information, and the request is sent to the corresponding interface. The user of mobile payment (e.g., a first object, e.g., a user) triggers a target payment item through an instant messaging client. In response to the triggering operation, the instant messaging client sends a payment request to the payment server corresponding to the instant messaging client. After receiving the payment request sent by the instant messaging client, the payment server sends the payment request to the gateway server. The payment request includes the identifier of the first object.
[0080] Specifically, the payment processing method provided in this embodiment can be applied to mobile social payment business scenarios with large traffic. At the same time or in the same time period, the gateway server may receive multiple payment requests for different target payment items. At this time, the gateway server can process each payment request in sequence according to the reception time of the payment request S202-S204.
[0081] S202: Query the location information of the first object from the first storage unit of the gateway server according to the identifier of the first object.
[0082] Specifically, after receiving the payment request, the gateway server first queries the territorial information of the first object from the first storage unit of the gateway server. If the payment request is not the first payment request initiated by the first object, the first storage unit has stored the territorial information of the first object. The first storage unit stores the identifier of the first object and the territorial information of the first object. The gateway server can query the territorial information of the first object from the first storage unit based on the identifier of the first object. If the payment request is the first payment request initiated by the first object, the first storage unit does not store the territorial information of the first object, and the gateway server cannot query the territorial information of the first object from the first storage unit.
[0083] S203. If the location information of the first object is not found from the first storage unit, obtain the location information of the first object from the second storage unit of the mobile payment location server corresponding to the instant messaging client, and the second storage unit stores the location data of all objects stored in the current location server.
[0084] Specifically, the mobile payment territorial server is a new server built and deployed on the mobile payment side in the embodiment of the present application. The mobile payment territorial server is used to write, store and read territorial data (including the identification of each object and the territorial information of each object). The mobile payment territorial server can be deployed in multiple computer rooms. For example, computer room 1 and computer room 2 respectively deploy the first mobile payment territorial server and the second mobile payment territorial server. The territorial information of all current objects is fully stored in the first mobile payment territorial server and the second mobile payment territorial server. The first mobile payment territorial server and the second mobile payment territorial server can also update the stored territorial data.
[0085] As mentioned above, if the gateway server fails to query the territorial information of the first object from the first storage unit, it obtains the territorial information of the first object from the second storage unit of the mobile payment territorial server. The gateway server and the newly deployed mobile payment territorial server are both servers deployed on the mobile payment side. Therefore, when obtaining the territorial information, whether it is obtained from the first storage unit of the gateway server or from the second storage unit of the mobile payment territorial server, compared with obtaining it from the territorial server, the call link is shortened and the time for obtaining the territorial information is also shortened.
[0086] Optionally, as an implementable manner, in S203, obtaining the location information of the first object from the second storage unit of the mobile payment location server corresponding to the instant messaging client may be:
[0087] S2031. Send a query request to the mobile payment territorial server, so that the mobile payment territorial server queries the territorial information of the first object from the second storage unit according to the identifier of the first object carried in the query request, and obtains the territorial information of the first object from the territorial server if the territorial information of the first object is not found.
[0088] Specifically, the mobile payment local server has pre-stored local data for a first object, where the local data includes an object identifier and the object's local information. The storage process may include: receiving local data for all objects stored on the current local server from a local synchronization tool server; and writing the local data for all objects stored on the current local server into a second storage unit of the mobile payment local server. There may be one or more current local servers, each storing local data for a different object. For example, if there are two current local servers, the local synchronization tool server will send the local data stored by both local servers to the mobile payment local server, i.e., sending the local data for all objects stored on the current local server to the mobile payment local server, which will then write the data into the second storage unit. Optionally, when the local information changes, the stored local information may be updated. The mobile payment server's updating of the local information may include: the mobile payment local server receiving local information for a second object from a message queue server; and the mobile payment local server updating the local information for the second object stored in the local storage unit with the local information for the second object sent by the message queue server. For example, if the first mobile payment territorial server and the second mobile payment territorial server are deployed in computer room 1 and computer room 2 respectively, the two mobile payment territorial servers are updated synchronously when the territorial information is updated.
[0089] Among them, when the mobile payment territorial server fails to query the territorial information of the first object from the territorial storage unit, it obtains the territorial information of the first object from the territorial server. In this case, it may be that the first object is a new object and the first object does not belong to the objects in the full amount of objects stored in the current territorial server. Therefore, the mobile payment territorial server cannot query the territorial information of the first object from the territorial storage unit. At this time, it is necessary to obtain the territorial information of the first object from the territorial server. Specifically, the mobile payment server may send a query request to the territorial server, and the query request carries the identifier of the first object. After receiving the query request, the territorial server sends the territorial information of the first object to the mobile payment territorial server.
[0090] S2032: Receive the location information of the first object sent by the mobile payment location server.
[0091] Specifically, after receiving the first object's location information sent by the mobile payment location server, the gateway server may also write the first object's location information into the first storage unit, so that the first object's location information can be quickly obtained from the first storage unit the next time the first object makes a payment request. Accordingly, in one practicable manner, the method of this embodiment may further include:
[0092] S2033: Store the identifier of the first object and the territorial information of the first object in a first storage unit.
[0093] S204: Routing the first object to a corresponding payment processing server for payment processing according to the location information of the first object.
[0094] Specifically, after obtaining the location information of the first object, the gateway server routes the information to the corresponding payment processing server for payment processing. The payment processing server can handle payment services such as order placement, cashier pull, payment, order checking, and order closing. It is understood that there can be one or more payment processing servers. If there are multiple payment processing servers, each payment processing server can handle one payment service.
[0095] In an embodiment of the present application, when the gateway server receives a large number of payment requests for different target payment items at the same time or within the same time period, if the payment request is not a payment request initiated for the first time, the gateway server may query the territorial information from the first storage unit; if the payment request is a payment request initiated for the first time, the gateway server obtains the territorial information from the second storage unit of the mobile payment territorial server, thereby achieving diversion in the case of large traffic and improving the processing speed of payment services.
[0096] In an embodiment of the present application, the first storage unit has the following two implementable methods. Correspondingly, in S202, querying the territorial information of the first object from the first storage unit of the gateway server according to the identifier of the first object also has two implementable methods, which are described in detail below.
[0097] Optionally, in one practicable manner, the gateway server includes a proxy module and a first cache module, the first storage unit is the first cache module, and the second storage unit is the cache module of the mobile payment location server. In S202, based on the identifier of the first object, the location information of the first object is queried from the first storage unit of the gateway server, which may be specifically:
[0098] S2021. Query the location information of the first object from the first cache module according to the identifier of the first object.
[0099] Optionally, in another practicable manner, the first storage unit is a cache unit of a client provided by the mobile payment territorial server, and the second storage unit is a cache module of the mobile payment territorial server. In S202, the territorial information of the first object is queried from the first storage unit of the gateway server according to the identifier of the first object, which may be specifically:
[0100] S2021′: According to the identifier of the first object, query the location information of the first object from the cache unit of the client provided by the mobile payment location server.
[0101] In this embodiment, a client cache unit is added to the client provided by the mobile payment territorial server. When the gateway server calls through RPC, it compiles the client provided by the mobile payment territorial server into the gateway server's own module, and first queries the client's cache unit. If no query is found from the client's cache unit, it penetrates to the lower layer for query. If the lower layer query returns the territorial information of the first object, the territorial information of the first object is synchronously updated to the second storage unit of the mobile payment territorial server and the cache unit of the client. The next time a payment request for the first object is received, the territorial information of the first object can be queried from the client's cache unit with a high probability.
[0102] In this embodiment, the second storage unit of the mobile payment territorial server stores the territorial data of all objects stored in the current territorial server. Optionally, when the territorial information changes, the stored territorial information can also be updated. The update process is initiated by the gateway server, which is described in detail below in conjunction with S205-S208.
[0103] Optionally, the method of this embodiment may further include:
[0104] S205: Receive an information query request for the second object sent by the payment server, where the information query request carries an identifier of the second object.
[0105] Specifically, the information query request may be an object information query request. The object information may include account information, location information, and other information, and may also include other information, which is not limited in this embodiment.
[0106] S206: Send a location information query request for the second object to the mobile payment location server, where the location information query request carries the identifier of the second object, and receive the location information of the second object sent by the mobile payment location server.
[0107] S207: Send an information query request for the second object to the payment processing server, and receive the information of the second object sent by the payment processing server, where the information of the second object includes the location information of the second object.
[0108] Specifically, after receiving the second object information query request from the payment server, the gateway server sends a second object location information query request to the mobile payment location server and receives the second object location information from the mobile payment location server. Simultaneously, the gateway server sends a second object information query request to the payment processing server and receives the second object information from the payment processing server, the second object information including the second object location information.
[0109] S208. If it is determined that the territorial information of the second object sent by the mobile payment territorial server is different from the territorial information of the second object sent by the payment processing server, the territorial information of the second object sent by the mobile payment territorial server is sent to the message queue server, so that the message queue server updates the territorial information of the second object stored in at least one mobile payment territorial server to the territorial information of the second object sent by the payment processing server.
[0110] Specifically, if two mobile payment territorial servers are deployed, the message queue server updates the territorial data of the two mobile payment territorial servers. Specifically, the message queue server updates the territorial information of the second object stored in each mobile payment territorial server to the territorial information of the second object sent by the payment processing server.
[0111] The payment processing method provided in this embodiment is that when a gateway server receives a payment request including an identifier of a first object, it first queries the first object's location information from the first storage unit of the gateway server. If the location information of the first object is not found from the first storage unit, the location information of the first object is obtained from the second storage unit of the mobile payment location server corresponding to the instant messaging client. The second storage unit stores the location data of all objects stored in the current location server. Then, based on the location information of the first object, the location information is routed to the corresponding payment processing server for payment processing. By caching the location information required for each payment request in both the gateway server and the mobile payment location server, when a payment request is received, the location information can be first obtained from the local cache. If the location information is not in the local cache, it is obtained from the second storage unit of the mobile payment location server. This shortens the time for obtaining the location information and the length of the call link, improves the performance and availability of obtaining the location information, avoids strong dependence on the location server, avoids deploying a large number of machines on the location server, and reduces machine costs and maintenance costs.
[0112] Figure 4 This is a flow chart of a payment processing method provided in an embodiment of the present application. The execution subject of this embodiment may be a mobile payment local server corresponding to the instant messaging client, such as Figure 4 As shown, the method may include:
[0113] S301. Receive a query request sent by a gateway server corresponding to an instant messaging client, where the query request carries an identifier of a first object. The query request is sent by the gateway server when the gateway server receives a payment request for a target payment item sent by a payment server corresponding to the instant messaging client and fails to find the territorial information of the first object from a first storage unit of the gateway server based on the identifier of the first object carried in the payment request.
[0114] Specifically, the mobile payment territorial server is a new server built and deployed on the mobile payment side in the embodiment of the present application. The mobile payment territorial server is used to write, store and read territorial data (including the identification of each object and the territorial information of each object). The mobile payment territorial server can be deployed in multiple computer rooms. For example, computer room 1 and computer room 2 respectively deploy the first mobile payment territorial server and the second mobile payment territorial server. The territorial information of all current objects is fully stored in the first mobile payment territorial server and the second mobile payment territorial server. The first mobile payment territorial server and the second mobile payment territorial server can also update the stored territorial data.
[0115] After the gateway server receives a payment request for a target payment item from the payment server corresponding to the instant messaging client, it first queries the first object's territorial information from the first storage unit of the gateway server. If the payment request is not the first payment request initiated by the first object, the first storage unit has already stored the first object's territorial information. The first storage unit stores the first object's identifier and the first object's territorial information. The gateway server can query the first object's territorial information from the first storage unit based on the first object's identifier. If the payment request is the first payment request initiated by the first object, the first storage unit does not store the first object's territorial information, and the gateway server cannot query the first object's territorial information from the first storage unit. When the gateway server fails to query the first object's territorial information from the first storage unit of the gateway server, it sends a query request to the mobile payment territorial server, and the query request carries the first object's identifier.
[0116] S302. According to the identifier of the first object, obtain the location information of the first object from the second storage unit of the mobile payment location server, and the second storage unit stores the location data of all objects stored in the current location server.
[0117] Specifically, the mobile payment local server has previously stored local data of the first object in the second storage unit. The local data includes the object identifier and the local information of the object. The storage process may be as follows S304-S305:
[0118] S304: Receive the local data of all objects stored in the current local server sent by the local synchronization tool server.
[0119] S305: Write the local data of all objects stored in the current local server into the local storage unit of the mobile payment local server.
[0120] The current local server can be one or more, each storing local data for different objects. For example, if there are two current local servers, the local synchronization tool server will send the local data stored by the two local servers to the mobile payment local server. In other words, the local data of all objects stored by the current local server will be sent to the mobile payment local server, which will then write the local data to the local storage unit. Optionally, when the local information changes, the stored local information can also be updated. The mobile payment server's update process for local information can be as shown below, S306-S307:
[0121] S306: Receive the location information of the second object sent by the message queue server.
[0122] S307: Update the location information of the second object stored in the location storage unit to the location information of the second object sent by the message queue server. For example, if a first mobile payment location server and a second mobile payment location server are deployed in computer room 1 and computer room 2, respectively, the two mobile payment location servers will be updated synchronously when the location information is updated.
[0123] Optionally, as an implementable manner, in S302, according to the identifier of the first object, the location information of the first object is obtained from the second storage unit of the mobile payment location server, which may be:
[0124] S3021. Based on the identifier of the first object carried in the query request, query the territorial information of the first object from the second storage unit. If the territorial information of the first object is not found, query the territorial information of the first object from the territorial storage unit of the mobile payment territorial server. If the territorial information of the first object is not found, send a query request to the territorial server.
[0125] S3022: Receive the location information of the first object sent by the location server.
[0126] Among them, when the mobile payment territorial server fails to query the territorial information of the first object from the territorial storage unit, it obtains the territorial information of the first object from the territorial server. In this case, it may be that the first object is a new object and the first object does not belong to the objects in the full amount of objects stored in the current territorial server. Therefore, the mobile payment territorial server cannot query the territorial information of the first object from the territorial storage unit. At this time, it is necessary to obtain the territorial information of the first object from the territorial server. Specifically, the mobile payment server may send a query request to the territorial server, and the query request carries the identifier of the first object. After receiving the query request, the territorial server sends the territorial information of the first object to the mobile payment territorial server.
[0127] Optionally, in an practicable manner, after S3022, the following steps may be further included:
[0128] S3023: Store the identifier of the first object and the location information of the first object in the second storage unit of the mobile payment location server.
[0129] S3024: Store the identifier of the first object and the location information of the first object in a location storage unit.
[0130] Specifically, the second storage unit is a cache unit of the mobile payment territorial server, and the territorial storage unit is a storage unit of the mobile payment territorial server for storing territorial information. After receiving the territorial information of the first object sent by the territorial server, the mobile payment territorial server stores the territorial information of the first object in the second storage unit and the territorial storage unit, so that the next time a payment request for the first object is received, the territorial information of the first object can be quickly obtained from the second storage unit or the territorial storage unit.
[0131] S303: Send the location information of the first object to the gateway server, so that the gateway server can route the first object to a corresponding payment processing server for payment processing according to the location information of the first object.
[0132] Specifically, after obtaining the location information of the first object, the gateway server routes the information to the corresponding payment processing server for payment processing. The payment processing server can handle payment services such as order placement, cashier pull, payment, order checking, and order closing. It is understood that there can be one or more payment processing servers. If there are multiple payment processing servers, each payment processing server can handle one payment service.
[0133] In the embodiment of the present application, the first storage unit can be implemented in the following two ways:
[0134] Optionally, the gateway server includes a proxy module and a first cache module, the first storage unit is the first cache module, and the second storage unit is the cache module of the mobile payment local server; or,
[0135] The first storage unit is a cache unit of the client provided by the mobile payment local server, and the second storage unit is a cache module of the mobile payment local server.
[0136] In this embodiment, a client cache unit is added to the client provided by the mobile payment territorial server. When the gateway server calls through RPC, it compiles the client provided by the mobile payment territorial server into the gateway server's own module, and first queries the client's cache unit. If no query is found from the client's cache unit, it penetrates to the lower layer for query. If the lower layer query returns the territorial information of the first object, the territorial information of the first object is synchronously updated to the second storage unit of the mobile payment territorial server and the cache unit of the client. The next time a payment request for the first object is received, the territorial information of the first object can be queried from the client's cache unit with a high probability.
[0137] The payment processing method provided in this embodiment caches the local information required for each payment request in both the gateway server and the mobile payment local server. Therefore, when a payment request is received, the local information can be first obtained from the local cache. If the local cache does not contain the local information, the local information is obtained from the second storage unit of the mobile payment local server. This shortens the time for obtaining the local information and the length of the call link, improves the performance and availability of obtaining the local information, avoids strong dependence on the local server, avoids deploying a large number of machines on the local server, and reduces machine costs and maintenance costs.
[0138] The payment processing method provided in the embodiment of the present application is described in detail below with reference to a specific embodiment.
[0139] Figure 5 An interactive flow chart of a payment processing method provided in an embodiment of the present application, such as Figure 5 As shown, the execution entities involved in this embodiment are the gateway server corresponding to the instant messaging client and the mobile payment local server, such as Figure 5 As shown, the method of this embodiment may include:
[0140] S401. The mobile payment local server receives local data of all objects stored in the current local server from the local synchronization tool server.
[0141] S402: The mobile payment local server writes the local data of all objects currently stored in the local server into the local storage unit of the mobile payment local server.
[0142] Among them, the current local server can be one or more, and each local server stores local data of different objects. For example, if there are two current local servers, the local synchronization tool server will send the local data stored in the two local servers to the mobile payment local server, that is, the local data of all objects stored in the current local server will be sent to the mobile payment local server, and the mobile payment local server will write it into the local storage unit.
[0143] Figure 6 A schematic diagram of a local data storage provided in an embodiment of the present application is shown as follows: Figure 6 As shown, a mobile payment local server is deployed in the computer room of City A, and a mobile payment local server is also deployed in the computer room of City B. Both mobile payment local servers have local storage units for storing local data. Specifically, the local synchronization tool server can obtain the local data of all objects stored on the current local server from the payment processing server. The local synchronization tool server then sends the local data of all objects stored on the current local server to the two mobile payment local servers. The two mobile payment local servers then write the local data of all objects stored on the current local server into the local storage units of the mobile payment local servers.
[0144] S403: The mobile payment local server updates the stored local data.
[0145] In this embodiment, when the territorial information changes, the stored territorial data can also be updated. Figure 7 Describe the detailed process of updating territorial information. Figure 7 A flowchart of a territorial data update process provided in an embodiment of the present application is as follows: Figure 7 As shown, the updating process may include S4031-S4036.
[0146] S4031. The gateway server receives an information query request for a second object sent by the payment server. The information query request carries an identifier of the second object.
[0147] Specifically, the information query request may be an object information query request. The object information may include account information, location information, and other information, and may also include other information, which is not limited in this embodiment.
[0148] S4032. The gateway server sends a location information query request for the second object to the mobile payment location server, where the location information query request carries the identifier of the second object, and receives the location information of the second object sent by the mobile payment location server.
[0149] S4033. The gateway server sends an information query request for the second object to the payment processing server, and receives the information of the second object sent by the payment processing server, where the information of the second object includes the territorial information of the second object.
[0150] S4034. If the gateway server determines that the territorial information of the second object sent by the mobile payment territorial server is different from the territorial information of the second object sent by the payment processing server, the gateway server sends the territorial information of the second object sent by the mobile payment territorial server to the message queue server.
[0151] S4035. The message queue server sends the location information of the second object to the mobile payment location server.
[0152] S4036: The mobile payment local server updates the local information of the second object stored in the local storage unit to the local information of the second object sent by the message queue server.
[0153] Specifically, for example, if the first mobile payment territorial server and the second mobile payment territorial server are deployed in computer room 1 and computer room 2 respectively, the two mobile payment territorial servers are updated synchronously when the territorial information is updated.
[0154] S404: The gateway server receives a payment request for a target payment item sent by a payment server corresponding to the instant messaging client, where the payment request includes an identifier of the first object.
[0155] Specifically, the user of mobile payment (e.g., a user) triggers a target payment item through an instant messaging client. The target payment item may be, for example, a red envelope, a transfer, a face-to-face payment, or a commercial payment. Each payment may include placing an order, pulling up the cashier, paying, checking orders, closing orders, etc., and the user's location information must first be obtained. Then, routing is performed based on the location information, and the request is sent to the corresponding interface. The user of mobile payment (e.g., a first object, e.g., a user) triggers a target payment item through an instant messaging client. In response to the triggering operation, the instant messaging client sends a payment request to the payment server corresponding to the instant messaging client. After receiving the payment request sent by the instant messaging client, the payment server sends the payment request to the gateway server. The payment request includes the identifier of the first object.
[0156] S405: The gateway server queries the first object's location information from the first storage unit of the gateway server according to the identifier of the first object.
[0157] S406: If the gateway server fails to find the location information of the first object from the first storage unit, the gateway server sends a query request to the mobile payment location server, where the query request carries the identifier of the first object.
[0158] S407. The mobile payment local server queries the local information of the first object from the second storage unit according to the identifier of the first object carried in the query request. The second storage unit stores the local data of all objects currently stored in the local server.
[0159] S408: When the mobile payment local server fails to find the local information of the first object from the second storage unit, the mobile payment local server searches for the local information of the first object from the local storage unit of the mobile payment local server.
[0160] S409: When the mobile payment local server fails to find the local information of the first object from the local storage unit, it sends a query request to the local server.
[0161] S410: The mobile payment local server receives local information of the first object sent by the local server.
[0162] S411. The mobile payment territorial server sends the territorial information of the first object to the gateway server.
[0163] S412: The gateway server routes the first object to a corresponding payment processing server for payment processing based on the location information of the first object.
[0164] Specifically, after obtaining the location information of the first object, the gateway server routes the information to the corresponding payment processing server for payment processing. The payment processing server can handle payment services such as order placement, cashier pull, payment, order checking, and order closing. It is understood that there can be one or more payment processing servers. If there are multiple payment processing servers, each payment processing server can handle one payment service.
[0165] Optionally, the method of this embodiment may further include:
[0166] S413: The mobile payment local server stores the identifier of the first object and the local information of the first object in a second storage unit of the mobile payment local server.
[0167] S414: The mobile payment local server stores the identifier of the first object and the local information of the first object in a local storage unit.
[0168] S415: The gateway server stores the identifier of the first object and the location information of the first object in the first storage unit.
[0169] Specifically, the second storage unit is a cache unit of the mobile payment territorial server, and the territorial storage unit is a storage unit of the mobile payment territorial server for storing territorial information. After receiving the territorial information of the first object sent by the territorial server, the mobile payment territorial server stores the territorial information of the first object in the second storage unit and the territorial storage unit, so that the next time a payment request for the first object is received, the territorial information of the first object can be quickly obtained from the second storage unit or the territorial storage unit.
[0170] In the embodiment of the present application, the first storage unit can be implemented in two ways:
[0171] Method 1: The gateway server includes a proxy module and a first cache module, the first storage unit is the first cache module, and the second storage unit is the cache module of the mobile payment local server.
[0172] Method 2: The first storage unit is a cache unit of the client provided by the mobile payment local server, and the second storage unit is a cache module of the mobile payment local server.
[0173] The payment processing method provided in this embodiment caches the local information required for each payment request in both the gateway server and the mobile payment local server. Therefore, when a payment request is received, the local information can be first obtained from the local cache. If the local cache does not contain the local information, the local information is obtained from the second storage unit of the mobile payment local server. This shortens the time for obtaining the local information and the length of the call link, improves the performance and availability of obtaining the local information, avoids strong dependence on the local server, avoids deploying a large number of machines on the local server, and reduces machine costs and maintenance costs.
[0174] The following combination Figure 8 and Figure 9 Describe the payment processing process in detail.
[0175] Figure 8 A flow chart of a payment processing method provided in an embodiment of the present application, in this embodiment, the first storage unit is a first cache module, the second storage unit is a cache module of a mobile payment local server, such as Figure 8 As shown, the method of this embodiment may include:
[0176] S501: The payment server corresponding to the instant messaging client sends a payment request for a target payment item to the proxy module of the gateway server, where the payment request includes an identifier of a first object.
[0177] S502: The proxy module of the gateway server queries the first cache module of the gateway server for the location information of the first object according to the identifier of the first object.
[0178] S503: If the proxy module of the gateway server fails to find the location information of the first object from the first cache module, it sends a query request to the mobile payment location server, where the query request carries the identifier of the first object.
[0179] Specifically, the mobile payment local server includes a local service module and a cache module.
[0180] S504: The local service module of the mobile payment local server queries the local information of the first object from the cache module of the mobile payment local server according to the identifier of the first object.
[0181] S505: If the local service module of the mobile payment local server fails to find the local information of the first object from the cache module, the local service module of the mobile payment local server searches for the local information of the first object from the local storage unit of the mobile payment local server.
[0182] S506: If the local service module of the mobile payment local server fails to find the local information of the first object from the local storage unit, it sends a query request to the local server.
[0183] S507: The local service module of the mobile payment local server receives the local information of the first object sent by the local server.
[0184] S508: The local service module of the mobile payment local server stores the identifier of the first object and the local information of the first object in the local storage unit.
[0185] S509: The local service module of the mobile payment local server stores the identifier of the first object and the local information of the first object in a cache module, referred to as local information storage.
[0186] S510: The local service module of the mobile payment local server sends the local information of the first object to the gateway server.
[0187] S511. The gateway server routes the first object to the corresponding payment processing server for payment processing according to the location information of the first object.
[0188] S512: The gateway server stores the identifier of the first object and the location information of the first object in a first cache module, referred to as location information storage.
[0189] In this embodiment, for a payment request from a first party, the process for obtaining the first party's local information is sequentially: the first cache module of the gateway server, the cache module of the mobile payment local server, the local storage unit of the mobile payment local server, the local server, and finally the local server. Through multi-level caching, for example, the number of query requests from the first cache module of the gateway server to 90 million per minute can be reduced to 150,000 per minute at the local server. This avoids a strong reliance on the local server and the deployment of a large number of machines on the local server, reducing machine and maintenance costs. Traffic diversion can also be achieved in high-traffic situations, improving the processing speed of payment services.
[0190] Figure 9 A flow chart of a payment processing method provided in an embodiment of the present application. In this embodiment, the first storage unit is a cache unit of the client provided by the mobile payment local server, and the second storage unit is a cache module of the mobile payment local server. Figure 9 As shown, the method of this embodiment may include:
[0191] S601: The payment server corresponding to the instant messaging client sends a payment request for a target payment item to the proxy module of the gateway server, where the payment request includes an identifier of a first object.
[0192] S602: The proxy module of the gateway server queries the location information of the first object from the cache unit of the client provided by the mobile payment location server according to the identifier of the first object.
[0193] S603: If the proxy module of the gateway server fails to find the location information of the first object from the cache unit of the client, it sends a query request to the mobile payment location server, where the query request carries the identifier of the first object.
[0194] Specifically, the mobile payment local server includes a mobile payment local server service end and a cache module.
[0195] S604: The server of the mobile payment local server queries the local information of the first object from the cache module of the mobile payment local server according to the identifier of the first object.
[0196] S605: If the server of the mobile payment local server fails to find the local information of the first object from the cache module, the server queries the local storage unit of the mobile payment local server for the local information of the first object.
[0197] S606: If the service end of the mobile payment local server fails to find the local information of the first object from the local storage unit, it sends a query request to the local server.
[0198] S607: The server of the mobile payment local server receives the local information of the first object sent by the local server.
[0199] S608: The server of the mobile payment local server stores the identifier of the first object and the local information of the first object in the local storage unit.
[0200] S609: The server of the mobile payment location server stores the identifier of the first object and the location information of the first object in the cache module.
[0201] S610: The server of the mobile payment territorial server sends the territorial information of the first object to the gateway server.
[0202] S611. The gateway server routes the first object to the corresponding payment processing server for payment processing according to the location information of the first object.
[0203] S612: The gateway server stores the identifier of the first object and the location information of the first object in a cache unit of the client provided by the mobile payment location server.
[0204] In this embodiment, the client cache unit provided by the mobile payment local server is a shared memory, which can be used by most calls. It is based on component multi-level hash implementation, the cache logic expiration time is 60s, and the physical expiration time is theoretically permanent.
[0205] In this embodiment, for a payment request of a first object, the process of obtaining the first object's location information is sequentially: the client's cache unit provided by the mobile payment location server, the cache module of the mobile payment location server, the location storage unit of the mobile payment location server, the location server, and finally the location server. Through multi-level caching, for example, the number of query requests from the client's cache unit provided by the mobile payment location server can be reduced to 150,000 per minute for the location server. This avoids a strong reliance on the location server and the deployment of a large number of machines on the location server, reducing machine and maintenance costs. Traffic diversion can also be achieved in high-traffic situations, improving the processing speed of payment services.
[0206] The preferred embodiments of the present application are described in detail above in conjunction with the accompanying drawings. However, the present application is not limited to the specific details in the above embodiments. Within the technical concept of the present application, a variety of simple modifications can be made to the technical solution of the present application, and these simple modifications all fall within the scope of protection of the present application. For example, the various specific technical features described in the above specific embodiments can be combined in any suitable manner unless there is any contradiction. In order to avoid unnecessary repetition, the present application will not further explain various possible combinations. For another example, the various different embodiments of the present application can also be arbitrarily combined, and as long as they do not violate the ideas of the present application, they should also be regarded as the contents disclosed in the present application.
[0207] It should also be understood that in the various method embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0208] The above describes the method provided in the embodiment of the present application. The following describes the payment processing device provided in the embodiment of the present application.
[0209] Figure 10 A schematic diagram of a payment processing device provided in an embodiment of the present application is shown in FIG. Figure 10 As shown, the device may include: a receiving module 11, an acquiring module 12 and a processing module 13.
[0210] The receiving module 11 is configured to receive a payment request for a target payment item sent by a payment server corresponding to the instant messaging client, wherein the payment request includes an identifier of the first object;
[0211] The acquisition module 12 is configured to query the location information of the first object from the first storage unit of the gateway server based on the identifier of the first object; if the location information of the first object is not found from the first storage unit, the acquisition module 12 is configured to obtain the location information of the first object from the second storage unit of the mobile payment location server corresponding to the instant messaging client, where the second storage unit stores the location data of all objects currently stored on the location server;
[0212] The processing module 13 is used to route the first object to a corresponding payment processing server for payment processing according to the location information of the first object.
[0213] In one embodiment, the acquisition module 12 is configured to: send a query request to the payment location server, so that the payment location server queries the location information of the first object from the second storage unit based on the identifier of the first object carried in the query request, and if the location information of the first object is not found, obtain the location information of the first object from the location server;
[0214] Receive the location information of the first object sent by the payment location server.
[0215] In one embodiment, the processing module 13 is further configured to store the identifier of the first object and the territorial information of the first object in the first storage unit.
[0216] In one embodiment, the gateway server includes a proxy module and a first cache module, the first storage unit is the first cache module, the second storage unit is the cache module of the mobile payment territorial server, and the acquisition module 12 is specifically used to: query the territorial information of the first object from the first cache module according to the identifier of the first object.
[0217] In one embodiment, the first storage unit is a cache unit of the client provided by the mobile payment territorial server, and the second storage unit is a cache module of the mobile payment territorial server. The acquisition module 12 is specifically used to: query the territorial information of the first object from the cache unit of the client provided by the mobile payment territorial server according to the identifier of the first object.
[0218] In one embodiment, the processing module 13 is further configured to compile the cache unit of the client provided by the mobile payment local server into the first storage unit through a remote procedure call.
[0219] In one embodiment, the receiving module 11 is further configured to: receive an information query request for the second object, the information query request carrying an identifier of the second object;
[0220] The apparatus of this embodiment may further include a sending module, the sending module being configured to:
[0221] Sending a location information query request for the second object to the mobile payment location server, the location information query request carrying the identifier of the second object, and receiving the location information of the second object sent by the mobile payment location server;
[0222] Sending an information query request for the second object to the payment processing server, and receiving information about the second object sent by the payment processing server, where the information about the second object includes location information of the second object;
[0223] If it is determined that the territorial information of the second object sent by the mobile payment territorial server is different from the territorial information of the second object sent by the payment processing server, the territorial information of the second object sent by the mobile payment territorial server is sent to the message queue server, so that the message queue server updates the territorial information of the second object stored in at least one mobile payment territorial server to the territorial information of the second object sent by the payment processing server.
[0224] Figure 11 A schematic diagram of a payment processing device provided in an embodiment of the present application is shown in FIG. Figure 11As shown, the device includes: a receiving module 21, a processing module 22 and a sending module 23.
[0225] The receiving module 21 is configured to receive a query request sent by a gateway server corresponding to the instant messaging client, the query request carrying an identifier of the first object. The query request is sent by the gateway server after receiving a payment request for a target payment item sent by a payment server corresponding to the instant messaging client, based on the identifier of the first object carried in the payment request, when the gateway server fails to find the location information of the first object from the first storage unit of the gateway server.
[0226] The processing module 22 is configured to obtain the location information of the first object from the second storage unit of the mobile payment location server according to the identifier of the first object, where the second storage unit stores the location data of all objects currently stored in the location server;
[0227] The sending module 23 is used to send the location information of the first object to the gateway server, so that the gateway server can route the first object to the corresponding payment processing server for payment processing according to the location information of the first object.
[0228] In one embodiment, the processing module 22 is configured to:
[0229] querying the location information of the first object from the second storage unit according to the identifier of the first object carried in the query request, and if the location information of the first object is not found, querying the location information of the first object from the second storage unit of the mobile payment location server, and if the location information of the first object is not found, sending a query request to the location server;
[0230] The receiving module 21 is further configured to receive the location information of the first object sent by the location server.
[0231] In one embodiment, the processing module 22 is further configured to: store the identifier of the first object and the location information of the first object in a second storage unit of the mobile payment location server;
[0232] The identifier of the first object and the location information of the first object are stored in the location storage unit.
[0233] In one embodiment, the gateway server includes a proxy module and a first cache module, the first storage unit is the first cache module, and the second storage unit is the cache module of the mobile payment local server; or,
[0234] The first storage unit is a cache unit of the client provided by the mobile payment local server, and the second storage unit is a cache module of the mobile payment local server.
[0235] In one embodiment, the receiving module 21 is further configured to: receive the local data of all objects stored in the current local server, sent by the local synchronization tool server;
[0236] The processing module 22 is further configured to write the local data of all objects stored in the current local server into the second storage unit of the mobile payment local server.
[0237] In one embodiment, the receiving module 21 is further configured to: receive the location information of the second object sent by the message queue server;
[0238] The processing module 22 is further configured to update the location information of the second object stored in the location storage unit to the location information of the second object sent by the message queue server.
[0239] It should be understood that the device embodiment and the method embodiment may correspond to each other, and similar descriptions may refer to the method embodiment. To avoid repetition, they will not be described here. Specifically, Figure 10 The device shown can execute the method embodiment corresponding to the gateway server, Figure 11 The device shown can execute the method embodiment corresponding to the mobile payment territorial server, and the aforementioned and other operations and / or functions of each module in the device are respectively for implementing the corresponding processes in the above-mentioned methods. For the sake of brevity, they will not be repeated here.
[0240] The apparatus of the embodiment of the present application is described above from the perspective of functional modules in conjunction with the accompanying drawings. It should be understood that the functional module can be implemented in hardware form, can be implemented by instructions in software form, or can be implemented by a combination of hardware and software modules. Specifically, the steps of the method embodiment in the embodiment of the present application can be completed by the hardware integrated logic circuit and / or software form instructions in the processor, and the steps of the method disclosed in the embodiment of the present application can be directly embodied as being executed by a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. Optionally, the software module can be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps in the above method embodiment in conjunction with its hardware.
[0241] Figure 12 1 is a schematic block diagram of a computer device provided in an embodiment of the present application. The computer device may be the aforementioned gateway server or mobile payment local server.
[0242] like Figure 12 As shown, the computer device may include:
[0243] The memory 710 and the processor 720 are configured to store computer programs and transmit the program code to the processor 720. In other words, the processor 720 can call and run the computer program from the memory 710 to implement the method in the embodiment of the present application.
[0244] For example, the processor 720 may be configured to execute the above method embodiments according to instructions in the computer program.
[0245] In some embodiments of the present application, the processor 720 may include but is not limited to:
[0246] General-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc.
[0247] In some embodiments of the present application, the memory 710 includes but is not limited to:
[0248] Volatile memory and / or non-volatile memory. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus random access memory (DR RAM).
[0249] In some embodiments of the present application, the computer program may be divided into one or more modules, which are stored in the memory 710 and executed by the processor 720 to implement the method provided by the present application. The one or more modules may be a series of computer program instruction segments capable of implementing specific functions, and the instruction segments are used to describe the execution process of the computer program in the computer device.
[0250] like Figure 12 As shown, the computer device may also include:
[0251] The transceiver 730 may be connected to the processor 720 or the memory 710 .
[0252] The processor 720 may control the transceiver 730 to communicate with other devices. Specifically, the processor 720 may send information or data to other devices or receive information or data sent by other devices. The transceiver 730 may include a transmitter and a receiver. The transceiver 730 may further include one or more antennas.
[0253] It should be understood that the various components in the computer device are connected via a bus system, wherein the bus system includes not only a data bus but also a power bus, a control bus and a status signal bus.
[0254] The present application also provides a computer storage medium having a computer program stored thereon, which, when executed by a computer, enables the computer to perform the method of the above-mentioned method embodiment. In other words, the present application also provides a computer program product containing instructions, which, when executed by a computer, enables the computer to perform the method of the above-mentioned method embodiment.
[0255] When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a digital video disc (DVD)), or a semiconductor medium (e.g., a solid state drive (SSD)).
[0256] Those skilled in the art will appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0257] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the modules is merely a logical function division. In actual implementation, there may be other division methods, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
[0258] Modules described as separate components may or may not be physically separate, and components displayed as modules may or may not be physical modules, i.e., they may be located in one place or distributed across multiple network elements. Some or all of the modules may be selected based on actual needs to achieve the purpose of the present embodiment. For example, the functional modules in the various embodiments of the present application may be integrated into a processing module, or each module may exist physically separately, or two or more modules may be integrated into a single module.
[0259] The above are only specific embodiments of the present application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. A payment processing method, characterized in that: The method is applied to a gateway server corresponding to an instant messaging client, and the method includes: receiving a payment request for a target payment item sent by a payment server corresponding to the instant messaging client, wherein the payment request includes an identifier of a first object; querying, from a first storage unit of the gateway server, the location information of the first object according to the identifier of the first object; If the location information of the first object is not found from the first storage unit, the location information of the first object is obtained from the second storage unit of the mobile payment location server corresponding to the instant messaging client, where the second storage unit stores the location data of all objects currently stored in the location server; According to the territorial information of the first object, the payment is routed to the corresponding payment processing server for payment processing.
2. The method according to claim 1, characterized in that The acquiring the location information of the first object from the second storage unit of the mobile payment location server corresponding to the instant messaging client includes: sending a query request to the mobile payment local server, so that the mobile payment local server queries the local information of the first object from the second storage unit according to the identifier of the first object carried in the query request, and if the local information of the first object is not found, obtaining the local information of the first object from the local server; Receive the location information of the first object sent by the mobile payment location server.
3. The method according to claim 2, characterized in that The method further comprises: The identifier of the first object and the location information of the first object are stored in the first storage unit.
4. The method according to claim 1, wherein The gateway server includes a proxy module and a first cache module, the first storage unit is the first cache module, and querying the first object's location information from the first storage unit of the gateway server according to the identifier of the first object includes: According to the identifier of the first object, the location information of the first object is queried from the first cache module.
5. The method according to claim 1, wherein The first storage unit is a cache unit of the client provided by the mobile payment location server, and querying the location information of the first object from the first storage unit of the gateway server according to the identifier of the first object includes: According to the identifier of the first object, the location information of the first object is queried from a cache unit of the client provided by the mobile payment location server.
6. The method according to claim 5, characterized in that The method further comprises: The cache unit of the client provided by the mobile payment local server is compiled into the first storage unit when a remote procedure call is made.
7. The method according to claim 1, characterized in that The method further comprises: receiving an information query request for a second object sent by the payment server, wherein the information query request carries an identifier of the second object; Sending a location information query request for the second object to the mobile payment location server, the location information query request carrying the identifier of the second object, and receiving the location information of the second object sent by the mobile payment location server; sending an information query request for the second object to the payment processing server, and receiving information about the second object sent by the payment processing server, the information about the second object including location information of the second object; If it is determined that the territorial information of the second object sent by the mobile payment territorial server is different from the territorial information of the second object sent by the payment processing server, the territorial information of the second object sent by the mobile payment territorial server is sent to the message queue server, so that the message queue server updates the territorial information of the second object stored in at least one of the mobile payment territorial servers to the territorial information of the second object sent by the payment processing server.
8. A payment processing method, characterized in that: The method is applied to a mobile payment local server corresponding to an instant messaging client, and the method includes: receiving a query request sent by a gateway server corresponding to the instant messaging client, the query request carrying an identifier of a first object, the query request being sent by the gateway server upon receiving a payment request for a target payment item sent by a payment server corresponding to the instant messaging client, and upon failing to find location information of the first object in a first storage unit of the gateway server based on the identifier of the first object carried in the payment request; According to the identifier of the first object, obtaining the location information of the first object from the second storage unit of the mobile payment location server, the second storage unit storing the location data of all objects currently stored in the location server; The location information of the first object is sent to the gateway server, so that the gateway server can route the first object to a corresponding payment processing server for payment processing according to the location information of the first object.
9. The method according to claim 8, characterized in that The acquiring, according to the identifier of the first object, the location information of the first object from the second storage unit of the mobile payment location server includes: querying the location information of the first object from the second storage unit according to the identifier of the first object carried in the query request, and if the location information of the first object is not found, querying the location information of the first object from the location storage unit of the mobile payment location server, and if the location information of the first object is not found, sending the query request to the location server; Receive the location information of the first object sent by the location server.
10. The method according to claim 9, characterized in that After receiving the location information of the first object sent by the location server, the method further includes: storing the identifier of the first object and the location information of the first object in a second storage unit of the mobile payment location server; The identifier of the first object and the location information of the first object are stored in the location storage unit.
11. The method according to any one of claims 8 to 10, characterized in that: The gateway server includes a proxy module and a first cache module, the first storage unit is the first cache module, and the second storage unit is the cache module of the mobile payment local server; or, The first storage unit is a cache unit of the client provided by the mobile payment local server, and the second storage unit is a cache module of the mobile payment local server.
12. The method according to any one of claims 8 to 10, characterized in that The method further comprises: Receiving the local data of all objects stored in the current local server from the local synchronization tool server; The local data of all objects stored in the current local server is written into the local storage unit of the mobile payment local server.
13. The method according to claim 12, characterized in that The method further comprises: receiving the location information of the second object sent by the message queue server; The location information of the second object stored in the location storage unit is updated to the location information of the second object sent by the message queue server.
14. A payment processing device, characterized in that: include: a receiving module, configured to receive a payment request for a target payment item sent by a payment server corresponding to the instant messaging client, wherein the payment request includes an identifier of the first object; an acquisition module, configured to query the location information of the first object from a first storage unit of a gateway server based on the identifier of the first object; if the location information of the first object is not found from the first storage unit, obtain the location information of the first object from a second storage unit of a mobile payment location server corresponding to the instant messaging client, where the second storage unit stores location data of all objects currently stored on the location server; The processing module is used to route the first object to a corresponding payment processing server for payment processing according to the location information of the first object.
15. A payment processing device, characterized in that: include: a receiving module, configured to receive a query request sent by a gateway server corresponding to an instant messaging client, the query request carrying an identifier of a first object, the query request being sent by the gateway server upon receiving a payment request for a target payment item sent by a payment server corresponding to the instant messaging client, and upon failing to find location information of the first object from a first storage unit of the gateway server based on the identifier of the first object carried in the payment request; a processing module, configured to obtain, based on the identifier of the first object, the location information of the first object from a second storage unit of the mobile payment location server, wherein the second storage unit stores the location data of all objects currently stored in the location server; The sending module is used to send the location information of the first object to the gateway server, so that the gateway server can route the location information of the first object to the corresponding payment processing server for payment processing.
16. A computer device, characterized in that: include: A processor and a memory, the memory being used to store a computer program, the processor being used to call and run the computer program stored in the memory to execute the method according to any one of claims 1 to 7 or 8 to 13.
17. A computer-readable storage medium, characterized in that Used to store a computer program, the computer program causing a computer to execute the method according to any one of claims 1 to 7 or 8 to 13.