Search

CN-115714802-B - Cross-system call result tri-state processing method and system

CN115714802BCN 115714802 BCN115714802 BCN 115714802BCN-115714802-B

Abstract

The invention provides a three-state processing method and a three-state processing system for cross-system call results, wherein the method comprises the steps of initiating a call request to a called party, obtaining a call result when a call response from the called party is received, executing a corresponding successful business process or a corresponding failure business process when the call result is successful or failed, initiating an inquiry request to the called party when the call response is received overtime, obtaining the call result when the inquiry response from the called party is received, executing the corresponding successful business process or the corresponding failure business process when the call result is successful or failed, performing forward compensation when the call result is unprocessed, determining the call result of the call request according to business trends when the inquiry response is not received for N times, and storing call data corresponding to the call request into a database. The method is strong in universality and wide in application range, and timeliness and definition of call result acquisition are guaranteed.

Inventors

  • CHUN YU
  • ZHANG YUPING
  • HE DANGQING
  • WANG RIQING

Assignees

  • 深圳市雁联计算系统有限公司

Dates

Publication Date
20260505
Application Date
20221109

Claims (8)

  1. 1. A cross-system call result tri-state processing method, comprising: Initiating a call request to a called party; when receiving a call response from the called party, analyzing the call response to obtain a call result, and when the call result is success or failure, executing a corresponding success business process or failure business process; when the call response receives the timeout, an inquiry request is initiated to the called party; When receiving the inquiry response from the called party, analyzing the inquiry response to obtain a calling result, and not inquiring any more, executing a corresponding successful business process or a corresponding failed business process when the calling result is successful or failed, and performing forward compensation when the calling result is unprocessed; When the inquiry response is not received for N times, determining a calling result of the calling request according to the service tendency, storing calling data corresponding to the calling request into a database, and not inquiring any more; The business trends are determined according to business scenes, including optimistic trends and pessimistic trends; the determining the calling result of the calling request according to the service tendency specifically comprises the following steps: When the calling request is that the service scene belongs to optimistic tendency, the calling result is successful; and when the calling request is that the service scene belongs to pessimistic trend, the calling result is failure.
  2. 2. The cross-system call result tri-state processing method of claim 1, wherein, The inquiry request is used for inquiring the calling result of the called party.
  3. 3. The cross-system call result tri-state processing method of claim 1, wherein, Acquiring call data with the business trend being optimistic trend from the database at regular time, and performing forward compensation; and acquiring call data with pessimistic service trend from the database at regular time, and carrying out back flushing.
  4. 4.A cross-system call result tri-state processing method in accordance with claim 3 wherein said forward compensation comprises: initiating a call request corresponding to the obtained call data to a called party, and performing forward compensation at the time; When the calling result of the forward compensation is successful, executing the successful business flow, updating the calling result of the calling data in the database to be successful, wherein the calling data does not perform forward compensation any more; when the calling result of the forward compensation is failure and the failure cause is that the record of the success of the calling result exists, executing the success business flow, updating the calling result of the calling data in the database to be success, and the calling data does not carry out the forward compensation any more; When the calling result of the forward compensation is failure and the failure cause is that the record of the calling result is failure exists or the calling response of the forward compensation is received for a time-out, the forward compensation fails.
  5. 5. A cross-system call result tri-state processing method as claimed in claim 3, wherein said back flushing comprises: sending a positive flushing request for canceling the original calling request to the called party, and carrying out the reverse flushing; When the positive result of the current reverse flushing is successful, executing the failure service flow, updating the calling result of the calling data in the database to be failure, wherein the calling data does not perform reverse flushing any more; When the positive result of the current reverse flushing is failure and the failure cause is that the record of the failure exists, executing the failure business flow, updating the calling result of the calling data in the database to be failure, and the calling data does not perform reverse flushing any more; When the positive result of the current backward punching is failure and the failure cause is that the calling result is successful record or the current backward punching is overtime, the current backward punching fails.
  6. 6. The cross-system call result tri-state processing method according to claim 4 or 5, wherein, And if the triggering of the forward compensation or the triggering of the backward flushing on the same day reaches a threshold value, manually updating the corresponding calling result in the database.
  7. 7. A cross-system call result tri-state processing system, comprising: the called party module is used for returning a calling response according to the calling request and returning a query response according to the query response; The main calling party module is used for initiating the calling request to the called party module, analyzing the calling response to obtain a calling result when receiving the calling response, and executing a corresponding successful business process or a corresponding failed business process when the calling result is successful or failed; when the call response is received for a time-out, the inquiry request is initiated to the called party module; When the inquiry response is received, analyzing the inquiry response to obtain a calling result, and not inquiring any more, when the calling result is success or failure, executing a corresponding success business process or failure business process, and when the calling result is unprocessed, performing forward compensation; When the inquiry response is not received for N times, determining a calling result of the calling request according to the service tendency, storing calling data corresponding to the calling request into a database, and not inquiring any more; The business trends are determined according to business scenes, including optimistic trends and pessimistic trends; The main modulator module is specifically configured to: When the calling request is that the service scene belongs to optimistic tendency, the calling result is successful; and when the calling request is that the service scene belongs to pessimistic trend, the calling result is failure.
  8. 8. The cross-system call result tri-state processing system of claim 7, wherein, The master modulator module is further configured to: acquiring call data with the business trend being optimistic trend from the database at regular time, and performing forward compensation; and acquiring call data with pessimistic service trend from the database at regular time, and carrying out back flushing.

