A system interaction processing method and device, storage medium, and electronic device

By using asynchronous framework and multi-threaded services in the switching system to process interactive requests and responses, the inefficiency problem caused by centralized switching systems due to waiting for response messages is solved, and the processing efficiency of interaction between business systems and third-party systems is improved.

CN114900451BActive Publication Date: 2024-12-03CHINA EVERBRIGHT BANK
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210462291.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-28
Publication Date
2024-12-03
Estimated Expiration
2042-04-28

AI Technical Summary

Technical Problem

When the business system interacts with the third-party system, the main control service of the centralized exchange system is in a waiting state for a long time due to waiting for the reply message, resulting in low interaction processing efficiency. If there is a problem with the third-party business system processing, the main control service may be caused. Stuck, further reducing efficiency.

Method used

By using an asynchronous framework in the switching system, forwarding interactive requests to the target business system, and using multi-threaded services to receive interactive requests and answers asynchronously, avoiding long-term occupation of thread services after receiving the request until the response is completed, improving the processing efficiency of system interactions .

Benefits of technology

The technical effect of improving the system's interactive processing efficiency is achieved, and service lag caused by waiting for response messages is avoided, and the efficiency of interactive processing is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114900451B_ABST
    Figure CN114900451B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a method and device for processing system interaction, a storage medium, and an electronic device. The method includes: when a switching system detects a target interaction request, using a first type of service to receive the target interaction request, wherein the target interaction request is used to request a target business system to process a target transaction, and the first type of service is a master control service in the switching system for receiving interaction requests; controlling the first type of service to forward the target interaction request to an asynchronous framework, and sending the target interaction request to the target business system through the asynchronous framework, wherein the asynchronous framework is a multi-threaded service; when the switching system detects a target transaction response returned by the target business system, using a second type of service to receive the target transaction response, wherein the second type of service is a master control service in the switching system for receiving a response message. Therefore, the problem of low efficiency of system interaction processing in the related art can be solved, and the effect of improving the system interaction processing effect can be achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the computer field, and in particular, to a system interaction processing method and device, a storage medium, and an electronic device. Background Art

[0002] Currently, when various business systems need to interact with third-party systems, they usually need to perform online processing with the centralized exchange system deployed in the business system and use transaction middleware to communicate with the third-party system.

[0003] Taking the banking system as an example, when it is necessary to interact online with a third-party business system, it is usually necessary to use Tuxedo transaction middleware to communicate with the third-party business system based on the deployed centralized exchange system. The centralized exchange system is the requester, and the third-party business system is the service provider. The master control service of the centralized exchange system forwards the interaction request to the third-party business system. After the third-party business system receives the interaction request and completes the processing, it returns the response message to the master control service of the centralized exchange system.

[0004] After forwarding the interaction request, the central switching system's main control service will always be in a state of waiting for a response message, and new interaction requests cannot be processed during this period. If the third-party business system takes a long time to process the interaction, the central switching system's main control service will need to wait for a long time to get a response from the third-party business system. During this process, the central switching system's main control is always in a waiting state and cannot process other interactions in time, making the interaction processing efficiency very low. If there is a problem with the third-party business system processing the interaction, the central switching system's main control service is likely to be stuck on the interaction, further reducing the interaction processing efficiency. Summary of the invention

[0005] The embodiments of the present invention provide a method and device for processing system interaction, a storage medium, and an electronic device, so as to at least solve the problem of low efficiency of system interaction processing in the related art.

[0006] According to one embodiment of the present invention, a method for processing system interactions is provided, comprising: in a case where an exchange system detects a target interaction request, using a first type of service to receive the target interaction request, wherein the target interaction request is used to request a target business system to process a target transaction, and the first type of service is a master control service in the exchange system for receiving interaction requests; controlling the first type of service to forward the target interaction request to an asynchronous framework, and sending the target interaction request to the target business system through the asynchronous framework, wherein the asynchronous framework is a multi-threaded service; in a case where the exchange system detects a target transaction response returned by the target business system, using a second type of service to receive the target transaction response, wherein the second type of service is a master control service in the exchange system for receiving response messages.

