Third-party connection exception handling method and system

By using Rabbitmq message queue and docking subsystem unified scheduling in high concurrency scenarios, and automatically or manually handle third-party docking exceptions, the problems of low docking exception handling efficiency and large system burden in the existing technology are solved, and the system business is achieved smoothly Improve the performance and fault tolerance capabilities.

CN114217932BActive Publication Date: 2024-11-26四川启睿克科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111600345.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-24
Publication Date
2024-11-26
Estimated Expiration
2041-12-24

AI Technical Summary

Technical Problem

In high concurrency scenarios, it is difficult for third-party docking exception handling to ensure the smooth progress of system business. Current technologies such as increasing timeout time and retry methods may affect system efficiency or increase burden.

Method used

By extracting the types and processing methods of the business system, using the Rabbitmq message queue for unified scheduling, automatically or manually handle exceptions, including network connection timeout, data format exceptions and request status exceptions, using try-catch package to connect to the docking request, and in the number of failures Manual intervention is performed after more than three times.

Benefits of technology

Effectively handle third-party docking exceptions in high concurrency scenarios, ensure the smooth progress of system business, and improve the system's fault tolerance capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114217932B_ABST
    Figure CN114217932B_ABST
Patent Text Reader

Abstract

The present invention discloses a third-party docking exception processing method, comprising: extracting the exception type and exception processing method information of the business system, and entering them into the docking subsystem; the business system initiates a third-party docking request, and sends the docking information to the Rabbitmq message queue; the docking subsystem consumes the docking information received in the Rabbitmq message queue, initiates a request to the third-party system according to the third-party address and protocol type, and sends the docking information to the third party; the docking subsystem receives the business processing result returned by the third-party system, judges the result, and performs different processing according to whether there is an exception; the docking exception information is pushed to the business person in charge, so as to facilitate human intervention processing; the present invention also discloses a third-party docking exception processing system; the present invention can ensure the smooth operation of the system business in a high-concurrency scenario, and can realize the processing of abnormal situations.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a third-party docking exception processing method and system. Background Art

[0002] In the process of software system development, with the popularity of microservice concepts and designs, more and more businesses and scenarios need to be connected with third parties, such as production information synchronization, inventory information synchronization, third-party services, etc. In the actual system connection process, various abnormal situations often occur due to network, program and other reasons, thus affecting the overall business process; in addition, in high-concurrency scenarios, conventional synchronization methods may affect the work efficiency of the original business and greatly affect the normal development of the business.

[0003] The current methods for handling connection anomalies include increasing the timeout period and increasing retries. Increasing the timeout period does not solve the problem of interrupting business due to anomalies; directly using retries may greatly increase the system burden and affect service efficiency. Summary of the invention

[0004] In order to solve the problems existing in the prior art, the purpose of the present invention is to provide a third-party docking exception handling method and system, which is used to solve the handling of exception problems when the business system and the third-party system are docked in high-concurrency scenarios, ensure the smooth operation of the system's business, and increase the system's fault tolerance.

[0005] To achieve the above object, the technical solution adopted by the present invention is: a third-party docking exception handling method, comprising the following steps:

[0006] Step 1: Extract the exception types and exception handling information of the business system and enter them into the docking subsystem;

[0007] Step 2: The business system initiates a third-party connection request and sends the connection information to the Rabbitmq message queue;

[0008] Step 3: The docking subsystem consumes the docking information received in step 2 in the Rabbitmq message queue, initiates a request to the third-party system according to the third-party address and protocol type, and sends the docking information to the third party;

[0009] Step 4: The docking subsystem receives the business processing results returned by the third-party system, judges the results, and performs different processing according to whether there are any abnormalities;

[0010] Step 5: Push the connection exception information to the business manager to facilitate human intervention.

[0011] As a preferred implementation, in step 1, the exception types include network connection timeout, data format exception and request status exception, and the exception handling methods include automatic retry and manual handling.

[0012] As another preferred implementation, in step 2, the docking information includes a message ID, a third-party address, a protocol type, a docking service ID, and request parameters.

