Abnormality processing method, apparatus, system, electronic device, and storage medium

By leveraging automated rule synchronization detection and the collaborative efforts of a container management platform, containers that have failed to load new business rules are identified and restarted. This addresses the issue of low efficiency in handling exceptions due to manual intervention in existing technologies, thereby improving the quality and consistency of the rule computation service.

CN116302861BActive Publication Date: 2026-04-28INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
INDUSTRIAL AND COMMERCIAL BANK OF CHINA
Filing Date
2023-03-15
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

In a distributed environment, when anomalies occur during the container synchronization process of the rule computation service, existing technologies require manual intervention, resulting in low efficiency in anomaly handling and affecting the quality of the rule computation service.

Method used

By obtaining the list of containers in the rule computing service cluster, the system automatically identifies containers that have failed to load new business rules and restarts these containers through the container management platform. This leverages the automated processing flow of the rule synchronization detection system and the container management platform to reduce manual intervention.

Benefits of technology

It improves the efficiency of anomaly handling, reduces the workload of operations and maintenance personnel, and ensures the consistency and quality of rule calculation service processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116302861B_ABST
    Figure CN116302861B_ABST
Patent Text Reader

Abstract

The embodiment of the application provides a kind of exception handling method, device, system, electronic equipment and storage medium, it is related to the field of financial technology or other related fields, method includes: obtaining the first list and the second list of rule computing service cluster;According to the first list and the second list, when the container identifier of the rule computing service cluster exists that new business rule is not successfully loaded, generate the third list;The third list is sent to container management platform, to make container management platform according to the third list restarts the container of the rule computing service cluster that new business rule is not successfully loaded.For the rule synchronization detection system can obtain the container list that new business rule is not successfully loaded, and call container management platform restarts the container that new business rule is not successfully loaded.When container synchronizes new business rule and encounters exception, exception can be automatically identified and handled, without manual intervention, improve the efficiency of exception handling, reduce the workload of operation and maintenance personnel.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of financial technology or other related fields, and in particular to an anomaly handling method, apparatus, system, electronic device and storage medium. Background Technology

[0002] With the continuous development of electronic information technology, the functions that various business systems can achieve are becoming increasingly comprehensive and complex. To separate business rules from the specific implementation code, rule engines are typically used to store and execute these rules. Rule engines generally provide visual rule maintenance functions and rule calculation services. In a distributed environment, the rule calculation service typically runs in various containers within a container cluster. If business rules change, they need to be synchronized to all containers of the rule calculation service in real time. If errors occur during the synchronization process, the same input may produce different results after being processed by different containers, thus affecting the quality of the rule calculation service.

[0003] In existing technologies, logging and monitoring reporting functions are added to the rule calculation service. When an anomaly occurs during the synchronization of rule changes, logs are output and monitoring messages are sent to the monitoring system. Upon receiving the messages, the monitoring system alerts operations and maintenance personnel for handling. This results in low efficiency in anomaly handling. Summary of the Invention

[0004] This application provides an exception handling method, apparatus, system, electronic device, and storage medium, which can improve the efficiency of exception handling.

[0005] In a first aspect, embodiments of this application provide an exception handling method, including:

[0006] Obtain a first list and a second list of the rule computing service cluster. The first list is used to indicate the container identifiers in the rule computing service cluster that have successfully loaded new business rules, and the second list is used to indicate the identifiers of each container running in the rule computing service cluster.

[0007] Based on the first list and the second list, when it is determined that there are container identifiers in the rule calculation service cluster that have failed to load new business rules, a third list is generated, which is used to indicate the container identifiers that have failed to load new business rules.

[0008] The third list is sent to the container management platform so that the container management platform can restart the containers in the rule computing service cluster that have failed to load new business rules based on the third list.

[0009] Optionally, the first and second lists of the obtained rule calculation service cluster include:

[0010] Receive rule change processing result information sent by at least one container in the rule calculation service cluster, or obtain rule change processing result information sent by at least one container in the rule calculation service cluster to the message middleware from the message middleware;

[0011] Update or generate the first list based on the rule change processing result information of at least one container;

[0012] Receive registration information sent by each container in the rule computing service cluster, or obtain registration information sent by each container in the rule computing service cluster to the message middleware from the message middleware;

[0013] The second list is updated or generated based on the registration information of each container.

[0014] Optionally, sending the third list to the container management platform includes:

[0015] If the number of container identifiers included in the third list is less than or equal to the first threshold, the third list is sent to the container management platform.

[0016] Optionally, the method further includes:

[0017] If the number of container identifiers included in the third list is greater than the first threshold, then the rule calculation service cluster is determined to be abnormal.