[0007] In an exemplary embodiment, the target interaction request is received using a first type of service, including: determining a first service that is currently in an idle state in the first type of service; receiving a target request message indicating the target interaction request using the first service, and saving the context data of the target transaction carried in the target request message.

[0008] In an exemplary embodiment, the first type of service is controlled to forward the target interaction request to the asynchronous framework, and the target processing request is sent to the target business system through the asynchronous framework, including: controlling the first service to forward the target request message to the asynchronous framework; controlling the target thread in the asynchronous framework to parse the target request message; and sending the target request message to the target business system when the parsing result of the target request message meets the interaction condition.

[0009] In an exemplary embodiment, controlling the target thread in the asynchronous framework to parse the target request message includes: controlling the target thread of the asynchronous framework to parse the system identifier and target transaction time indicating the target business system from the target request message; when the current time does not exceed the target transaction time, adding the monitoring information of the target transaction to the monitoring linked list of the monitoring thread, wherein the monitoring thread is used to monitor each thread running in the asynchronous framework.

[0010] In an exemplary embodiment, when the current time exceeds the target transaction time, the target thread is released; a target response message indicating a timeout exception is generated, and the target response message is sent to the second type of service to respond to the target interaction request by utilizing the second type of service.

[0011] In an exemplary embodiment, the control monitoring thread performs linked list processing on the monitoring linked list every time a target time has passed, including: adjusting the monitoring linked list to a locked state, wherein the monitoring linked list does not respond to the adjustment operation performed on the monitoring linked list in the locked state; judging whether the monitoring linked list is an empty linked list; if the monitoring linked list is not an empty linked list, judging in turn whether each monitoring information in the monitoring linked list exceeds the current time; if the monitoring information exceeds the current time, instructing the monitoring thread to close the thread corresponding to the monitoring information; if the monitoring linked list is an empty linked list or after traversing each of the monitoring information, adjusting the monitoring linked list to an unlocked state, wherein the monitoring linked list responds to the adjustment operation performed on the monitoring linked list in the unlocked state.

[0012] In an exemplary embodiment, when the above-mentioned exchange system detects the above-mentioned target transaction response and the above-mentioned target thread runs normally, the above-mentioned target thread is used to obtain the target response message indicating the above-mentioned target transaction response; the above-mentioned target thread is controlled to add the context data of the above-mentioned target transaction to the above-mentioned target response message, and the above-mentioned target response message with the context data of the above-mentioned target transaction added is forwarded to the above-mentioned second type of service; and the above-mentioned target thread is released.

[0013] In an exemplary embodiment, when the exchange system detects the target transaction response and the target thread runs abnormally, the target thread is released and a target response message indicating the abnormality of the target thread is generated; the target response message is sent to the second type of service to respond to the target interaction request by utilizing the second type of service.

[0014] According to another embodiment of the present invention, a system interaction processing device is provided, including: a request receiving unit, used for receiving the target interaction request by using a first type of service when a switching system detects the target interaction request, wherein the target interaction request is used to request a target business system to process a target transaction, and the first type of service is a master control service in the switching system for receiving interaction requests; a forwarding unit, used for controlling the first type of service to forward the target interaction request to an asynchronous framework, and sending the target interaction request to the target business system through the asynchronous framework, wherein the asynchronous framework is a multi-threaded service; and a response receiving unit, used for receiving the target transaction response by using a second type of service when the switching system detects a target transaction response returned by the target business system, wherein the second type of service is a master control service in the switching system for receiving response messages.

[0015] According to yet another embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any one of the above method embodiments when run.