[0013] As another preferred implementation, in step 3, when initiating a connection request to a third party, trycatch is used to wrap everything up; wherein, the connection subsystem consumes Rabbitmq messages in a manual signing manner.

[0014] As another preferred implementation, in step 4, the docking subsystem performs exception processing including the following steps:

[0015] A. If no abnormal information is returned, the connection is completed;

[0016] B. Program exception, obtain the type of this exception, and find the exception handling method according to the exception type;

[0017] C. Automatic processing mode: Check whether the number of failures exceeds 3 times. If it does not exceed 3 times, return the message to the Rabbitmq queue for operation, record the exception, and increase the number of exceptions. If it exceeds 3 times, manually sign for the Rabbitmq message and save the exception information.

[0018] D. The processing method is manual processing. According to the saved exception information, a manual page is provided for manual retry.

[0019] The present invention also provides a third-party docking exception processing system, comprising: a business system, a docking subsystem and a third-party system; wherein:

[0020] The business system is used for business processing and initiating third-party connection requests;

[0021] The third-party system is used to receive docking requests and perform specific business processing;

[0022] The docking subsystem is used to uniformly schedule docking and analyze and process the docking results.

[0023] As a preferred implementation, the docking subsystem includes an abnormal basic information maintenance module, an abnormal logic processing module, a docking module, an abnormal record tracing module and an abnormal manual maintenance module; wherein:

[0024] The exception basic information maintenance module is used to obtain all exception types and exception handling methods of the business system;

[0025] The docking module is used to consume the Rabbitmq message queue, receive the docking information of the business system, initiate a docking request to the third-party system, and receive the return result;

[0026] The exception logic processing module is used to analyze the third-party business processing results and perform different logic processing according to different exception types and exception processing methods;

[0027] The abnormal system tracing module is used to store the abnormal information analyzed and processed by the abnormal logic processing module, and provide query function for system tracing;

[0028] The exception manual maintenance module is used to manually handle exceptions, and the relevant responsible person can continue to try to reconnect.

[0029] The beneficial effects of the present invention are:

[0030] Aiming at the abnormal situation of third-party docking, the present invention introduces Rabbitmq message queue and unified scheduling and processing of docking subsystems, so as to ensure the smooth operation of system business in high concurrency scenarios and realize the processing of abnormal situations. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 This is a flow chart of a method for handling third-party connection exceptions in Embodiment 1 of the present invention;

[0032] Figure 2 This is a structural block diagram of the third-party docking exception handling system in Example 2 of the present invention. DETAILED DESCRIPTION

[0033] The embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0034] Example 1

[0035] like Figure 1 As shown, a method for handling third-party connection exceptions includes the following steps:

[0036] Step 1: Extract the exception types and exception handling methods of the business system and enter them into the docking subsystem; the exception types include network connection timeout, data format exception, request status exception, etc., and the handling methods include automatic retry and manual processing;

[0037] Step 2: The business system initiates a third-party docking request and sends the docking information to the Rabbitmq message queue; the docking information includes the message ID, third-party address, protocol type, docking business ID, request parameters, etc.

[0038] Step 3: The docking subsystem consumes the docking information received in step 2 in the Rabbitmq message queue, initiates a request to the third-party system according to the third-party address and protocol type, and sends the docking service ID and request parameters to the third party. When initiating a docking request to a third party, use try catch to wrap everything. Among them, the docking subsystem consumes Rabbitmq messages by manual signing;

[0039] Step 4: The docking subsystem receives the business processing results returned by the third party, judges the results, and performs different processing according to whether there are any exceptions. The docking subsystem performs exception processing including the following steps:

[0040] A: If no abnormal information is returned, the connection is completed;

[0041] B: Program exception, get the type of this exception, and find the exception handling method according to the exception type;

[0042] C: Automatic processing mode, determine whether the number of failures exceeds 3 times. If it does not exceed 3 times, return the message to the Rabbitmq queue for operation, record the exception, and increase the number of exceptions. If it exceeds 3 times, manually sign for the Rabbitmq message and save the exception information.

[0043] D: The processing method is manual processing. According to the saved exception information, a manual page is provided for manual retry;

