WO2020140680A1 - 异步回调方法、装置、计算机设备和存储介质 - Google Patents

异步回调方法、装置、计算机设备和存储介质 Download PDF

Info

Publication number
WO2020140680A1
WO2020140680A1 PCT/CN2019/123243 CN2019123243W WO2020140680A1 WO 2020140680 A1 WO2020140680 A1 WO 2020140680A1 CN 2019123243 W CN2019123243 W CN 2019123243W WO 2020140680 A1 WO2020140680 A1 WO 2020140680A1
Authority
WO
WIPO (PCT)
Prior art keywords
callback
data
preset
information table
polling thread
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2019/123243
Other languages
English (en)
French (fr)
Inventor
颜赛云
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
OneConnect Smart Technology Co Ltd
Original Assignee
OneConnect Smart Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by OneConnect Smart Technology Co Ltd filed Critical OneConnect Smart Technology Co Ltd
Publication of WO2020140680A1 publication Critical patent/WO2020140680A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication

Definitions

  • the present application relates to an asynchronous callback method, device, computer equipment and storage medium.
  • an asynchronous call usually corresponds to a callback interface, which is used to transmit the corresponding call result.
  • the inventor realized that with the rapid increase in communication between systems, the asynchronous calls between systems have also increased sharply, resulting in the increasing number of callback interfaces, thereby increasing the complexity of callback interface management, and the low efficiency of callback interface management. problem.
  • an asynchronous callback method, device, computer device, and storage medium are provided.
  • An asynchronous callback method includes:
  • An asynchronous callback device includes:
  • An obtaining module configured to obtain an asynchronous callback instruction and determine a polling thread for responding to the asynchronous callback instruction
  • the query module is configured to query the callback data that meets the preset callback conditions in the pre-configured callback information table according to the preset query mode through the polling thread;
  • a callback module configured to determine a calling server according to the callback data through the polling thread, and perform a corresponding callback operation corresponding to the calling server;
  • An update module configured to receive the callback result corresponding to the calling server through the polling thread, and update the callback data in the callback information table according to the callback result;
  • the polling module is configured to return to the step of querying the callback data that meets the preset callback condition in the pre-configured callback information table according to the preset query mode through the polling thread, until the callback information is targeted.
  • the callback operations performed by the callback data in the table that meet the preset callback conditions are all performed.
  • a computer device includes a memory and one or more processors.
  • the memory stores computer-readable instructions.
  • the computer-readable instructions are executed by the one or more processors, the one or more Each processor implements the steps of the asynchronous callback method provided in any embodiment of this application.
  • One or more non-volatile computer-readable storage media storing computer-readable instructions, which when executed by one or more processors, cause the one or more processors to implement any of the present application. The steps of the asynchronous callback method provided in an embodiment.
  • FIG. 1 is an application scenario diagram of an asynchronous callback method according to one or more embodiments.
  • FIG. 2 is a schematic flowchart of an asynchronous callback method according to one or more embodiments.
  • FIG. 3 is a schematic flowchart of an asynchronous callback method in another embodiment.
  • FIG. 4 is a block diagram of an asynchronous callback device according to one or more embodiments.
  • FIG. 5 is a block diagram of an asynchronous callback device in another embodiment.
  • Figure 6 is a block diagram of a computer device in accordance with one or more embodiments.
  • the asynchronous callback method provided by this application can be applied to the application environment shown in FIG. 1.
  • the callback server 102 communicates with the calling server 104 through the network.
  • the callback server 102 determines a polling thread for responding to the obtained asynchronous callback instruction, and uses the polling thread to query callback data that meets preset callback conditions in a pre-configured callback information table, and determines the calling server 104 according to the callback data and Perform a callback operation, when receiving the call result corresponding to the call server 104, update the callback data in the callback information table according to the call result, and return to the pre-configured callback information table to query the callback that meets the preset callback conditions The step of data continues to be executed until no callback data that meets the preset callback conditions is found in the callback information table.
  • the callback server 102 and the calling server 104 may be implemented by independent servers or a server cluster composed of multiple servers.
  • an asynchronous callback method is provided. Taking the method applied to the callback server in FIG. 1 as an example for illustration, it includes the following steps:
  • Asynchronous callback instructions are instructions used to trigger asynchronous callback operations.
  • Asynchronous callback refers to a callback method that does not require a real-time callback to the caller to return the call result to the caller in real time when the call request sent by the caller is received.
  • the asynchronous call refers to a calling method in which the caller sends the call request to the callback party without waiting for the callback party to perform other operations by performing a corresponding callback response to the callback operation.
  • the asynchronous calling process involves the caller and the called party
  • the asynchronous callback process involves the calling party and the called party
  • the asynchronous calling and the asynchronous callback are two processes corresponding to each other, so the called party and the calling party can be Unified as the caller, the callee and the callback party are unified as the callback party.
  • the calling server is used to represent the calling party
  • the callback server is used to represent the calling party.
  • a thread is a single sequential control flow in computer-readable instructions, and it is a basic unit capable of independent operation and independent scheduling.
  • the polling thread is a thread for responding to asynchronous callback instructions to poll callback data that meets preset callback conditions from the callback information table and perform corresponding callback operations.
  • the callback server detects the current system time in real time. When the detected current system time is consistent with the preset preset trigger time, the callback server triggers to generate a corresponding asynchronous callback instruction according to the preset trigger time.
  • the callback server matches the detected current system time with the preset trigger time obtained from the configuration file. When the match is successful, it indicates that the current system time is consistent with the preset trigger time, and the callback server triggers the generation of the corresponding asynchronous callback instruction.
  • the terminal detects the user's preset trigger operation in real time.
  • the terminal When a preset trigger operation of the user is detected, the terminal generates a corresponding asynchronous callback instruction according to the detected preset trigger operation, and sends the generated asynchronous callback instruction to the callback server.
  • the callback server may create a polling thread for responding to the asynchronous callback instruction according to the obtained asynchronous callback instruction.
  • the callback server can also obtain the currently idle thread from the pre-created thread pool as the polling thread according to the asynchronous callback instruction.
  • the preset query method is a preset method for querying callback data that meets preset callback conditions from the callback information table.
  • the preset query method may specifically be a query method for polling each callback data in the callback information table. For example, the polling thread queries the callback data that meets the preset callback conditions in the callback information table in order from the front to the back.
  • the callback data is the data on which the callback operation is performed.
  • the callback data includes a variety of callback status, number of callbacks, maximum number of retry callbacks, callback type, callback request data, callback network address, callback method, and associated interface return result.
  • the callback status includes the initial status, success or failure, which can be represented by strings, such as 0 for the initial status, 1 for success, and 3 for failure.
  • the maximum number of retry callbacks refers to the maximum number of callback retries allowed.
  • the type of callback can be the name of the callback, such as the short message collection callback.
  • the preset callback condition is a basis for determining whether the callback data in the callback information table is the callback data to be recalled.
  • the preset callback conditions are, for example, callback data with a specified callback state, a maximum number of retry callbacks greater than the preset number, and a callback number less than the maximum number of retry callbacks.
  • the specified state such as callback failure or initial state, the preset number of times such as zero.
  • the callback information table may include multiple callback data sorted according to the insertion time.
  • the sorting position of the callback data with the first insertion time is better than the sorting position of the callback data with the later insertion time, that is, the sorting of the callback data with the earlier insertion time in the callback information table
  • the position is further forward.
  • the callback server compares each piece of callback data in the callback information table with the preset callback condition in order from the front to the rear of the sorted position through the polling thread.
  • the callback server continues to execute the callback data and the preset callback in the sorted position second only to the currently compared callback data according to the order of the sorted position through the polling thread Steps to compare conditions.
  • the callback server performs the following steps S206 and S208 according to the callback data that meets the preset callback condition through a polling thread to implement the callback data that meets the preset callback condition Callback operation.
  • the callback server continues to execute the polling thread from the sorted position corresponding to the callback data corresponding to the currently executed callback operation, in order from the front to the back of the sorted position, and sequentially puts the callback information in the list The step of comparing each callback data with the preset callback condition.
  • the callback server uses a polling thread to sort the position corresponding to the callback data with the highest sort position in the callback information table , That is, from the sorted position corresponding to the first callback data in the callback information table, continue to perform the comparison of each callback data in the callback information table with the preset callback conditions in order from the front to the back of the sorted position Step until no callback data that meets the preset callback condition is found in the callback information table.
  • the callback information table includes callback data A, B, and C.
  • the callback data B meets the preset callback condition.
  • the callback server compares the callback data A with the preset callback condition through the polling thread; since the callback data A does not meet the preset callback condition, the callback server continues to compare the callback data B with the preset callback condition through the polling thread; due to the callback
  • the data B meets the preset callback condition, and the callback server performs the following steps S206 and S208 according to the callback data B through the polling thread; when the steps S206 and S208 are completed, the callback server continues the callback data C and the preset callback through the polling thread Condition comparison; since the callback data C does not meet the preset callback condition, the callback server continues to perform the step of comparing the callback data A with the preset callback condition in the above manner through the polling thread until the callback data A, B, and C are not Meet the preset callback conditions.
  • the callback operation may fail to execute, and when the callback data B is polled again, the callback data B still meets the preset callback conditions, and then continue to follow the callback Data B performs the following steps S206 and S208.
  • the polling thread determines the calling server according to the callback data, and performs a corresponding callback operation corresponding to the calling server.
  • the callback server obtains the callback network address and the callback request data from the currently queried callback data that meets the preset callback condition through the polling thread.
  • the callback server determines the calling server according to the obtained callback network address through the polling thread, and establishes a connection with the determined calling server according to the callback network address, and then sends the corresponding callback request data to the calling server through the established connection.
  • the callback server In order to realize the callback operation corresponding to the currently queried callback data that meets the preset callback condition, so as to realize the callback to the calling server.
  • the callback server performs a callback operation corresponding to the calling server based on the specified unified callback interface through the polling thread. It can be understood that the callback operations performed for different callback data can be implemented based on the specified unified callback interface. In this way, by configuring and managing the specified unified callback interface, multiple callback data callback and unified management can be achieved, which reduces the management complexity of the callback interface, thereby improving management efficiency.
  • the callback result is the result obtained when the callback server performs callback on the calling server according to the callback data.
  • the callback result may be coding information or prompt information used to characterize the success or failure of the callback. For example, 111 means the callback result of successful callback, and 000 means the callback result of failed callback.
  • the calling server performs the corresponding callback operation according to the received callback request data.
  • the calling server obtains the callback result corresponding to the callback operation, and obtains the obtained
  • the corresponding callback result is fed back to the callback server.
  • the callback server queries the callback data corresponding to the callback request data in the callback information table through the polling thread, and according to the received callback As a result, the retrieved callback data is updated in the callback information table.
  • the callback server updates the returned result, the callback status, and the number of callbacks of the associated interface in the retrieved callback data in the callback information table according to the callback result.
  • the callback server performs a callback operation on the callback data B through a polling thread.
  • the callback server updates the return result of the associated interface included in the callback data B to success through the polling thread, the callback status is updated to success, and the number of callbacks is increased by 1.
  • the callback status is updated from the initial status to success, and the number of callbacks is updated from 0 to 1.
  • the callback server updates the return result of the associated interface included in the callback data B to fail through the polling thread, the callback status is updated to fail, and the number of callbacks is increased by 1.
  • the calling server determines the callback thread for performing the corresponding callback operation according to the received callback request data, and executes the callback operation according to the callback request data through the callback thread, and obtains the corresponding callback result, and then feeds back To the callback server.
  • the callback server when the corresponding callback data is successfully updated in the callback information table according to the received callback result through the polling thread, the callback server returns to the order of the sorting position from front to back through the polling thread, and sequentially sets the callback information table
  • the step of comparing each callback data in the callback condition with the preset callback condition continues to be executed, in order to continue to query the callback data that meets the preset callback condition in the callback information table and execute the corresponding callback operation until the callback information table matches
  • the callback data executed by the callback data of the preset callback condition is executed in sequence, the iteration is stopped, and the response to the asynchronous callback instruction is completed.
  • the polling thread used to respond to the asynchronous callback instruction is determined, and the polling thread is used to poll the callback data that meets the preset callback conditions in the pre-configured callback information table, and The corresponding callback operation is performed on the polled callback data, and the callback data in the callback information table is correspondingly updated according to the callback result corresponding to the callback operation.
  • the callback data is managed in a unified manner through the callback information table, and the callback data to be called back is queried in turn according to the method of polling the callback information table and the callback operations are executed in sequence.
  • asynchronous callbacks corresponding to different callback data can be realized through a unified callback interface without the need to configure corresponding callback interfaces for different callback data, which reduces the number of callback interfaces and reduces the complexity of managing callback interfaces, thereby improving The management efficiency of the callback interface is introduced.
  • the preset callback condition includes a plurality of preset filter conditions
  • Step S204 includes: selecting a single preset filter condition from the preset filter conditions that are not currently used to filter the callback data, as the current filter The current filtering conditions; match the current filtering conditions with the previously filtered callback data; determine the callback data matching the current filtering conditions as the currently filtered callback data, and return to the callback that is not currently used for filtering
  • a single preset filter condition is selected from the preset filter conditions of the data, and the step of being the current filter condition at the time of filtering is continued until multiple preset filter conditions are used to filter callback data.
  • the preset filtering conditions are preset conditions for filtering callback data.
  • the preset filtering condition is that the callback state is the preset state, or the maximum number of retry callbacks is greater than the preset number, and the number of callbacks is less than the maximum number of retry callbacks.
  • the preset state such as the initial state or failure, and the preset number of times such as 0.
  • the callback server is locally pre-configured with multiple preset filtering conditions.
  • the callback server filters out one or more callback data that meets the preset callback condition from the callback information table based on the multiple preset filter conditions.
  • the callback server determines the callback data filtered out as the currently filtered callback data, and uses a polling thread to select one or more pre-filters that are not currently used to filter callback data. Select a preset filter condition among the filter conditions as the current filter condition at the time of screening.
  • the callback server matches the selected current filtering conditions with the currently filtered callback data through the polling thread, determines the matched callback data as the currently selected callback data, and returns to the current unused filter Select one preset filter condition from one or more preset filter conditions of the callback data as the current filter condition at the time of filtering, and continue to execute until the multiple preset filter order conditions are used to filter the callback data, Stop the iteration, and determine the callback data that successfully matches the multiple preset filtering conditions as the final filtered callback data.
  • the preset callback condition includes the plurality of preset filter conditions, so the finally filtered callback data is the callback data that meets the preset callback condition, and the finally filtered callback data may be one or more .
  • the callback server uses a polling thread to sort the corresponding corresponding positions in the callback information table according to the plurality of callback data, according to the sort position from the front to the The corresponding sequence is followed by the corresponding callback operation, and the corresponding callback data is updated in the callback information table according to the callback result corresponding to the call server corresponding feedback.
  • the call servers corresponding to the plurality of callback data finally selected may be the same or different.
  • the callback server uses the polling thread to filter out the matching information from the callback information table again according to the multiple iterative filtering methods described above. Preset one or more callback data of the callback condition, and perform corresponding callback operations in sequence until no callback data that matches the preset callback condition is filtered out in the callback information table.
  • the callback server sequentially polls each callback data in the callback information table with the plurality of preset filter conditions according to the order from the front to the rear of the sorted position.
  • the callback server determines the callback data as the callback data that meets the preset callback condition through the polling thread, and executes the corresponding callback according to the above callback method operating.
  • the callback server returns to the order from the front to the back of the sorted position through the polling thread, and sequentially matches each callback data in the callback information table with the multiple preset filter conditions. The steps are continued until no callback data is found in the callback information table that successfully matches the multiple preset filter conditions.
  • one or more callback data that meets the preset callback conditions are selected from the callback information table in an iterative filtering manner, which improves the filtering efficiency and filtering of the callback data Precision.
  • the callback data includes callback request data, callback network address and callback method; step S206 includes: determining the calling server according to the callback network address through the polling thread, and establishing a connection with the calling server; according to the callback through the polling thread Way, the callback request data is sent to the callback server based on the connection.
  • the callback request data is the callback request parameters involved in performing the callback operation.
  • the callback request data may be in json format (JavaScript Object Notation, lightweight data exchange format).
  • Callback network address such as callback URL (Uniform Resource Locator, uniform resource locator).
  • Callback methods can include http (HyperText Transfer Protocol, Hypertext Transfer Protocol) and https (HyperText Transfer Protocol, Secure OverSocket, Secure Socket Layer Hypertext Transfer Protocol), etc.
  • the callback server obtains the callback request data, the callback network address and the callback method from the retrieved callback data through the polling thread, determines the calling server corresponding to the callback data according to the obtained callback network address, and determines The callback network address establishes a connection with the calling server, and then sends the corresponding callback request data to the calling server with the established connection according to the corresponding obtained callback method.
  • the callback server sends the corresponding callback request data to the calling server of the established connection according to the obtained callback mode through the specified unified callback interface based on the established connection through the polling thread.
  • the specified callback request data is sent to the specified calling server according to the callback method specified by the callback data, which improves the execution efficiency of the callback operation.
  • the callback operation for the callback data can be realized by simply configuring the callback data, which reduces the control complexity of the callback operation.
  • step S210 includes: when the callback data is successfully updated by the polling thread, the polling thread is put into a sleep waiting state, and the waiting duration of the polling thread is counted; when the waiting duration reaches the preset waiting duration, Return to the step of querying the callback data that meets the preset callback conditions in the pre-configured callback information table through the polling thread according to the preset query method, until the execution is performed on the callback data that meets the preset callback conditions in the callback information table The callback operation is completed.
  • the preset waiting time refers to querying the callback data in the callback information table twice through the polling thread, and corresponding to the time interval for performing the callback operation, which can be customized according to the actual situation, such as 1 second.
  • the preset wait time refers to the time between the time when the currently executed callback operation is completed and the time when the query data that meets the preset callback condition is queried in the callback information table.
  • the waiting time refers to the length of time that the polling thread is in the sleep waiting state.
  • the callback server causes the polling thread to enter the sleep waiting state, counts the waiting time for the polling thread to enter the sleep waiting state, and compares the statistical data The waiting time is compared with the preset waiting time. It can be understood that when the polling thread enters the sleep waiting state, the polling thread will no longer perform query and callback operations for the callback data.
  • the callback server When the statistical waiting time reaches the preset waiting time, the callback server returns to the order of sorting position from front to back through the polling thread, and compares each piece of callback data in the callback information table with the preset callback condition in turn Continue execution to continue to query the callback data that meets the preset callback conditions in the callback information table and perform the corresponding callback operation until the callback operations that are sequentially executed for the callback data that match the preset callback conditions in the callback information table are completed To stop the iteration and complete the response to the asynchronous callback command.
  • the time interval between two adjacent callback operations can be effectively controlled, so as to realize effective unified management of asynchronous callback and improve management efficiency.
  • the above asynchronous callback method further includes: receiving a call request sent by a call server; determining a business thread to respond to the call request according to the call request; and performing a corresponding call operation according to the call request through the business thread ; When the call operation is completed, obtain the corresponding callback data through the business thread, and insert the obtained callback data into the pre-configured callback information table.
  • the call request is a request for triggering a call operation.
  • the business thread is a thread used to perform a corresponding call operation according to the call request to achieve an effective response to the call request.
  • the calling operation refers to the operation corresponding to the calling request. For example, when the calling request sends a collection short message for the calling short message module, the calling operation refers to calling the short message module according to the calling request to send a collection short message to the user.
  • the callback server receives the call request sent by the call server, and creates a business thread for responding to the call request according to the received call request, and then executes the corresponding call operation according to the call request through the business thread.
  • the callback server obtains the callback data corresponding to the calling request through the business thread, and inserts the obtained callback data into the pre-configured callback information table in the database.
  • the business thread may also be an idle thread obtained from the thread pool by the callback server according to the received call request.
  • the callback server when the callback server inserts the obtained callback data into the callback information table through a business thread, the current system time is obtained as a time stamp corresponding to the callback data, and the corresponding callback is performed according to the time stamp sequence The data is inserted into the callback information table.
  • the callback server receives the information table configuration instruction sent by the terminal, and pre-configures the corresponding callback information table in the database according to the received information table configuration instruction.
  • the calling operation corresponding to the calling request is executed by assigning a business thread, and the corresponding callback data to be called back is inserted into the pre-configured callback information table through the business thread, so as to facilitate the asynchronous callback process
  • the callback data to be called back can be directly queried in the callback information table, and the callback operation is performed, which improves the callback efficiency.
  • an asynchronous callback method is provided.
  • the method specifically includes the following steps:
  • S304 Determine a business thread for responding to the call request according to the call request.
  • S306 Perform a corresponding calling operation according to the calling request through the business thread.
  • the callback data includes callback request data, callback network address, and callback method.
  • the polling thread determines the calling server according to the callback network address, and establishes a connection with the calling server.
  • the polling thread sends the callback request data to the callback server based on the connection according to the callback method.
  • S318 Receive the callback result corresponding to the calling server through the polling thread, and update the callback data in the callback information table according to the callback result.
  • the callback data to be called back is obtained and pre-configured in the callback information table, so that in the asynchronous callback process, the callback information table is polled by the polling thread You can quickly determine the callback data to be recalled and execute the callback operation in sequence.
  • the unified management of multiple callback data can be achieved through simple configuration, and the callback operations can be performed in an orderly manner for the multiple callback data, and the unified callback interface can be configured to implement the corresponding corresponding multiple callback data
  • the callback operation reduces the number of callback interfaces required for configuration, reduces the management complexity of the callback interface, and thus improves the management efficiency of the callback interface.
  • steps in the flowcharts of FIGS. 2-3 are displayed in order according to the arrows, the steps are not necessarily executed in the order indicated by the arrows. Unless clearly stated in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in FIG. 2-3 may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but may be executed at different times. These sub-steps or stages The execution order of is not necessarily sequential, but may be executed in turn or alternately with at least a part of other steps or sub-steps or stages of other steps.
  • an asynchronous callback device 400 including: an acquisition module 402, a query module 404, a callback module 406, an update module 408, and a polling module 410, where:
  • the obtaining module 402 is used to obtain an asynchronous callback instruction and determine a polling thread for responding to the asynchronous callback instruction.
  • the query module 404 is configured to query the callback data that meets the preset callback conditions in the pre-configured callback information table according to the preset query mode through the polling thread.
  • the callback module 406 is configured to determine a calling server according to the callback data through the polling thread, and perform a corresponding callback operation corresponding to the calling server.
  • the update module 408 is configured to receive the callback result corresponding to the calling server through the polling thread, and update the callback data in the callback information table according to the callback result.
  • the polling module 410 is configured to return to the step of querying the callback data that meets the preset callback condition in the pre-configured callback information table according to the preset query mode through the polling thread, until the callback The callback operations performed by the callback data that meets the preset callback conditions in the information table are all executed.
  • the preset callback condition includes multiple preset filter conditions; the query module 404 is also used to select a single preset filter condition from preset filter conditions that are not currently used to filter callback data As the current screening conditions at the time of screening; match the current screening conditions with the callback data filtered out previously; the query module 404 is also used to match the callback data with the current screening conditions Determine the callback data filtered out at the current time, and return to the step of selecting a single preset filter condition from the preset filter conditions that are not currently used to filter the callback data as the current filter condition at the time of screening, Until multiple preset filter conditions are used to filter callback data.
  • the callback data includes callback request data, callback network address and callback method; the callback module 406 is also used to determine the calling server according to the callback network address through the polling thread and communicate with the The calling server establishes a connection; the polling thread sends the callback request data to the callback server based on the connection according to the callback method.
  • the polling module 410 is further configured to put the polling thread in a sleep waiting state when the callback data is successfully updated by the polling thread, and to count the waiting of the polling thread Duration; when the waiting duration reaches the preset waiting duration, return to the step of querying the callback data that meets the preset callback condition in the pre-configured callback information table according to the preset query mode by the polling thread It is executed until the callback operation performed on the callback data that meets the preset callback condition in the callback information table is completed.
  • the asynchronous callback device 400 further includes: a calling module 412;
  • the calling module 412 is configured to receive a calling request sent by a calling server; determine a business thread to respond to the calling request according to the calling request; perform a corresponding calling operation according to the calling request through the business thread; when the When the call operation is completed, the corresponding callback data is obtained through the business thread, and the obtained callback data is inserted into a pre-configured callback information table.
  • Each module in the above-mentioned asynchronous callback device may be implemented in whole or in part by software, hardware, or a combination thereof.
  • the above modules may be embedded in the hardware form or independent of the processor in the computer device, or may be stored in the memory in the computer device in the form of software so that the processor can call and execute the operations corresponding to the above modules.
  • a computer device is provided.
  • the computer device may be a server, and its internal structure may be as shown in FIG. 6.
  • the computer device includes a processor, memory, network interface, and database connected by a system bus.
  • the processor of the computer device is used to provide computing and control capabilities.
  • the memory of the computer device includes a non-volatile storage medium and an internal memory.
  • the non-volatile storage medium stores an operating system, computer-readable instructions, and a database.
  • the internal memory provides an environment for the operation of the operating system and computer-readable instructions in the non-volatile storage medium.
  • the database of the computer device is used to store a pre-configured callback information table and callback data in the callback information table.
  • the network interface of the computer device is used to communicate with external terminals through a network connection.
  • the computer-readable instructions are executed by the processor to implement an asynchronous callback method.
  • FIG. 6 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer equipment to which the solution of the present application is applied.
  • the specific computer equipment may Include more or less components than shown in the figure, or combine certain components, or have a different arrangement of components.
  • a computer device includes a memory and one or more processors.
  • the memory stores computer-readable instructions.
  • the one or more processors implement any one of the applications The steps of the asynchronous callback method provided in the embodiment.
  • One or more non-volatile computer-readable storage media storing computer-readable instructions, which when executed by one or more processors, cause the one or more processors to implement any one of the embodiments of the present application Steps of the provided asynchronous callback method.
  • Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory can include random access memory (RAM) or external cache memory.
  • RAM random access memory
  • DRAM dynamic RAM
  • SDRAM synchronous DRAM
  • DDRSDRAM double data rate SDRAM
  • ESDRAM enhanced SDRAM
  • SLDRAM synchronous chain (Synchlink) DRAM
  • RDRAM direct RAM
  • DRAM direct memory bus dynamic RAM
  • RDRAM memory bus dynamic RAM

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Telephonic Communication Services (AREA)
  • Computer And Data Communications (AREA)