[0016] According to yet another embodiment of the present invention, there is provided an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0017] In the present invention, based on the case where the exchange system detects the target interaction request, the first type of service is used to receive the target interaction request, wherein the target interaction request is used to request the target business system to process the target transaction, the first type of service is the main control service in the exchange system for receiving the interaction request, the first type of service is controlled to forward the target interaction request to the asynchronous framework, and the target interaction request is sent to the target business system through the asynchronous framework, wherein the asynchronous framework is a multi-threaded service, and when the exchange system detects the target transaction response returned by the target business system, the second type of service is used to receive the target transaction response, wherein the second type of service is the main control service in the exchange system for receiving the response message, the first type of service is used to receive the interaction request requesting the target business system to process the target transaction in the exchange system, and the interaction request is forwarded to the asynchronous framework, and the multi-threaded service of the asynchronous framework is used to receive the transaction response when receiving the transaction response returned by the target business system, so that the multi-threaded server of the asynchronous framework asynchronously receives the interaction request and the interaction response, avoids the thread service from being occupied by the same transaction for a long time after receiving the interaction request until the interaction response is completed, and improves the processing efficiency of the system interaction. Therefore, the problem of low processing efficiency of the system interaction in the related art can be solved, and the technical effect of improving the processing efficiency of the system interaction can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 It is a hardware structure block diagram of a computer terminal of the system interaction processing method of an embodiment of the present invention;

[0019] Figure 2 is a network architecture diagram according to an embodiment of the present invention;

[0020] Figure 3 A flowchart of a method for processing system interaction according to an embodiment of the present invention;

[0021] Figure 4 A flowchart of a method for processing system interaction according to an embodiment of the present invention;

[0022] Figure 5 A flowchart of a method for processing system interaction according to an embodiment of the present invention;

[0023] Figure 6 A flowchart of a method for processing system interaction according to an embodiment of the present invention;

[0024] Figure 7 A flowchart of a method for processing system interaction according to an embodiment of the present invention;

[0025] Figure 8 is a structural block diagram of a system interaction processing device according to another embodiment of the present invention. DETAILED DESCRIPTION

[0026] Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings and in combination with the embodiments.

[0027] It should be noted that the terms "first", "second", etc. in the specification 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.

[0028] To facilitate the understanding of the technical solution provided by the present invention, the professional terms involved in the embodiments of the present invention are explained below.

[0029] AP: application server.

[0030] Atomic method: a function that can be configured with a relatively small granularity in the transaction process

[0031] Tuxedo: A client / server middleware product that mediates between the client and the server to ensure that transactions are processed correctly.

[0032] Master: Tuxedo service used to process transaction messages and configure the transaction processing flow.

[0033] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a computer terminal as an example, Figure 1 FIG. 1 is a hardware structure block diagram of a computer terminal of the system interaction processing method of an embodiment of the present invention. Figure 1 As shown, the computer terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor (Central Processing Unit, MCU) or a programmable logic device (Field Programmable Gate Array, FPGA)) and a memory 104 for storing data, wherein the above-mentioned computer terminal may also include a transmission device 106 and an input and output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1The structure shown is only for illustration and does not limit the structure of the above-mentioned computer terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.

[0034] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the subject behavior authority control method in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories can be connected to the computer terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0035] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of a computer terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0036] Figure 2 is a network architecture diagram of the system interaction processing according to an embodiment of the present invention, such as Figure 2As shown, the network architecture includes a switching system 200 and a business system 210. The switching system 200 is used to process an interactive request about a transaction in the system. The interactive request is to request the corresponding business system 210 to process the transaction. After the business system 210 processes the transaction, the switching system 200 receives a transaction response to complete the interactive request. When the switching system 200 detects the interactive request, it receives the interactive request using the first type of service 202. The first type of service 202 is a master control service for receiving the interactive request in the switching system 200. The first type of service 202 is controlled to forward the interactive request to the asynchronous framework 206, and the interactive request is sent to the business system 210 through the asynchronous framework 206. The asynchronous framework is a multi-threaded service. When the switching system 200 detects the transaction response returned by the business system 210, the transaction response is received using the second type of service 204. The second type of service 204 is a master control service for receiving a response message in the switching system.

[0037] Figure 3 A flowchart of a method for processing system interaction according to an embodiment of the present invention is shown in FIG. Figure 3 As shown, the process includes the following steps:

[0038] Step S302, when the switching system detects a target interaction request, the target interaction request is received using a first type of service, wherein the target interaction request is used to request a target business system to process a target transaction, and the first type of service is a master control service in the switching system for receiving interaction requests;

