Strategy exception processing method and device, computer equipment and storage medium

By storing business exception processing configuration information in the Redis cache, the problem of inefficient exception processing during risk control policy execution is solved, and more refined and dynamic exception processing is achieved to adapt to complex risk control scenarios.

CN120011121APending Publication Date: 2025-05-16SHANGHAI SHUHE INFORMATION TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510092463.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-21
Publication Date
2025-05-16

AI Technical Summary

Technical Problem

Existing risk control strategies are prone to abnormalities during implementation, resulting in system stability and inefficiency, and lack targeted and scalable exception handling methods, making it difficult to adapt to complex risk control scenarios and exception types.

Method used

By storing business exception processing configuration information in the Redis cache, including business identity and exception type, after capturing the exception event, matching configuration information is queried from the Redis cache, and exception events are processed based on the configuration information, including the judgment of exception handling methods and trigger conditions.

Benefits of technology

It improves the efficiency of handling policy exceptions, makes full use of system resources, adapts to increasingly complex risk control scenarios and exception types, and avoids invalid retry and resource waste.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120011121A_ABST
    Figure CN120011121A_ABST
Patent Text Reader

Abstract

The invention relates to a strategy exception processing method and device, computer equipment and a storage medium. The method comprises the following steps: in response to a service exception handling configuration instruction of a user, creating service exception handling configuration information, and storing the created service exception handling configuration information into a Redis cache; a plurality of pieces of service exception processing configuration information are stored in the Redis cache; each piece of service exception processing configuration information comprises a service identifier and an exception type; in response to an abnormal event captured in the strategy execution process, determining service exception handling configuration information matched with the service identifier of the current service and the exception information of the abnormal event from the Redis cache, and recording the service exception handling configuration information as target configuration information; and processing the abnormal event according to the target configuration information. According to the method, system resources can be fully utilized, the strategy exception processing efficiency is improved, the expansibility is high, and the method can adapt to increasingly complex risk control scenes and exception types.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of financial risk control technology, and in particular to a strategy exception processing method, device, computer equipment and storage medium. Background Art

[0002] With the rapid development of the Internet and financial technology, business scenarios are becoming increasingly diversified and complex, market supervision is becoming stricter, business ecosystems are deeply integrated, and the methods of black and gray production are becoming more professional, the number and complexity of risk points have increased significantly. In this context, risk control strategies need to be continuously and rapidly iterated, which makes the strategy length and complexity continue to increase.

[0003] Exceptions may occur during the execution of risk control strategies. The frequent occurrence of strategy exceptions has become a key issue that restricts the stability and efficiency of risk control systems. Specifically, the execution process of risk control strategies usually involves nodes such as data acquisition, feature extraction, model execution, decision-making, and decision execution. There is no order requirement for node configuration in risk control strategies, and risk control strategies in production environments are even more complicated. Exceptions may occur at any node in the risk control strategy, and once an exception occurs, it will affect the execution of the entire process. At present, if an abnormal event is found during the execution of the risk control strategy, a simple full-process retry mechanism is usually used to handle it. This processing method will result in many invalid retries, which will consume a lot of system resources. In addition, due to the lack of targeted processing methods, it is likely to delay business response and the efficiency of exception handling is low. In addition, this processing method is difficult to expand, and therefore difficult to adapt to increasingly complex risk control scenarios and exception types. Summary of the invention

[0004] In response to the above-mentioned deficiencies or shortcomings, the present application provides a policy exception processing method, apparatus, computer equipment and storage medium. The embodiments of the present application can make full use of system resources, improve the efficiency of handling policy exceptions, and have strong scalability and can adapt to increasingly complex risk control scenarios and exception types.

[0005] The present application provides a policy exception processing method according to a first aspect. In some embodiments, the method includes:

[0006] In response to the user's business exception handling configuration instruction, create business exception handling configuration information, and store the created business exception handling configuration information in the Redis cache; the Redis cache stores multiple business exception handling configuration information; each business exception handling configuration information includes a business identifier and an exception type;

[0007] In response to capturing an abnormal event during policy execution, business abnormality handling configuration information matching the business identifier of the current business and the abnormal information of the abnormal event is determined from the Redis cache, recorded as target configuration information, and the abnormal event is handled according to the target configuration information.

