Method, device, terminal and storage medium for updating status of resource transfer
By setting up a message queue in the resource transfer management platform and updating the resource transfer result message, the complexity of order status callbacks in the resource transfer system is solved, and the efficiency of resource transfer status updates is improved.
Patent Information
- Application Number
- CN202111447349.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-30
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2041-11-30
AI Technical Summary
In the resource transfer system, due to the different callback addresses corresponding to different orders during the order payment process, the payment interface is more complicated to implement order status callbacks and is less efficient.
By setting up a message queue in the resource transfer management platform and updating the message queue based on the resource transfer result message feedback from the resource transfer platform, the business platform can obtain the status of the resource transfer event message by querying the message queue, thereby updating the resource transfer status of the target service.
The process of resource transfer status update is simplified, the efficiency of resource transfer status update is improved, and the complex process of security authentication is avoided when performing state callbacks to different target services is required to perform security authentication based on their respective callback addresses.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a state updating method, device, terminal and storage medium for resource transfer. Background Art
[0002] Currently, in a system for resource transfer, for example, a system for order payment, order payment for a target business requires creating an order corresponding to the target business, and making order payment by calling a payment interface. After the order payment is completed, the payment interface needs to be called to send the order status to the callback address corresponding to the order.
[0003] According to the above solution, since different orders correspond to different callback addresses, the order status callback implementation of the payment interface is more complicated. The status of each order requires a different callback address, which leads to low efficiency of order status callback. Summary of the invention
[0004] The embodiment of the present application provides a method, device, terminal and storage medium for updating the state of resource transfer, which can improve the efficiency of updating the state of resource transfer. The technical solution is as follows:
[0005] In one aspect, a method for updating a state of resource transfer is provided, the method being executed by a resource transfer management platform, the method comprising:
[0006] receiving a service initiation notification sent by a service platform, wherein the service initiation notification is used to indicate initiation of a target service; and the target service corresponds to resource transfer;
[0007] Based on the service initiation notification, adding a resource transfer event message corresponding to the target service to a message queue;
[0008] Receiving a resource transfer result message sent by a resource transfer platform; the resource transfer result message is used to indicate whether the resource transfer of the target business is successful;
[0009] Based on the resource transfer result message, processing the resource transfer event message in the message queue;
[0010] The message queue is used to provide query services to the business platform, so that the business platform queries the message queue for the resource transfer event message and updates the resource transfer status of the target business based on the query result.
[0011] In a possible implementation manner, the resource transfer event message corresponds to a message attribute, and the message attribute is used to indicate the state of the target service before the resource transfer is successful.
[0012] In a possible implementation manner, the processing the resource transfer event message in the message queue based on the resource transfer result message includes:
[0013] In response to the resource transfer result message indicating that the resource transfer to the target service is successful, the resource transfer event message is removed from the message queue.
[0014] In a possible implementation, the method further includes:
[0015] Query the resource transfer event message;
[0016] In response to the query result of the resource transfer event message indicating that the resource transfer event message is removed, the service information of the target service is stored in the first database.
[0017] In a possible implementation manner, the receiving a service initiation notification sent by the service platform includes:
[0018] Receiving the service initiation notification sent by the service platform through the resource transfer interface;
[0019] The adding a resource transfer event message corresponding to the target service in a message queue based on the service initiation notification includes:
[0020] The resource transfer event message is added to the message queue based on the service initiation notification through the resource transfer interface.
[0021] In a possible implementation manner, the receiving a resource transfer result message sent by the resource transfer platform to the target service includes:
[0022] Receiving the resource transfer result message sent by the resource transfer platform through the resource transfer management service;
[0023] The processing of the resource transfer event message in the message queue based on the resource transfer result message includes:
[0024] The resource transfer event message in the message queue is processed based on the resource transfer result message through the resource transfer management service.
[0025] In one aspect, a method for updating a state of resource transfer is provided, the method being executed by a service platform, the method comprising:
[0026] Sending a service initiation notification to the resource transfer management platform, wherein the service initiation notification is used to indicate initiation of a target service; the target service corresponds to resource transfer;
[0027] Sending a resource transfer request to a resource transfer platform, wherein the resource transfer request is used to request resource transfer for the target business;
[0028] querying the message queue in the resource transfer management platform for a resource transfer event message corresponding to the target business; the resource transfer event message is a message added by the resource transfer management platform in the message queue based on the business initiation notification; the resource transfer result message is used to indicate whether the resource transfer of the target business is successful;
[0029] The resource transfer status of the target service is updated based on the query result.
[0030] In a possible implementation, the resource transfer result message corresponds to a message attribute, and the message attribute is used to indicate the state of the target service before the resource transfer is successful;
[0031] The updating of the resource transfer status of the target service based on the query result includes:
[0032] In response to the query result indicating that the resource transfer event message has not been removed, the message attribute included in the query result is used to set the resource transfer state of the target service.
[0033] In a possible implementation manner, updating the resource transfer status of the target service based on the query result includes:
[0034] In response to the query result indicating that the resource transfer event message is removed, the resource transfer status of the target service is updated to resource transfer success.
[0035] On the other hand, a state update device for resource transfer is provided, the device is used in a resource transfer management platform, and the device includes:
[0036] A notification receiving module, used to receive a service initiation notification sent by a service platform, wherein the service initiation notification is used to indicate the initiation of a target service; the target service corresponds to a resource transfer;
[0037] A message adding module, used for adding a resource transfer event message corresponding to the target service to a message queue based on the service initiation notification;
[0038] A message receiving module, used to receive a resource transfer result message sent by a resource transfer platform; the resource transfer result message is used to indicate whether the resource transfer to the target business is successful;
[0039] A message processing module, used for processing the resource transfer event message in the message queue based on the resource transfer result message;
[0040] The message queue is used to provide query services to the business platform, so that the business platform queries the message queue for the resource transfer event message and updates the resource transfer status of the target business based on the query result.
[0041] In a possible implementation manner, the resource transfer event message corresponds to a message attribute, and the message attribute is used to indicate the state of the target service before the resource transfer is successful.
[0042] In a possible implementation, the message processing module includes:
[0043] The message removal submodule is used to remove the resource transfer event message from the message queue in response to the resource transfer result message indicating that the resource transfer to the target service is successful.
[0044] In a possible implementation manner, the device further includes:
[0045] A message query module, used to query the resource transfer event message;
[0046] The information storage module is used to store the service information of the target service in a first database in response to a query result of the resource transfer event message indicating that the resource transfer event message is removed.
[0047] In a possible implementation, the notification receiving module includes:
[0048] A notification receiving submodule, used for receiving the service initiation notification sent by the service platform through a resource transfer interface;
[0049] The message adding module comprises:
[0050] The message adding submodule is used to add the resource transfer event message in the message queue based on the service initiation notification through the resource transfer interface.
[0051] In a possible implementation, the message receiving module includes:
[0052] A message receiving submodule, used for receiving the resource transfer result message sent by the resource transfer platform through the resource transfer management service;
[0053] The message processing module comprises:
[0054] The message processing submodule is used to process the resource transfer event message in the message queue based on the resource transfer result message through the resource transfer management service.
[0055] On the other hand, a state update device for resource transfer is provided, the device is used in a service platform, and the device includes:
[0056] A notification initiation module, used to send a service initiation notification to the resource transfer management platform, wherein the service initiation notification is used to indicate the initiation of a target service; the target service corresponds to resource transfer;
[0057] A request sending module, used to send a resource transfer request to the resource transfer platform, wherein the resource transfer request is used to request resource transfer for the target business;
[0058] A message query module, used to query the message queue in the resource transfer management platform for the resource transfer event message corresponding to the target business; the resource transfer event message is a message added by the resource transfer management platform in the message queue based on the business initiation notification; the resource transfer result message is used to indicate whether the resource transfer of the target business is successful;
[0059] The status update module is used to update the resource transfer status of the target business based on the query result.
[0060] In a possible implementation, the resource transfer result message corresponds to a message attribute, and the message attribute is used to indicate the state of the target service before the resource transfer is successful;
[0061] The state update module comprises:
[0062] The state setting submodule is used to set the message attribute included in the query result as the resource transfer state of the target service in response to the query result indicating that the resource transfer event message has not been removed.
[0063] In a possible implementation, the status update module includes:
[0064] The status update submodule is used to update the resource transfer status of the target service to a successful resource transfer in response to the query result indicating that the resource transfer event message is removed.
[0065] On the other hand, a computer device is provided, comprising a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the above-mentioned status update method for resource transfer.
[0066] On the other hand, a computer-readable storage medium is provided, in which at least one instruction, at least one program, a code set or an instruction set is stored, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement the above-mentioned status update method for resource transfer.
[0067] On the other hand, a computer program product or a computer program is provided, the computer program product or the computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the state update method for resource transfer provided in the above various optional implementations.
[0068] The technical solution provided by this application may have the following beneficial effects:
[0069] By setting up a message queue in the resource transfer management platform and updating the message queue based on the resource transfer result message fed back by the resource transfer platform, the business platform can obtain the status of each resource transfer event message by querying the message queue, thereby determining whether the target business has successfully transferred resources. The resource transfer status of the target business is updated in the above manner, so that the resource transfer status corresponding to different target businesses is stored in the same message queue, avoiding the complex process of security authentication based on the corresponding callback addresses when performing status callbacks for different target businesses, thereby simplifying the process of updating the resource transfer status, and further improving the efficiency of the status update of the resource transfer of the target business. BRIEF DESCRIPTION OF THE DRAWINGS
[0070] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0071] Figure 1 A schematic diagram showing a system architecture corresponding to a state update method for resource transfer shown in an exemplary embodiment of the present application;
[0072] Figure 2 A flow chart of a state update method for resource transfer shown in an exemplary embodiment of the present application is shown;
[0073] Figure 3 A flow chart of a state update method for resource transfer shown in an exemplary embodiment of the present application is shown;
[0074] Figure 4 A flow chart of a state update method for resource transfer shown in an exemplary embodiment of the present application is shown;
[0075] Figure 5 yes Figure 4 An architecture diagram of an order payment system involved in the illustrated embodiment;
[0076] Figure 6 A block diagram of a state updating device for resource transfer according to an exemplary embodiment of the present application is shown;
[0077] Figure 7 A block diagram of a state updating device for resource transfer according to an exemplary embodiment of the present application is shown;
[0078] Figure 8 is a structural block diagram of a computer device according to an exemplary embodiment;
[0079] Fig. 9 A structural block diagram of a computer device shown in an exemplary embodiment of the present application is shown. DETAILED DESCRIPTION
[0080] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0081] It should be understood that the "plurality" mentioned in this article refers to two or more. "And / or" describes the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects are in an "or" relationship.
[0082] An embodiment of the present application provides a status update method for resource transfer, which is used to improve the efficiency of status update during the resource transfer process. Figure 1 A schematic diagram showing a system architecture corresponding to a state update method for resource transfer provided by an exemplary embodiment of the present application is shown. Figure 1 As shown, the system includes a resource transfer management platform 110 , a business platform 120 and a resource transfer platform 130 .
[0083] The resource transfer management platform 110 may include a gateway, a server for resource transfer management, various interfaces, and open source message agent software for implementing a message queue protocol.
[0084] The server used for resource transfer management can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or 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, CDN (Content Delivery Network), and big data and artificial intelligence platforms. The server is used to execute events of resource transfer management, and the server includes a database or storage, which can be used to store parameters related to resource transfer event messages.
[0085] The business platform 120 may include a cloud gateway, business-related interfaces, and a server for determining resource transfer event results. In addition, the server includes a database or memory, which may store business-related parameters and resource transfer result message-related parameters.
[0086] The resource transfer platform 130 may include a server for performing resource transfer.
[0087] Optionally, the above platforms are connected via a gateway or an interface to implement the management of the complete resource transfer business and the process of updating the resource transfer result status.
[0088] Figure 2 A flowchart of a state update method for resource transfer shown in an exemplary embodiment of the present application is shown. The state update method for resource transfer can be executed by a resource transfer management platform, wherein the resource transfer management platform can be the resource transfer management platform 110 in the above system, such as Figure 2 As shown, the state update method for resource transfer may include the following steps:
[0089] Step 201: receiving a service initiation notification sent by a service platform, where the service initiation notification is used to indicate initiation of a target service; the target service corresponds to resource transfer.
[0090] In an embodiment of the present application, the resource transfer management platform receives a notification initiated by the business platform for executing the initiated target business.
[0091] In a possible implementation manner, relevant parameters corresponding to the target service are determined based on the content of the target service.
[0092] For example, when the target business is to initiate an appointment order for nucleic acid testing, the business platform first needs to obtain parameters related to the appointment of nucleic acid testing from the database in the business platform, generate a corresponding appointment notification for nucleic acid testing, and send a business initiation notification to the resource transfer management platform based on the appointment notification. When the target business is to initiate an appointment order for vaccines, the business platform first needs to obtain parameters related to vaccine appointments from the database in the business platform, generate a corresponding appointment notification for vaccines, and send a business initiation notification to the resource transfer management platform based on the appointment notification.
[0093] The service initiation notification sent by the service platform to the resource transfer management platform may be sent through a corresponding interface, and the resource transfer management platform receives the service initiation notification through a gateway.
[0094] Step 202: Based on the service initiation notification, a resource transfer event message corresponding to the target service is added to the message queue.
[0095] In an embodiment of the present application, after receiving the service initiation notification, the resource transfer management platform adds a resource transfer event message of the target service corresponding to the service initiation notification to the message queue.
[0096] In a possible implementation, in response to a resource transfer interface in a resource transfer management platform receiving a service initiation notification, a resource transfer event message corresponding to the service initiation notification is written into an open source message agent software for implementing a message queue protocol.
[0097] If there are other resource transfer event messages in the message queue, the written resource transfer event message may be added after the existing resource transfer event message.
[0098] Step 203: Receive a resource transfer result message sent by the resource transfer platform; the resource transfer result message is used to indicate whether the resource transfer to the target business is successful.
[0099] In an embodiment of the present application, when a user sends a resource transfer instruction to a resource transfer platform, the resource transfer platform executes a resource transfer event, and the resource transfer platform can determine whether the resource transfer is successfully achieved. The resource transfer platform can feedback the resource transfer result message to the resource transfer management platform, so that the resource transfer management platform determines whether the resource transfer of the target business is successful.
[0100] Step 204, based on the resource transfer result message, process the resource transfer event message in the message queue; wherein the message queue is used to provide query services to the business platform, so that the business platform queries the message queue for resource transfer event messages and updates the resource transfer status of the target business based on the query results.
[0101] In an embodiment of the present application, the resource transfer management platform determines whether the resource transfer of the target business is successful based on the received resource transfer result message, and processes the resource transfer event message corresponding to the target business in the message queue according to whether the resource transfer of the target business is successful.
[0102] The resource transfer event message may be processed by a status update or a removal operation.
[0103] To summarize, by setting up a message queue in the resource transfer management platform and updating the message queue based on the resource transfer result message fed back by the resource transfer platform, the business platform can obtain the status of each resource transfer event message by querying the message queue, thereby determining whether the target business has successfully transferred resources. The resource transfer status of the target business is updated in the above manner, so that the resource transfer status corresponding to different target businesses is stored in the same message queue, avoiding the complex process of security authentication based on the corresponding callback addresses when performing status callbacks for different target businesses, thereby simplifying the process of updating the resource transfer status, and further improving the efficiency of the status update of the resource transfer of the target business.
[0104] Figure 3 A flowchart of a state update method for resource transfer shown in an exemplary embodiment of the present application is shown. The state update method for resource transfer can be executed by a service platform, wherein the service platform can be the service platform 120 in the above system, such as Figure 3 As shown, the state update method for resource transfer may include the following steps:
[0105] Step 301, sending a service initiation notification to a resource transfer management platform, where the service initiation notification is used to indicate initiation of a target service; the target service corresponds to resource transfer.
[0106] Step 302: Send a resource transfer request to the resource transfer platform, where the resource transfer request is used to request resource transfer for the target business.
[0107] In an embodiment of the present application, after sending a service initiation notification corresponding to the target service to the resource transfer management platform, the service platform may send a resource transfer request for requesting resource transfer for the target service to the resource transfer platform.
[0108] In one possible implementation, the business platform queries the message queue in the resource transfer management platform for the resource transfer event message corresponding to the target business, and sends a resource transfer request to the resource transfer platform; or, in response to the terminal initiating the target business in the business platform receiving a specified operation from the user, sends a resource transfer request to the resource transfer platform.
[0109] Step 303, query the message queue in the resource transfer management platform for the resource transfer event message corresponding to the target business; the resource transfer event message is the message added to the message queue by the resource transfer management platform based on the business initiation notification; the resource transfer result message is used to indicate whether the resource transfer to the target business is successful.
[0110] In an embodiment of the present application, after the business platform sends a business initiation notification to the resource transfer management platform, the business platform may periodically query the message queue in the resource transfer management platform for the resource transfer event message corresponding to the target business, or the business platform may query the message queue in the resource transfer management platform for the resource transfer event message corresponding to the target business when receiving a specified operation.
[0111] That is to say, step 303 may be performed before step 302 or after step 302 .
[0112] Step 304: Update the resource transfer status of the target service based on the query result.
[0113] In an embodiment of the present application, the service platform determines the current resource transfer status of the target service based on the resource transfer event message queried from the message queue.
[0114] The resource transfer status includes the status of the target service when resource transfer is not performed and the status of the target service when resource transfer is performed.
[0115] To summarize, by setting up a message queue in the resource transfer management platform and updating the message queue based on the resource transfer result message fed back by the resource transfer platform, the business platform can obtain the status of each resource transfer event message by querying the message queue, thereby determining whether the target business has successfully transferred resources. The resource transfer status of the target business is updated in the above manner, so that the resource transfer status corresponding to different target businesses is stored in the same message queue, avoiding the complex process of security authentication based on the corresponding callback addresses when performing status callbacks for different target businesses, thereby simplifying the process of updating the resource transfer status, and further improving the efficiency of the status update of the resource transfer of the target business.
[0116] Illustratively, the status update method for resource transfer provided in the embodiments of the present application can be applied to and is not limited to scenarios in which users initiate and pay for orders. For example, a user initiates a corresponding order in the application of the target business. When it is found that the order has been successfully created, the user initiates a payment instruction corresponding to the order. After completing the payment of the order, the payment status of the order corresponding to the target business can be queried in the application of the target business, that is, feedback information indicating that the payment is completed or feedback information indicating that the payment has failed is received.
[0117] Figure 4 A flowchart of a state update method for resource transfer provided by an exemplary embodiment of the present application is shown. The method can be interactively executed by a business platform and a resource management platform, such as Figure 4 As shown, the state update method for resource transfer may include the following steps:
[0118] Step 401: The service platform sends a service initiation notification to the resource transfer management platform.
[0119] In an embodiment of the present application, the service platform sends a service initiation notification corresponding to the target service to the resource transfer management platform.
[0120] The service initiation notification is used to indicate the initiation of a target service; the target service corresponds to resource transfer.
[0121] Exemplarily, the business platform is a platform for providing health services, on which health service-related services such as full-body physical examination appointments, special physical examination appointments, and vaccine appointments can be initiated. Users can initiate the target service on the client and send the service initiation notification to the resource transfer management platform.
[0122] Step 402: The resource transfer management platform receives a service initiation notification sent by the service platform.
[0123] In the embodiment of the present application, the resource transfer management platform receives a service initiation notification corresponding to one or more target services sent by the service platform.
[0124] In a possible implementation, the resource transfer management platform receives the service initiation notification sent by the service platform through the resource transfer interface.
[0125] The resource transfer management platform may be a platform for order management, and the resource transfer management platform may transmit information with the business platform via a gateway and a resource transfer interface.
[0126] Exemplarily, when the business platform is a health service platform, the target business selected by the user is to make an appointment for a special physical examination, and the resource transfer management platform can receive an order initiation notification for making an appointment for a special physical examination.
[0127] Step 403: The resource transfer management platform adds a resource transfer event message corresponding to the target service to the message queue based on the service initiation notification.
[0128] In an embodiment of the present application, the resource transfer management platform can determine the target business corresponding to the business initiation notification based on the received business initiation notification, and add a resource transfer event message corresponding to the target business to the message queue in the resource transfer management platform.
[0129] In a possible implementation, a resource transfer event message is added to a message queue based on a service initiation notification through a resource transfer interface.
[0130] The resource transfer management platform forwards the service initiation notification to the resource transfer interface through the network, determines the corresponding target service, and writes the resource transfer event message corresponding to the target service into the message queue.
[0131] In a possible implementation, the resource transfer event message corresponds to a message attribute, and the message attribute is used to indicate the state of the target service before the resource transfer is successful.
[0132] Among them, the status of the target business before the successful resource transfer includes the status of being booked, the status of successfully booked and waiting for payment, the status of failed booked, etc.
[0133] That is, when the resource transfer event message generated by the resource transfer management platform based on the service initiation notification includes relevant parameters of the resource transfer event corresponding to the target service.
[0134] For example, if the received message is a service for booking a special physical examination, a service order for booking a special physical examination is added to the message queue, and the status corresponding to the order is booking in progress.
[0135] Step 404: The business platform sends a resource transfer request to the resource transfer platform.
[0136] In an embodiment of the present application, when the service platform determines that the target service supports a resource transfer event by querying a message queue, the service platform may send a resource transfer request to the resource transfer platform.
[0137] The resource transfer request is used to request resource transfer for a target service.
[0138] In one possible implementation, the business platform queries the status corresponding to the resource transfer event message in the message queue, and after determining that the resource transfer event message indicates that the target business supports resource transfer, a trigger control for sending a resource transfer request is displayed on the client in the business platform. In response to receiving a trigger operation from the user, a resource transfer request is sent to the resource transfer platform, and the resource transfer platform performs resource transfer using relevant parameters in the resource transfer event message.
[0139] Exemplarily, after the health service platform queries the message queue and finds that the status corresponding to the special physical examination appointment event is a successful appointment pending payment status, a trigger control for paying the special physical examination order can be displayed on the client in the health service platform. In response to receiving the user's trigger operation, a payment request can be sent to the official UnionPay service platform. The official UnionPay service platform deducts the corresponding amount based on the relevant parameters in the special physical examination order.
[0140] Step 405: The resource transfer management platform receives the resource transfer result message sent by the resource transfer platform.
[0141] In an embodiment of the present application, after the resource transfer platform performs a resource transfer operation, a corresponding resource transfer result message is sent to the resource transfer management platform.
[0142] The resource transfer result message is used to indicate whether the resource transfer to the target service is successful.
[0143] In a possible implementation manner, a resource transfer result message sent by a resource transfer platform is received through a resource transfer management service.
[0144] The resource transfer result message is generated by the resource transfer platform and sent to the resource transfer management service in the resource transfer management platform through the resource transfer interface for analysis to determine whether the resource transfer result to the target business indicated by the resource transfer result message is successful or failed.
[0145] For example, in actual applications, there are many situations where payment fails, that is, the user initiates a payment operation, and the order payment fails due to subjective or objective reasons. When the order payment fails, the resource transfer result of the target business indicated by the resource transfer result message is failure, and when the order payment is successful, the resource transfer result of the target business indicated by the resource transfer result message is success.
[0146] Step 406: The resource transfer management platform processes the resource transfer event message in the message queue based on the resource transfer result message.
[0147] In an embodiment of the present application, the resource transfer management service in the resource transfer management platform analyzes the resource transfer result message, and processes the resource transfer event message in the message queue based on the analysis result.
[0148] The message queue is used to provide query services to the business platform, so that the business platform queries the message queue for the resource transfer event message and updates the resource transfer status of the target business based on the query result.
[0149] In a possible implementation, in response to the resource transfer result message indicating that the resource transfer to the target service is successful, the resource transfer event message is removed from the message queue.
[0150] In a possible implementation manner, the resource transfer event message in the message queue is processed based on the resource transfer result message through the resource transfer management service.
[0151] When the resource transfer result message indicates that the resource transfer to the target business fails, the message attribute of the corresponding resource transfer event message in the message queue may be modified to a payment failure state.
[0152] Step 407: The resource transfer management platform queries the resource transfer event message, and in response to the query result of the resource transfer event message indicating that the resource transfer event message is removed, stores the service information of the target service in the first database.
[0153] In an embodiment of the present application, the resource transfer management platform may periodically query the resource transfer event messages in the message queue. In response to the lack of a certain resource transfer event message in the messages in the current message queue queried compared to the messages in the message queue queried last time, the removed message is stored in the first database in the resource transfer management platform, so as to facilitate the resource transfer management platform to count the target business that has completed the resource transfer.
[0154] In a possible implementation, the first database also includes setting parameters related to resource transfer. Developers edit the relevant parameters of resource transfer through a designated interface and store them in the first database.
[0155] Step 408: The service platform queries the message queue in the resource transfer management platform for a resource transfer event message corresponding to the target service.
[0156] In an embodiment of the present application, the business platform may query the message queue in the resource transfer management platform for the resource transfer event message corresponding to the target business periodically or upon receiving a specified operation, and obtain the current corresponding message attributes.
[0157] The resource transfer event message is a message added to the message queue by the resource transfer management platform based on the service initiation notification.
[0158] Step 409: The service platform updates the resource transfer status of the target service based on the query result.
[0159] In the embodiment of the present application, the service platform may update the resource transfer status of the target service stored in the service platform based on the message attributes of the resource transfer event message corresponding to each queried target service.
[0160] In a possible implementation, in response to the query result indicating that the resource transfer event message has not been removed, the message attribute included in the query result is set to the resource transfer state of the target service. In response to the query result indicating that the resource transfer event message has been removed, the resource transfer state of the target service is updated to resource transfer success.
[0161] For example, Figure 5 This is an order payment system architecture diagram involved in the embodiment of this application. Figure 5 As shown, the business platform 50 includes a business interface 501, a cloud gateway 502, an order status listener 503, a database 504, a write-off confirmation service 505, and a background service 506. The resource transfer management service 51 includes a designated gateway 511, an open source message software 512, a status listener 513, a management webpage or interface 514, a strategy interface 515, a payment interface 516, a payment service 517, and a first database 518. The resource transfer platform includes the UnionPay official service 53. Among them, the third-party program can call the business interface 501 through the cloud gateway 502 to send a business initiation notification to the resource transfer management platform 51. The business initiation notification is generated by the designated gateway 511, calling the payment interface 516 to generate a resource transfer event message and write it into the open source message software 512. The open source message software 512 is used to implement a message queue. The order status listener 503 and the write-off confirmation service 505 can determine the status of the target business by querying the open source message software 512, and update the status. The third-party program can call the third-party program interface to initiate a resource transfer request to the UnionPay official service 53. The UnionPay official service 53 will feed back the resource transfer result to the resource transfer management platform 51 through the designated gateway 511, and update the status of the resource transfer event message in the open source message software, that is, the message queue, and remove the payment completed message. The policy interface 515 is used to control the risk of the order, and the management webpage or interface 514 is used to configure the relevant parameters of the order.
[0162] To summarize, by setting up a message queue in the resource transfer management platform and updating the message queue based on the resource transfer result message fed back by the resource transfer platform, the business platform can obtain the status of each resource transfer event message by querying the message queue, thereby determining whether the target business has successfully transferred resources. The resource transfer status of the target business is updated in the above manner, so that the resource transfer status corresponding to different target businesses is stored in the same message queue, avoiding the complex process of security authentication based on the corresponding callback addresses when performing status callbacks for different target businesses, thereby simplifying the process of updating the resource transfer status, and further improving the efficiency of the status update of the resource transfer of the target business.
[0163] Figure 6 A block diagram of a state updating device for resource transfer shown in an exemplary embodiment of the present application is shown. The state updating device for resource transfer is used in a resource transfer management platform. The device includes:
[0164] Notification receiving module 610, used to receive a service initiation notification sent by the service platform, wherein the service initiation notification is used to indicate initiation of a target service; the target service corresponds to resource transfer;
[0165] A message adding module 620, configured to add a resource transfer event message corresponding to the target service to a message queue based on the service initiation notification;
[0166] The message receiving module 630 is used to receive a resource transfer result message sent by the resource transfer platform; the resource transfer result message is used to indicate whether the resource transfer to the target service is successful;
[0167] A message processing module 640, configured to process the resource transfer event message in the message queue based on the resource transfer result message;
[0168] The message queue is used to provide query services to the business platform, so that the business platform queries the message queue for the resource transfer event message and updates the resource transfer status of the target business based on the query result.
[0169] In a possible implementation manner, the resource transfer result message corresponds to a message attribute, and the message attribute is used to indicate the state of the target service before the resource transfer is successful.
[0170] In a possible implementation, the message processing module 640 includes:
[0171] The message removal submodule is used to remove the resource transfer event message from the message queue in response to the resource transfer result message indicating that the resource transfer to the target service is successful.
[0172] In a possible implementation manner, the device further includes:
[0173] A message query module, used to query the resource transfer event message;
[0174] The information storage module is used to store the service information of the target service in a first database in response to a query result of the resource transfer event message indicating that the resource transfer event message is removed.
[0175] In a possible implementation, the notification receiving module 610 includes:
[0176] A notification receiving submodule, used for receiving the service initiation notification sent by the service platform through a resource transfer interface;
[0177] The message adding module 620 includes:
[0178] The message adding submodule is used to add the resource transfer event message in the message queue based on the service initiation notification through the resource transfer interface.
[0179] In a possible implementation, the message receiving module 630 includes:
[0180] A message receiving submodule, used for receiving the resource transfer result message sent by the resource transfer platform through the resource transfer management service;
[0181] The message processing module 640 includes:
[0182] The message processing submodule is used to process the resource transfer event message in the message queue based on the resource transfer result message through the resource transfer management service.
[0183] To summarize, by setting up a message queue in the resource transfer management platform and updating the message queue based on the resource transfer result message fed back by the resource transfer platform, the business platform can obtain the status of each resource transfer event message by querying the message queue, thereby determining whether the target business has successfully transferred resources. The resource transfer status of the target business is updated in the above manner, so that the resource transfer status corresponding to different target businesses is stored in the same message queue, avoiding the complex process of security authentication based on the corresponding callback addresses when performing status callbacks for different target businesses, thereby simplifying the process of updating the resource transfer status, and further improving the efficiency of the status update of the resource transfer of the target business.
[0184] Figure 7 A block diagram of a state updating device for resource transfer shown in an exemplary embodiment of the present application is shown. The state updating device for resource transfer is used in a service platform, and the device includes:
[0185] The notification initiation module 710 is used to send a service initiation notification to the resource transfer management platform, wherein the service initiation notification is used to indicate the initiation of a target service; the target service corresponds to resource transfer;
[0186] A request sending module 720, configured to send a resource transfer request to a resource transfer platform, wherein the resource transfer request is used to request resource transfer for the target service;
[0187] A message query module 730 is used to query the message queue in the resource transfer management platform for a resource transfer event message corresponding to the target business; the resource transfer event message is a message added by the resource transfer management platform in the message queue based on the business initiation notification; the resource transfer result message is used to indicate whether the resource transfer of the target business is successful;
[0188] The status updating module 740 is used to update the resource transfer status of the target service based on the query result.
[0189] In a possible implementation, the resource transfer result message corresponds to a message attribute, and the message attribute is used to indicate the state of the target service before the resource transfer is successful;
[0190] The state updating module 740 includes:
[0191] The state setting submodule is used to set the message attribute included in the query result as the resource transfer state of the target service in response to the query result indicating that the resource transfer event message has not been removed.
[0192] In a possible implementation, the status updating module 740 includes:
[0193] The status update submodule is used to update the resource transfer status of the target service to a successful resource transfer in response to the query result indicating that the resource transfer event message is removed.
[0194] To summarize, by setting up a message queue in the resource transfer management platform and updating the message queue based on the resource transfer result message fed back by the resource transfer platform, the business platform can obtain the status of each resource transfer event message by querying the message queue, thereby determining whether the target business has successfully transferred resources. The resource transfer status of the target business is updated in the above manner, so that the resource transfer status corresponding to different target businesses is stored in the same message queue, avoiding the complex process of security authentication based on the corresponding callback addresses when performing status callbacks for different target businesses, thereby simplifying the process of updating the resource transfer status, and further improving the efficiency of the status update of the resource transfer of the target business.
[0195] Figure 8 800 is a block diagram of a computer device according to an exemplary embodiment. The computer device 800 may be Figure 1 The terminal in the system shown is, for example, a smart phone, a tablet computer or a desktop computer. The computer device 800 may also be called a target user device, a portable terminal, a laptop terminal, a desktop terminal or other names.
[0196] Typically, the computer device 800 includes a processor 801 and a memory 802 .
[0197] The processor 801 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 801 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 801 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 801 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 801 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0198] The memory 802 may include one or more computer-readable storage media, which may be non-transitory. The memory 802 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 802 is used to store at least one instruction, which is used to be executed by the processor 801 to implement the method provided in the method embodiment of the present application.
[0199] In some embodiments, the computer device 800 may also optionally include: a peripheral device interface 803 and at least one peripheral device. The processor 801, the memory 802 and the peripheral device interface 803 may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral device interface 803 via a bus, a signal line or a circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 804, a display screen 805, a camera assembly 806, an audio circuit 807, a positioning assembly 808 and a power supply 809.
[0200] In some embodiments, the computer device 800 further includes one or more sensors 810 , including but not limited to: an acceleration sensor 811 , a gyroscope sensor 812 , a pressure sensor 813 , a fingerprint sensor 814 , an optical sensor 815 , and a proximity sensor 816 .
[0201] Those skilled in the art will understand that Figure 8 The structure shown in the figure does not constitute a limitation on the computer device 800, and the computer device 800 may include more or less components than those shown in the figure, or combine some components, or adopt a different arrangement of components.
[0202] Fig. 9 The structural block diagram of a computer device 900 shown in an exemplary embodiment of the present application is shown. The computer device can be implemented as a server in the above-mentioned scheme system of the present application. The computer device 900 includes a central processing unit (CPU) 901, a system memory 904 including a random access memory (RAM) 902 and a read-only memory (ROM) 903, and a system bus 905 connecting the system memory 904 and the central processing unit 901. The computer device 900 also includes a large-capacity storage device 906 for storing an operating system 909, an application program 910 and other program modules 911.
[0203] The mass storage device 906 is connected to the central processing unit 901 via a mass storage controller (not shown) connected to the system bus 905. The mass storage device 906 and its associated computer readable medium provide non-volatile storage for the computer device 900. That is, the mass storage device 906 may include a computer readable medium (not shown) such as a hard disk or a compact disc read-only memory (CD-ROM) drive.
[0204] Without loss of generality, the computer-readable medium may include computer storage media and communication media. Computer storage media include volatile and non-volatile, removable and non-removable media implemented by any method or technology for storing information such as computer-readable instructions, data structures, program modules or other data. Computer storage media include RAM, ROM, Erasable Programmable Read Only Memory (EPROM), Electronically-Erasable Programmable Read-Only Memory (EEPROM) flash memory or other solid-state storage devices, CD-ROM, Digital Versatile Disc (DVD) or other optical storage, cassettes, tapes, disk storage or other magnetic storage devices. Of course, those skilled in the art will appreciate that the computer storage media is not limited to the above. The above-mentioned system memory 904 and mass storage device 906 can be collectively referred to as memory.
[0205] According to various embodiments of the present disclosure, the computer device 900 can also be connected to a remote computer on the network through a network such as the Internet. That is, the computer device 900 can be connected to the network 908 through the network interface unit 907 connected to the system bus 905, or the network interface unit 907 can be used to connect to other types of networks or remote computer systems (not shown).
[0206] The memory also includes at least one instruction, at least one program, code set or instruction set, and the at least one instruction, at least one program, code set or instruction set is stored in the memory. The central processing unit implements all or part of the steps in the status update method for resource transfer shown in the above-mentioned embodiments by executing the at least one instruction, at least one program, code set or instruction set.
[0207] Those skilled in the art will appreciate that in one or more of the above examples, the functions described in the embodiments of the present application can be implemented with hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein the communication media include any media that facilitates the transmission of a computer program from one place to another. The storage medium can be any available medium that a general or special-purpose computer can access.
[0208] In an exemplary embodiment, a computer-readable storage medium is also provided, which is used to store at least one instruction, at least one program, code set or instruction set, and the at least one instruction, the at least one program, the code set or instruction set is loaded and executed by a processor to implement all or part of the steps in the above-mentioned scene screen display method. For example, the computer-readable storage medium can be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, etc.
[0209] In an exemplary embodiment, a computer program product or a computer program is also provided, the computer program product or the computer program comprising computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the above-mentioned Figure 2 or Figure 3 or Figure 4 All or part of the steps of the method shown in any embodiment.
[0210] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
[0211] It should be understood that the present application is not limited to the precise structures described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A state update method for resource transfer, characterized in that: The method is performed by a resource transfer management platform, which is a platform for order management. The method includes: Receive a service initiation notification sent by a service platform, the service initiation notification is used to indicate the initiation of a target service; the target service corresponds to a resource transfer; after the service platform sends the service initiation notification corresponding to the target service to the resource transfer management platform, when the service platform determines by querying a message queue that the target service supports a resource transfer event, the service platform sends a resource transfer request for requesting resource transfer for the target service to the resource transfer platform; the service platform is a platform for providing health services, and the resource transfer management platform and the service platform transmit information through a gateway and a resource transfer interface; Based on the service initiation notification, adding a resource transfer event message corresponding to the target service to a message queue; Receiving a resource transfer result message sent by a resource transfer platform; the resource transfer result message is used to indicate whether the resource transfer of the target business is successful; In response to the resource transfer result message indicating that the resource transfer to the target business is successful, removing the resource transfer event message from the message queue; when the resource transfer result message indicates that the resource transfer to the target business fails, modifying the message attribute of the corresponding resource transfer event message in the message queue to a payment failure state; The message queue is used to provide query services to the business platform, so that the business platform queries the message queue for the resource transfer event message and updates the resource transfer status of the target business based on the query result.
2. The method according to claim 1, characterized in that The resource transfer event message corresponds to a message attribute, and the message attribute is used to indicate the state of the target service before the resource transfer is successful.
3. The method according to claim 1, characterized in that The method further comprises: Query the resource transfer event message; In response to the query result of the resource transfer event message indicating that the resource transfer event message is removed, the service information of the target service is stored in the first database.
4. The method according to claim 1, characterized in that: The receiving service initiation notification sent by the service platform includes: Receiving the service initiation notification sent by the service platform through the resource transfer interface; The adding a resource transfer event message corresponding to the target service in a message queue based on the service initiation notification includes: The resource transfer event message is added to the message queue based on the service initiation notification through the resource transfer interface.
5. The method according to claim 1, characterized in that The receiving of a resource transfer result message sent by the resource transfer platform includes: The resource transfer result message sent by the resource transfer platform is received through the resource transfer management service.
6. A state update method for resource transfer, characterized in that: The method is executed by a business platform, which is a platform for providing health services, and the method includes: Sending a service initiation notification to the resource transfer management platform, the service initiation notification is used to indicate the initiation of a target service; the target service corresponds to resource transfer, and the resource transfer management platform is a platform for order management; the resource transfer management platform and the service platform transmit information through a gateway and a resource transfer interface; When the service platform determines that the target service supports a resource transfer event by querying the message queue, a resource transfer request is sent to the resource transfer platform, where the resource transfer request is used to request resource transfer for the target service; querying the message queue in the resource transfer management platform for the resource transfer event message corresponding to the target business; the resource transfer event message is a message added by the resource transfer management platform to the message queue based on the business initiation notification; the resource transfer result message is used to indicate whether the resource transfer of the target business is successful; the resource transfer management platform is used to: in response to the resource transfer result message indicating that the resource transfer of the target business is successful, remove the resource transfer event message from the message queue; when the resource transfer result message indicates that the resource transfer of the target business fails, modify the message attribute of the corresponding resource transfer event message in the message queue to a payment failure state; The resource transfer status of the target service is updated based on the query result.
7. The method according to claim 6, characterized in that The resource transfer result message corresponds to a message attribute, and the message attribute is used to indicate the state of the target service before the resource transfer is successful; The updating of the resource transfer status of the target service based on the query result includes: In response to the query result indicating that the resource transfer event message has not been removed, the message attribute included in the query result is used to set the resource transfer state of the target service.
8. The method according to claim 6, characterized in that The updating of the resource transfer status of the target service based on the query result includes: In response to the query result indicating that the resource transfer event message is removed, the resource transfer status of the target service is updated to resource transfer success.
9. A state updating device for resource transfer, characterized in that: The device is used in a resource transfer management platform, which is a platform for order management. The device includes: A notification receiving module, used for receiving a service initiation notification sent by a service platform, wherein the service initiation notification is used to indicate the initiation of a target service; the target service corresponds to a resource transfer; wherein after the service platform sends the service initiation notification corresponding to the target service to the resource transfer management platform, when the service platform determines by querying a message queue that the target service supports a resource transfer event, a resource transfer request for requesting resource transfer for the target service is sent to the resource transfer platform; the service platform is a platform for providing health services, and the resource transfer management platform and the service platform transmit information through a gateway and a resource transfer interface; A message adding module, used for adding a resource transfer event message corresponding to the target service to a message queue based on the service initiation notification; A message receiving module, used to receive a resource transfer result message sent by a resource transfer platform; the resource transfer result message is used to indicate whether the resource transfer to the target business is successful; a message processing module, configured to remove the resource transfer event message from the message queue in response to the resource transfer result message indicating that the resource transfer to the target business is successful; and to modify the message attribute of the corresponding resource transfer event message in the message queue to a payment failure state when the resource transfer result message indicates that the resource transfer to the target business fails; The message queue is used to provide query services to the business platform, so that the business platform queries the message queue for the resource transfer event message and updates the resource transfer status of the target business based on the query result.
10. A state updating device for resource transfer, characterized in that: The device is used in a business platform, which is a platform for providing health services. The device includes: A notification initiation module is used to send a service initiation notification to the resource transfer management platform, wherein the service initiation notification is used to indicate the initiation of a target service; the target service corresponds to resource transfer; the resource transfer management platform is a platform for order management; the resource transfer management platform and the service platform transmit information through a gateway and a resource transfer interface; A request sending module, used for sending a resource transfer request to a resource transfer platform when the service platform determines that the target service supports a resource transfer event by querying a message queue, wherein the resource transfer request is used for requesting resource transfer for the target service; A message query module is used to query the message queue in the resource transfer management platform for the resource transfer event message corresponding to the target business; the resource transfer event message is a message added by the resource transfer management platform in the message queue based on the business initiation notification; the resource transfer result message is used to indicate whether the resource transfer of the target business is successful; the resource transfer management platform is used to: in response to the resource transfer result message indicating that the resource transfer of the target business is successful, remove the resource transfer event message from the message queue; when the resource transfer result message indicates that the resource transfer of the target business fails, modify the message attribute of the corresponding resource transfer event message in the message queue to a payment failure state; The status update module is used to update the resource transfer status of the target business based on the query result.
11. A computer device, characterized in that: The computer device includes a processor and a memory, the memory storing at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set are loaded and executed by the processor to implement the status update method for resource transfer as described in any one of claims 1 to 8.
12. A computer-readable storage medium, characterized in that: The storage medium stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the status update method for resource transfer as described in any one of claims 1 to 8.