Intelligent service switching method and system based on real-time operation condition change

By analyzing the business logic operation data of the interface caller in real time, determining priority and adjusting the call logic in real time, the problem of waste of system resources caused by external interface calls in traditional design is solved, and more efficient system operation and interface performance is achieved.

CN119960934APending Publication Date: 2025-05-09AISINO CORPORATION
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411980129.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-05-09

AI Technical Summary

Technical Problem

In traditional design, when calling external interfaces, in order to ensure normal operation of the business, alternate interfaces or paths are usually used, which causes the system to increase its own interface burden when it is unstable and waste system resources.

Method used

Provide a business intelligent switching method based on real-time operation changes. By analyzing the business logic operation data of the interface caller, determining the caller's priority and switching priority, and adjusting the call logic in real time to optimize system resource utilization.

Benefits of technology

Through intelligent switching, the system operation efficiency is improved, the interface performance is optimized, and the normal and efficient return of business processes is ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119960934A_ABST
    Figure CN119960934A_ABST
Patent Text Reader

Abstract

The invention discloses an intelligent business switching method and system based on real-time operation condition change. The method comprises the following steps: according to operation data of business logic of an interface calling party; determining the priority and the switching priority of the first service operation logic of the calling party; if no priority data exists in the cache, loading a first service operation logic priority and a switching priority, and taking the priority as default priorities; if the priority data exists in the cache and the interface is not called for the first time, judging the execution capability of the called party used in the last time period by calculating the data success rate and the response time in the configured time period; if the execution force does not meet the requirement, acquiring a next called party in a switching priority sequence, and updating the called party into a cache; and if the executive force meets the requirement, taking the current called party as the first priority to update the priority data. The system operation efficiency is improved, the interface performance is improved, and normal and efficient return of the business process is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of load optimization, and in particular to a method and system for intelligent business switching based on real-time operating status changes. Background Art

[0002] In traditional designs, when external interfaces are called, backup interfaces or paths are usually used to ensure normal business operation. In a sequential process, it is determined one by one whether the current caller can return as expected. In this case, a certain caller is usually called first, and the code logic has a strong dependence on the front caller. When the system is unstable, the burden on its own interface is increased, wasting system resources. Summary of the invention

[0003] In view of the above technical problems, the present invention provides a service intelligent switching method based on real-time operation status changes, comprising:

[0004] According to the operation data of the business logic of the interface caller; determining the priority and switching priority of the first business operation logic of the caller;

[0005] When the automatic switching logic is triggered, if there is no priority data in the cache, the first service operation logic priority and the switching priority are loaded, and the first service operation logic priority is used as the default priority;

[0006] If there is priority data in the cache and it is not the first call to the interface, the execution capability of the called party used in the previous time period is determined by calculating the data success rate and response time in the configured time period;

[0007] If the execution capability does not meet the requirement, the next callee in the switching priority order is obtained and the callee is updated to the cache; if the execution capability meets the requirement, the priority data is updated with the current callee as the first priority.

[0008] Furthermore, it also includes:

[0009] If there is priority data in the cache and it is not the first time the interface is called, the first business operation logic priority is used as the default priority.

[0010] Furthermore, by calculating the data success rate and response time within the configured time period, the execution capability of the callee used in the previous time period is determined, including:

[0011] If the data success rate within the configured time period is less than the set value or the average execution time is longer than the expected time, it is determined that the execution capacity does not meet the requirements;

[0012] If the data success rate within the configured time period is greater than the set value and the average execution time is less than the expected time, the execution capacity is determined to meet the requirements.

[0013] Furthermore, it also includes:

[0014] Updates cached data using the default priority.

[0015] Furthermore, if the execution capability meets the requirement, after the priority data is updated with the current callee as the first priority, the following is further included:

[0016] Record the data success rate and response time within the configured time period, and record the change log.

[0017] The present invention also provides a service intelligent switching system based on real-time operation status changes, including:

[0018] The priority determination module is used to determine the priority and switching priority of the first business operation logic of the caller according to the operation data of the business logic of the interface caller;

[0019] A first priority loading module, used for loading the first service operation logic priority and the switching priority when the automatic switching logic is triggered, if there is no priority data in the cache, and using the first service operation logic priority as the default priority;

[0020] The execution capability calculation module is used to determine the execution capability of the callee used in the previous time period by calculating the data success rate and response time in the configured time period if there is priority data in the cache and it is not the first call to the interface;

[0021] The priority update module is used to obtain the next callee in the switching priority order and update the callee to the cache if the execution power does not meet the requirements; if the execution power meets the requirements, the priority data is updated with the current callee as the first priority.

[0022] Furthermore, it also includes:

[0023] If the second priority loading module has priority data in the cache and it is not the first time the interface is called, the first business operation logic priority is used as the default priority.

[0024] Furthermore, the execution capability calculation module includes:

[0025] If the data success rate within the configured time period is less than the set value or the average execution time is longer than the expected time, it is determined that the execution capacity does not meet the requirements;

[0026] If the data success rate within the configured time period is greater than the set value and the average execution time is less than the expected time, the execution capacity is determined to meet the requirements.

[0027] Furthermore, it also includes:

[0028] Update module, used to update cache data with default priority.

[0029] Furthermore, it also includes:

[0030] The data recording module is used to record the data success rate and response time within the configured time period and record the change log.

[0031] The present invention provides a business intelligent switching method and system based on real-time operation status changes, which uses various data to record the operation status of the caller, analyzes the operation status of the caller, and makes real-time changes to the calling logic to achieve the effect of intelligent switching, improve system operation efficiency, improve interface performance, and ensure normal and efficient return of business processes. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 It is a flow chart of a method for intelligently switching services based on real-time operation status changes provided by an embodiment of the present invention;

[0033] Figure 2 It is a basic process execution logic diagram involved in the embodiment of the present invention;

[0034] Figure 3 It is a structural diagram of a business intelligent switching system based on real-time operation status changes provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0035] Many specific details are set forth in the following description to facilitate a full understanding of the present invention. However, the present invention can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of the present invention, so the present invention is not limited to the specific implementation disclosed below.

[0036] Example 1

[0037] The present invention provides a method and system for intelligent business switching based on real-time operation status changes, which uses various data to record the operation status of the caller, analyzes the operation status of the caller, and changes the call logic in real time to achieve the effect of intelligent switching, improve the system operation efficiency, improve the interface performance, and ensure the normal and efficient return of the business process. The method includes the following steps:

[0038] Step S101, according to the operation data of the service logic of the interface caller; determine the priority and switching priority of the first service operation logic of the caller.

[0039] By using the same business logic of the called interface and the characteristics of request and return messages, the code logic unifies the calling logic of each interface, gives each caller a feature number, and records each caller's feature number, request return key fields, request time, request results, calling order and other parameters into the log system as the prerequisite data of the present invention for data analysis and processing.

[0040] By analyzing the operation data of the service logic of the interface caller, the priority and switching priority of the first service operation logic of the caller (ie, the current one) are determined.

[0041] Step S102, when the automatic switching logic is triggered, if there is no priority data in the cache, the first business operation logic priority and the switching priority are loaded, and the first business operation logic priority is used as the default priority.

[0042] If there is priority data in the cache and it is not the first time the interface is called, the first service operation logic priority is used as the default priority, and the cache data is updated using the default priority.

[0043] Step S103, if there is priority data in the cache and it is not the first call to the interface, the execution capability of the called party used in the previous time period is determined by calculating the data success rate and response time in the configured time period.

[0044] If the data success rate within the configured time period is less than the set value or the average execution time is longer than the expected time, it is determined that the execution capacity does not meet the requirements;

[0045] If the data success rate within the configured time period is greater than the set value and the average execution time is less than the expected time, the execution capacity is determined to meet the requirements.