[0008] In some embodiments, the created business exception handling configuration information is stored in the Redis cache, including:

[0009] A key-value pair is constructed based on the created business exception handling configuration information, and the key-value pair is stored in the Redis cache; wherein the key of the key-value pair is the information obtained by concatenating the business identifier and exception type in the created business exception handling configuration information, and the value of the key-value pair is other information in the created business exception handling configuration information.

[0010] In some embodiments, the abnormal information of the abnormal event includes the abnormal type; determining the business abnormality processing configuration information matching the business identifier of the current business and the abnormal information of the abnormal event from the Redis cache includes:

[0011] The business identifier of the current business and the exception type of the exception event are concatenated to obtain a query key;

[0012] The Redis cache is queried based on the query key, and the found business exception handling configuration information is used as the business exception handling configuration information that matches the business identifier of the current business and the exception information of the exception event.

[0013] In some embodiments, each piece of service exception handling configuration information further includes an exception handling method; handling an exception event according to the target configuration information includes:

[0014] Handle exception events according to the exception handling method in the target configuration information.

[0015] In some embodiments, each piece of business exception processing configuration information further includes a trigger condition; the exception information of the abnormal event further includes an abnormal node and an abnormal duration;

[0016] Handle abnormal events according to target configuration information, including:

[0017] Determine whether the trigger condition in the target configuration information is met according to the abnormal node and abnormal duration included in the abnormal information;

[0018] When the trigger condition in the target configuration information is met, an operation of handling the abnormal event according to the abnormal handling method in the target configuration information is executed;

[0019] When the trigger condition in the target configuration information is not satisfied, the operation of handling the abnormal event according to the abnormal handling method in the target configuration information is not performed.

[0020] In some embodiments, the triggering conditions in the target configuration information include a preset abnormal node and a preset abnormal duration threshold;

[0021] Determine whether the trigger conditions in the target configuration information are met based on the abnormal node and abnormal duration included in the abnormal information, including:

[0022] Determine whether the abnormal node included in the abnormal information is the same as the preset abnormal node, and whether the abnormal duration included in the abnormal information is greater than or equal to the preset abnormal duration threshold;

[0023] When the abnormal node included in the abnormal information is the same as the preset abnormal node, and the abnormal duration included in the abnormal information is greater than or equal to the preset abnormal duration threshold, it is determined that the trigger condition in the target configuration information is met;

[0024] When the abnormal node included in the abnormal information is different from the preset abnormal node, or the abnormal duration included in the abnormal information is less than the preset abnormal duration threshold, it is determined that the trigger condition in the target configuration information is not satisfied.

[0025] In some embodiments, the method further comprises:

[0026] In response to a user's instruction for modifying the business exception handling configuration information, the business exception handling configuration information related to the instruction is determined from the Redis cache, and the content of the business exception handling configuration information is modified.

[0027] According to a second aspect, the present application provides a policy exception processing device. In some embodiments, the device includes:

[0028] The business exception handling configuration module is used to respond to the user's business exception handling configuration instruction, create business exception handling configuration information, and store the created business exception handling configuration information in the Redis cache; the Redis cache stores multiple business exception handling configuration information; each business exception handling configuration information includes a business identifier and an exception type;

[0029] The abnormal event processing module is used to respond to the abnormal event captured during the policy execution process, determine the business abnormality processing configuration information that matches the business identifier of the current business and the abnormal information of the abnormal event from the Redis cache, record it as the target configuration information, and process the abnormal event according to the target configuration information.

[0030] According to a third aspect, the present application provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the policy exception handling method provided in any of the above embodiments are implemented.

[0031] According to a fourth aspect, the present application provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the policy exception handling method provided in any of the above embodiments are implemented.