Abstract

一种异步回调方法,包括:获取异步回调指令,并确定用于响应异步回调指令的轮询线程;通过轮询线程按照预设查询方式,在预配置的回调信息表中查询符合预设回调条件的回调数据;通过轮询线程根据回调数据确定调用服务器,并对应于调用服务器执行相应的回调操作;通过轮询线程接收调用服务器对应反馈的回调结果,并根据回调结果在回调信息表中更新回调数据;返回至通过轮询线程按照预设查询方式,在预配置的回调信息表中查询符合预设回调条件的回调数据的步骤继续执行,直至针对回调信息表中符合预设回调条件的回调数据执行的回调操作均执行完毕。

Description

异步回调方法、装置、计算机设备和存储介质
本申请要求于2019年01月02日提交中国专利局,申请号为2019100022696,申请名称为“异步回调方法、装置、计算机设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及一种异步回调方法、装置、计算机设备和存储介质。
背景技术
随着计算机技术的发展,系统间的通信越来越多,对于不能实时返回结果的系统间通信,通常都是采用异步调用的方式返回结果。对于系统间的异步调用,通常是通过特定的回调接口进行回调操作,以实现调用结果的传输。
目前,通常是一个异步调用对应一个回调接口,用于传输相应的调用结果。然而,发明人意识到,随着系统间通信的剧增,系统间的异步调用也急剧增加,使得回调接口的数量也不断增加,从而增加了回调接口管理复杂度,存在回调接口管理效率低的问题。
发明内容
根据本申请公开的各种实施例,提供一种异步回调方法、装置、计算机设备和存储介质。
一种异步回调方法包括:
获取异步回调指令,并确定用于响应所述异步回调指令的轮询线程;
通过所述轮询线程按照预设查询方式,在预配置的回调信息表中查询符合预设回调条件的回调数据;
通过所述轮询线程根据所述回调数据确定调用服务器,并对应于所述调用服务器执行相应的回调操作;
通过所述轮询线程接收所述调用服务器对应反馈的回调结果,并根据所述回调结果在所述回调信息表中更新所述回调数据;及
返回至所述通过所述轮询线程按照预设查询方式,在预配置的回调信息表中查询符合预设回调条件的回调数据的步骤继续执行,直至针对所述回调信息表中符合预设回调条件的回调数据执行的回调操作均执行完毕。
一种异步回调装置包括:
获取模块,用于获取异步回调指令,并确定用于响应所述异步回调指令 的轮询线程;
查询模块,用于通过所述轮询线程按照预设查询方式,在预配置的回调信息表中查询符合预设回调条件的回调数据;
回调模块,用于通过所述轮询线程根据所述回调数据确定调用服务器,并对应于所述调用服务器执行相应的回调操作;
更新模块,用于通过所述轮询线程接收所述调用服务器对应反馈的回调结果,并根据所述回调结果在所述回调信息表中更新所述回调数据;及
轮询模块,用于返回至所述通过所述轮询线程按照预设查询方式,在预配置的回调信息表中查询符合预设回调条件的回调数据的步骤继续执行,直至针对所述回调信息表中符合预设回调条件的回调数据执行的回调操作均执行完毕。
一种计算机设备,包括存储器和一个或多个处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述一个或多个处理器执行时,使得所述一个或多个处理器实现本申请任意一个实施例中提供的异步回调方法的步骤。
一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器实现本申请任意一个实施例中提供的异步回调方法的步骤。
本申请的一个或多个实施例的细节在下面的附图和描述中提出。本申请的其它特征和优点将从说明书、附图以及权利要求书变得明显。计算机可读指令计算机可读指令计算机可读指令计算机可读指令
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。
图1为根据一个或多个实施例中异步回调方法的应用场景图。
图2为根据一个或多个实施例中异步回调方法的流程示意图。
图3为另一个实施例中异步回调方法的流程示意图。
图4为根据一个或多个实施例中异步回调装置的框图。
图5为另一个实施例中异步回调装置的框图。
图6为根据一个或多个实施例中计算机设备的框图。
具体实施方式
为了使本申请的技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
本申请提供的异步回调方法,可以应用于如图1所示的应用环境中。回调服务器102通过网络与调用服务器104通过网络进行通信。回调服务器102确定用于响应所获取到的异步回调指令的轮询线程,通过该轮询线程在预配置的回调信息表中查询符合预设回调条件的回调数据,根据回调数据确定调用服务器104并执行回调操作,在接收到调用服务器104对应反馈的调用结果时,根据该调用结果对应更新回调信息表中的回调数据,并返回至在预配置的回调信息表中查询符合预设回调条件的回调数据的步骤继续执行,直至在回调信息表中没有查询到符合预设回调条件的回调数据。回调服务器102和调用服务器104可以用独立的服务器或者是多个服务器组成的服务器集群来实现。
在其中一个实施例中,如图2所示,提供了一种异步回调方法,以该方法应用于图1中的回调服务器为例进行说明,包括以下步骤:
S202,获取异步回调指令,并确定用于响应异步回调指令的轮询线程。
异步回调指令是用于触发异步回调操作的指令。异步回调是指在接收到调用方发送的调用请求时,无需实时对调用方进行回调以实时向该调用方返回调用结果的回调方式。相应地,异步调用是指调用方向回调方发送调用请求后,无需等待回调方通过执行回调操作对应反馈回调结果而继续执行其他操作的调用方式。可以理解的是,异步调用过程涉及调用方和被调用方,异步回调过程涉及回调方和被回调方,而异步调用与异步回调是相互对应的两个过程,故可将被回调方和调用方统一为调用方,将被调用方和回调方统一为回调方。在本实施例中,用调用服务器表征调用方,用回调服务器表征回调方。
线程是计算机可读指令中一个单一的顺序控制流程,是能独立运行和独立调度的基本单位。轮询线程是用于响应异步回调指令,以从回调信息表中轮询符合预设回调条件的回调数据并执行相应的回调操作的线程。
具体地,回调服务器实时检测当前系统时间,当检测到的当前系统时间与预配置的预设触发时间一致时,回调服务器根据该预设触发时间触发生成相应的异步回调指令。回调服务器将检测到的当前系统时间与从配置文件中获取到的预设触发时间进行匹配。当匹配成功时,表明当前系统时间与预设触发时间一致,回调服务器触发生成相应的异步回调指令。
在其中一个实施例中,终端实时检测用户的预设触发操作。当检测到用户的预设触发操作时,终端根据所检测到的预设触发操作生成相应的异步回 调指令,并将所生成的异步回调指令发送至回调服务器。
在其中一个实施例中,当获取到异步回调指令时,回调服务器可根据所获取到的异步回调指令创建用于响应该异步回调指令的轮询线程。回调服务器也可根据异步回调指令从预先创建的线程池中获取当前空闲的线程作为轮询线程。
S204,通过轮询线程按照预设查询方式,在预配置的回调信息表中查询符合预设回调条件的回调数据。
预设查询方式是预先设定的从回调信息表中查询符合预设回调条件的回调数据的方式。预设查询方式具体可以是轮询回调信息表中各回调数据的查询方式,比如通过轮询线程按照从前往后的顺序依次在回调信息表中查询符合预设回调条件的回调数据。回调数据是执行回调操作所依据的数据。回调数据包括回调状态、回调次数、最大重试回调次数、回调类型、回调请求数据、回调网络地址、回调方式和关联接口返回结果等中的多种。回调状态包括初始状态、成功或失败,可用字符串分别表示,比如0表示初始状态,1表示成功,3表示失败。最大重试回调次数是指允许进行回调重试的最大次数。回调类型可以是回调名称,比如催收短信回调。
预设回调条件是用于判定回调信息表中的回调数据是否为待回调的回调数据的依据。预设回调条件比如回调状态为指定状态、最大重试回调次数大于预设次数、且回调次数小于最大重试回调次数的回调数据。指定状态比如回调失败或初始状态,预设次数比如零。回调信息表中可包括有多个按照插入时间进行排序的回调数据。可以理解的是,在回调信息表中,插入时间在前的回调数据的排序位置优于插入时间在后的回调数据的排序位置,即插入时间越早的回调数据在该回调信息表中的排序位置越靠前。
具体地,回调服务器通过轮询线程按照排序位置从前至后的顺序,依次将回调信息表中的每条回调数据与预设回调条件进行比较。在当前进行比较的回调数据不符合预设回调条件时,回调服务器通过轮询线程按照排序位置的先后顺序,继续执行将排序位置仅次于该当前进行比较的回调数据的回调数据与预设回调条件进行比较的步骤。在当前进行比较的回调数据符合预设回调条件时,回调服务器通过轮询线程根据该符合预设回调条件的回调数据执行下述步骤S206和S208,以实现针对该符合预设回调条件的回调数据的回调操作。当步骤S206和S208依次执行完毕时,回调服务器通过轮询线程从当前执行的回调操作对应的回调数据所对应的排序位置处,继续执行按照排序位置从前至后的顺序,依次将回调信息表中的每条回调数据与预设回调条件进行比较的步骤。
进一步地,当回调信息表中的回调数据按照排序位置从前至后的顺序依 次轮询完毕时,回调服务器通过轮询线程从该回调信息表中排序位置最靠前的回调数据所对应的排序位置处,即从该回调信息表中首条回调数据所对应的排序位置处,继续执行按照排序位置从前至后的顺序,依次将回调信息表中的每条回调数据与预设回调条件进行比较的步骤,直至在该回调信息表中没有查询到符合预设回调条件的回调数据。
举例说明,假设回调信息表中包括回调数据A、B和C。回调数据B符合预设回调条件。回调服务器通过轮询线程将回调数据A与预设回调条件进行比较;由于回调数据A不符合预设回调条件,回调服务器通过轮询线程继续将回调数据B与预设回调条件进行比较;由于回调数据B符合预设回调条件,回调服务器通过轮询线程根据回调数据B执行下述步骤S206和S208;当步骤S206和S208执行完毕时,回调服务器通过轮询线程继续将回调数据C与预设回调条件进行比较;由于回调数据C不符合预设回调条件,回调服务器通过轮询线程按照上述方式继续执行将回调数据A与预设回调条件进行比较的步骤,直至回调数据A、B和C均不符合预设回调条件。可以理解的是,按照上述方式对回调数据B执行回调操作时,该回调操作可能会执行失败,且当再次轮询回调数据B,该回调数据B仍然符合预设回调条件,则继续根据该回调数据B执行下述步骤S206和S208。
S206,通过轮询线程根据回调数据确定调用服务器,并对应于调用服务器执行相应的回调操作。
具体地,回调服务器通过轮询线程从当前所查询到的符合预设回调条件的回调数据中,获取回调网络地址和回调请求数据。回调服务器通过轮询线程根据所获取到的回调网络地址确定调用服务器,并根据该回调网络地址与所确定的调用服务器建立连接,进而通过所建立的连接将相应的回调请求数据发送至调用服务器,以实现对应于该当前所查询到的符合预设回调条件的回调数据的回调操作,从而实现对调用服务器的回调。
在其中一个实施例中,回调服务器通过轮询线程基于指定的统一回调接口执行对应于调用服务器的回调操作。可以理解的是,针对不同的回调数据所执行的回调操作均可基于该指定的统一回调接口来实现。这样,通过配置和管理该指定的统一回调接口即可实现多个回调数据的回调以及统一管理,降低了回调接口的管理复杂度,从而提高了管理效率。
S208,通过轮询线程接收调用服务器对应反馈的回调结果,并根据回调结果在回调信息表中更新回调数据。
回调结果是回调服务器根据回调数据对调用服务器进行回调时所获取到的结果。回调结果可以是用于表征回调成功或回调失败的编码信息或提示信息。举例说明,用111表示回调成功的回调结果,用000表示回调失败的回 调结果。
具体地,调用服务器根据所接收到的回调请求数据执行相应的回调操作,当该对应于回调请求数据的回调操作执行完毕时,调用服务器获取与该回调操作对应的回调结果,并将所获取到的回调结果对应反馈至回调服务器。当通过轮询线程接收到调用服务器针对回调请求数据对应反馈的回调结果时,回调服务器通过该轮询线程在回调信息表中查询与该回调请求数据对应的回调数据,并根据所接收到的回调结果在回调信息表中更新所查询到的回调数据。回调服务器通过该轮询线程根据回调结果在回调信息表中,更新该所查询到的回调数据中的关联接口返回结果、回调状态和回调次数。
举例说明,假设回调服务器通过轮询线程针对回调数据B执行了回调操作。当对应于该回调操作接收到表示回调成功的回调结果时,回调服务器通过轮询线程将回调数据B所包括的关联接口返回结果更新为成功,回调状态更新为成功,以及回调次数加1。以针对回调数据B的第一次回调操作为例,将回调状态由初始状态更新为成功,并将回调次数由0更新为1。当对应于该回调操作接收到表示回调失败的回调结果时,回调服务器通过轮询线程将回调数据B所包括的关联接口返回结果更新为失败,回调状态更新为失败,以及回调次数加1。
在其中一个实施例中,调用服务器根据所接收到的回调请求数据确定用于执行相应回调操作的回调线程,通过该回调线程根据该回调请求数据执行回调操作,并获取相应的回调结果,进而反馈至回调服务器。
S210,返回至通过轮询线程按照预设查询方式,在预配置的回调信息表中查询符合预设回调条件的回调数据的步骤继续执行,直至针对回调信息表中符合预设回调条件的回调数据执行的回调操作均执行完毕。
具体地,当通过轮询线程根据所接收到的回调结果在回调信息表中成功更新相应回调数据后,回调服务器通过该轮询线程返回至按照排序位置从前至后的顺序,依次将回调信息表中的每条回调数据与预设回调条件进行比较的步骤继续执行,以在该回调信息表中继续查询符合预设回调条件的回调数据并执行相应的回调操作,直至针对该回调信息表中符合预设回调条件的回调数据依次执行的回调操作执行完毕时,停止迭代,完成对异步回调指令的响应。
上述异步回调方法,获取到异步回调指令时,确定用于响应该异步回调指令的轮询线程,通过该轮询线程在预配置的回调信息表中轮询符合预设回调条件的回调数据,并针对轮询到的回调数据执行相应的回调操作,进而根据对应于回调操作的回调结果对应更新回调信息表中的回调数据。通过回调信息表统一管理回调数据,按照轮询回调信息表的方式依次查询待回调的回 调数据并依次执行回调操作。这样,通过统一的回调接口即可实现对应于不同回调数据的异步回调,而无需针对不同的回调数据分别配置相应的回调接口,减少了回调接口数量,降低了管理回调接口的复杂度,从而提高了针对回调接口的管理效率。
在其中一个实施例中,预设回调条件包括多个预设筛选条件;步骤S204包括:从当前未用于筛选回调数据的预设筛选条件中选取单个预设筛选条件,作为当次筛选时的当前筛选条件;将当前筛选条件分别与前次筛选出的回调数据进行匹配;将与当前筛选条件相匹配的回调数据确定为当次筛选出的回调数据,并返回至从当前未用于筛选回调数据的预设筛选条件中选取单个预设筛选条件,作为当次筛选时的当前筛选条件的步骤继续执行,直至多个预设筛选条件均用于筛选回调数据。
预设筛选条件是预先设定的用于筛选回调数据的条件。预设筛选条件比如回调状态为预设状态,或者,最大重试回调次数大于预设次数、且回调次数小于最大重试回调次数。预设状态比如初始状态或失败,预设次数比如0。
具体地,回调服务器本地预配置有多个预设筛选条件。回调服务器基于该多个预设筛选条件从回调信息表中筛选出符合预设回调条件的一个或多个回调数据。当前次筛选回调数据的步骤执行完毕时,回调服务器将前次筛选出的回调数据确定为当前已筛选出的回调数据,并通过轮询线程从当前未用于筛选回调数据的一个或多个预设筛选条件中选取一个预设筛选条件,作为当次筛选时的当前筛选条件。回调服务器通过轮询线程将所选取的当前筛选条件分别与当前已筛选出的回调数据进行匹配,将匹配成功的回调数据确定为当次筛选出的回调数据,并返回至从当前未用于筛选回调数据的一个或多个预设筛选条件中选取一个预设筛选条件,作为当次筛选时的当前筛选条件的步骤继续执行,直至该多个预设筛序条件均用于筛选回调数据时,停止迭代,并将与该多个预设筛选条件均匹配成功的回调数据,确定为最终筛选出的回调数据。可以理解的是,预设回调条件包括该多个预设筛选条件,故该最终筛选出的回调数据为符合预设回调条件的回调数据,且该最终筛选出的回调数据可以是一个或多个。
进一步地,当基于多个预设筛选条件最终筛选出的回调数据有多个时,回调服务器通过轮询线程根据该多个回调数据在回调信息表中各自对应的排序位置,按照排序位置从前至后的顺序依次执行相应的回调操作,并根据调用服务器对应反馈的回调结果在回调信息表中更新相应的回调数据。可以理解的是,该最终筛选出的多个回调数据各自对应的调用服务器可相同也可不同。当针对该最终筛选出的多个回调数据依次执行的回调操作均执行完毕时,回调服务器通过轮询线程基于该多个预设筛选条件,按照上述迭代筛选方式 再次从回调信息表中筛选出符合预设回调条件的一个或多个回调数据,并依次执行相应的回调操作,直至在该回调信息表中没有筛选出符合该预设回调条件的回调数据。
在其中一个实施例中,回调服务器通过轮询线程按照排序位置从前至后的顺序,依次将回调信息表中的每个回调数据分别与该多个预设筛选条件进行匹配。在当前进行匹配的回调数据与该多个预设筛选条件均匹配成功时,回调服务器通过轮询线程将该回调数据确定为符合预设回调条件的回调数据,并按照上述回调方式执行相应的回调操作。在当前执行的回调操作执行完毕时,回调服务器通过轮询线程返回至按照排序位置从前至后的顺序,依次将回调信息表中的每个回调数据分别与该多个预设筛选条件进行匹配的步骤继续执行,直至该回调信息表中没有查询到与该多个预设筛选条件均匹配成功的回调数据。
上述实施例中,基于预配置的多个预设筛选条件,按照迭代筛选的方式从回调信息表中筛选出符合预设回调条件的一个或多个回调数据,提高了回调数据的筛选效率和筛选精准性。
在其中一个实施例中,回调数据包括回调请求数据、回调网络地址和回调方式;步骤S206包括:通过轮询线程根据回调网络地址确定调用服务器,并与调用服务器建立连接;通过轮询线程按照回调方式,基于连接将回调请求数据发送至回调服务器。
回调请求数据是执行回调操作时所涉及的回调请求参数,回调请求数据可以是json格式(JavaScript Object Notation,轻量级数据交换格式)。回调网络地址比如回调URL(Uniform Resource Locator,统一资源定位符)。回调方式可包括http(HyperText Transfer Protocol,超文本传输协议)和https(Hyper Text Transfer Protocol over Secure Socket Layer,安全套接字层超文本传输协议)等。
具体地,回调服务器通过轮询线程从所查询到的回调数据中获取回调请求数据、回调网络地址和回调方式,根据所获取到的回调网络地址确定与该回调数据对应的调用服务器,并根据该回调网络地址与该调用服务器建立连接,进而通过已建立的连接,按照对应获取的回调方式将相应的回调请求数据发送至该已建立连接的调用服务器。
在其中一个实施例中,回调服务器通过轮询线程基于已建立的连接通过指定的统一回调接口,按照所获取的回调方式将相应的回调请求数据发送至已建立连接的调用服务器。
上述实施例中,按照回调数据所指定的回调方式将指定的回调请求数据发送至指定的调用服务器,提高了回调操作的执行效率。这样,通过简单的 配置回调数据即可实现针对该回调数据的回调操作,降低了回调操作的控制复杂度。
在其中一个实施例中,步骤S210包括:当通过轮询线程成功更新回调数据时,使轮询线程处于休眠等待状态,并统计轮询线程的等待时长;当等待时长达到预设等待时长时,返回至通过轮询线程按照预设查询方式,在预配置的回调信息表中查询符合预设回调条件的回调数据的步骤继续执行,直至针对回调信息表中符合预设回调条件的回调数据执行的回调操作均执行完毕。
预设等待时长是指通过轮询线程相邻两次在回调信息表中查询回调数据,并对应执行回调操作的时间间隔,可以根据实际情况自定义,比如1秒。在本实施例中,预设等待时长是指当前执行的回调操作执行完毕时的时间,与继续执行在回调信息表中查询符合预设回调条件的回调数据时的时间之间的时间长度。等待时长是指轮询线程处于休眠等待状态的时间长度。
具体地,当通过轮询线程根据所接收到的回调结果成功更新回调数据时,回调服务器使该轮询线程进入休眠等待状态,统计该轮询线程进入休眠等待状态的等待时长,并将统计的等待时长与预设等待时长进行比较。可以理解的是,当轮询线程进入休眠等待状态时,该轮询线程不会再执行针对回调数据的查询与回调操作。当统计的等待时长达到预设等待时长时,回调服务器通过该轮询线程返回至按照排序位置从前至后的顺序,依次将回调信息表中的每条回调数据与预设回调条件进行比较的步骤继续执行,以在该回调信息表中继续查询符合预设回调条件的回调数据并执行相应的回调操作,直至针对该回调信息表中符合预设回调条件的回调数据依次执行的回调操作执行完毕时,停止迭代,完成对异步回调指令的响应。
上述实施例中,通过预配置预设等待时长,可以有效控制相邻两次执行回调操作的时间间隔,实现了异步回调的有效统一管理,提高了管理效率。
在其中一个实施例中,步骤S202之前,上述异步回调方法还包括:接收调用服务器发送的调用请求;根据调用请求确定用于响应调用请求的业务线程;通过业务线程根据调用请求执行相应的调用操作;当调用操作执行完毕时,通过业务线程获取相应的回调数据,并将获取的回调数据插入预配置的回调信息表中。
调用请求是用于触发调用操作的请求。业务线程是用于根据调用请求执行相应的调用操作,以实现对该调用请求的有效响应的线程。调用操作是指针对调用请求对应执行的操作,比如当调用请求为调用短信模块发送催收短信时,调用操作是指根据该调用请求调用短信模块来向用户发送催收短信。
具体地,回调服务器接收调用服务器发送的调用请求,并根据所接收到 调用请求创建用于响应该调用请求的业务线程,进而通过该业务线程根据该调用请求执行相应的调用操作。当调用操作执行完毕时,回调服务器通过该业务线程获取与该调用请求对应的回调数据,并将所获取到的回调数据插入数据库中预配置的回调信息表中。可以理解的是,业务线程也可以是回调服务器根据所接收到的调用请求从线程池中获取的空闲线程。
在其中一个实施例中,回调服务器通过业务线程将所获取到的回调数据插入回调信息表时,获取当前系统时间作为与该回调数据对应的时间戳,并按照时间戳的先后顺序将相应的回调数据插入回调信息表中。
在其中一个实施例中,回调服务器接收终端发送的信息表配置指令,并根据所接收到的信息表配置指令在数据库中预配置相应的回调信息表。
上述实施例中,通过分配业务线程来执行与调用请求对应的调用操作,并通过该业务线程将对应获取、且待回调的回调数据插入预配置的回调信息表中,以便于在异步回调过程中能够直接在回调信息表中查询待回调的回调数据,并执行回调操作,提高了回调效率。
如图3所示,在其中一个实施例中,提供了异步回调方法,该方法具体包括以下步骤:
S302,接收调用服务器发送的调用请求。
S304,根据所述调用请求确定用于响应所述调用请求的业务线程。
S306,通过所述业务线程根据所述调用请求执行相应的调用操作。
S308,当所述调用操作执行完毕时,通过所述业务线程获取相应的回调数据,并将获取的所述回调数据插入预配置的回调信息表中。
S310,获取异步回调指令,并确定用于响应异步回调指令的轮询线程。
S312,通过轮询线程按照预设查询方式,在预配置的回调信息表中查询符合预设回调条件的回调数据;回调数据包括回调请求数据、回调网络地址和回调方式。
S314,通过轮询线程根据回调网络地址确定调用服务器,并与调用服务器建立连接。
S316,通过轮询线程按照回调方式,基于连接将回调请求数据发送至回调服务器。
S318,通过轮询线程接收调用服务器对应反馈的回调结果,并根据回调结果在回调信息表中更新回调数据。
S320,当通过轮询线程成功更新回调数据时,使轮询线程处于休眠等待状态,并统计轮询线程的等待时长。
S322,当等待时长达到预设等待时长时,返回至通过轮询线程按照预设查询方式,在预配置的回调信息表中查询符合预设回调条件的回调数据的步 骤继续执行,直至针对回调信息表中符合预设回调条件的回调数据执行的回调操作均执行完毕。
上述实施例中,当针对调用请求执行的调用操作执行完毕时,获取待回调的回调数据并预配置到回调信息表中,以便于在异步回调过程中,通过轮询线程轮询该回调信息表即可快速确定待回调的回调数据,并依次执行回调操作。这样,通过简单的配置即可实现多个回调数据的统一管理,以及针对该多个回调数据的有序的执行回调操作,且可通过配置统一的回调接口来实现该多个回调数据各自对应的回调操作,减少了所需配置的回调接口数量,降低了回调接口的管理复杂度,从而提高了回调接口的管理效率。
应该理解的是,虽然图2-3的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,图2-3中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。
在其中一个实施例中,如图4所示,提供了一种异步回调装置400,包括:获取模块402、查询模块404、回调模块406、更新模块408和轮询模块410,其中:
获取模块402,用于获取异步回调指令,并确定用于响应所述异步回调指令的轮询线程。
查询模块404,用于通过所述轮询线程按照预设查询方式,在预配置的回调信息表中查询符合预设回调条件的回调数据。
回调模块406,用于通过所述轮询线程根据所述回调数据确定调用服务器,并对应于所述调用服务器执行相应的回调操作。
更新模块408,用于通过所述轮询线程接收所述调用服务器对应反馈的回调结果,并根据所述回调结果在所述回调信息表中更新所述回调数据。
轮询模块410,用于返回至所述通过所述轮询线程按照预设查询方式,在预配置的回调信息表中查询符合预设回调条件的回调数据的步骤继续执行,直至针对所述回调信息表中符合预设回调条件的回调数据执行的回调操作均执行完毕。
在其中一个实施例中,所述预设回调条件包括多个预设筛选条件;所述查询模块404,还用于从当前未用于筛选回调数据的预设筛选条件中选取单 个预设筛选条件,作为当次筛选时的当前筛选条件;将所述当前筛选条件分别与前次筛选出的回调数据进行匹配;所述查询模块404,还用于将与所述当前筛选条件相匹配的回调数据确定为当次筛选出的回调数据,并返回至所述从当前未用于筛选回调数据的预设筛选条件中选取单个预设筛选条件,作为当次筛选时的当前筛选条件的步骤继续执行,直至多个预设筛选条件均用于筛选回调数据。
在其中一个实施例中,所述回调数据包括回调请求数据、回调网络地址和回调方式;回调模块406,还用于通过所述轮询线程根据所述回调网络地址确定调用服务器,并与所述调用服务器建立连接;通过所述轮询线程按照所述回调方式,基于所述连接将所述回调请求数据发送至所述回调服务器。
在其中一个实施例中,轮询模块410,还用于当通过所述轮询线程成功更新所述回调数据时,使所述轮询线程处于休眠等待状态,并统计所述轮询线程的等待时长;当所述等待时长达到预设等待时长时,返回至所述通过所述轮询线程按照预设查询方式,在预配置的回调信息表中查询符合预设回调条件的回调数据的步骤继续执行,直至针对所述回调信息表中符合预设回调条件的回调数据执行的回调操作均执行完毕。
如图5所示,在其中一个实施例中,异步回调装置400,还包括:调用模块412;
调用模块412,用于接收调用服务器发送的调用请求;根据所述调用请求确定用于响应所述调用请求的业务线程;通过所述业务线程根据所述调用请求执行相应的调用操作;当所述调用操作执行完毕时,通过所述业务线程获取相应的回调数据,并将获取的所述回调数据插入预配置的回调信息表中。
关于异步回调装置的具体限定可以参见上文中对于异步回调方法的限定,在此不再赘述。上述异步回调装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。
在其中一个实施例中,提供了一种计算机设备,该计算机设备可以是服务器,其内部结构图可以如图6所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口和数据库。该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机可读指令和数据库。该内存储器为非易失性存储介质中的操作系统和计算机可读指令的运行提供环境。该计算机设备的数据库用于存储预配置的回调信息表和该回调信息表中的回调数据。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计 算机可读指令被处理器执行时以实现一种异步回调方法。
本领域技术人员可以理解,图6中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。
一种计算机设备,包括存储器和一个或多个处理器,存储器中储存有计算机可读指令,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器实现本申请任意一个实施例中提供的异步回调方法的步骤。
一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器实现本申请任意一个实施例中提供的异步回调方法的步骤。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一非易失性计算机可读取存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。