[0046] Step S104, if the execution capability does not meet the requirement, the next callee in the switching priority order is obtained, and the callee is updated to the cache; if the execution capability meets the requirement, the priority data is updated with the current callee as the first priority.

[0047] If the execution capability meets the requirement, the priority data is updated with the current callee as the first priority, and the data success rate and response time within the configured time period are recorded, and a change log is recorded.

[0048] Example 2

[0049] The basic process of the technical solution of the present invention is implemented as follows: Figure 2 As shown, including:

[0050] Step 1: The timer triggers the monitoring program according to the designed interval time to trigger the automatic switching logic.

[0051] Step 2: Determine whether there is priority data in the cache. If there is no priority data, it means that the service is called for the first time or the data is lost due to system abnormality. By reading the specified parameters in the data, load the default priority and switch priority order. When switching for the first time in the month, load the default priority and switch priority order.

[0052] Step 3: In the case of non-first call, the execution capability of the callee used in the previous time period is determined by calculating the data success rate and response time in the configured time period. If the requirement is not met (the success rate is less than the set value or the average execution time is longer than the expected time), the next callee in the switching priority order is obtained and the callee information is updated to the cache.

[0053] Step 4: Record the execution status of the previous stage and the priority adjustment log.

[0054] Step 5: When executing the business, the business logic first reads the cache priority data, calls the corresponding business interface according to the business feature code in the data, and stores the call result in the log system to provide a data basis for the next switching decision.

[0055] The steps for optimizing the basic process are as follows:

[0056] Step 1: Based on the business logic in Example 1, when processing the switching process, use the recorded priority adjustment log to obtain the caller with a higher expected execution result within a fixed time interval.

[0057] Step 2: When it is clear that the caller needs to be switched, if all or most of the callers are polled within a fixed interval, the next caller to be used in the system default order is not used. Instead, the caller with a better expected result after calculation is used, and its information is stored in the switch, and the business interface is retrieved and used.

[0058] The special processes in the business logic are described as follows:

[0059] Process 1: Determine whether it is the first call of the month. This logic is to restore the system default call to prevent a callee from occupying a high priority position for a long time, resulting in less data records in the log system of other callees, affecting the success rate calculation ratio.

[0060] Process 2: Priority switching logic If the currently executing caller is at the end of the default order, when switching, the last priority is changed to the first priority to ensure continuous execution of the logic.

[0061] Example 3

[0062] Based on the same inventive concept, the present invention also provides a service intelligent switching system 300 based on real-time operation status changes, such as Figure 3 As shown, including:

[0063] The priority determination module 310 is used to determine the priority and switching priority of the first business operation logic of the caller according to the operation data of the business logic of the interface caller;

[0064] A first priority loading module 320, configured to load the first service operation logic priority and the switching priority when the automatic switching logic is triggered, if there is no priority data in the cache, and use the first service operation logic priority as the default priority;

[0065] The execution capability calculation module 330 is used to determine the execution capability of the callee used in the previous time period by calculating the data success rate and response time in the configured time period if there is priority data in the cache and it is not the first call of the interface;

[0066] The priority update module 340 is used to obtain the next callee in the switching priority order and update the callee to the cache if the execution power does not meet the requirements; if the execution power meets the requirements, the priority data is updated with the current callee as the first priority.

[0067] Furthermore, it also includes:

[0068] If the second priority loading module has priority data in the cache and it is not the first time the interface is called, the first business operation logic priority is used as the default priority.

[0069] Furthermore, the execution capability calculation module includes:

[0070] If the data success rate within the configured time period is less than the set value or the average execution time is longer than the expected time, it is determined that the execution capacity does not meet the requirements;

[0071] If the data success rate within the configured time period is greater than the set value and the average execution time is less than the expected time, the execution capacity is determined to meet the requirements.

[0072] Furthermore, it also includes:

[0073] Update module, used to update cache data with default priority.