[0032] In the above-mentioned embodiment of the present application, the risk control system responds to the user's business exception handling configuration instruction, creates business exception handling configuration information, and stores the created business exception handling configuration information in the Redis cache; there are multiple business exception handling configuration information in the Redis cache; each business exception handling configuration information includes a business identifier and an exception type; the risk control system can monitor abnormal events during the execution of the risk control strategy. If an abnormal event is captured during the execution of the strategy, the business exception handling configuration information that matches the business identifier of the current business and the abnormal information of the abnormal event is determined from the Redis cache, recorded as the target configuration information, and the abnormal event is processed according to the target configuration information. When an abnormality is found, the present application will process it according to the pre-configured exception handling method, and will not only retry the whole process, so it can make full use of system resources and improve the efficiency of handling policy exceptions. In addition, users can dynamically configure business exception handling configuration information according to actual business scenarios, so it can adapt to increasingly complex risk control scenarios and abnormal types. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 A flowchart of a policy exception handling method provided by the present application according to one or more embodiments;

[0034] Figure 2 A schematic diagram of the execution flow of a simple risk control strategy provided by the present application according to one or more embodiments;

[0035] Figure 3 A structural block diagram of a policy exception handling device provided by the present application according to one or more embodiments;

[0036] Figure 4 This is a diagram of the internal structure of a computer device provided by the present application according to one or more embodiments. DETAILED DESCRIPTION

[0037] In order to make the purpose, technical solutions and advantages of the present application clearer, the embodiments of the present application will be further described in detail below in conjunction with the accompanying drawings. It should be clear that the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.

[0038] When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Instead, they are only examples of devices and methods consistent with some aspects of the present application as detailed in the attached claims.

[0039] In the description of the present application, it should be understood that the terms "first", "second", "third", etc. are only used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence, nor can they be understood as indicating or implying relative importance. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood according to the specific circumstances. In addition, in the description of the present application, unless otherwise specified, "multiple" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects associated before and after are in an "or" relationship.

[0040] During the execution of the risk control strategy, if an exception occurs, the relevant technology usually adopts a full-process retry mechanism to handle the exception. The full-process retry mechanism does not distinguish the type of exception and the cause of the exception, and does not care at which node of the risk control strategy the exception occurs. As long as the exception is found, the entire risk control strategy is re-executed. This one-size-fits-all processing method cannot solve the actual problems of different exceptions in a targeted manner, and it is easy to cause invalid or inefficient processing. In addition, this indiscriminate retry method cannot effectively handle the specific cause of the exception, and under certain uncontrollable factors, if the root cause of the exception has not been eliminated, it is difficult to succeed even if multiple retries are performed. At this time, multiple retries occupy a lot of computing resources and network bandwidth, but fail to produce actual results, resulting in serious waste of resources. In addition, the above method lacks dynamic adaptability, and it cannot dynamically adjust the processing strategy according to the actual abnormal situation, which will make it difficult for the risk control system to respond flexibly in complex scenarios, especially when there are exceptions in multiple links such as external data dependence and model execution. The fixed mode retry is difficult to meet the diverse business needs.

[0041] In response to the problems of related technologies such as insufficiently refined exception handling, waste of resources, and lack of dynamic adaptability, this application provides a policy exception handling method, which provides a more refined and dynamic exception handling solution and can improve the efficiency and reliability of exception handling. The method can be applied to a risk control system (which can be implemented with an independent server or a server cluster). In some embodiments, the method includes: Figure 1 The steps shown are described below.

[0042] S110: In response to the user's business exception handling configuration instruction, create business exception handling configuration information, and store the created business exception handling configuration information in the Redis cache. The Redis cache stores multiple business exception handling configuration information; each business exception handling configuration information includes a business identifier and an exception type.

[0043] The risk control system has the ability to dynamically configure exception types. Users of the risk control system (such as developers responsible for risk control business, etc.) can standardize and classify the exceptions that may occur when executing various risk control strategies based on actual business scenarios and business needs, and refine the definition of various classified exceptions in the risk control system. Such operations can configure a variety of exception types, laying the foundation for subsequent targeted processing. The risk control system can store relevant information of the exception types pre-defined by the user (such as the unique identifier, Chinese name, description information, etc. of the exception type) in the database. In some embodiments, the risk control system can also respond to the user's instructions for modifying the business exception handling configuration information, determine the business exception handling configuration information related to the instruction from the Redis cache, and modify the content of the business exception handling configuration information. Among them, the risk control system supports users to dynamically add new exception types, delete existing exception types, and modify existing exception types (such as modifying the Chinese name and / or description information of existing exception types, etc.).