[0018] Send an early warning message to the monitoring and management platform so that the monitoring and management platform outputs the early warning message, which is used to indicate that the rule calculation service cluster is abnormal.

[0019] Optionally, the rule change processing result information includes: the identifier of the new business rule and the first modification time; the method further includes:

[0020] If it is determined from the first list and the second list that there is no container identifier in the rule computing service cluster that has failed to load the new business rule, then based on the identifier of the new business rule, the second modification time of the recorded business rules other than the new business rule is obtained;

[0021] If there is a second modification time later than the first modification time, then the rule calculation service cluster is determined to be abnormal;

[0022] Send an early warning message to the monitoring and management platform so that the monitoring and management platform outputs the early warning message, which is used to indicate that the rule calculation service cluster is abnormal.

[0023] Optionally, the method further includes:

[0024] Receive notifications of changes to business rules;

[0025] If the number of container identifiers in the first list is less than or equal to a first threshold within a preset time period, the rule calculation service cluster is determined to be abnormal.

[0026] Secondly, embodiments of this application provide an anomaly handling apparatus, comprising:

[0027] The acquisition module is used to acquire a first list and a second list of the rule computing service cluster. The first list is used to indicate the container identifiers in the rule computing service cluster that have successfully loaded new business rules, and the second list is used to indicate the identifiers of each container running in the rule computing service cluster.

[0028] The determination module is used to determine, based on the first list and the second list, that there are container identifiers in the rule computing service cluster that have failed to load new business rules, and then generate a third list, which is used to indicate the container identifiers that have failed to load new business rules.

[0029] The sending module is used to send the third list to the container management platform so that the container management platform can restart the containers in the rule computing service cluster that have failed to load new business rules according to the third list.

[0030] Thirdly, embodiments of this application provide an exception handling system, including: a rule calculation service cluster, a rule synchronization detection system, a container management platform, and a message middleware;

[0031] The rule calculation service cluster is used to send container rule change processing results and container registration information;

[0032] The message middleware is used to receive the container rule change processing result information and the container registration information, and send the container rule change processing result information and the container registration information to the rule synchronization detection system;

[0033] The rule synchronization detection system is used to generate a third list based on the container rule change processing result information and the container registration information, and send the third list to the container management platform. The third list is used to indicate the container identifiers that have failed to load new business rules.

[0034] The container management platform is used to restart containers in the rule computing service cluster that have failed to load new business rules, based on the third list.

[0035] Fourthly, this application provides an electronic device, including: a memory and a processor;

[0036] The memory is used to store computer instructions; the processor is used to execute the computer instructions stored in the memory to implement the method of either the first aspect or the second aspect.

[0037] Fifthly, this application provides a computer-readable storage medium having a computer program stored thereon, the computer program being executed by a processor to implement the method of any one of the first and / or second aspects.

[0038] In a sixth aspect, this application provides a computer program product, including a computer program that, when executed by a processor, implements the method of either the first aspect or the second aspect.

[0039] The exception handling method, apparatus, system, electronic device, and storage medium provided in this application embodiment obtain a first list and a second list of the rule computing service cluster; based on the first and second lists, when it is determined that there are container identifiers in the rule computing service cluster that have failed to load new business rules, a third list is generated; the third list is sent to the container management platform, so that the container management platform restarts the containers in the rule computing service cluster that have failed to load new business rules according to the third list. Through the interaction between the rule synchronization detection system and the rule computing service cluster, the list of containers that have failed to load new business rules is obtained, and the containers that have failed to load new business rules are restarted through the container management platform. When an exception is encountered during container synchronization of new business rules, the exception can be automatically identified and handled without manual intervention, improving the efficiency of exception handling and reducing the workload of operation and maintenance personnel. Attached Figure Description

[0040] Figure 1 This is a schematic diagram of a scenario provided for an embodiment of this application;

[0041] Figure 2 Flowchart of the exception handling method provided in the embodiments of this application Figure 1 ;

[0042] Figure 3 Flowchart of the exception handling method provided in the embodiments of this application Figure 2 ;

[0043] Figure 4 This is a schematic diagram of the structure of the exception handling device provided in the embodiments of this application;

[0044] Figure 5 Schematic diagram of the structure of the exception handling system provided in the embodiments of this application Figure 1 ;

[0045] Figure 6 Schematic diagram of the structure of the exception handling system provided in the embodiments of this application Figure 2 ;

[0046] Figure 7 A schematic diagram of the structure of the electronic device provided in the application embodiment. Detailed Implementation

[0047] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0048] In the embodiments of this application, the terms "first" and "second" are used to distinguish identical or similar items with essentially the same function and effect, without limiting their order. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, and that the terms "first" and "second" do not necessarily imply that they are different.