[0039] Step S304, controlling the first type of service to forward the target interaction request to the asynchronous framework, and sending the target interaction request to the target business system through the asynchronous framework, wherein the asynchronous framework is a multi-threaded service;

[0040] Step S306: When the switching system detects the target transaction response returned by the target business system, the target transaction response is received using the second type of service, wherein the second type of service is a master control service in the switching system for receiving a response message.

[0041] The exchange system is not limited to being used for receiving interaction requests in the system. The exchange system interacts with the business system based on transactions, and receives transaction responses returned by the business system through the exchange system to determine whether the transaction is successfully completed.

[0042] The exchange system is not limited to being provided with a first type of service for receiving interaction requests and a second type of service for receiving transaction responses. Interaction requests and transaction responses are received respectively through different types of services, so that when there is an interaction demand, the service is called for reception, thereby avoiding the occupation of services and interaction requests in the exchange system.

[0043] The asynchronous framework is not limited to multi-threaded services that use asynchronous processing. Each thread processes interactive requests independently. Each thread processes each interactive request. When the first type of service receives an interactive request, the interactive request is forwarded to the business system through the thread, and the transaction response returned by the business system is received based on the thread.

[0044] In the above embodiment of the present invention, based on the case where the exchange system detects the target interaction request, the target interaction request is received by using the first type of service, wherein the target interaction request is used to request the target business system to process the target transaction, the first type of service is the main control service in the exchange system for receiving the interaction request, the first type of service is controlled to forward the target interaction request to the asynchronous framework, and the target interaction request is sent to the target business system through the asynchronous framework, wherein the asynchronous framework is a multi-threaded service, and when the exchange system detects the target transaction response returned by the target business system, the target transaction response is received by using the second type of service, wherein the second type of service is the main control service in the exchange system for receiving the response message, the first type of service is used in the exchange system to receive the interaction request requesting the target business system to process the target transaction, and the interaction request is forwarded to the asynchronous framework, and the multi-threaded service of the asynchronous framework is used to receive the transaction response when receiving the transaction response returned by the target business system, so that the multi-threaded server of the asynchronous framework asynchronously receives the interaction request and the interaction response, avoids the thread service from being occupied by the same transaction for a long time after receiving the interaction request until the interaction response is completed, and improves the processing efficiency of the system interaction. Therefore, the problem of low processing efficiency of the system interaction in the related art can be solved, and the technical effect of improving the processing efficiency of the system interaction can be achieved.

[0045] In an optional example, the above step S302 includes: determining a first service that is currently in an idle state in the first category of services; using the first service to receive a target request message indicating a target interaction request, and saving context data of the target transaction carried in the target request message.

[0046] When the exchange system receives an interaction request, the first service currently in the idle state in the first category of services is used to receive the interaction request. The first category of services and the second category of services are not limited to including multiple independent master control services for independently processing the received interaction request or transaction response. When the first service forwards the interaction request to the asynchronous framework, the first service is adjusted from the occupied state to the idle state so that other interaction requests can continue to be received.

[0047] Similarly, when a transaction response is received, the second service currently in the idle state in the second type of service is used to receive the transaction response. After the transaction response is processed, the second service is adjusted from the occupied state to the idle state so that other transaction responses can continue to be received.

[0048] The interaction request is not limited to the interaction request message, and the first server storing the context data for identifying the transaction is not limited to storing the context data of the transaction in the message header of the interaction request message. The context data is not limited to identifying the interaction request and the transaction response, and is used to indicate the associated environment of the transaction.

[0049] Optionally, the context data is placed in the transaction message header without limitation using the atomic method Data_SaveKeyData, thereby forwarding the transaction message carrying the context data to the asynchronous framework, using the context data to indicate the associated environment of the transaction, and realizing decoupling of the transaction from the thread.

