Abnormal alarm method and device of system state, electronic equipment and storage medium
By building a global business view and message queue mechanism, real-time tracking and checking the business status in the distributed microservice architecture and generating exception analysis reports, the problem of difficult to manage cross-system dependencies in the existing technology is solved, and fault location and repair efficiency is improved.
Patent Information
- Application Number
- CN202510483944.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-17
- Publication Date
- 2025-08-01
AI Technical Summary
Under the distributed microservice architecture, existing monitoring tools are difficult to provide a global view across multiple systems, resulting in long failure location and repair times and lack of comprehensive understanding of cross-system dependencies.
By building a global business view, real-time business status tracking is achieved using node events and message queues, check deviations from expected behavior based on predefined standard dependency configuration, generate exception analysis reports and visual alarms, ensuring the consistency of dependency configurations of each business system.
It realizes a fast global business view and automated exception alarms, reduces troubleshooting and repair time, improves the system's response speed and maintainability, and enhances the system's flexibility and scalability.
Smart Images

Figure CN120407620A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer processing, and particularly to an abnormal alarm method, device, electronic device and storage medium for system status. Background Art
[0002] In the process of digital transformation of financial loan platforms, the upstream and downstream business management systems have gradually evolved from traditional monolithic architectures to distributed microservice architectures. This transformation enables each business subsystem (such as user registration, credit assessment, loan approval, loan disbursement processing, repayment management, etc.) to operate and expand more flexibly and independently to meet the rapidly changing market demands and service innovations.
[0003] In the environment of a distributed microservice architecture, complex dependency chains are formed among these business subsystems. For example, in a loan application process, after a user's loan application is submitted (the first business information), it triggers the response of the credit assessment system (the first business system), and then based on the credit assessment result, it triggers the operation of the loan approval system, and finally loan disbursement processing and subsequent repayment management. Any operation in any link may trigger a chain reaction in a series of other systems, forming a continuous workflow.
[0004] However, most current monitoring tools mainly focus on the performance and health status monitoring of a single business system, and lack support for the global view across multiple systems. For example, when the loan approval system fails, it will not only affect the speed of loan approval, but may also cause the entire loan process to stagnate, affecting the normal operation of the credit assessment system and the loan disbursement processing system, and further causing more extensive service interruptions. Due to the lack of a comprehensive understanding of cross-system dependencies, such problems are often difficult to quickly locate and solve.
[0005] Therefore, how to quickly provide a global business view and automated abnormal alarms, and reduce the troubleshooting and repair time has become a technical problem that needs to be solved urgently. Summary of the Invention
[0006] In view of the above, it is necessary to provide an abnormal alarm method for system status, the purpose of which is to use node events and message queues in the global business view to achieve real-time tracking of business status changes, check behaviors deviating from expectations based on predefined standard dependency configurations, and be able to quickly provide a global business view and automated abnormal alarms, reducing the troubleshooting and repair time.
[0007] The abnormal alarm method for system status provided by the present invention includes:
[0008] When it is monitored that the first business system generates first business information for the first node in the preset global business view, query the local cache according to the first business information to obtain a second business system that has a status dependency relationship with the first business system, and obtain a structure table storing the standard dependency configuration of the upstream and downstream statuses between each node in the global business view;
[0009] Use the first business information to change the status of the first business system on the message queue corresponding to the global business view to obtain a status change message, and trigger the second business system to process the first business information according to the status change message;
[0010] Record the data items and business logics relied on by the second business system to process the first business information, obtain the actual dependency configuration of the second business system according to the data items and the business logics, and determine whether the actual dependency configuration is consistent with the standard dependency configuration in the structure table;
[0011] If they are inconsistent, analyze the reason why the actual dependency configuration is inconsistent with the standard dependency configuration in the structure table, generate an exception analysis report according to the inconsistent reason, visually link the exception analysis report with the second node of the second business system in the global business view, generate an exception reminder message according to the content of the exception analysis report, and notify a preset user to click on the visual link to view the exception analysis report in the global business view through the exception reminder message.
[0012] Optionally, before the step of when it is monitored that the first business system generates first business information for the first node in the preset global business view, the method further includes:
[0013] Obtain the functions and interaction sequences of each business system to form a business flow chart;
[0014] Analyze the status dependency relationships between each business system, and record the dependency relationships in the business flow chart;
[0015] Use a preset visualization tool to display the business flow chart and the status dependency relationships in a graphical manner to form a global business view.
[0016] Optionally, the structure table is obtained in the following manner:
[0017] Construct an initial hash structure table, mark the business systems belonging to the upstream type according to the execution order between each node in the global business view, and use the upstream type of business systems as the keywords of the initial hash structure table;
[0018] Generate a standard dependency configuration based on the dependency configuration relationship of the upstream and downstream states between each node, use the standard dependency configuration as the value of the initial hash structure table, and construct the structure table according to the keywords and values of the initial hash structure table. The dependency configuration relationship of the upstream and downstream states includes the data items and business logics relied on by each business system.
[0019] Optionally, the using the first service information to change the state of the first service system on the message queue corresponding to the global service view to obtain a state change message includes:
[0020] Send the first service information to the message queue communicatively connected to each service system;
[0021] Modify the unprocessed state of the first service system in the message queue to the processed state according to the first service information to obtain the state change message.
[0022] Optionally, the triggering the second service system to process the first service information according to the state change message includes:
[0023] Push the state change message to the second service system according to the subscription mechanism of the second service system to the message queue;
[0024] After the second service system subscribes to the state change message, trigger the second service system to process the first service information.
[0025] Optionally, the analyzing the reason why the actual dependency configuration is inconsistent with the standard dependency configuration of the structure table and generating an exception analysis report according to the inconsistent reason includes:
[0026] Compare the data items in the actual dependency configuration with the data items in the standard dependency configuration of the structure table to obtain data item differences;
[0027] Compare the business logics in the actual dependency configuration with the business logics in the standard dependency configuration of the structure table to obtain business logic differences;
[0028] Analyze the difference reasons of the data item differences and the business logic differences, and generate the exception analysis report according to the difference reasons. The difference reasons include human error reasons, environmental change reasons, and service update reasons.
[0029] Optionally, the visually linking the exception analysis report with the second node of the second service system in the global service view includes:
[0030] Store the exception analysis report in a preset file system and generate a unique identifier for the exception analysis report;
[0031] In the global service view, add a link to the second node corresponding to the second service system, and direct the link to the unique identifier of the exception analysis report, so that a preset user can access the exception analysis report by clicking on the second node.
[0032] To solve the above problems, the present invention also provides an abnormal alarm device for system status, and the device includes:
[0033] A monitoring module, configured to, when it monitors that a first service system generates first service information for a first node in a preset global service view, query a local cache according to the first service information to obtain a second service system having a status dependency relationship with the first service system, and obtain a structure table storing a standard dependency configuration of upstream and downstream statuses between each node in the global service view;
[0034] A change module, configured to use the first service information to change the status of the first service system on a message queue corresponding to the global service view to obtain a status change message, and trigger the second service system to process the first service information according to the status change message;
[0035] A recording module, configured to record data items and service logics relied on by the second service system to process the first service information, obtain an actual dependency configuration of the second service system according to the data items and the service logics, and determine whether the actual dependency configuration is consistent with the standard dependency configuration in the structure table;
[0036] A feedback module, configured to, if they are inconsistent, analyze the reason why the actual dependency configuration is inconsistent with the standard dependency configuration in the structure table, generate an exception analysis report according to the inconsistent reason, visually link the exception analysis report with a second node of the second service system in the global service view, generate an exception reminder message according to the content of the exception analysis report, and notify a preset user to click on the visual link to view the exception analysis report in the global service view through the exception reminder message.
[0037] To solve the above problems, the present invention also provides an electronic device, and the electronic device includes:
[0038] At least one processor; and,
[0039] A memory communicatively connected to the at least one processor; wherein,
[0040] The memory stores an abnormal alarm program of the system state that can be executed by the at least one processor. The abnormal alarm program of the system state is executed by the at least one processor so that the at least one processor can execute the above-mentioned abnormal alarm method of the system state.
[0041] To solve the above problems, the present invention also provides a computer-readable storage medium. An abnormal alarm program of the system state is stored on the computer-readable storage medium. The abnormal alarm program of the system state can be executed by one or more processors to implement the above-mentioned abnormal alarm method of the system state.
[0042] Compared with the prior art, the present invention uses a global business view to clarify the interaction sequence and dependency relationship between all business systems, and creates a structure table for each node to ensure that all business systems have a clear execution path when processing business, which helps to reduce errors and improve the maintainability and transparency of the system.
[0043] The message queue mechanism is used to notify each business system when it should start or stop operating, and the business flow is advanced by changing the status. Whenever a business system completes its task, a message of status change is published to the queue, so that the next business system subscribing to the message can immediately respond and continue the processing flow. An asynchronous non-blocking business processing mode is realized, which improves the response speed and efficiency of the system, decouples the business systems from each other, and enhances the elasticity and scalability of the system.
[0044] After each business system finishes the task it is responsible for, record the actual dependency configuration it uses, and then compare whether these configurations are consistent with the predefined standard dependency configurations.
[0045] If they are inconsistent, analyze the reasons for the inconsistency between the actual dependency configuration and the standard dependency configuration in the structure table, generate an abnormal analysis report according to the inconsistent reasons, visually link the abnormal analysis report with the second node of the second business system in the global business view, generate an abnormal reminder message according to the content of the abnormal analysis report, and notify the preset user to click the visual link to view the abnormal analysis report in the global business view. A detailed abnormal analysis report is generated based on the analysis results, which includes the specific description of the abnormality, cause analysis, impact assessment, and improvement suggestions, providing clear guidance for the operation and maintenance personnel to help them quickly understand and solve problems. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 It is a flowchart of the abnormal alarm method of the system state provided by an embodiment of the present invention;
[0047] Figure 2Schematic diagram of modules of an abnormal alarm device for system status provided by an embodiment of the present invention;
[0048] Figure 3 Schematic diagram of the structure of an electronic device for implementing an abnormal alarm method for system status provided by an embodiment of the present invention;
[0049] The implementation, functional features and advantages of the present invention will be further described in conjunction with embodiments with reference to the accompanying drawings. Specific embodiments
[0050] In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts fall within the protection scope of the present invention.
[0051] It should be noted that the descriptions involving "first", "second", etc. in the present invention are only for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include at least one of such features. In addition, the technical solutions between various embodiments can be combined with each other, but it must be based on the fact that those of ordinary skill in the art can implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the protection scope required by the present invention.
[0052] Refer to Figure 1 As shown, it is a flowchart of an abnormal alarm method for system status provided by an embodiment of the present invention. This method is executed by an electronic device.
[0053] In this embodiment, the abnormal alarm method for system status includes:
[0054] S1. When it is monitored that the first business system generates first service information for the first node in the preset global business view, query the local cache according to the first service information to obtain a second business system having a status dependency relationship with the first business system, and obtain a structure table storing the standard dependency configuration of the upstream and downstream statuses between each node in the global business view;
[0055] In this embodiment, the attribute information (the attribute information includes the upstream type and the downstream type) of each business system and the standard dependency configuration of the upstream and downstream states are pre-registered in the upstream and downstream business management systems. For example, the upstream and downstream business management systems include the first business system (upstream system / credit assessment system), the second business system (intermediate system / clearing system), the third business system (downstream system / loan processing system)… N business systems, and the attribute information of the first to N business systems and the standard dependency configuration of the upstream and downstream states are registered in the local cache of the upstream and downstream business management systems.
[0056] Specific registration process: construct a preset structure table, obtain the execution order of multiple business systems, the multiple business systems include the first business system and the second business system and their mutual relationships, sort the business processes of the multiple business systems according to the execution order and the mutual relationships to obtain the global business view, mark the business systems belonging to the upstream type according to the execution order between each node in the global business view, use the business systems of the upstream type as the keywords of the structure table, obtain the dependency configuration relationship of the upstream and downstream states between each node to generate the standard dependency configuration, use the standard dependency configuration as the value of the structure table, and the dependency configuration relationship of the upstream and downstream states includes the data items and business logics that each business system depends on. The registered structure table is stored in the local cache.
[0057] When it is monitored that the first business system generates the first business information for the first node in the global business view. The first business information can be the result triggered by user operation or a timing task. Use the first business information as the query condition to access the local cache stored in advance. The local cache contains the attribute information of all known business systems and the standard dependency configuration of the upstream and downstream states between them. The attribute information and the standard dependency configuration of the upstream and downstream states have been registered and constructed when the business system is initialized or updated.
[0058] According to the first node in the global business view associated with the first business information, find the next business system (such as the second business system / clearing system) that has a direct state dependency relationship with it. At the same time, the detailed standard dependency configuration of the upstream and downstream states between each node in the entire global business view is also obtained, and the interaction mode and data flow rules between each node can be ensured to be understood through the standard dependency configuration of the upstream and downstream states.
[0059] The first business system refers to the starting system of the initiated business process or one of the systems. In the example of a financial loan platform, it is the credit assessment system.
[0060] The first node in the global business view refers to the first processing node defined in the global business view or one of the nodes.
[0061] The standard dependency configuration of upstream and downstream states refers to a logical relationship and data interaction rule established between different business systems in a distributed microservices architecture to complete a complete business process. It defines the dependencies between business systems, that is, how the operations of one business system affect other business systems, and which data items need to be shared between these business systems and what business logic to follow.
[0062] Taking the financial scenario as an example: In a financial loan platform, when a user submits a new loan application (the first business information), this action triggers the credit assessment system (the first business system) to respond to the "loan application received" node (the first node) in the preset global business view. According to the information of the loan application, the credit assessment system queries the local cache to determine the subsequent business systems with which it has a state dependency relationship, such as the loan approval system (the second business system). At the same time, a structure table containing the standard dependency configuration of the upstream and downstream states between each node in all global business views is constructed.
[0063] For example, at the initial stage of loan application processing, first obtain the execution order of multiple business systems, and the multiple business systems include the first business system and the second business system, such as: 1. User registration -> 2. Loan application submission -> 3. Credit assessment -> 4. Loan approval -> 5. Loan disbursement processing -> 6. Repayment management
[0064] According to this order, all business systems are sorted to obtain the global business view. Then, for each node, a structure table is created. For example, the "credit assessment" node, as an upstream type of business system, is the key of the Hash structure table, and the value of the Hash structure table is the standard dependency configuration of this node, including the required user data items (such as income certificate, credit score, etc.) and business logic (such as credit score calculation rules).
[0065] In one embodiment, before the step of when it is monitored that the first business system generates the first business information for the first node in the preset global business view, the method further includes:
[0066] Obtain the functions and interaction order of each business system to form a business process diagram;
[0067] Analyze the state dependency relationships between each business system and record the dependency relationships in the business process diagram;
[0068] Use a preset visualization tool to display the business process diagram and the state dependency relationships in a graphical manner to form a global business view.
[0069] In one embodiment, the step of obtaining the functions and interaction order of each business system to form a business process diagram includes:
[0070] Obtain the execution order of multiple business systems, where the multiple business systems include a first business system and a second business system;
[0071] According to the execution order, sort the business processes of the multiple business systems to obtain the business process diagram.
[0072] Construct an initial directed graph, use each business system as a node of the initial directed graph, add directed edges between the corresponding nodes according to the interface call information of each business system to obtain a candidate directed graph, perform topological sorting on the candidate directed graph, and according to the obtained topological sorting result, clarify the execution order of each business system.
[0073] Parse the directed edges in the candidate directed graph to obtain the functions and interaction methods between each business system, use the functions and interaction methods between each business system as the mutual relationship between each business system, and according to the execution order and mutual relationship, sort the business processes of the multiple business systems to obtain the global business view. The business process diagram provides a clear and intuitive perspective, enabling users to quickly understand the relationships and workflows between different business systems. It solves the problems of poor communication or misunderstanding caused by the lack of an overall view and reduces the phenomenon of information silos.
[0074] In one embodiment, the structure table is obtained in the following manner:
[0075] Construct an initial hash structure table, mark the business systems belonging to the upstream type according to the execution order between each node in the global business view, and use the upstream type of business systems as the keywords of the initial hash structure table;
[0076] Generate a standard dependency configuration according to the dependency configuration relationship of the upstream and downstream states between each node, use the standard dependency configuration as the value of the initial hash structure table, and construct the structure table according to the keywords and values of the initial hash structure table. The dependency configuration relationship of the upstream and downstream states includes the data items and business logics that each business system depends on.
[0077] The execution order between each node refers to the way in which different tasks or steps are processed in a predetermined order in the business process.
[0078] Create an empty hash table as the initial hash structure table for storing the dependency relationships between business systems. According to the execution order defined in the global business view, determine the upstream business system of each node. For each business system identified as the upstream type, set its identifier (such as name or ID) as the key (keyword) in the structure table.
[0079] For each upstream business system, analyze its interaction with the downstream system, including the required data items and business logic, integrate the data items and business logic into a standard dependency configuration in a standard format, and store it as the value corresponding to the key (keyword) in the structure table.
[0080] By using the upstream business system as the keyword and the status dependency configuration of the downstream system as the value, the structure table clearly defines the dependency relationships between various business systems, enabling a lookup operation with an O(1) time complexity and greatly improving the query efficiency. When problems occur, the structure table can help quickly locate the affected business systems and their upstream and downstream associations, accelerating the problem diagnosis and resolution process. The structure table of the present invention provides a way to capture and display the interactions of all participating business systems in the entire business process, while solving the problem that traditional monitoring tools often only focus on the performance and health status of a single business system and ignore the overall perspective across multiple systems.
[0081] S2. Use the first business information to change the status of the first business system on the message queue corresponding to the global business view, obtain a status change message, and trigger the second business system to process the first business information according to the status change message;
[0082] In this embodiment, the first business information is sent to the message queue communicatively connected to each business system, and the status of the first business system in the message queue is updated according to the first business information, changing from "unprocessed" to "processed", indicating that the first business information has been received and is ready to be passed to the next business system. When the second business system reads the status change message, it automatically triggers its internal processing logic to respond to the first business information.
[0083] Continuing with the above example: When the credit assessment system completes the assessment of a user's loan application, it will use the information of the loan application to change its status on the message queue corresponding to the global business view to "processed". This status change message is published to the message queue and triggers the loan approval system to automatically start processing the loan application information after subscribing to the message.
[0084] In this process, the publishing mechanism and subscription mechanism of each business system to the message queue are set to ensure that only relevant business systems can receive the corresponding status change messages. For example, after the loan approval system subscribes to the "processed" status change message from the credit assessment system, it automatically starts the loan approval process.
[0085] In one embodiment, the method further includes:
[0086] Construct a message queue according to the execution order between the nodes in the global business view;
[0087] Set the publishing mechanism and / or subscription mechanism of each business system to the message queue.
[0088] Identify the nodes corresponding to all business systems from the global business view of the whole and determine the positions of the nodes in the process. Based on the business logic and dependencies, clarify the execution order among the nodes.
[0089] Utilize message middleware (such as Rabbit MQ, Kafka, AWS SQS, etc.) to create message queues according to the execution order among the nodes, and configure message queue parameters according to performance, durability, and security requirements, such as maximum message size, expiration time, permission control, etc. For each upstream business system, define the role of the upstream business system as a message producer. For each downstream business system, define the role of the downstream business system as a message consumer to subscribe to relevant message queues or topics and listen for the arrival of new messages. By introducing the message queue as an intermediate layer, each business system no longer directly depends on each other, but indirectly interacts through the message queue, reducing the coupling degree among business systems, so that the change of a single system will not directly affect other systems, and reducing the maintenance cost and complexity.
[0090] In one embodiment, the changing the state of the first business system on the message queue corresponding to the global business view by using the first business information to obtain a state change message includes:
[0091] Send the first business information to the message queue communicatively connected to each business system;
[0092] Modify the unprocessed state of the first business system in the message queue to the processed state according to the first business information to obtain the state change message.
[0093] Each business system initially generates an initial state in the message queue, and the initial state is set to "unprocessed". Send the first business information to the message queue, and change its state to "processed" after the first business information is consumed to obtain the state change message.
[0094] In one embodiment, the triggering the second business system to process the first business information according to the state change message includes:
[0095] Push the state change message to the second business system according to the subscription mechanism of the second business system to the message queue;
[0096] After the second business system subscribes to the state change message, trigger the second business system to process the first business information.
[0097] The message subscription mechanism is a core concept in message middleware or publish - subscribe systems, allowing consumers to express interest in predefined types of messages and automatically receive them when they are available.
[0098] According to the message subscription mechanism, call the API interface provided by the message middleware to monitor the subscription behavior of the second business system. After the second business system receives a status change message, it automatically triggers the second business system to look up the first business information based on the identifier of the status change message and process the first business information.
[0099] S3. Record the data items and business logic relied on by the second business system to process the first business information, obtain the actual dependency configuration of the second business system based on the data items and the business logic, and determine whether the actual dependency configuration is consistent with the standard dependency configuration in the structure table;
[0100] In this embodiment, record the specific data items (such as database tables, fields, etc.) and the business logic (such as calculation rules, called service interfaces, etc.) relied on by the second business system when processing the first business information. The relied - on data items and business logic represent different definitions in different application scenarios. For example, in the present invention, the relied - on data items include order ID, user ID, product list, payment status, etc., and the business logic includes checking the validity of the order, verifying the user's credit limit, updating the inventory quantity, notifying the user of the order processing result, etc.
[0101] Based on the recorded dependency data items and business logic, extract an object describing the actual dependency configuration of the second business system. This object contains all necessary configuration parameters, such as database connection strings, API endpoint URLs, version numbers of specific services, etc.
[0102] Compare the actual dependency configuration with the standard dependency configuration in the predefined structure table. The hash algorithm can be used to generate the hash values of both, and then compare whether these two hash values are equal. If they are equal, it means they are consistent; otherwise, there may be differences and the reasons need to be further investigated.
[0103] Continuing with the above example: When the loan approval system processes a loan application, record the relied - on data items (such as the user's credit assessment result, loan amount, etc.) and business logic (such as approval decision rules). Subsequently, compare whether these actual dependency configurations are consistent with the standard dependency configurations predefined in the structure table. If they are consistent, continue with the process; if not, for example, if it is found that the loan approval system uses unexpected data or business logic, then further investigation is required.
[0104] In one embodiment, recording the data items and business logics relied on by the second service system for processing the first service information includes:
[0105] Monitoring the processing steps of the second service system for processing the first service information to obtain a monitoring log;
[0106] Extracting each data item used in the processing steps and the business logics for processing each data item from the monitoring log.
[0107] Monitoring the processing steps of the second service system for processing the first service information through a preset monitoring program to obtain a monitoring log, and extracting each data item used in the processing steps and the business logics for processing each data item from the monitoring log. By accurately obtaining and recording the actual dependency configurations when the second service system processes the first service information, it can be ensured that the actual dependency configurations are consistent with the predefined standard dependency configurations, which helps to eliminate the risks of service interruption or function failure caused by configuration differences and ensures the stable operation of the business process. When problems occur, the differences between the actual dependency configurations and the standard configurations can be quickly compared, helping the development and operation and maintenance teams quickly locate the root causes of the problems and greatly shortening the fault recovery time.
[0108] In one embodiment, determining whether the actual dependency configuration is consistent with the standard dependency configuration in the structure table includes:
[0109] Comparing whether the data items in the actual dependency configuration are consistent with the data items in the standard dependency configuration;
[0110] And checking whether the actually executed business logics in the actual dependency configuration are consistent with the business logics predefined in the standard dependency configuration.
[0111] Extracting all actually used data items and the values of the data items from the actual operating environment of the second service system. For each data item, comparing the value in the actual dependency configuration with the corresponding value in the standard dependency configuration.
[0112] For each processing step of the second service system for processing the first service information, parsing and extracting the description of the executed business logic, and comparing the actually executed business logic with the description of the business logic predefined in the standard dependency configuration to ensure that the two are the same or equivalent in expression.
[0113] S4. If they are inconsistent, analyze the reasons for the inconsistency between the actual dependency configuration and the standard dependency configuration in the structure table, generate an exception analysis report based on the reasons for the inconsistency, visually link the exception analysis report to the second node of the second business system in the global business view, generate an exception reminder message based on the content of the exception analysis report, and notify a preset user through the exception reminder message to click on the visual link to view the exception analysis report in the global business view.
[0114] In one embodiment, the analyzing the reasons for the inconsistency between the actual dependency configuration and the standard dependency configuration in the structure table and generating an exception analysis report based on the reasons for the inconsistency includes:
[0115] Compare the data items in the actual dependency configuration with the data items in the standard dependency configuration in the structure table to obtain data item differences;
[0116] Compare the business logic in the actual dependency configuration with the business logic in the standard dependency configuration in the structure table to obtain business logic differences;
[0117] Analyze the reasons for the differences between the data item differences and the business logic differences, and generate the exception analysis report based on the reasons for the differences. The reasons for the differences include human error reasons, environmental change reasons, and service update reasons.
[0118] If the actual dependency configuration is inconsistent with the standard dependency configuration, extract all the dependent data items from the actual dependency configuration, including data sources, data types, data values, etc. Compare the data items in the actual dependency configuration with the data items in the standard dependency configuration in the structure table one by one, and check for the following differences through the comparison:
[0119] Missing data item: Some data items required by the standard configuration are missing in the actual configuration.
[0120] Extra data item: There are data items in the actual configuration that are not defined in the standard configuration.
[0121] Inconsistent data value: The data value in the actual configuration does not match the data value in the standard configuration.
[0122] Record all the differences of the data items in detail and obtain the data item differences. The data item differences include the difference type, the specific data item name, the standard value, and the actual value.
[0123] Extract all the executed business logic from the actual dependency configuration, including calculation rules, called service interfaces, execution order, etc. Compare the business logic in the actual dependency configuration with the business logic in the standard dependency configuration in the structure table one by one, and check for the following differences through the comparison:
[0124] Logical missing: Some business logics required by the standard configuration are missing in the actual configuration.
[0125] Logical redundant: There are business logics in the actual configuration that are not defined in the standard configuration.
[0126] Logical sequence inconsistency: The execution sequence of the business logics in the actual configuration does not match that of the standard configuration.
[0127] Logical implementation inconsistency: The implementation methods of the business logics in the actual configuration do not match those of the standard configuration.
[0128] Record all the differences in business logics in detail to obtain the business logic differences, which include difference types, specific logic descriptions, standard logics, and actual logics.
[0129] Analyze the reasons for the differences in data items and business logics. The reasons for differences include human errors, environmental changes, third-party service updates, system upgrades or migrations. For example, human errors: Check whether the inconsistencies in data items or business logics are caused by the mistakes of developers or configurators. Environmental changes: Check whether the changes in the operating environment (such as database version updates, service interface changes, etc.) lead to inconsistencies in dependent configurations. Third-party service updates: Check whether the updates or changes of third-party services result in inconsistencies in dependent configurations. System upgrades or migrations: Check whether problems occur during system upgrades or migrations, leading to inconsistencies in dependent configurations. Other reasons: Analyze whether there are other possible reasons for the inconsistencies in dependent configurations, such as data transmission errors, cache problems, etc.
[0130] Generate an exception analysis report based on the reasons for differences. The structure of the exception analysis report includes:
[0131] Title: Exception Analysis Report.
[0132] Report date: The date and time when the report is generated.
[0133] Node information: The names and locations of the business system nodes involved.
[0134] Differences in data items: List in detail the differences in data items, including difference types, specific data item names, standard values, and actual values.
[0135] Differences in business logics: List in detail the differences in business logics, including difference types, specific logic descriptions, standard logics, and actual logics.
[0136] Analysis of reasons for differences: Analyze in detail the reasons for the differences, including possible human errors, environmental changes, third-party service updates, etc.
[0137] Impact assessment: Evaluate the potential impact of these differences on business processes and system operations.
[0138] Improvement suggestions: Propose recommended measures to address the differences, including repair solutions, preventive measures, etc.
[0139] In one embodiment, the visual linking of the exception analysis report with the second node of the second business system in the global business view includes:
[0140] Store the exception analysis report in a preset file system and generate a unique identifier for the exception analysis report;
[0141] In the global business view, add a link to the second node corresponding to the second business system, and direct the link to the unique identifier of the exception analysis report, so that a preset user can access the exception analysis report by clicking on the second node.
[0142] Store the generated exception analysis report in the file system to ensure that the report can be quickly accessed and retrieved, and generate a unique identifier (such as UU ID) for each exception analysis report to uniquely identify the report.
[0143] In the global business view, add a link to the second node corresponding to the second business system, and direct the link to the unique identifier of the exception analysis report. In this way, when the user clicks on the second node, the corresponding exception analysis report can be directly accessed through the link.
[0144] Generate an exception reminder message containing the following information based on the content of the exception analysis report: Title: Clearly indicate that this is an exception reminder message. Exception node information: Include the name or identifier of the second business system and the second node. Exception brief: Briefly describe the cause and impact of the exception. Visual link: Provide a clickable link or button that, when clicked by the user, can directly jump to the second node in the global business view and view the detailed exception analysis report.
[0145] According to the preset user preferences or system configuration, select an appropriate notification method to send the exception reminder message to the user, such as email, text message, instant messaging tool, in-system notification, etc. After receiving the exception reminder message, the user clicks on the visual link in the exception reminder message and, based on the unique identifier in the visual link, automatically jumps to the second node in the global business view. After the user clicks on the second node in the global business view, the system pops up or displays the detailed content of the exception analysis report, including data item differences, business logic differences, cause analysis, impact assessment, and improvement suggestions, etc.
[0146] In one embodiment, the method further includes:
[0147] If the data item and the business logic are compared and found to be consistent, then second service information is generated for the second node in the global service view;
[0148] The status change message of the second service system on the message queue is changed by using the second service information;
[0149] According to the status change message of the second service system on the message queue, the next service system is triggered to process the second service information until all preset tasks in the global service view are completed.
[0150] Verify whether the actual dependency configuration is consistent with the standard dependency configuration. If they are consistent, then for the second node in the global service view, use the second service information to update the status on the message queue, indicating that the second service system has completed the current task and is ready to transmit the message of task completion. Trigger the next service system to start processing the newly generated second service information according to the message of task completion, ensuring that the entire service process can continue to advance until all preset tasks are completed.
[0151] In steps S1 to S4, the present invention uses a global service view to clarify the interaction sequence and dependency relationship between all service systems, and creates a structure table for each node, ensuring that all service systems have a clear execution path when processing services, which helps to reduce errors and improve the maintainability and transparency of the system.
[0152] Use the message queue mechanism to notify each service system when it should start or stop operating, and realize the advancement of the service flow by changing the status. Whenever a service system completes its task, a status change message is published to the queue, enabling the next service system subscribing to the message to immediately respond and continue processing the flow. An asynchronous non-blocking service processing mode is achieved, improving the response speed and efficiency of the system, decoupling between service systems, and enhancing the elasticity and scalability of the system.
[0153] After each service system finishes processing the task it is responsible for, record the actual dependency configuration it uses (such as the input data items and applied business rules), and then compare whether these configurations are consistent with the predefined standard dependency configuration.
[0154] If they are inconsistent, analyze the reasons for the inconsistency between the actual dependency configuration and the standard dependency configuration in the structure table, generate an exception analysis report based on the reasons for the inconsistency, visually link the exception analysis report to the second node of the second business system in the global business view, generate an exception reminder message according to the content of the exception analysis report, and notify the preset user through the exception reminder message to click on the visual link to view the exception analysis report in the global business view. Generate a detailed exception analysis report based on the analysis results, which includes the specific description of the exception, cause analysis, impact assessment, and improvement suggestions, providing clear guidance for the operation and maintenance personnel to help them quickly understand and solve problems.
[0155] The core concept of the present invention is to construct a method that can monitor, track, and respond to business processes across multiple business systems in real time, which can ensure the consistency and reliability between various business systems, and quickly locate and solve problems when problems occur. Specifically, the present invention uses node events and message queues in the global business view to achieve real-time tracking of state changes, and combines predefined standard dependency configurations for consistency checking to ensure that each business system can work in the expected manner. Once a behavior deviating from the expectation is detected, a warning is immediately issued to notify the relevant personnel.
[0156] As Figure 2 shown, it is a schematic diagram of the modules of the abnormal alarm device for the system state provided by an embodiment of the present invention.
[0157] The abnormal alarm device 100 for the system state of the present invention can be installed in an electronic device. According to the functions achieved, the abnormal alarm device 100 for the system state can include a monitoring module 110, a change module 120, a recording module 130, and a feedback module 140. The modules of the present invention can also be referred to as units, which refer to a series of computer program segments that can be executed by the processor of the electronic device and can complete fixed functions, and are stored in the memory of the electronic device.
[0158] In this embodiment, the functions of each module / unit are as follows:
[0159] The monitoring module 110 is used to, when monitoring that the first business system generates first business information for the first node in the preset global business view, query the local cache according to the first business information to obtain the second business system that has a state dependency relationship with the first business system, and obtain a structure table that stores the upstream and downstream states between each node in the global business view.
[0160] A change module 120 is configured to change the state of the first business system on the message queue corresponding to the global business view by using the first business information, obtain a state change message, and trigger the second business system to process the first business information according to the state change message;
[0161] A recording module 130 is configured to record the data items and business logics relied on by the second business system to process the first business information, obtain the actual dependency configuration of the second business system according to the data items and the business logics, and determine whether the actual dependency configuration is consistent with the standard dependency configuration in the structure table;
[0162] A feedback module 140 is configured to, if they are inconsistent, analyze the reason why the actual dependency configuration is inconsistent with the standard dependency configuration in the structure table, generate an exception analysis report according to the inconsistent reason, visually link the exception analysis report with a second node of the second business system in the global business view, generate an exception reminder message according to the content of the exception analysis report, and notify a preset user to click the visual link to view the exception analysis report in the global business view through the exception reminder message.
[0163] In one embodiment, before the step of when it is monitored that the first business system generates first business information for a first node in a preset global business view, the method further includes:
[0164] Obtain the functions and interaction sequences of each business system to form a business process diagram;
[0165] Analyze the state dependency relationships among the business systems, and record the dependency relationships in the business process diagram;
[0166] Use a preset visualization tool to display the business process diagram and the state dependency relationships in a graphical manner to form a global business view.
[0167] In one embodiment, the structure table is obtained in the following manner:
[0168] Construct an initial hash structure table, mark the business systems belonging to the upstream type according to the execution order among the nodes in the global business view, and use the upstream type of business systems as the keywords of the initial hash structure table;
[0169] Generate a standard dependency configuration according to the dependency configuration relationships of the upstream and downstream states among the nodes, use the standard dependency configuration as the values of the initial hash structure table, and construct the structure table according to the keywords and values of the initial hash structure table, where the dependency configuration relationships of the upstream and downstream states include the data items and business logics relied on by each business system.
[0170] In one embodiment, changing the state of the first service system on the message queue corresponding to the global service view by using the first service information to obtain a state change message includes:
[0171] Sending the first service information to a message queue communicatively connected to each service system;
[0172] Modifying the unprocessed state of the first service system in the message queue to a processed state according to the first service information to obtain the state change message.
[0173] In one embodiment, triggering the second service system to process the first service information according to the state change message includes:
[0174] Pushing the state change message to the second service system according to the subscription mechanism of the second service system to the message queue;
[0175] After the second service system subscribes to the state change message, triggering the second service system to process the first service information.
[0176] In one embodiment, analyzing the reason why the actual dependency configuration is inconsistent with the standard dependency configuration in the structure table, and generating an exception analysis report according to the inconsistent reason includes:
[0177] Comparing the data items in the actual dependency configuration with the data items in the standard dependency configuration in the structure table to obtain data item differences;
[0178] Comparing the business logics in the actual dependency configuration with the business logics in the standard dependency configuration in the structure table to obtain business logic differences;
[0179] Analyzing the reasons for the differences between the data item differences and the business logic differences, and generating the exception analysis report according to the difference reasons, where the difference reasons include human error reasons, environmental change reasons, and service update reasons.
[0180] In one embodiment, visually linking the exception analysis report to the second node of the second service system in the global service view includes:
[0181] Storing the exception analysis report in a preset file system, and generating a unique identifier for the exception analysis report;
[0182] In the global service view, add a link to the second node corresponding to the second service system, and direct the link to the unique identifier of the exception analysis report, so that a preset user can access the exception analysis report by clicking on the second node.
[0183] As Figure 3 shown, it is a schematic structural diagram of an electronic device for implementing an exception warning method for system status provided by an embodiment of the present invention.
[0184] In this embodiment, the electronic device 1 includes, but is not limited to, a memory 11, a processor 12, and a network interface 13 that can communicate with each other through a system bus. An exception warning program 10 for system status is stored in the memory 11, and the exception warning program 10 for system status can be executed by the processor 12. Figure 3 Only the electronic device 1 with components 11-13 and the exception warning program 10 for system status is shown. Those skilled in the art can understand that Figure 3 the shown structure does not constitute a limitation on the electronic device 1, and it may include fewer or more components than shown, or combine certain components, or have different component arrangements.
[0185] Among them, the memory 11 includes a memory and at least one type of readable storage medium. The memory provides a cache for the operation of the electronic device 1; the readable storage medium can be a non-volatile storage medium such as a flash memory, a hard disk, a multimedia card, a card-type memory (for example, an SD or DX memory, etc.), a random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the readable storage medium may be an internal storage unit of the electronic device 1; in other embodiments, the non-volatile storage medium may also be an external storage device of the electronic device 1, such as a plug-in hard disk equipped on the electronic device 1, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. In this embodiment, the readable storage medium of the memory 11 is generally used to store the operating system and various application software installed on the electronic device 1, such as storing the code of the exception warning program 10 for system status in an embodiment of the present invention. In addition, the memory 11 can also be used to temporarily store various data that have been output or will be output.
[0186] In some embodiments, the processor 12 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips. The processor 12 is generally used to control the overall operation of the electronic device 1, such as performing control and processing related to data interaction or communication with other devices. In this embodiment, the processor 12 is used to run the program code stored in the memory 11 or process data, such as running the exception warning program 10 of the system state.
[0187] The network interface 13 may include a wireless network interface or a wired network interface, and this network interface 13 is used to establish a communication connection between the electronic device 1 and a terminal (not shown in the figure).
[0188] Optionally, the electronic device 1 may further include a user interface, and the user interface may include a display, an input unit such as a keyboard (keyboard), and optionally the user interface may further include a standard wired interface and a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch liquid crystal display, and an OLED (Organic Light-Emitting Diode) toucher, etc. Among them, the display may also be appropriately referred to as a display screen or a display unit, which is used to display the information processed in the electronic device 1 and to display a visual user interface.
[0189] It should be understood that the above embodiments are only for illustration purposes and are not limited by this structure in the scope of the patent application.
[0190] The exception warning program 10 of the system state stored in the memory 11 of the electronic device 1 is a combination of multiple instructions. When running in the processor 12, it can implement:
[0191] When it is monitored that the first service system generates first service information for a first node in a preset global service view, query the local cache according to the first service information to obtain a second service system that has a state dependency relationship with the first service system, and obtain a structure table storing the upstream and downstream state standard dependency configurations between each node in the global service view;
[0192] Use the first service information to change the state of the first service system on the message queue corresponding to the global service view to obtain a state change message, and trigger the second service system to process the first service information according to the state change message;
[0193] Record the data items and business logics relied on by the second business system for processing the first business information, obtain the actual dependency configuration of the second business system according to the data items and the business logics, and determine whether the actual dependency configuration is consistent with the standard dependency configuration in the structure table;
[0194] If they are inconsistent, analyze the reasons for the inconsistency between the actual dependency configuration and the standard dependency configuration in the structure table, generate an exception analysis report according to the reasons for the inconsistency, visually link the exception analysis report to the second node of the second business system in the global business view, generate an exception reminder message according to the content of the exception analysis report, and notify a preset user through the exception reminder message to click on the visual link to view the exception analysis report in the global business view.
[0195] Specifically, for the specific implementation method of the abnormal alarm program 10 of the above system state by the processor 12, reference can be made to Figure 1 the description of the relevant steps in the corresponding embodiments, which will not be elaborated here.
[0196] Furthermore, if the modules / units integrated in the electronic device 1 are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. The computer-readable medium can be non-volatile or non-volatile. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disc, computer memory, read-only memory (ROM, Read-Only Memory).
[0197] The abnormal alarm program 10 of the system state is stored on the computer-readable storage medium, and the abnormal alarm program 10 of the system state can be executed by one or more processors. The specific implementation manner of the computer-readable storage medium of the present invention is basically the same as that of the various embodiments of the above abnormal alarm method of the system state, and will not be elaborated here.
[0198] In several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the modules is only a logical function division, and there can be other division methods in actual implementation.
[0199] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0200] In addition, in each embodiment of the present invention, each functional module can be integrated into a processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware, or in the form of a combination of hardware and software functional modules.
[0201] For those skilled in the art, it is obvious that the present invention is not limited to the details of the above exemplary embodiments, and without departing from the spirit or basic characteristics of the present invention, the present invention can be implemented in other specific forms.
[0202] Therefore, from any point of view, the embodiments should be regarded as exemplary and non-restrictive. The scope of the present invention is defined by the appended claims rather than the above description. Therefore, all changes falling within the meaning and scope of the equivalent elements of the claims are intended to be included in the present invention. Any reference signs in the claims should not be regarded as limiting the claims involved.
[0203] In addition, it is obvious that the word "including" does not exclude other units or steps, and the singular does not exclude the plural. The multiple units or devices stated in the system claims can also be implemented by one unit or device through software or hardware. The terms such as "second" are used to denote names and do not denote any particular order.
[0204] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention.
Claims
1. An abnormal alarm method for system status, characterized in that, The method includes: When it is monitored that the first service system generates first service information for a first node in a preset global service view, query the local cache according to the first service information to obtain a second service system that has a state dependency relationship with the first service system, and obtain a structure table storing the standard dependency configuration of the upstream and downstream states between each node in the global service view; Use the first service information to change the state of the first service system on the message queue corresponding to the global service view to obtain a state change message, and trigger the second service system to process the first service information according to the state change message; Record the data items and service logics relied on by the second service system to process the first service information, obtain the actual dependency configuration of the second service system according to the data items and the service logics, and determine whether the actual dependency configuration is consistent with the standard dependency configuration in the structure table; If they are inconsistent, analyze the reason why the actual dependency configuration is inconsistent with the standard dependency configuration in the structure table, generate an exception analysis report according to the inconsistent reason, visually link the exception analysis report with a second node of the second service system in the global service view, generate an exception reminder message according to the content of the exception analysis report, and notify a preset user to click on the visual link to view the exception analysis report in the global service view through the exception reminder message.
2. The method for abnormal alarm of system status according to claim 1, wherein Before the step of "When it is monitored that the first service system generates first service information for a first node in a preset global service view", the method further includes: Obtain the functions and interaction sequences of each service system to form a service flow chart; Analyze the state dependency relationships between each service system, and record the dependency relationships in the service flow chart; Use a preset visualization tool to graphically display the service flow chart and the state dependency relationships to form a global service view.
3. The method for abnormal alarm of system state according to claim 1, characterized in that, The structure table is obtained in the following manner: Construct an initial hash structure table, mark the service systems belonging to the upstream type according to the execution order between each node in the global service view, and use the upstream type of service systems as the keywords of the initial hash structure table; Generate a standard dependency configuration according to the dependency configuration relationship of the upstream and downstream states between each node, use the standard dependency configuration as the value of the initial hash structure table, and construct the structure table according to the keywords and values of the initial hash structure table. The dependency configuration relationship of the upstream and downstream states includes the data items and service logics relied on by each service system.
4. The method for abnormal alarm of system state according to claim 1, characterized in that, The step of "Use the first service information to change the state of the first service system on the message queue corresponding to the global service view to obtain a state change message" includes: Send the first service information to the message queue communicatively connected to each service system; Modify the unprocessed state of the first service system in the message queue to the processed state according to the first service information to obtain the state change message.
5. The method for abnormal alarm of system status according to claim 1, characterized in that, Triggering the second service system to process the first service information according to the status change message includes: Pushing the status change message to the second service system according to the subscription mechanism of the second service system to the message queue; After the second service system subscribes to the status change message, triggering the second service system to process the first service information.
6. The method for abnormal alarm of system state according to claim 1, wherein, Analyzing the reason why the actual dependency configuration is inconsistent with the standard dependency configuration in the structure table, and generating an exception analysis report according to the inconsistent reason, including: Comparing the data items in the actual dependency configuration with the data items in the standard dependency configuration in the structure table to obtain data item differences; Comparing the business logic in the actual dependency configuration with the business logic in the standard dependency configuration in the structure table to obtain business logic differences; Analyzing the difference reasons of the data item differences and the business logic differences, and generating the exception analysis report according to the difference reasons, where the difference reasons include human error reasons, environmental change reasons, and service update reasons.
7. The method for abnormal alarm of system state according to claim 1, characterized in that, Visualizing the link between the exception analysis report and the second node of the second service system in the global service view includes: Storing the exception analysis report in a preset file system, and generating a unique identifier for the exception analysis report; In the global service view, adding a link to the second node corresponding to the second service system, and pointing the link to the unique identifier of the exception analysis report, so that a preset user can access the exception analysis report by clicking the second node.
8. An abnormal alarm device for a system state, characterized in that, The device includes: A monitoring module, configured to, when monitoring that the first service system generates first service information for a first node in a preset global service view, query a local cache according to the first service information, obtain a second service system having a status dependency relationship with the first service system, and obtain a structure table storing a standard dependency configuration of upstream and downstream states between each node in the global service view; A change module, configured to use the first service information to change the status of the first service system on a message queue corresponding to the global service view to obtain a status change message, and trigger the second service system to process the first service information according to the status change message; A recording module, configured to record data items and business logic on which the second service system depends on to process the first service information, obtain an actual dependency configuration of the second service system according to the data items and the business logic, and determine whether the actual dependency configuration is consistent with the standard dependency configuration in the structure table; A feedback module, which is configured to, if there is an inconsistency, analyze the reason why the actual dependency configuration is inconsistent with the standard dependency configuration in the structure table, generate an exception analysis report according to the reason for the inconsistency, visually link the exception analysis report with the second node of the second business system in the global business view, generate an exception reminder message according to the content of the exception analysis report, and notify a preset user through the exception reminder message to click on the visual link to view the exception analysis report in the global business view.
9. An electronic device, characterized in that, The electronic device includes: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores an exception warning program for the system state that can be executed by the at least one processor. The exception warning program for the system state is executed by the at least one processor, so that the at least one processor can execute the method for warning of exceptions in the system state according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, An exception warning program for the system state is stored on the computer-readable storage medium. The exception warning program for the system state can be executed by one or more processors to implement the method for warning of exceptions in the system state according to any one of claims 1 to 7.
Citation Information
Cited By
Service file processing method and electronic equipment
CN120994273A