[0044] Furthermore, users can clearly identify the characteristics and processing requirements of different types of exceptions, and configure targeted processing methods for different types of exceptions in the risk control system.

[0045] For example, see Figure 2 , Figure 2 The following is a simple execution process of a risk control strategy, which involves data acquisition, feature extraction, model execution, decision-making, and decision execution. For various exceptions that may occur in this process, the following exception types can be set:

[0046] 1. Decision execution exception: For example, the rule engine cannot be loaded or run correctly;

[0047] 2. Model execution exception: such as model call failure or abnormal output results;

[0048] 3. Abnormalities in third-party data acquisition: such as external service timeout or interface abnormality;

[0049] 4. Abnormal feature data acquisition: such as missing data fields or feature calculation errors;

[0050] 5. Missing business parameters: For example, incomplete business configuration leads to processing interruption;

[0051] 6. Abnormal business processing: such as abnormal result distribution processing;

[0052] 7. System abnormalities: such as system crash, resource exhaustion, etc.

[0053] Users can configure targeted processing methods for different exceptions that may occur in actual business according to the various exceptions that may occur in the actual business. For various exception processing methods that may be used, users can define the corresponding processing method information (such as the unique identifier and description information of the exception processing method) in the risk control system and develop the corresponding exception processing logic.

[0054] The business exception handling configuration information configured by the user includes a variety of information. For example, Table 1 shows three exemplary business exception handling configuration information, including information for indicating the business type (such as a business identifier), information for indicating the exception type (such as a unique identifier of the exception type), information for indicating the exception handling method (such as a unique identifier of the exception handling method), and information for indicating the exception handling personnel (such as a personnel identifier), etc.

[0055] Table 1:

[0056] Business Logo Exception Type Exception handling method Exception handling personnel Credit Model execution exception Automatic rejection Credit Abnormal decision execution Retry loan Abnormal feature acquisition DingTalk Notification Zhang San

[0057] The risk control system can use the business exception handling configuration information configured by the user to handle exceptions that occur during policy execution.

[0058] The risk control system can store the business exception handling configuration information configured by the user in the database, and store the business exception handling configuration information in the Redis cache. After an exception occurs, the business exception handling configuration information is first searched from the Redis cache. If no result is found in the Redis cache, the business exception handling configuration information is searched from the database. In this way, the business exception handling configuration information can be read at a faster speed after the exception occurs. Since the frequency of database access is reduced, the system response speed can be greatly improved.

[0059] S120: In response to capturing an abnormal event during the policy execution process, determine the business abnormality processing configuration information that matches the business identifier of the current business and the abnormal information of the abnormal event from the Redis cache, record it as the target configuration information, and process the abnormal event according to the target configuration information.

[0060] In the business process, it is usually necessary to execute the risk control strategy specified by the business. The risk control system obtains the specified risk control strategy from the strategy system and executes the risk control strategy. During the execution of the risk control strategy, it monitors whether abnormal events occur. When an abnormal event is detected, the business abnormality processing configuration information that matches the business identifier of the current business and the abnormal information of the abnormal event is determined from the Redis cache, the determined business abnormality processing configuration information is obtained as the target configuration information, and the abnormal event is processed according to the target configuration information.

[0061] In some embodiments, the created business exception handling configuration information is stored in the Redis cache, including: constructing a key-value pair based on the created business exception handling configuration information, and storing the key-value pair in the Redis cache; wherein the key of the key-value pair is the information obtained by concatenating the business identifier and exception type in the created business exception handling configuration information, and the value of the key-value pair is other information in the created business exception handling configuration information.

[0062] For example, the business identifier of a business exception handling configuration information is order_strategy, the exception type is decision_failure, the exception handling method is retry, the retry interval is 300 seconds, and the notification method is DingTalk, then the constructed keys and values ​​can be as follows:

[0063] Key: order_strategy:decision_failure;

[0064] Value: {Processing method: "retry", Retry interval: 300 seconds, Notification method: "DingTalk"}.

[0065] Among them, the business exception handling configuration information is also stored in the database in the form of key-value pairs, and the configuration information is automatically synchronized to the Redis cache after being saved in the database. The Redis cache also provides timeout control and consistency update mechanisms.