[0074] Furthermore, it also includes:

[0075] The data recording module is used to record the data success rate and response time within the configured time period and record the change log.

[0076] The present invention provides a business intelligent switching method and system based on real-time operation status changes, which breaks the limitation that the calling order can only be formulated through code logic, so that the business logic gives priority to the callee with better execution effect, thereby improving the logic success rate and stability. The configuration is flexible but the recovery logic is also retained, so that the system execution results can still be controlled by the project team, and the system can be restored under special circumstances. The data collection degree is high. During the execution process, the configured callee can be further analyzed and calculated through the actual data execution results. According to the obtained phenomena and results, the system can be further optimized to achieve a virtuous cycle of system optimization.

[0077] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0078] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0079] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0080] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0081] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents, and any modifications or equivalents that do not depart from the spirit and scope of the present invention should be included in the scope of the claims of the present invention.

Claims

1. A method for intelligently switching services based on real-time operation status changes, characterized in that: include: Operational data based on the business logic of the interface caller; Determine the priority and switching priority of the first service operation logic of the caller; When the automatic switching logic is triggered, if there is no priority data in the cache, the first service operation logic priority and the switching priority are loaded, and the first service operation logic priority is used as the default priority; If there is priority data in the cache and it is not the first call to the interface, the execution capability of the called party used in the previous time period is determined by calculating the data success rate and response time in the configured time period; If the execution capability does not meet the requirement, the next callee in the switching priority order is obtained, and the callee is updated into the cache; If the execution capability meets the requirement, the priority data is updated with the current callee as the first priority.

2. The method according to claim 1, characterized in that Also includes: If there is priority data in the cache and it is not the first time the interface is called, the first business operation logic priority is used as the default priority.

3. The method according to claim 1, characterized in that By calculating the data success rate and response time within the configured time period, the execution capability of the callee used in the previous time period is determined, including: If the data success rate within the configured time period is less than the set value or the average execution time is longer than the expected time, it is determined that the execution capacity does not meet the requirements; If the data success rate within the configured time period is greater than the set value and the average execution time is less than the expected time, the execution capacity is determined to meet the requirements.

4. The method according to claim 2, characterized in that: Also includes: Updates cached data using the default priority.

5. The method according to claim 1, characterized in that If the execution capability meets the requirement, the current callee is taken as the first priority, and after the priority data is updated, the following is also included: Record the data success rate and response time within the configured time period, and record the change log.

6. A business intelligent switching system based on real-time operation status changes, characterized in that: include: A priority determination module is used to run data based on the business logic of the interface caller; Determine the priority and switching priority of the first service operation logic of the caller; A first priority loading module, used for loading the first service operation logic priority and the switching priority when the automatic switching logic is triggered, if there is no priority data in the cache, and using the first service operation logic priority as the default priority; The execution capability calculation module is used to determine the execution capability of the callee used in the previous time period by calculating the data success rate and response time in the configured time period if there is priority data in the cache and it is not the first call to the interface; A priority update module, for obtaining the next callee in the switching priority order and updating the callee into the cache if the execution power does not meet the requirement; If the execution capability meets the requirement, the priority data is updated with the current callee as the first priority.

7. The system according to claim 6, characterized in that Also includes: If the second priority loading module has priority data in the cache and it is not the first time the interface is called, the first business operation logic priority is used as the default priority.

8. The system according to claim 6, characterized in that Execution capability calculation module, including: If the data success rate within the configured time period is less than the set value or the average execution time is longer than the expected time, it is determined that the execution capacity does not meet the requirements; If the data success rate within the configured time period is greater than the set value and the average execution time is less than the expected time, the execution capacity is determined to meet the requirements.

9. The system according to claim 6, characterized in that Also includes: Update module, used to update cache data with default priority.

10. The system according to claim 6, characterized in that Also includes: The data recording module is used to record the data success rate and response time within the configured time period and record the change log.