Claims (20)

  1. 一种异步回调方法,包括:
    获取异步回调指令,并确定用于响应所述异步回调指令的轮询线程;
    通过所述轮询线程按照预设查询方式,在预配置的回调信息表中查询符合预设回调条件的回调数据;
    通过所述轮询线程根据所述回调数据确定调用服务器,并对应于所述调用服务器执行相应的回调操作;
    通过所述轮询线程接收所述调用服务器对应反馈的回调结果,并根据所述回调结果在所述回调信息表中更新所述回调数据;及
    返回至所述通过所述轮询线程按照预设查询方式,在预配置的回调信息表中查询符合预设回调条件的回调数据的步骤继续执行,直至针对所述回调信息表中符合预设回调条件的回调数据执行的回调操作均执行完毕。
  2. 根据权利要求1所述的方法,其特征在于,所述预设回调条件包括多个预设筛选条件;所述通过所述轮询线程按照预设查询方式,在预配置的回调信息表中查询符合预设回调条件的回调数据,包括:
    从当前未用于筛选回调数据的预设筛选条件中选取单个预设筛选条件,作为当次筛选时的当前筛选条件;
    将所述当前筛选条件分别与前次筛选出的回调数据进行匹配;及
    将与所述当前筛选条件相匹配的回调数据确定为当次筛选出的回调数据,并返回至所述从当前未用于筛选回调数据的预设筛选条件中选取单个预设筛选条件,作为当次筛选时的当前筛选条件的步骤继续执行,直至多个预设筛选条件均用于筛选回调数据。
  3. 根据权利要求1所述的方法,其特征在于,所述回调数据包括回调请求数据、回调网络地址和回调方式;所述通过所述轮询线程根据所述回调数据确定调用服务器,并对应于所述调用服务器执行相应的回调操作,包括:
    通过所述轮询线程根据所述回调网络地址确定调用服务器,并与所述调用服务器建立连接;及
    通过所述轮询线程按照所述回调方式,基于所述连接将所述回调请求数据发送至所述回调服务器。
  4. 根据权利要求1所述的方法,其特征在于,所述返回至所述通过所述轮询线程按照预设查询方式,在预配置的回调信息表中查询符合预设回调条件的回调数据的步骤继续执行,直至针对所述回调信息表中符合预设回调条件的回调数据执行的回调操作均执行完毕,包括:
    当通过所述轮询线程成功更新所述回调数据时,使所述轮询线程处于休眠等待状态,并统计所述轮询线程的等待时长;及
    当所述等待时长达到预设等待时长时,返回至所述通过所述轮询线程按照预设查询方式,在预配置的回调信息表中查询符合预设回调条件的回调数据的步骤继续执行,直至针对所述回调信息表中符合预设回调条件的回调数据执行的回调操作均执行完毕。
  5. 根据权利要求1至4任一项所述的方法,其特征在于,所述获取异步回调指令,并确定用于响应所述异步回调指令的轮询线程之前,所述方法还包括:
    接收调用服务器发送的调用请求;
    根据所述调用请求确定用于响应所述调用请求的业务线程;
    通过所述业务线程根据所述调用请求执行相应的调用操作;及
    当所述调用操作执行完毕时,通过所述业务线程获取相应的回调数据,并将获取的所述回调数据插入预配置的回调信息表中。
  6. 一种异步回调装置,包括:
    获取模块,用于获取异步回调指令,并确定用于响应所述异步回调指令的轮询线程;
    查询模块,用于通过所述轮询线程按照预设查询方式,在预配置的回调信息表中查询符合预设回调条件的回调数据;
    回调模块,用于通过所述轮询线程根据所述回调数据确定调用服务器,并对应于所述调用服务器执行相应的回调操作;
    更新模块,用于通过所述轮询线程接收所述调用服务器对应反馈的回调结果,并根据所述回调结果在所述回调信息表中更新所述回调数据;及
    轮询模块,用于返回至所述通过所述轮询线程按照预设查询方式,在预配置的回调信息表中查询符合预设回调条件的回调数据的步骤继续执行,直至针对所述回调信息表中符合预设回调条件的回调数据执行的回调操作均执行完毕。
  7. 根据权利要求6所述的装置,其特征在于,所述预设回调条件包括多个预设筛选条件;
    所述查询模块,还用于从当前未用于筛选回调数据的预设筛选条件中选取单个预设筛选条件,作为当次筛选时的当前筛选条件;将所述当前筛选条件分别与前次筛选出的回调数据进行匹配;及
    所述查询模块,还用于将与所述当前筛选条件相匹配的回调数据确定为当次筛选出的回调数据,并返回至所述从当前未用于筛选回调数据的预设筛选条件中选取单个预设筛选条件,作为当次筛选时的当前筛选条件的步骤继续执行,直至多个预设筛选条件均用于筛选回调数据。
  8. 根据权利要求6所述的装置,其特征在于,所述回调数据包括回调请求数据、回调网络地址和回调方式;所述回调模块,还用于通过所述轮询线程根据所述回调网络地址确定调用服务器,并与所述调用服务器建立连接;及通过所述轮询线程按照所述回调方式,基于所述连接将所述回调请求数据发送至所述回调服务器。
  9. 根据权利要求6所述的装置,其特征在于,所述轮询模块,还用于当通过所述轮询线程成功更新所述回调数据时,使所述轮询线程处于休眠等待状态,并统计所述轮询线程的等待时长;及当所述等待时长达到预设等待时长时,返回至所述通过所述轮询线程按照预设查询方式,在预配置的回调信息表中查询符合预设回调条件的回调数据的步骤继续执行,直至针对所述回调信息表中符合预设回调条件的回调数据执行的回调操作均执行完毕。
  10. 根据权利要求6至9任一项所述的装置,其特征在于,所述装置还包括:
    调用模块,用于接收调用服务器发送的调用请求;根据所述调用请求确定用于响应所述调用请求的业务线程;通过所述业务线程根据所述调用请求执行相应的调用操作;及当所述调用操作执行完毕时,通过所述业务线程获取相应的回调数据,并将获取的所述回调数据插入预配置的回调信息表中。
  11. 一种计算机设备,包括存储器和一个或多个处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:
    获取异步回调指令,并确定用于响应所述异步回调指令的轮询线程;
    通过所述轮询线程按照预设查询方式,在预配置的回调信息表中查询符合预设回调条件的回调数据;
    通过所述轮询线程根据所述回调数据确定调用服务器,并对应于所述调用服务器执行相应的回调操作;
    通过所述轮询线程接收所述调用服务器对应反馈的回调结果,并根据所述回调结果在所述回调信息表中更新所述回调数据;及
    返回至所述通过所述轮询线程按照预设查询方式,在预配置的回调信息表中查询符合预设回调条件的回调数据的步骤继续执行,直至针对所述回调信息表中符合预设回调条件的回调数据执行的回调操作均执行完毕。
  12. 根据权利要求11所述的计算机设备,其特征在于,所述预设回调条件包括多个预设筛选条件;所述处理器执行所述计算机可读指令时还执行以下步骤:
    从当前未用于筛选回调数据的预设筛选条件中选取单个预设筛选条件, 作为当次筛选时的当前筛选条件;
    将所述当前筛选条件分别与前次筛选出的回调数据进行匹配;及
    将与所述当前筛选条件相匹配的回调数据确定为当次筛选出的回调数据,并返回至所述从当前未用于筛选回调数据的预设筛选条件中选取单个预设筛选条件,作为当次筛选时的当前筛选条件的步骤继续执行,直至多个预设筛选条件均用于筛选回调数据。
  13. 根据权利要求11所述的计算机设备,其特征在于,所述回调数据包括回调请求数据、回调网络地址和回调方式;所述处理器执行所述计算机可读指令时还执行以下步骤:
    通过所述轮询线程根据所述回调网络地址确定调用服务器,并与所述调用服务器建立连接;及
    通过所述轮询线程按照所述回调方式,基于所述连接将所述回调请求数据发送至所述回调服务器。
  14. 根据权利要求11所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时还执行以下步骤:
    当通过所述轮询线程成功更新所述回调数据时,使所述轮询线程处于休眠等待状态,并统计所述轮询线程的等待时长;及
    当所述等待时长达到预设等待时长时,返回至所述通过所述轮询线程按照预设查询方式,在预配置的回调信息表中查询符合预设回调条件的回调数据的步骤继续执行,直至针对所述回调信息表中符合预设回调条件的回调数据执行的回调操作均执行完毕。
  15. 根据权利要求11至14任一项所述的计算机设备,其特征在于,所述计算机可读指令被所述处理器执行时,使得所述处理器在执行所述获取异步回调指令,并确定用于响应所述异步回调指令的轮询线程之前,还执行以下步骤:
    接收调用服务器发送的调用请求;
    根据所述调用请求确定用于响应所述调用请求的业务线程;
    通过所述业务线程根据所述调用请求执行相应的调用操作;及
    当所述调用操作执行完毕时,通过所述业务线程获取相应的回调数据,并将获取的所述回调数据插入预配置的回调信息表中。
  16. 一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:
    获取异步回调指令,并确定用于响应所述异步回调指令的轮询线程;
    通过所述轮询线程按照预设查询方式,在预配置的回调信息表中查询符合预设回调条件的回调数据;
    通过所述轮询线程根据所述回调数据确定调用服务器,并对应于所述调用服务器执行相应的回调操作;
    通过所述轮询线程接收所述调用服务器对应反馈的回调结果,并根据所述回调结果在所述回调信息表中更新所述回调数据;及
    返回至所述通过所述轮询线程按照预设查询方式,在预配置的回调信息表中查询符合预设回调条件的回调数据的步骤继续执行,直至针对所述回调信息表中符合预设回调条件的回调数据执行的回调操作均执行完毕。
  17. 根据权利要求16所述的存储介质,其特征在于,所述预设回调条件包括多个预设筛选条件;所述计算机可读指令被所述处理器执行时还执行以下步骤:
    从当前未用于筛选回调数据的预设筛选条件中选取单个预设筛选条件,作为当次筛选时的当前筛选条件;
    将所述当前筛选条件分别与前次筛选出的回调数据进行匹配;及
    将与所述当前筛选条件相匹配的回调数据确定为当次筛选出的回调数据,并返回至所述从当前未用于筛选回调数据的预设筛选条件中选取单个预设筛选条件,作为当次筛选时的当前筛选条件的步骤继续执行,直至多个预设筛选条件均用于筛选回调数据。
  18. 根据权利要求16所述的存储介质,其特征在于,所述回调数据包括回调请求数据、回调网络地址和回调方式;所述计算机可读指令被所述处理器执行时还执行以下步骤:
    通过所述轮询线程根据所述回调网络地址确定调用服务器,并与所述调用服务器建立连接;及
    通过所述轮询线程按照所述回调方式,基于所述连接将所述回调请求数据发送至所述回调服务器。
  19. 根据权利要求16所述的存储介质,其特征在于,所述计算机可读指令被所述处理器执行时还执行以下步骤:
    当通过所述轮询线程成功更新所述回调数据时,使所述轮询线程处于休眠等待状态,并统计所述轮询线程的等待时长;及
    当所述等待时长达到预设等待时长时,返回至所述通过所述轮询线程按照预设查询方式,在预配置的回调信息表中查询符合预设回调条件的回调数据的步骤继续执行,直至针对所述回调信息表中符合预设回调条件的回调数据执行的回调操作均执行完毕。
  20. 根据权利要求16至19任一项所述的存储介质,其特征在于,所述 计算机可读指令被所述处理器执行时,使得所述处理器在执行所述获取异步回调指令,并确定用于响应所述异步回调指令的轮询线程之前,还执行以下步骤:
    接收调用服务器发送的调用请求;
    根据所述调用请求确定用于响应所述调用请求的业务线程;
    通过所述业务线程根据所述调用请求执行相应的调用操作;及
    当所述调用操作执行完毕时,通过所述业务线程获取相应的回调数据,并将获取的所述回调数据插入预配置的回调信息表中。