[0044] Step 5: Push the system connection exception information to the business manager to facilitate human intervention.

[0045] Example 2

[0046] like Figure 2 As shown, a third-party docking exception handling system includes a business system, a docking subsystem, and a third-party system, wherein the docking subsystem includes an exception basic information maintenance module, an exception logic processing module, a docking module, an exception record tracing module, and an exception manual maintenance module.

[0047] The business system is used for business processing and initiating third-party connection requests;

[0048] The third-party system is used to receive docking requests and perform specific business processing;

[0049] The docking subsystem is used to uniformly schedule docking and analyze and process the docking results; among them, the exception basic information maintenance module is used to obtain all exception types and exception handling methods of the business system; the docking module is used to consume the Rabbitmq message queue, receive the docking information of the business system, initiate a docking request to the third-party system, and receive the return result; the exception logic processing module is used to parse the third-party business processing results, and perform different logical processing according to different exception types and exception handling methods; the exception system tracing module user stores the exception information analyzed and processed by the exception logic processing module, and provides a query function for system tracing; the exception manual maintenance module is used to manually handle the exception, and the relevant responsible person can continue to try to re-dock.

[0050] The above-mentioned embodiments only express the specific implementation of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention.

Claims

1. A method for handling exceptions in third-party docking. It is characterized in that A third-party docking exception handling system is used to implement the third-party docking exception handling system, which includes: a business system, a docking subsystem and a third-party system; wherein: The business system is used for business processing and initiating third-party connection requests; The third-party system is used to receive connection requests and perform business processing; The docking subsystem is used to centrally schedule docking, analyze and process docking results, and store information on business system exception types and exception handling methods; The docking subsystem includes an abnormal basic information maintenance module, an abnormal logic processing module, a docking module, an abnormal record tracing module and an abnormal manual maintenance module; wherein: The exception basic information maintenance module is used to obtain all exception types and exception handling methods of the business system; The docking module is used to consume the Rabbitmq message queue, receive the docking information of the business system, initiate a docking request to the third-party system, and receive the return result; The exception logic processing module is used to analyze the third-party business processing results and perform different logic processing according to different exception types and exception processing methods; The abnormal system tracing module is used to store the abnormal information analyzed and processed by the abnormal logic processing module, and provide query function for system tracing; The abnormal manual maintenance module is used to manually handle the abnormality and continue to try to reconnect; The method comprises the following steps: Step 1: Extract the exception types and exception handling method information of the business system and enter them into the docking subsystem; the exception types include network connection timeout, data format exception and request status exception, and the exception handling methods include automatic retry and manual processing; Step 2: The business system initiates a third-party connection request and sends the connection information to the Rabbitmq message queue; Step 3: The docking subsystem consumes the docking information received in step 2 in the Rabbitmq message queue, initiates a request to the third-party system according to the third-party address and protocol type, and sends the docking information to the third party; Step 4: The docking subsystem receives the business processing results returned by the third-party system, judges the results, and performs different processing according to whether there are any abnormalities; Step 5: Push the connection exception information to the business manager for human intervention.

2. The third-party docking exception handling method according to claim 1, It is characterized in that In step 2, the docking information includes a message ID, a third-party address, a protocol type, a docking service ID, and request parameters.

3. The third-party docking exception handling method according to claim 1, It is characterized in that In step 3, when initiating a connection request to a third party, try catch is used to wrap everything up; the connection subsystem consumes RabbitMQ messages by manually signing for them.

4. The method for handling third-party connection exceptions according to claim 1, It is characterized in that In step 4, the docking subsystem performs exception handling including the following steps: A. If no abnormal information is returned, the connection is completed; B. Program exception, obtain the type of this exception, and find the exception handling method according to the exception type; C. Automatic processing mode: Check whether the number of failures exceeds 3 times. If it does not exceed 3 times, return the message to the Rabbitmq queue for operation, record the exception, and increase the number of exceptions. If it exceeds 3 times, manually sign for the Rabbitmq message and save the exception information. D. The processing method is manual processing. According to the saved exception information, a manual page is provided for manual retry.