[0049] It should be noted that, in the embodiments of this application, the terms "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design scheme described as "exemplary" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.

[0050] With the continuous development of electronic information technology, the functions that various business systems can achieve are becoming increasingly comprehensive and complex. In order to separate business rules from specific implementation code, rule engines are usually used to store and execute business rules, and to make rule modifications take effect in real time in the rule calculation service.

[0051] Rule engines typically provide visual rule maintenance and rule computation services. In a distributed environment, the rule computation service usually runs in various containers within a container cluster. If business rules change, they need to be synchronized to all containers of the rule computation service in real time. If errors occur during the synchronization process, rule modifications may not take effect in some containers. When these containers continue to provide services, the same input will result in different results after being processed by different containers, thus affecting the quality of the rule computation service.

[0052] In existing technologies, logging and monitoring reporting functions are added to the rule calculation service. When an anomaly occurs during the synchronization of rule changes, logs are output and monitoring messages are sent to the monitoring system. Upon receiving the messages, the monitoring system alerts operations and maintenance personnel for handling. Operations and maintenance personnel typically restart the container experiencing the problem. After restarting, the container loads all rules from the relational database, thereby ensuring consistent rule calculation processing across all containers and guaranteeing service quality.

[0053] As can be seen from the above, when anomalies occur in the rule-based synchronization process of containers in existing technologies, manual intervention is required, increasing the workload of operations and maintenance personnel. The time from problem discovery to container restart by operations and maintenance personnel is relatively long, resulting in low efficiency in anomaly handling and impacting the quality of the rule calculation service.

[0054] In view of this, embodiments of this application provide an exception handling method, apparatus, system, electronic device, and storage medium. By introducing a message notification mechanism and integrating a Platform as a Service (PaaS) platform to restart container interfaces, containers that encounter exceptions during the synchronization rule process can be automatically detected and restarted. This can reduce the workload of operation and maintenance personnel, thereby effectively improving the decision service quality of the rule engine.

[0055] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be implemented independently or in combination with each other. The same or similar concepts or processes may not be described again in some embodiments.

[0056] Figure 1 This is a schematic diagram illustrating an application scenario of an embodiment of this application, such as... Figure 1 As shown, it includes: a rule calculation service cluster 101, a rule synchronization detection system 102, and a container management platform 103.

[0057] The rule calculation service cluster 101 can include N containers, each of which uses the same business rules.

[0058] In this embodiment of the application, the rule computing service cluster 101 can interact with the rule synchronization detection system 102. For example, when the rule computing service cluster 101 is running, it can send registration information to the rule synchronization detection system 102. When the rule synchronization detection system 102 receives the registration information, it can determine the identifier of each container running in the current rule computing service cluster 101, such as the identity document (ID) of each container.

[0059] It is understandable that the rule computing service cluster 101 interacts with the rule synchronization detection system 102, allowing each container in the rule computing service cluster 101 to interact with the rule synchronization detection system 102.

[0060] In this embodiment, the rule synchronization detection system 102 can interact with the container management platform 103. For example, the rule synchronization detection system 102 can determine a list of containers in the rule computing service cluster 101 that are prone to anomalies when loading new rules by interacting with the rule computing service cluster 101, and send the list of abnormal containers to the container management platform 103.

[0061] The container management platform 103 can interact with the rule computation service cluster 101. For example, when the container management platform 103 receives a list of abnormal containers sent by the rule synchronization detection system 102, it can restart the corresponding containers according to the list. The container management platform 103 can be a PaaS platform.

[0062] The application scenarios provided in the embodiments of this application have been briefly described above. The following section describes applications in... Figure 1 Taking the rule synchronization detection system in the example, the anomaly handling method provided in the embodiments of this application will be described.

[0063] Figure 2 A schematic diagram of the exception handling process provided in the embodiments of this application Figure 1 .like Figure 2 As shown, it includes the following steps:

[0064] S201. Obtain the first and second lists of the rule calculation service cluster.

[0065] In this embodiment of the application, the rule computing service cluster can be a cluster that has deployed a rule computing service. The cluster may include multiple containers, each of which runs the same rule computing service.

[0066] Containers can be considered a sandbox technology, primarily designed to isolate applications from the outside world and facilitate the migration of the sandbox to other host machines. Essentially, a container is a special type of process that uses techniques such as namespaces, control groups, and chroot to divide resources, files, devices, states, and configurations into an independent space.

[0067] The rule computation service can refer to the business rules used by the container. Through the rule computation service container, the input information can be processed and the information required by the user can be output.

[0068] In this embodiment of the application, the first list is used to indicate the container identifiers that have successfully loaded new business rules in the rule computing service cluster, and the second list is used to indicate the identifiers of each container running in the rule computing service cluster.