[0050] The exchange system's transaction processing process is not limited to the following: Figure 4 As shown. Main control A (first service) executes the request processing flow, and main control B (second service) executes the response processing flow transaction flow. When an interaction request is received, the transaction processing flow is determined to start. Main control A and the little girl process the transaction logic and save the context data. The interaction message carrying the context data is forwarded to the asynchronous framework. When the asynchronous framework receives the interaction message, it sends a request to the third party (business system). The asynchronous framework receives the third-party response and sends the third-party response to main control B. Main control B restores the context data, performs transaction logic processing, and returns a response to the requester of the system. The transaction processing flow ends here.

[0051] The data format of the transaction message is not limited to that shown in Table 1 below:

[0052] Table 1

[0053]

[0054] In an optional example, the above step S304 includes: controlling the first service to forward the target request message to the asynchronous framework; controlling the target thread in the asynchronous framework to parse the target request message; and sending the target request message to the target business system when the parsing result of the target request message meets the interaction condition.

[0055] The asynchronous framework is not limited to initializing the service through the tuxedo configuration file at startup to support multi-threading, where the transaction thread is supported by Tuxedo middleware and the MINDISPATCHTHREADS configuration property is used to monitor the thread startup process of the asynchronous framework. The startup process of the asynchronous framework is not limited to Figure 5 As shown. Initialize tpinit, parse the parameters to set the published service name according to the parameters, publish the service after the settings are completed, and create a monitoring thread. The transaction thread is Tuxedo. The monitoring thread is used to monitor the transaction thread running in the asynchronous framework. The transaction thread is used to receive and forward interaction requests and receive and forward transaction responses.

[0056] In an optional example, the target thread in the above-mentioned control asynchronous framework parses the target request message, including: the target thread of the control asynchronous framework parses the system identifier and target transaction time indicating the target business system from the target request message; when the current time does not exceed the target transaction time, the monitoring information of the target transaction is added to the monitoring linked list of the monitoring thread, wherein the monitoring thread is used to monitor each thread running in the asynchronous framework.

[0057] The target thread currently in idle state determined in the asynchronous framework receives and parses the request message, and parses the system identifier used to indicate the business system and the transaction time used to determine whether the transaction has timed out from the request message. Taking the transaction time as the transaction timeout moment as an example, if the current time does not exceed the transaction time, it is determined that the transaction has not timed out; if the time exceeds the transaction time, it is determined that the transaction has timed out. If the transaction has not timed out, the monitoring information of the transaction is added to the monitoring linked list of the monitoring thread.

[0058] The monitoring linked list is not limited to a linked list for monitoring each transaction thread and recording relevant information of each transaction thread for the monitoring thread in the asynchronous framework, and records the current status of each transaction thread, monitoring information of received transactions, transaction information, etc. The transaction thread is in a running state when processing an interaction request and receiving a transaction response, and is in an idle state when not processing an interaction request and receiving a transaction response.

[0059] The monitoring information of the target transaction is not limited to including the identifier of the target thread processing the target transaction and the target transaction time, so as to monitor the transaction thread running in the asynchronous framework through the monitoring linked list.

[0060] In an optional example, when the current time exceeds the target transaction time, the target thread is released; a target response message indicating a timeout exception is generated, and the target response message is sent to the second type of service to respond to the target interaction request by utilizing the second type of service.

[0061] When the current time exceeds the target transaction time, that is, the target transaction is currently timed out, the target thread processing the target transaction is released, and a response message indicating a transaction timeout exception is generated, thereby indicating that the target transaction is completed within the indicated target transaction time.

[0062] When the current time does not exceed the target transaction time, that is, the target transaction has not currently timed out, while recording the monitoring information of the target transaction in the monitoring linked list, the target thread is used to send the interaction request to the third-party business system indicated by the interaction request to instruct the business system to process the target transaction.

[0063] After sending the interaction request to the third-party business system, the asynchronous framework is not limited to processing the monitoring linked list through the monitoring thread to determine whether the transaction thread currently processing the transaction has timed out.

[0064] In an optional example, the control monitoring thread performs linked list processing on the monitoring linked list every time a target time has passed, including:

[0065] S1, adjusting the monitoring chain list to a locked state, wherein the monitoring chain list does not respond to an adjustment operation performed on the monitoring chain list in the locked state;