[0066] Correspondingly, the exception information of the exception event includes the exception type; determine the business exception handling configuration information that matches the business identifier of the current business and the exception information of the exception event from the Redis cache, including: concatenating the business identifier of the current business and the exception type of the exception event to obtain a query key; query the Redis cache based on the query key, and use the found business exception handling configuration information as the business exception handling configuration information that matches the business identifier of the current business and the exception information of the exception event.

[0067] The risk control system stores the business exception handling configuration information in the Redis cache in the form of key-value pairs. Specifically, the business identifier and exception type in the business exception handling configuration information are concatenated to obtain the key, and the rest of the business exception handling configuration information is used as the value. In this way, after capturing an abnormal event, the risk control system can quickly query the matching business exception handling configuration information based on the business identifier of the currently executing business and the exception type of the abnormal event.

[0068] Furthermore, in some embodiments, each piece of business exception handling configuration information also includes an exception handling method; and handling an exception event according to the target configuration information includes: handling the exception event according to the exception handling method in the target configuration information.

[0069] Exemplarily, if the business exception handling configuration information stored in the Redis cache is as shown in Table 1, if the business identifier of the currently executing business is credit and the exception type of the currently captured exception event is a model execution exception, then it can be determined that the corresponding exception handling method is automatic rejection, and if the business identifier of the currently executing business is credit and the exception type of the currently captured exception event is a decision execution exception, then it can be determined that the corresponding exception handling method is retry.

[0070] In some embodiments, each piece of business exception handling configuration information also includes a trigger condition; the exception information of the exception event also includes an exception node and an exception duration; processing the exception event according to the target configuration information also includes: judging whether the trigger condition in the target configuration information is met based on the exception node and the exception duration included in the exception information; when the trigger condition in the target configuration information is met, executing the operation of processing the exception event according to the exception handling method in the target configuration information; when the trigger condition in the target configuration information is not met, not executing the operation of processing the exception event according to the exception handling method in the target configuration information.

[0071] During the real-time execution of the strategy, the risk control system detects whether there is any abnormality in the strategy. When it is determined that the strategy has an abnormality, it does not directly execute the pre-configured exception handling method, but first determines whether the node where the abnormal event currently occurs (i.e., the abnormal node) and the abnormal duration meet the pre-configured trigger conditions. When it is determined that the trigger conditions are met, the exception handling method is executed. When it is determined that the trigger conditions are not met, the exception handling method is not executed. This ensures that the exception handling method is only executed when the pre-configured trigger conditions (such as node, time, etc.) are met, avoiding invalid operations.

[0072] Among them, the triggering conditions of each business exception processing configuration information specifically include abnormal nodes and abnormal duration thresholds. Correspondingly, the triggering conditions in the target configuration information also include preset abnormal nodes and preset abnormal duration thresholds. At this time, the operation of judging whether the triggering conditions in the target configuration information are met according to the abnormal nodes and abnormal duration included in the abnormal information can be to judge whether the abnormal nodes included in the abnormal information are the same as the preset abnormal nodes, and whether the abnormal duration included in the abnormal information is greater than or equal to the preset abnormal duration threshold; when the abnormal nodes included in the abnormal information are the same as the preset abnormal nodes, and the abnormal duration included in the abnormal information is greater than or equal to the preset abnormal duration threshold, it is judged that the triggering conditions in the target configuration information are met; when the abnormal nodes included in the abnormal information are not the same as the preset abnormal nodes, or the abnormal duration included in the abnormal information is less than the preset abnormal duration threshold, it is judged that the triggering conditions in the target configuration information are not met.

[0073] It should be noted that, with respect to the various steps included in the policy exception handling method provided in any of the above embodiments, unless otherwise clearly stated in this document, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a part of these steps may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0074] Based on the same inventive concept, the present application also provides a policy exception handling device. In some embodiments, Figure 4 As shown, the strategy exception handling device includes the following modules:

[0075] The business exception handling configuration module 110 is used to create business exception handling configuration information in response to the user's business exception handling configuration instruction, and store the created business exception handling configuration information in the Redis cache; the Redis cache stores multiple business exception handling configuration information; each business exception handling configuration information includes a business identifier and an exception type;