[0069] For example, when each container in the rule computation service cluster starts running, it can send a registration message to the rule synchronization detection system. The rule synchronization detection system can determine the containers running in the rule computation service cluster based on the received registration messages, thus obtaining a second list. When each container in the rule computation service cluster receives a new business rule, it can load and run the new business rule, and after successful loading, send a message to the rule synchronization detection system indicating that the new business rule has been successfully loaded. The rule synchronization detection system can determine the containers that have successfully loaded the new business rule based on the received message, thus obtaining a first list.

[0070] S202. Based on the first list and the second list, when it is determined that there are container identifiers in the rule calculation service cluster that have failed to load new business rules, a third list is generated.

[0071] In this embodiment of the application, the third list is used to indicate the container identifiers that failed to load new business rules.

[0072] For example, when the rule synchronization detection system obtains the first list and the second list, it can compare the container identifiers in the first list and the second list. If the container identifiers in the first list are different from those in the second list, it is determined that there are container identifiers in the rule computing service cluster that have failed to load new business rules.

[0073] Understandably, the second list includes all containers running in the rule calculation service cluster, while the first list includes containers that have successfully loaded new business rules. If the number of container identifiers in the first list is less than the number of container identifiers in the second list, it can be determined that there are containers that have failed to load new business rules.

[0074] The rule synchronization detection system can remove container identifiers that are identical to those in the first list from the second list, obtaining the remaining container identifiers. A third list is then generated based on the remaining container identifiers.

[0075] S203. Send the third list to the container management platform so that the container management platform can restart the containers in the service cluster that have not successfully loaded the new business rules according to the rules of the third list.

[0076] In this embodiment, when the rule synchronization detection system obtains the third list, it can send the third list to the container management platform. The container management platform can then restart the corresponding container in the rule computation service cluster based on the container identifiers included in the third list.

[0077] The exception handling method provided in this application involves obtaining a first list and a second list of the rule computing service cluster; determining, based on the first and second lists, that there are containers in the rule computing service cluster that have failed to load new business rules, and then generating a third list; sending the third list to the container management platform so that the container management platform can restart the containers in the rule computing service cluster that have failed to load new business rules based on the third list. Through the interaction between the rule synchronization detection system and the rule computing service cluster, the list of containers that have failed to load new business rules is obtained, and the containers that have failed to load new business rules are restarted through the container management platform. When an exception is encountered during container synchronization of new business rules, the exception can be automatically identified and handled without manual intervention, improving the efficiency of exception handling and reducing the workload of operation and maintenance personnel.

[0078] Figure 3 Flowchart of the exception handling method provided in the embodiments of this application Figure 2 ,exist Figure 2 The exception handling process is further explained based on the illustrated embodiment, such as... Figure 3 As shown, it includes:

[0079] S301. Obtain the rule change processing result information and registration information sent by the container in the rule calculation service cluster, and generate the first list and the second list based on the rule change processing result information and registration information.

[0080] In this embodiment, the rule change processing result information can be information about the container successfully loading the new business rule, including the container ID, the identifier of the new business rule, and the last modification time of the new business rule. The last modification time of the new business rule can be the modification timestamp corresponding to the new business rule.

[0081] The registration information can be the information sent when each container runs for the first time, including information such as the container ID, which is used to indicate the number and names of containers included or running in the computing service cluster.

[0082] The first and second lists can be generated according to the following steps.

[0083] For example, the system receives rule change processing result information sent by at least one container in the rule calculation service cluster, or obtains rule change processing result information sent by at least one container in the rule calculation service cluster to the message middleware from the message middleware; and updates or generates the first list based on the rule change processing result information of at least one container.

[0084] Receive registration information sent by each container in the rule computing service cluster, or obtain registration information sent by each container in the rule computing service cluster to the message middleware from the message middleware; update or generate the second list based on the registration information of each container.

[0085] In this embodiment, the rule computation service cluster can interact directly with the rule synchronization detection system, or it can interact with the rule synchronization detection system through a message middleware. The message middleware can be a Kafka cluster or other types of message middleware; this embodiment does not impose any restrictions on this.

[0086] When using message middleware, the rule computation service cluster can send registration information and rule change processing results to a specified preset topic. The rule synchronization detection system can retrieve the registration information and rule change processing results via message retrieval.

[0087] When the rule synchronization detection system receives the rule change processing result information sent by the first container, it can enter the anomaly detection handling procedure. After waiting for a preset time, it determines that the rule change processing result information sent by containers in the rule computing service cluster has ended. A first list is then generated based on the currently received rule change processing result information.