PCT/CN2019/123243 2019-01-02 2019-12-05 异步回调方法、装置、计算机设备和存储介质 Ceased WO2020140680A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910002269.6A CN109783254A (zh) 2019-01-02 2019-01-02 异步回调方法、装置、计算机设备和存储介质
CN201910002269.6 2019-01-02

Publications (1)

Publication Number Publication Date
WO2020140680A1 true WO2020140680A1 (zh) 2020-07-09

Family

ID=66499840

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/123243 Ceased WO2020140680A1 (zh) 2019-01-02 2019-12-05 异步回调方法、装置、计算机设备和存储介质

Country Status (2)

Country Link
CN (1) CN109783254A (zh)
WO (1) WO2020140680A1 (zh)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109783254A (zh) * 2019-01-02 2019-05-21 深圳壹账通智能科技有限公司 异步回调方法、装置、计算机设备和存储介质
CN109961279A (zh) * 2019-03-18 2019-07-02 厦门市易联众易惠科技有限公司 一种基于多策略的his支付状态获取方法及设备
CN110995803B (zh) * 2019-11-22 2022-04-19 用友网络科技股份有限公司 上、下游业务处理方法及系统、计算机可读存储介质
CN111949387B (zh) * 2020-07-17 2022-08-23 上海淇馥信息技术有限公司 一种处理业务任务的方法、装置和电子设备
CN114064776B (zh) * 2021-11-18 2026-02-17 深圳市元征科技股份有限公司 应用程序数据处理方法、系统、计算机设备和存储介质
CN115103009B (zh) * 2022-06-17 2024-10-29 厦门绩牛软件技术有限公司 用于企业应用平台的回调分发方法和系统
CN118350814B (zh) * 2024-06-14 2024-08-20 北京宇信科技集团股份有限公司 分布式跨协议回调交易的生成方法、装置、介质和设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080320146A1 (en) * 2007-06-21 2008-12-25 Microsoft Corporation Establishing interaction between a process and a server process
CN101360060A (zh) * 2008-09-18 2009-02-04 中兴通讯股份有限公司 实现系统间数据交互的处理单元、数据发送/接收方法
CN107679931A (zh) * 2017-08-17 2018-02-09 平安科技(深圳)有限公司 订单异步处理的方法、装置、存储介质及终端
CN108399120A (zh) * 2017-02-06 2018-08-14 腾讯科技(深圳)有限公司 异步消息监控方法和装置
CN109783254A (zh) * 2019-01-02 2019-05-21 深圳壹账通智能科技有限公司 异步回调方法、装置、计算机设备和存储介质

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107463434B (zh) * 2017-08-11 2021-08-24 恒丰银行股份有限公司 一种分布式任务处理方法与设备
CN108846763A (zh) * 2018-06-05 2018-11-20 中国平安人寿保险股份有限公司 核保请求处理方法、装置、计算机设备和存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080320146A1 (en) * 2007-06-21 2008-12-25 Microsoft Corporation Establishing interaction between a process and a server process
CN101360060A (zh) * 2008-09-18 2009-02-04 中兴通讯股份有限公司 实现系统间数据交互的处理单元、数据发送/接收方法
CN108399120A (zh) * 2017-02-06 2018-08-14 腾讯科技(深圳)有限公司 异步消息监控方法和装置
CN107679931A (zh) * 2017-08-17 2018-02-09 平安科技(深圳)有限公司 订单异步处理的方法、装置、存储介质及终端
CN109783254A (zh) * 2019-01-02 2019-05-21 深圳壹账通智能科技有限公司 异步回调方法、装置、计算机设备和存储介质