[0066] S2, determine whether the monitoring linked list is an empty linked list;

[0067] S3, when the monitoring list is not an empty list, determine in turn whether each monitoring information in the monitoring list exceeds the current time;

[0068] S4, when the monitoring information exceeds the current time, instruct the monitoring thread to close the thread corresponding to the monitoring information;

[0069] S5, when the monitoring linked list is an empty linked list or after traversing each monitoring information, adjusting the monitoring linked list to an unlocked state, wherein the monitoring linked list responds to the adjustment operation performed on the monitoring linked list in the unlocked state.

[0070] The monitoring thread executes the above steps on the monitoring linked list every target time to determine whether each monitoring information in the monitoring linked list exceeds the current time, so as to determine whether the transactions of each currently running thread have timed out. If a transaction timeout is found, the thread corresponding to the timed out transaction is closed in time to release thread resources to avoid the transaction occupying the thread for a long time.

[0071] The monitoring chain list records the transaction threads that are in the running state, that is, the threads currently occupied by the transaction. When the transaction thread is in the idle state, it is not recorded in the monitoring chain list.

[0072] The monitoring thread's processing of the monitoring list is not limited to the following: Figure 6 As shown. Start to get the current time, lock the monitoring list, so that the monitoring list is in a locked state, and determine whether the list is empty. When it is determined that the list is empty, that is, there is no running transaction thread and no transaction request being processed, unlock the monitoring list. When it is determined that the list is not empty and there is a running transaction process, determine whether the transaction has timed out in turn. Determine whether the transaction has timed out for each transaction in turn. When it is determined that the transaction has timed out, close the timed out transaction thread. After all transactions in the list are judged, lock the monitoring list. Sleep for the target time. After the sleep period, re-execute the above steps to process the monitoring list for the next round.

[0073] Optionally, when the monitoring information of the target transaction is written into the monitoring chain table, the monitoring chain table is also locked to ensure that only one thread's information is changed in the monitoring chain table during the same time period. When the transaction thread is closed and released, the monitoring information corresponding to the transaction thread is deleted from the monitoring chain table.

[0074] In an optional example, when the exchange system detects a target transaction response and the target thread runs normally, the target thread is used to obtain a target response message indicating the target transaction response; the target thread is controlled to add context data of the target transaction to the target response message, and the target response message with the context data of the target transaction added is forwarded to the second type of service; and the target thread is released.

[0075] When a transaction response is received, first determine whether the target thread is running normally. If the target thread is running normally, use the target thread to obtain a response message; if the target thread is running abnormally, it is not limited to responding to the interaction request with an abnormal response message.

[0076] In an optional example, when the exchange system detects a target transaction response and the target thread runs abnormally, the target thread is released and a target response message indicating the target thread is abnormal is generated; the target response message is sent to the second type of service to respond to the target interaction request by utilizing the second type of service.

[0077] In the case where the target thread runs abnormally, the target thread is released and a response message indicating the thread abnormality is generated to respond to the interaction request.

[0078] The target thread in the asynchronous framework handles the interactive request and transaction response in the following ways: Figure 7 As shown. When receiving a request message, parse the message and obtain context data. Obtain the third-party service bridge type and timeout period from the request message. Determine whether the transaction has timed out. If it is determined that the transaction has timed out, release the thread and generate an exception message indicating that the transaction has timed out. If it is determined that the transaction has not timed out, add the transaction information to the monitoring linked list. Forward the transaction request to the third-party service to obtain the transaction response returned by the third-party service. If the transaction response is obtained, determine whether the thread is running normally. If it is determined that the thread is running normally, splice the context data through the transaction response to obtain a response message. Send the response message to the second service to respond to the interaction request. If it is determined that the thread is running abnormally, release the thread and generate a response message indicating the thread abnormality.

[0079] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory / random access memory (ROM / RAM), a magnetic disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0080] In this embodiment, a system interaction processing device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0081] Figure 8 is a structural block diagram of a processing device for system interaction according to an embodiment of the present invention, such as Figure 8 As shown, the device comprises:

[0082] The request receiving unit 802 is used to receive the target interaction request by using the first type of service when the switching system detects the target interaction request, wherein the target interaction request is used to request the target business system to process the target transaction, and the first type of service is a master control service in the switching system for receiving the interaction request;

[0083] The forwarding unit 804 is used to control the first type of service to forward the target interaction request to the asynchronous framework, and send the target interaction request to the target business system through the asynchronous framework, wherein the asynchronous framework is a multi-threaded service;

[0084] The response receiving unit 806 is used to receive the target transaction response using the second type of service when the switching system detects the target transaction response returned by the target business system, wherein the second type of service is a master control service for receiving response messages in the switching system.

[0085] The request receiving unit 802 further includes:

[0086] A determination module, used to determine a first service that is currently in an idle state in the first category of services;

[0087] The receiving module is used to receive a target request message indicating a target interaction request by using the first service, and save the context data of the target transaction carried in the target request message.

[0088] The forwarding unit 804 includes:

[0089] A forwarding module, used for controlling the first service to forward the target request message to the asynchronous framework;

[0090] A parsing module, used to control the target thread in the asynchronous framework to parse the target request message;

[0091] The sending module is used to send the target request message to the target business system when the parsing result of the target request message meets the interaction condition.

[0092] The above-mentioned parsing module is also used to control the target thread of the asynchronous framework to parse the system identifier and target transaction time indicating the target business system from the target request message; when the current time does not exceed the target transaction time, the monitoring information of the target transaction is added to the monitoring linked list of the monitoring thread, wherein the monitoring thread is used to monitor each thread running in the asynchronous framework.

[0093] The device includes Figure 8 In addition to all the modules shown, it also includes a release unit, which is used to release the target thread when the current time exceeds the target transaction time; generate a target response message indicating a timeout exception, and send the target response message to the second type of service to respond to the target interaction request by utilizing the second type of service.

[0094] The device includes Figure 8 In addition to all the modules shown, a monitoring unit is also included, which is used to control the monitoring thread to perform linked list processing on the monitoring linked list every target time, including: adjusting the monitoring linked list to a locked state, wherein the monitoring linked list does not respond to the adjustment operation performed on the monitoring linked list in the locked state; judging whether the monitoring linked list is an empty linked list; if the monitoring linked list is not an empty linked list, judging in turn whether each monitoring information in the monitoring linked list exceeds the current time; if the monitoring information exceeds the current time, instructing the monitoring thread to close the thread corresponding to the monitoring information; if the monitoring linked list is an empty linked list or after traversing each monitoring information, adjusting the monitoring linked list to an unlocked state, wherein the monitoring linked list responds to the adjustment operation performed on the monitoring linked list in the unlocked state.

[0095] The response receiving unit 806 further includes:

[0096] An acquisition module, configured to acquire a target response message indicating a target transaction response by using the target thread when the switching system detects a target transaction response and the target thread runs normally;

[0097] An adding module, used for controlling the target thread to add the context data of the target transaction in the target response message, and forwarding the target response message with the context data of the target transaction added to the second type of service;

[0098] The release module is used to release the target thread.

[0099] The device includes Figure 8 In addition to all the modules shown, it also includes an exception unit, which is used to release the target thread and generate a target response message indicating the abnormality of the target thread when the exchange system detects the target transaction response and the target thread runs abnormally; and send the target response message to the second type of service to respond to the target interaction request by utilizing the second type of service.

[0100] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.

[0101] An embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.

[0102] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.

[0103] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0104] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0105] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.

[0106] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.