Description

Cross-system call result tri-state processing method and system Technical Field The invention belongs to the technical field of computer software, and particularly relates to a cross-system call result tri-state processing method and system. Background In the field of computer software, cross-system calls are typically involved. Cross-system calls interact through interface specifications agreed in advance by both parties. The basic flow is shown in fig. 1, a master party (also called a request sender and the like) acquires information of an address, a port and the like where a called party (also called a receiving request party) is located, the master party sends a request message to the called party according to interface specifications, the called party receives the request message and analyzes the request message to perform service processing, the called party returns a processing result to the master party through a response message according to the interface specifications, and the master party receives the response message and analyzes the response message and performs subsequent processing according to the result of the response message. The response message results are generally two types, success or failure. Whether successful or failed, the result is explicit, and the host may explicitly perform subsequent logic processing according to the result. Then, in the actual calling process, the situation that the master calling party cannot obtain a definite result (unknown result) may occur, for example, the master calling party sends out the request message, but the called party does not receive the request message due to abnormal reasons such as network communication and the like. The master modulator sends out a request message, the modulated party receives the request message, but the modulated party generates an abnormality in the processing process, and the modulated party does not return a response message. The main modulator sends out the request message, the called party receives the request message, and returns the response message after the business processing is completed, but the main modulator does not receive the response message due to abnormal reasons such as network communication and the like. The scenes can lead the main call to have an unknown result, so that the main call party cannot easily carry out subsequent processing when the call is successful, and cannot easily carry out subsequent processing when the call is failed. Disclosure of Invention Aiming at the defects in the prior art, the invention provides a cross-system call result tri-state processing method, which is used for determining call results in three states of success, failure and unknown of the cross-system call result, has strong universality and wide application range, and ensures timeliness and definition of call result acquisition. A cross-system call result tri-state processing method comprises the following steps: Initiating a call request to a called party; when receiving the call response from the called party, analyzing the call response to obtain a call result, and when the call result is success or failure, executing a corresponding success business process or failure business process; When the call response is received for a time-out, an inquiry request is initiated to the called party; When receiving the inquiry response from the called party, analyzing the inquiry response to obtain a calling result, and not inquiring any more; executing corresponding successful business flow or failure business flow when the calling result is successful or failure, and performing forward compensation when the calling result is unprocessed; when the inquiry response is not received for N times, determining the calling result of the calling request according to the service trend, storing the calling data corresponding to the calling request into a database, and not inquiring any more, and executing the corresponding successful service flow or failed service flow when the calling result is successful or failed. Further, the query request is used to query the called party for the call result. Further, the business trends are determined according to business scenarios, including optimistic and pessimistic trends; The method for determining the calling result of the calling request according to the service tendency specifically comprises the following steps: When the calling request service scene belongs to optimistic tendency, the calling result is successful; When the calling request service scene belongs to pessimistic trend, the calling result is failure. Further, call data with the business trend being optimistic trend is regularly obtained from the database, and forward compensation is carried out; And acquiring call data with pessimistic service trend from the database at regular time, and carrying out back flushing. Further, the forward compensation includes: Initiating a call request corresponding to the acquired