Also Published As

Publication number Publication date
CN109783254A (zh) 2019-05-21

Similar Documents

Publication Publication Date Title
WO2020140680A1 (zh) 异步回调方法、装置、计算机设备和存储介质
CN112099958B (zh) 分布式多任务管理方法、装置、计算机设备及存储介质
WO2020140683A1 (zh) 任务调度方法、装置、计算机设备和存储介质
CN103516585B (zh) 一种实现消息优先级分发的方法及系统
CN109040227B (zh) 基于区块链的业务请求响应方法、装置和计算机设备
WO2020248375A1 (zh) 数据库间数据同步方法、系统、计算机设备及存储介质
WO2021238796A1 (zh) 下载任务异步处理方法、装置、系统和存储介质
CN114063936A (zh) 一种优化定时任务的方法、系统、设备和存储介质
CN110851248A (zh) 异步任务数据处理方法、装置及计算机可读存储介质
WO2020216077A1 (zh) 一种区块链事件去重方法、装置、计算机设备及存储介质
CN115567388A (zh) 网络切片配置自动更新方法、系统、装置及存储介质
CN112565286A (zh) 一种基于rpc访问的任务响应方法、装置、设备和存储介质
CN104022896B (zh) 一种配置管理方法、装置及网络设备
CN114020368A (zh) 基于状态机的信息处理方法、装置和存储介质
CN106789166A (zh) 一种网元批量配置的方法及装置
CN108259605B (zh) 一种基于多数据中心的数据调用系统及方法
CN114003384A (zh) 任务管理的方法、装置和设备
CN106933932B (zh) 数据处理方法、装置及应用服务器
CN113055498B (zh) 数据源访问方法、装置、存储介质及设备
CN116366724A (zh) 业务流程的处理方法、装置、计算机设备、存储介质
CN116132411A (zh) 一种会议控制方法、装置、电子设备及存储介质
CN107704526A (zh) 数据的存储方法、装置、计算机设备及存储介质
CN108052380B (zh) 业务功能对接方法、装置、计算机设备及存储介质
CN114584625B (zh) 一种消息处理方法、装置、电子设备及存储介质
CN119967442B (zh) 基于用户行为预测的通信数据处理方法和装置及介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19908055

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 22.10.2021)

122 Ep: pct application non-entry in european phase

Ref document number: 19908055

Country of ref document: EP

Kind code of ref document: A1