[0107] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for processing system interactions, It is characterized in that include: In the case where the switching system detects the target interaction request, determining a first service that is currently in an idle state in the first type of services; receiving, by using the first service, a target request message indicating the target interaction request, and saving context data of the target transaction carried in the target request message, wherein the target interaction request is used to request a target business system to process the target transaction, and the first type of service is a master control service in the switching system for receiving interaction requests; Control the first service to forward the target request message to the asynchronous framework; control the target thread of the asynchronous framework to parse the target request message to obtain the system identifier and target transaction time indicating the target business system; if the current time does not exceed the target transaction time, add the monitoring information of the target transaction to the monitoring linked list of the monitoring thread, wherein the monitoring thread is used to monitor each thread running in the asynchronous framework; The control monitoring thread performs linked list processing on the monitoring linked list every time a target time passes, including: adjusting the monitoring linked list to a locked state, wherein the monitoring linked list does not respond to the adjustment operation performed on the monitoring linked list in the locked state; judging whether the monitoring linked list is an empty linked list; if the monitoring linked list is not an empty linked list, judging in turn whether each monitoring information in the monitoring linked list exceeds the current time; if the monitoring information exceeds the current time, instructing the monitoring thread to close the thread corresponding to the monitoring information; if the monitoring linked list is an empty linked list or after traversing each monitoring information, adjusting the monitoring linked list to an unlocked state, wherein the monitoring linked list responds to the adjustment operation performed on the monitoring linked list in the unlocked state; When the parsing result of the target request message meets the interaction condition, sending the target request message to the target business system, wherein the asynchronous framework is a multi-threaded service; When the switching system detects the target transaction response returned by the target business system, the target transaction response is received by using a second type of service, wherein the second type of service is a main control service for receiving a response message in an interactive system.

2. The method according to claim 1, Features: When the current time exceeds the target transaction time, releasing the target thread; A target response message indicating a timeout exception is generated, and the target response message is sent to the second type of service to respond to the target interaction request by utilizing the second type of service.

3. The method according to claim 1, Features: When the exchange system detects the target transaction response and the target thread runs normally, using the target thread to obtain a target response message indicating the target transaction response; Control the target thread to add the context data of the target transaction to the target response message, and forward the target response message with the context data of the target transaction added to the second type of service; Release the target thread.

4. The method according to claim 1, Features: When the exchange system detects the target transaction response and the target thread runs abnormally, releasing the target thread and generating a target response message indicating that the target thread is abnormal; The target response message is sent to the second type of service to respond to the target interaction request by utilizing the second type of service.

5. A system interaction processing device, It is characterized in that include: a request receiving unit, configured to determine a first service currently in an idle state in a first type of service when the switching system detects a target interaction request; receiving, by using the first service, a target request message indicating the target interaction request, and saving context data of the target transaction carried in the target request message, wherein the target interaction request is used to request a target business system to process the target transaction, and the first type of service is a master control service in the switching system for receiving interaction requests; a forwarding unit, configured to control the first service to forward the target request message to the asynchronous framework; control the target thread of the asynchronous framework to parse the target request message to obtain the system identifier and target transaction time indicating the target business system; add the monitoring information of the target transaction to the monitoring linked list of the monitoring thread when the current time does not exceed the target transaction time, wherein the monitoring thread is used to monitor each thread running in the asynchronous framework; control the monitoring thread to perform linked list processing on the monitoring linked list every time the target time passes, including: adjusting the monitoring linked list to a locked state, wherein the monitoring linked list does not respond to an adjustment operation performed on the monitoring linked list in the locked state; determining whether the monitoring linked list is an empty linked list; when the monitoring linked list is not an empty linked list, sequentially determining whether each monitoring information in the monitoring linked list exceeds the current time; when the monitoring information exceeds the current time, instructing the monitoring thread to close the thread corresponding to the monitoring information; when the monitoring linked list is an empty linked list or after traversing each monitoring information, adjusting the monitoring linked list to an unlocked state, wherein the monitoring linked list responds to an adjustment operation performed on the monitoring linked list in the unlocked state; When the parsing result of the target request message meets the interaction condition, sending the target request message to the target business system, wherein the asynchronous framework is a multi-threaded service; The response receiving unit is used to receive the target transaction response by using the second type service when the switching system detects the target transaction response returned by the target business system, wherein the second type service is a main control service for receiving response messages in the interactive system.

6. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, wherein the computer program is configured to execute the method according to any one of claims 1 to 4 when executed.

7. An electronic device comprising a memory and a processor, It is characterized in that A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 4.