[0076] The abnormal event processing module 120 is used to respond to the abnormal event captured during the policy execution process, determine the business abnormality processing configuration information that matches the business identifier of the current business and the abnormal information of the abnormal event from the Redis cache, record it as the target configuration information, and process the abnormal event according to the target configuration information.

[0077] In some embodiments, the business exception processing configuration module 110 includes:

[0078] The key-value pair construction submodule is used to construct key-value pairs based on the created business exception handling configuration information;

[0079] The key-value pair storage submodule is used to store the key-value pair in the Redis cache; wherein the key of the key-value pair is the information obtained by concatenating the business identifier and the exception type in the created business exception handling configuration information, and the value of the key-value pair is other information in the created business exception handling configuration information.

[0080] In some embodiments, the abnormal information of the abnormal event includes the abnormal type; the abnormal event processing module 120 includes:

[0081] The query mechanism submodule is used to concatenate the business identifier of the current business and the abnormal type of the abnormal event to obtain a query key;

[0082] The configuration information query submodule is used to query the Redis cache based on the query key, and use the found business exception handling configuration information as the business exception handling configuration information that matches the business identifier of the current business and the exception information of the exception event.

[0083] In some embodiments, each piece of service exception handling configuration information further includes an exception handling method; the exception event handling module 120 further includes:

[0084] The abnormal event processing submodule is used to process abnormal events according to the abnormal processing method in the target configuration information.

[0085] In some embodiments, each piece of service exception handling configuration information further includes a trigger condition; the exception information of the abnormal event further includes an abnormal node and an abnormal duration; the abnormal event handling module 120 further includes:

[0086] A trigger condition detection submodule is used to determine whether the trigger condition in the target configuration information is met according to the abnormal node and abnormal duration included in the abnormal information;

[0087] The abnormal event processing submodule is also used to execute the operation of processing the abnormal event according to the abnormal processing method in the target configuration information when the trigger condition in the target configuration information is met; and not execute the operation of processing the abnormal event according to the abnormal processing method in the target configuration information when the trigger condition in the target configuration information is not met.

[0088] In some embodiments, the trigger condition in the target configuration information includes a preset abnormal node and a preset abnormal duration threshold; the trigger condition detection submodule includes:

[0089] A detection unit, used to respectively determine whether the abnormal node included in the abnormal information is the same as the preset abnormal node, and whether the abnormal duration included in the abnormal information is greater than or equal to a preset abnormal duration threshold;

[0090] A determination unit is configured to determine that a trigger condition in the target configuration information is satisfied when an abnormal node included in the abnormal information is the same as a preset abnormal node and an abnormal duration included in the abnormal information is greater than or equal to a preset abnormal duration threshold; and to determine that the trigger condition in the target configuration information is not satisfied when an abnormal node included in the abnormal information is different from the preset abnormal node or an abnormal duration included in the abnormal information is less than a preset abnormal duration threshold.

[0091] In some embodiments, the business exception handling configuration module 110 is further used to respond to a user's instruction for modifying the business exception handling configuration information, determine the business exception handling configuration information related to the instruction from the Redis cache, and modify the content of the business exception handling configuration information.

[0092] For the specific definition of the policy exception handling device, please refer to the definition of the policy exception handling method above, which will not be repeated here. Each module in the above-mentioned policy exception handling device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0093] The present application also provides a computer device. In some embodiments, the computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the policy exception handling method provided in any of the above embodiments can be implemented.

[0094] Furthermore, in some embodiments, the internal structure diagram of the computer device may be as follows: Figure 4 As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data such as business exception handling configuration information. The specific stored data can also refer to the definition in the above method embodiment. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a policy exception handling method is implemented.

[0095] Those skilled in the art will understand that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0096] The present application also provides a computer-readable storage medium. In some embodiments, a computer program is stored on the computer-readable storage medium. When the computer program is executed by a processor, the steps of the policy exception handling method provided in any of the above embodiments are implemented.