[0088] When the rule synchronization detection system receives rule change processing results through the message middleware, it can retrieve messages at preset time intervals and generate a first list based on the rule change processing results obtained within the current period. It's understandable that each container will send its own rule change processing results once.

[0089] The method for generating the second list is similar to that for the first list, and will not be repeated here.

[0090] Optionally, before generating the first list and / or the second list, the rule synchronization detection system can also determine whether the first list and / or the second list already exist. If they exist, the first list and / or the second list can be updated based on the received registration information and rule change processing results. That is, the information in the original first list and / or the second list is cleared, and new information is written.

[0091] S302. Generate a third list based on the first list and the second list.

[0092] The specific implementation method of embodiment S302 of this application is the same as Figure 2 The specific implementation of embodiment S202 shown is similar, and will not be described again here.

[0093] Optionally, in some embodiments, when the rule synchronization detection system pulls messages at preset time intervals, there may be instances where all container identifiers in the first and second lists are identical. In this case, all containers may have successfully loaded the new business rules, or none may have loaded the new business rules. The rule synchronization detection system needs to determine this.

[0094] For example, if it is determined from the first list and the second list that there are no container identifiers in the rule computing service cluster that have failed to load new business rules, then based on the identifier of the new business rule, the second modification time of the recorded business rules other than the new business rule is obtained; if there is a second modification time later than the first modification time, then it is determined that the rule computing service cluster is abnormal; a warning message is sent to the monitoring and management platform so that the monitoring and management platform outputs the warning message, which is used to indicate that the rule computing service cluster is abnormal.

[0095] In this embodiment, each time a new business rule is loaded, it is simultaneously written to the database of the rule synchronization detection system. When it is determined that all container identifiers in the first list and the second list are identical, i.e., there are no container identifiers in the rule computation service cluster that have failed to load the new business rule, the rule synchronization detection system can retrieve all business rules except the new business rule in the first list from the database based on the container identifiers in the first list, and obtain their respective last modification times.

[0096] The modification time of the new business rule in the first list is compared with the modification time of each business rule in the database. If a second modification time exists that is later than the first modification time, for example, if the modification time in the first list is 2023.2.15.13:45 and the latest time among all business rules is 2023.2.15.15:55, it indicates that a new business rule has been input, but none of the containers in the rule computing service cluster have loaded this business rule. The rule synchronization detection system can determine that the rule computing service cluster is abnormal and requires manual intervention. The rule synchronization detection system can send an alert message to the monitoring and management platform, causing the monitoring and management platform to output an alert message. When the operation and maintenance personnel see the alert message, they can perform manual intervention.

[0097] Optionally, in some embodiments, when each container in the rule computing service cluster receives a new business rule, the rule synchronization detection system can also receive a business rule change notification and determine whether the rule computing service cluster is operating normally by the number of container identifiers in the first list.

[0098] For example, a business rule change notification is received; if the number of container identifiers in the first list is less than or equal to a first threshold within a preset time period, the rule calculation service cluster is determined to be abnormal.

[0099] In this embodiment, when the rule synchronization detection system receives a business rule change notification, each container in the rule computing service cluster begins loading the new business rule. If, within a preset time, the number of rule change processing result information received by the rule synchronization detection system (i.e., the number of container identifiers in the first list) is less than a first threshold, it indicates that only a small number of containers have successfully loaded the business rule, or that no containers have successfully loaded the new business rule. The rule synchronization detection system can then determine that an anomaly has occurred in the rule computing service cluster and send a warning message.

[0100] S303. Determine whether the number of container identifiers in the third list is greater than the first threshold. If not, proceed to step S304. If yes, proceed to step S305.

[0101] S304. Send the third list to the container management platform so that the container management platform can restart the containers in the service cluster that have not successfully loaded the new business rules according to the rules of the third list.

[0102] For example, if the number of container identifiers included in the third list is less than or equal to the first threshold, the third list is sent to the container management platform.

[0103] In this embodiment of the application, when the number of container identifiers included in the third list is less than or equal to the first threshold, it indicates that only a small number of containers experience abnormalities when loading new services. In this case, the rule calculation service cluster is operating normally overall, and the abnormal containers can be restarted through the container management platform.

[0104] S305. If the rule calculation service cluster is found to be abnormal, an early warning message is sent to the monitoring and management platform.

[0105] For example, if the number of container identifiers included in the third list is greater than the first threshold, the rule calculation service cluster is determined to be abnormal; an early warning message is sent to the monitoring and management platform so that the monitoring and management platform outputs the early warning message, which is used to indicate that the rule calculation service cluster is abnormal.

[0106] In this embodiment, when the number of container identifiers included in the third list exceeds the first threshold, it indicates that most containers are experiencing abnormalities in loading new services, and the rule calculation service cluster as a whole is malfunctioning. In this case, restarting the containers may not solve the problem, and manual intervention is required. The specific implementation method is similar to the manual intervention method described above, and will not be repeated here.

[0107] The exception handling method provided in this application embodiment allows the rule synchronization detection system to record the processing results of container rule changes. Based on these results, it monitors the process of loading new business rules into containers, identifies abnormal containers, and restarts them through the container management platform. This improves the efficiency of exception handling, ensures the consistency of rule computation service processing, and enhances the service quality of the rule computation service. Furthermore, it provides early warnings when the rule computation service cluster experiences a failure.

[0108] This application also provides an exception handling device.

[0109] Figure 4 A schematic diagram of the structure of the exception handling device provided in the embodiments of this application is shown below. Figure 4 As shown, it includes:

[0110] The acquisition module 401 is used to acquire a first list and a second list of the rule computing service cluster. The first list is used to indicate the container identifiers in the rule computing service cluster that have successfully loaded new business rules, and the second list is used to indicate the identifiers of each container running in the rule computing service cluster.

[0111] The determining module 402 is used to determine, based on the first list and the second list, that there are container identifiers in the rule computing service cluster that have failed to load new business rules, and then generate a third list, which is used to indicate the container identifiers that have failed to load new business rules.

[0112] The sending module 403 is used to send the third list to the container management platform so that the container management platform can restart the containers in the rule computing service cluster that have failed to load new business rules according to the third list.

[0113] Optionally, the acquisition module 401 is further configured to receive rule change processing result information sent by at least one container in the rule calculation service cluster, or to acquire rule change processing result information sent by at least one container in the rule calculation service cluster to the message middleware from the message middleware.

[0114] Optionally, the acquisition module 401 is further configured to update or generate the first list based on the rule change processing result information of at least one container.

[0115] Optionally, the acquisition module 401 is further configured to receive registration information sent by each container in the rule computing service cluster, or to obtain registration information sent by each container in the rule computing service cluster to the message middleware from the message middleware.

[0116] Optionally, the acquisition module 401 is also used to update or generate the second list based on the registration information of each container.

[0117] Optionally, the determining module 402 is further configured to determine that the rule calculation service cluster is abnormal if the number of container identifiers included in the third list is greater than a first threshold; and send an early warning message to the monitoring and management platform so that the monitoring and management platform outputs the early warning message, the early warning message being used to indicate that the rule calculation service cluster is abnormal.

[0118] Optionally, the sending module 403 is further configured to determine that if the number of container identifiers included in the third list is less than or equal to a first threshold, then the third list is sent to the container management platform.

[0119] Optionally, the determining module 402 is further configured to: determine, based on the first list and the second list, that there are no container identifiers in the rule computing service cluster that have failed to load new business rules; then, based on the identifier of the new business rule, obtain the second modification time of the recorded business rules other than the new business rule; if there is a second modification time later than the first modification time, determine that the rule computing service cluster is abnormal; and send an early warning message to the monitoring and management platform so that the monitoring and management platform outputs the early warning message, the early warning message being used to indicate that the rule computing service cluster is abnormal.

[0120] Optionally, the determination module 402 is further configured to receive business rule change notifications; if the number of container identifiers in the first list is less than or equal to a first threshold within a preset time period, then the rule calculation service cluster is determined to be abnormal.

[0121] The anomaly detection device provided in this application embodiment can execute the technical solution of the anomaly handling method provided in any of the above embodiments. Its principle and technical effect are similar, and will not be repeated here.

[0122] This application also provides an exception handling system.

[0123] Figure 5 This application also provides a schematic diagram of the structure of an exception handling system, as shown in the embodiments. Figure 5 As shown, it includes: rule calculation service cluster 501, rule synchronization detection system 503, container management platform 504, and message middleware 502.

[0124] The rule calculation service cluster 501 is used to send container rule change processing result information and container registration information.

[0125] The message middleware 502 is used to receive the container rule change processing result information and the container registration information, and send the container rule change processing result information and the container registration information to the rule synchronization detection system.

[0126] The rule synchronization detection system 503 is used to generate a third list based on the container rule change processing result information and the container registration information, and send the third list to the container management platform. The third list is used to indicate the container identifiers that have failed to load new business rules.

[0127] Container management platform 504 is used to restart containers in the rule computing service cluster that failed to load new business rules according to the third list.

[0128] Optionally, a new Topic can be added to the Kafka cluster for message storage. Each container in the rule computation service cluster sends the rule change processing results to the designated Topic. The rule detection system consumes messages to obtain the rule change processing results from each container.