[0097] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0098] Those skilled in the art can understand that all or part of the processes in the above method embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink), DRAM (SLDRAM), memory bus (Rambus), direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0099] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0100] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A policy exception handling method, characterized in that: The method comprises: In response to the user's business exception handling configuration instruction, create business exception handling configuration information, and store the created business exception handling configuration information in the Redis cache; the Redis cache stores multiple business exception handling configuration information; each business exception handling configuration information includes a business identifier and an exception type; In response to capturing an abnormal event during the policy execution process, business exception handling configuration information matching the business identifier of the current business and the abnormal information of the abnormal event is determined from the Redis cache, recorded as target configuration information, and the abnormal event is processed according to the target configuration information.

2. The method according to claim 1, characterized in that Store the created business exception handling configuration information in the Redis cache, including: A key-value pair is constructed based on the created business exception handling configuration information, and the key-value pair is stored in the Redis cache; wherein the key of the key-value pair is the information obtained by concatenating the business identifier and the exception type in the created business exception handling configuration information, and the value of the key-value pair is other information in the created business exception handling configuration information.

3. The method according to claim 2, characterized in that The abnormal information of the abnormal event includes the abnormal type; Determining the business exception handling configuration information that matches the business identifier of the current business and the exception information of the exception event from the Redis cache includes: Concatenate the service identifier of the current service and the abnormal type of the abnormal event to obtain a query key; The Redis cache is queried based on the query key, and the found business exception handling configuration information is used as the business exception handling configuration information that matches the business identifier of the current business and the exception information of the exception event.

4. The method according to claim 3, characterized in that Each piece of the business exception handling configuration information also includes an exception handling method; Processing the abnormal event according to the target configuration information includes: The abnormal event is processed according to the abnormal processing mode in the target configuration information.

5. The method according to claim 4, characterized in that Each piece of the business exception handling configuration information also includes a trigger condition; the abnormal information of the abnormal event also includes an abnormal node and an abnormal duration; Processing the abnormal event according to the target configuration information also includes: Determining whether a trigger condition in the target configuration information is met according to the abnormal node and abnormal duration included in the abnormal information; When the trigger condition in the target configuration information is met, executing the operation of processing the abnormal event according to the abnormal processing method in the target configuration information; When the trigger condition in the target configuration information is not satisfied, the operation of processing the abnormal event according to the abnormal processing method in the target configuration information is not performed.

6. The method according to claim 5, characterized in that The triggering conditions in the target configuration information include a preset abnormal node and a preset abnormal duration threshold; Judging whether a trigger condition in the target configuration information is met according to the abnormal node and the abnormal duration included in the abnormal information includes: respectively determining whether the abnormal node included in the abnormal information is the same as the preset abnormal node, and whether the abnormal duration included in the abnormal information is greater than or equal to the preset abnormal duration threshold; When the abnormal node included in the abnormal information is the same as the preset abnormal node, and the abnormal duration included in the abnormal information is greater than or equal to the preset abnormal duration threshold, determining that the trigger condition in the target configuration information is satisfied; When the abnormal node included in the abnormal information is different from the preset abnormal node, or the abnormal duration included in the abnormal information is less than the preset abnormal duration threshold, it is determined that the trigger condition in the target configuration information is not satisfied.

7. The method according to claim 1, characterized in that The method further comprises: In response to a user's instruction for modifying the business exception handling configuration information, the business exception handling configuration information related to the instruction is determined from the Redis cache, and the content of the business exception handling configuration information is modified.

8. A policy exception handling device, characterized in that: The device comprises: A business exception handling configuration module is used to create business exception handling configuration information in response to a user's business exception handling configuration instruction, and store the created business exception handling configuration information in a Redis cache; the Redis cache stores multiple business exception handling configuration information; each business exception handling configuration information includes a business identifier and an exception type; An abnormal event processing module is used to respond to an abnormal event captured during the policy execution process, determine from the Redis cache the business abnormality processing configuration information that matches the business identifier of the current business and the abnormal information of the abnormal event, record it as target configuration information, and process the abnormal event according to the target configuration information.

9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • System exception processing method and device, computer equipment and storage medium

    CN111899105A

  • Business exception data processing method and device, computer equipment and storage medium

    CN111966515A

  • Service exception processing method and device

    CN112988443A

  • Abnormal interface fault tolerance method and device, equipment and storage medium

    CN115002000A