[0129] Optional, rule synchronization detection system: includes message retrieval module, message processing module, rule synchronization anomaly detection module, container restart service call module and database.

[0130] The message retrieval module is used to consume messages from a specified Topic in the Kafka cluster and pass the messages to the message processing module for processing.

[0131] The message processing module receives messages from the message retrieval module, parses their format, and saves them to the database. Messages contain two types: container registration information and rule change processing results.

[0132] The rule synchronization anomaly detection module is used for scheduled polling at regular intervals. It queries the database to obtain rule change processing results and the container registration list, and determines whether there are any containers with rule change processing anomalies. If a container with anomalies is found, its information is passed to the container restart service invocation module for further processing.

[0133] The container restart service call module is responsible for calling the container restart service provided by the management platform and sending the container ID information that needs to be restarted to the service call.

[0134] Database: Responsible for data storage, providing data storage and retrieval functions. The data mainly includes a container registration information table and a rule change processing result information table.

[0135] Container Management Platform: Responsible for the deployment and management of containers in the rule computing service cluster. It can add new containers and restart services, and can restart specified containers based on the passed container ID.

[0136] Optionally, in some embodiments, such as Figure 6As shown, the cluster containers of the rule computation service transmit rule change processing results through Kafka, or they can directly access the database to save the rule change processing results of each container to a designated data table. That is, the exception handling system includes: rule computation service cluster 601, rule synchronization detection system 603, and container management platform 603. Its specific implementation method is similar to... Figure 5 The system shown is similar, so it will not be described in detail here.

[0137] The exception handling system provided in this application can execute the exception handling method provided in any of the above embodiments, and its principle and technical effect are similar. Further details will not be provided here.

[0138] Figure 7 This is a schematic diagram of an electronic device structure provided in this application. Figure 7 As shown, the electronic device 70 may include at least one processor 701, a memory 702, and a communication interface 703.

[0139] The memory 702 is used to store programs. Specifically, the program may include program code, which includes computer operation instructions.

[0140] The memory 702 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.

[0141] The processor 701 is used to execute computer execution instructions stored in the memory 702 to implement the exception handling method described in the foregoing method embodiments. The processor 701 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application.

[0142] In practical implementation, if the communication interface 703, memory 702, and processor 701 are implemented independently, they can be interconnected via a bus to complete communication. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc., but this does not imply that there is only one bus or one type of bus.

[0143] Optionally, in a specific implementation, if the communication interface 703, memory 702, and processor 701 are integrated on a single chip, then the communication interface 703, memory 702, and processor 701 can communicate through an internal interface.

[0144] This application also provides a computer-readable storage medium storing a computer program thereon. When the computer program is executed by a processor, it implements the technical solution of the above-described exception handling method embodiment. Its implementation principle and technical effect are similar, and will not be repeated here.

[0145] In one possible implementation, a computer-readable medium may include random access memory (RAM), read-only memory (ROM), compact discread-only memory (CD-ROM) or other optical disc storage, disk storage or other magnetic storage devices, or any other medium targeted to carry or to store the required program code in the form of instructions or data structures, and accessible by a computer. Furthermore, any connection is appropriately referred to as a computer-readable medium. For example, if software is transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave, then coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. As used herein, disks and optical discs include optical discs, laser discs, optical discs, Digital Versatile Discs (DVDs), floppy disks, and Blu-ray discs, where disks typically reproduce data magnetically, while optical discs optically reproduce data using lasers. The above combinations should also be included within the scope of computer-readable media.

[0146] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the technical solution of the above-described abnormal method embodiment. Its implementation principle and technical effects are similar, and will not be repeated here.

[0147] In the specific implementation of the aforementioned terminal device or server, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of this application can be directly manifested as being executed by a hardware processor, or executed by a combination of hardware and software modules within the processor.

[0148] Those skilled in the art will understand that all or part of the steps in any of the above method embodiments can be implemented by hardware associated with program instructions. The aforementioned program can be stored in a computer-readable storage medium, and when the program is executed, all or part of the steps in the above method embodiments are performed.

[0149] If the technical solution of this application is implemented in software form and sold or used as a product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the technical solution of this application can be embodied in the form of a software product, which is stored in a storage medium and includes a computer program or several instructions. This computer software product causes a computer device (which may be a personal computer, server, network device, or similar electronic device) to execute all or part of the steps of the method described in the embodiments of this application.

[0150] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

Claims

1. An exception handling method, characterized in that, include: Obtain a first list and a second list of the rule computing service cluster. The first list is used to indicate the container identifiers in the rule computing service cluster that have successfully loaded new business rules, and the second list is used to indicate the identifiers of each container running in the rule computing service cluster. Based on the first list and the second list, when it is determined that there are container identifiers in the rule calculation service cluster that have failed to load new business rules, a third list is generated, which is used to indicate the container identifiers that have failed to load new business rules. The third list is sent to the container management platform so that the container management platform can restart the containers in the rule computing service cluster that have failed to load new business rules based on the third list; The first and second lists of the acquisition rule calculation service cluster include: Receive rule change processing result information sent by at least one container in the rule calculation service cluster, or obtain rule change processing result information sent by at least one container in the rule calculation service cluster to the message middleware from the message middleware; Update or generate the first list based on the rule change processing result information of at least one container; Receive registration information sent by each container in the rule computing service cluster, or obtain registration information sent by each container in the rule computing service cluster to the message middleware from the message middleware; Update or generate the second list based on the registration information of each container; The rule change processing result information includes: the identifier of the new business rule and the first modification time; the method further includes: If it is determined from the first list and the second list that there is no container identifier in the rule computing service cluster that has failed to load the new business rule, then based on the identifier of the new business rule, the second modification time of the recorded business rules other than the new business rule is obtained; If there is a second modification time later than the first modification time, then the rule calculation service cluster is determined to be abnormal; Send an early warning message to the monitoring and management platform so that the monitoring and management platform outputs the early warning message, which is used to indicate that the rule calculation service cluster is abnormal.

2. The method according to claim 1, characterized in that, Sending the third list to the container management platform includes: If the number of container identifiers included in the third list is less than or equal to the first threshold, the third list is sent to the container management platform.

3. The method according to claim 2, characterized in that, The method further includes: If the number of container identifiers included in the third list is greater than the first threshold, then the rule calculation service cluster is determined to be abnormal. Send an early warning message to the monitoring and management platform so that the monitoring and management platform outputs the early warning message, which is used to indicate that the rule calculation service cluster is abnormal.

4. The method according to claim 1, characterized in that, The method further includes: Receive notifications of changes to business rules; If the number of container identifiers in the first list is less than or equal to a first threshold within a preset time period, the rule calculation service cluster is determined to be abnormal.

5. An anomaly handling device, characterized in that, include: The acquisition module is used to acquire a first list and a second list of the rule computing service cluster. The first list is used to indicate the container identifiers in the rule computing service cluster that have successfully loaded new business rules, and the second list is used to indicate the identifiers of each container running in the rule computing service cluster. The determination module is used to determine, based on the first list and the second list, that there are container identifiers in the rule computing service cluster that have failed to load new business rules, and then generate a third list, which is used to indicate the container identifiers that have failed to load new business rules. The sending module is used to send the third list to the container management platform so that the container management platform can restart the containers in the rule computing service cluster that have failed to load new business rules according to the third list; The acquisition module, when acquiring the first list and the second list of the rule computing service cluster, is specifically used to receive rule change processing result information sent by at least one container in the rule computing service cluster, or to acquire rule change processing result information sent by at least one container in the rule computing service cluster to the message middleware from the message middleware. The rule change processing result information includes: the identifier of the new business rule and the first modification time; Update or generate the first list based on the rule change processing result information of at least one container; Receive registration information sent by each container in the rule computing service cluster, or obtain registration information sent by each container in the rule computing service cluster to the message middleware from the message middleware; Update or generate the second list based on the registration information of each container; The determining module is further configured to: if, based on the first list and the second list, it is determined that there is no container identifier in the rule computing service cluster that has failed to load a new business rule, then, based on the identifier of the new business rule, obtain the second modification time of the recorded business rules other than the new business rule; if there is a second modification time later than the first modification time, then determine that the rule computing service cluster is abnormal; and send an early warning message to the monitoring and management platform so that the monitoring and management platform outputs the early warning message, the early warning message being used to indicate that the rule computing service cluster is abnormal.

6. An exception handling system, characterized in that, The system includes: a rule computation service cluster, a rule synchronization detection system, a container management platform, and a message middleware; The rule calculation service cluster is used to send container rule change processing results and container registration information; The message middleware is used to receive the container rule change processing result information and the container registration information, and send the container rule change processing result information and the container registration information to the rule synchronization detection system; The rule synchronization detection system is used to generate a third list based on the container rule change processing result information and the container registration information, and send the third list to the container management platform. The third list is used to indicate the container identifiers that have failed to load new business rules. The container management platform is used to restart containers in the rule computing service cluster that have failed to load new business rules, based on the third list.

7. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the method of any one of claims 1-4.

8. A computer-readable storage medium, characterized in that, It stores a computer program, which is executed by a processor to implement the method of any one of claims 1-4.

Citation Information

Patent Citations

  • Container management method and related device

    CN114661425A