Abnormal monitoring method and device, computer equipment and storage medium
By obtaining the modified files and using the dependency graph to analyze the affected pages and generate alarm information, the problem of the monitoring system being unable to issue alarms in a timely manner is solved, and fast and accurate exception monitoring and problem solving are achieved, improving system stability and user experience.
Patent Information
- Application Number
- CN202510591905.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-08
- Publication Date
- 2025-09-23
AI Technical Summary
The existing monitoring system is unable to issue effective alerts in a timely manner after the code is released, making it difficult for developers to promptly discover and resolve problems caused by code changes, affecting system stability and user experience.
By detecting version updates, the modified files are obtained, the affected pages are analyzed using the pre-built dependency graph, and they are marked as priority monitoring objects based on the monitoring configuration file. The abnormal monitoring code is used for monitoring, and alarm information is generated and output.
It enables fast and accurate analysis of the impact of modified files on target projects, dynamically monitors affected pages and captures exceptions in real time, provides comprehensive monitoring data, helps developers discover and solve problems in a timely manner, and improves system stability and user experience.
Smart Images

Figure CN120687321A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology and can be applied to fields such as financial technology and digital medicine, and in particular to abnormality monitoring methods, devices, computer equipment and storage media. Background Art
[0002] Version control tools are a crucial cornerstone of code management during software project development and management, widely used for code storage, change tracking, and collaborative development. As a core component of a software project, every modification to the code can directly or indirectly impact the project's page functionality and user experience. However, after code is released to production, there remains a significant technological gap in how to quickly and accurately identify page issues caused by code changes and implement appropriate remedial measures.
[0003] Specifically, existing monitoring systems primarily rely on general page performance metrics (such as loading time and response speed) or error log collection for routine monitoring after code release. While these monitoring methods can provide certain system operating status information, they lack the ability to conduct in-depth analysis and targeted alerts for changes to new code versions. When potential problems exist in new code versions or new errors are introduced, traditional monitoring systems often fail to issue effective alerts in a timely manner, making it difficult for developers to discover and resolve the problems in a timely manner. This lag not only affects system stability, but also directly reduces the user experience and may even have a negative impact on the company's business operations.
[0004] For example, in the financial data verification scenario in the financial sector, the verification system serves as a key support for the daily operations of financial institutions, and its stability and accuracy are crucial. Verification systems typically involve a large amount of capital flow and account processing, and any code changes may have a significant impact on the correctness and performance of the system. However, after the verification system code is released, current financial institutions still rely mainly on traditional performance monitoring and error log collection methods. When the new version of the code causes anomalies in the verification process (such as verification failures, data errors, etc.), the traditional monitoring system may not issue an alarm in time, causing the problem to remain undetected and unresolved for a long time. This not only affects the efficiency of the financial institution's capital flow, but also may lead to customer complaints and regulatory risks.
[0005] Therefore, there is an urgent need to provide an automated exception monitoring system for page problems caused by code changes to improve system stability and user experience. Summary of the Invention
[0006] The purpose of the embodiments of the present application is to propose an abnormality monitoring method, device, computer equipment and storage medium to solve the technical problem that existing monitoring systems often fail to issue effective alarms in a timely manner, making it difficult for developers to discover and solve problems in a timely manner, thereby affecting the stability of the system and reducing the user experience.
[0007] In a first aspect, a method for detecting an abnormality is provided, comprising:
[0008] When it is detected that the target project has been updated, the modified file corresponding to the target project is obtained based on a preset version control command;
[0009] Obtain a pre-built dependency graph corresponding to the target project;
[0010] Performing page analysis on the modified file based on the dependency graph to determine affected pages corresponding to the modified file;
[0011] updating a preset monitoring configuration file based on the affected page to mark the affected page as a priority monitoring object;
[0012] Monitoring the priority monitoring object based on a preset abnormality monitoring code to determine whether abnormal information corresponding to the affected page is detected;
[0013] If so, generating corresponding alarm information based on the abnormal information;
[0014] The warning information is outputted.
[0015] In a second aspect, an abnormality monitoring device is provided, comprising:
[0016] A first acquisition module is configured to acquire a modified file corresponding to the target project based on a preset version control command when detecting that the target project has undergone a version update;
[0017] A second acquisition module is used to acquire a pre-built dependency graph corresponding to the target project;
[0018] an analysis module, configured to perform page analysis on the modified file based on the dependency graph, and determine affected pages corresponding to the modified file;
[0019] An updating module, configured to update a preset monitoring configuration file based on the affected page to mark the affected page as a priority monitoring object;
[0020] a judgment module, configured to monitor the priority monitoring object based on a preset abnormality monitoring code, and determine whether abnormal information corresponding to the affected page is detected;
[0021] A generating module, configured to generate corresponding alarm information based on the abnormal information;
[0022] The first output module is used to output the alarm information.
[0023] In a third aspect, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned abnormality monitoring method when executing the computer program.
[0024] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned abnormality monitoring method are implemented.
[0025] In the scheme implemented by the above-mentioned abnormality monitoring method, device, computer equipment and storage medium, when it is detected that the target project has undergone a version update, the modified file corresponding to the target project is obtained based on the preset version control command; then the pre-built dependency graph corresponding to the target project is obtained; and the page analysis of the modified file is performed based on the dependency graph to determine the affected page corresponding to the modified file; then the preset monitoring configuration file is updated based on the affected page to mark the affected page as a priority monitoring object; subsequently, the priority monitoring object is monitored based on the preset abnormality monitoring code to determine whether abnormal information corresponding to the affected page is detected; if so, corresponding alarm information is generated based on the abnormal information; finally, the alarm information is output and processed. When the present application detects that a version update has been made to a target project, the modified file corresponding to the target project is obtained by using a version control command, and then a page analysis is performed on the modified file based on a pre-built dependency graph to determine the affected pages corresponding to the modified file, and the preset monitoring configuration file is updated based on the obtained affected pages to mark the affected pages as priority monitoring objects, and then the priority monitoring objects are monitored based on the use of anomaly monitoring codes, and when anomaly information corresponding to the affected pages is detected, corresponding alarm information is automatically generated based on the anomaly information and output, thereby enabling a quick and accurate analysis of the impact of the modified file on the target project, and dynamic monitoring of the affected pages associated with the modified file and real-time capture of anomalies, and subsequently outputting the alarm information generated based on the captured anomaly information to provide developers with comprehensive monitoring data, which helps developers to promptly discover and solve problems, thereby improving the stability of the system and user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the solutions in this application, a brief introduction will be given below to the drawings required for use in the description of the embodiments of this application. Obviously, the drawings described below are some embodiments of this application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0027] Figure 1 is an exemplary system architecture diagram to which the present application may be applied;
[0028] Figure 2 is a flow chart of an embodiment of an abnormality monitoring method according to the present application;
[0029] Figure 3 is a structural schematic diagram of an embodiment of an abnormality monitoring device according to the present application;
[0030] Figure 4 It is a structural diagram of an embodiment of a computer device according to the present application. DETAILED DESCRIPTION
[0031] Unless otherwise defined, all technical and scientific terms used herein have the same meanings as commonly understood by those skilled in the art to which this application belongs. The terms used in the specification of the application are for the purpose of describing specific embodiments only and are not intended to limit this application. The terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of this application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.
[0032] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0033] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.
[0034] like Figure 1As shown, system architecture 100 may include a terminal device 101, a network 102, and a server 103. Terminal device 101 may be a laptop computer 1011, a tablet computer 1012, or a mobile phone 1013. Network 102 is a medium for providing a communication link between terminal device 101 and server 103. Network 102 may include various connection types, such as wired or wireless communication links or fiber optic cables.
[0035] The user can use the terminal device 101 to interact with the server 103 via the network 102 to receive or send messages, etc. Various communication client applications can be installed on the terminal device 101, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0036] The terminal device 101 can be various electronic devices with a display screen and supporting web browsing. In addition to the laptop computer 1011, tablet computer 1012 or mobile phone 1013, the terminal device 101 can also be an e-book reader, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 (Moving Picture Experts Group Audio Layer IV) player, a laptop computer and a desktop computer, etc.
[0037] The server 103 may be a server that provides various services, such as a background server that provides support for web pages displayed on the terminal device 101 .
[0038] It should be noted that the anomaly monitoring method provided in the embodiment of the present application is generally executed by a server / terminal device, and accordingly, the anomaly monitoring device is generally set in the server / terminal device.
[0039] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is merely illustrative. Any number of terminal devices, networks and servers may be provided as required.
[0040] Continue to refer Figure 2 , shows a flow chart of an embodiment of the abnormality monitoring method according to the present application. According to different needs, the order of the steps in the flow chart can be changed, and some steps can be omitted. The abnormality monitoring method provided in the embodiment of the present application can be applied to any scenario that requires abnormality monitoring, and the abnormality monitoring method can be applied to products in these scenarios, for example, abnormality monitoring in the financial field and the medical field. The abnormality monitoring method includes the following steps:
[0041] Step S201 : when it is detected that a target project has been updated, a modified file corresponding to the target project is obtained based on a preset version control command.
[0042] In this embodiment, the electronic device (eg Figure 1 The server / terminal device shown in the figure can obtain the modified files corresponding to the target project via a wired or wireless connection. It should be noted that the wireless connection methods mentioned above may include, but are not limited to, 3G / 4G / 5G connections, Wi-Fi connections, Bluetooth connections, Wi-MAX connections, Zigbee connections, UWB (Ultra Wide Band) connections, and other wireless connection methods currently known or developed in the future. The execution subject of this application is specifically an anomaly monitoring system, which can be simply referred to as the system. This application can be applied to project anomaly monitoring scenarios in the financial or medical fields. For example, in the financial field, the target projects mentioned above may include financial data analysis platforms, risk management and compliance systems, online banking transaction systems, etc. The project description of the financial data analysis platform includes: providing real-time market information, candlestick charts, technical indicator analysis, and other functions. The project description of the risk management and compliance system includes: enterprise users submitting compliance reports and risk assessment data through the front-end. The project description of the online banking transaction system includes: users performing operations such as transfers, payments, and account inquiries through the front-end page. In the medical field, the target projects mentioned above may include electronic medical record management systems, remote medical diagnosis platforms, medical equipment management systems, etc. The project description for an electronic medical record management system is: doctors use the front-end to enter and query patient medical records. The project description for a remote medical diagnosis platform is: patients use the front-end to upload examination reports, and doctors provide online diagnoses. The project description for a medical equipment management system is: hospitals use the front-end to monitor equipment status and manage maintenance records.
[0043] In addition, the specific implementation process of obtaining the modified file corresponding to the target project based on the preset version control command when it is detected that the target project has been updated will be further described in detail in subsequent specific embodiments of this application and will not be elaborated on here.
[0044] Step S202: Obtain a pre-built dependency graph corresponding to the target project.
[0045] In this embodiment, the specific construction process of the dependency graph corresponding to the target project will be further described in detail in subsequent specific embodiments of the present application and will not be elaborated on here.
[0046] Step S203 : performing page analysis on the modified file based on the dependency graph to determine affected pages corresponding to the modified file.
[0047] In this embodiment, the specific implementation process of performing page analysis on the modified file based on the dependency graph to determine the affected pages corresponding to the modified file will be further described in detail in subsequent specific embodiments of the present application and will not be elaborated on here.
[0048] Step S204: updating a preset monitoring configuration file based on the affected pages to mark the affected pages as priority monitoring objects.
[0049] In this embodiment, the monitoring configuration file refers to the configuration file of the system, and the monitoring configuration file can be automatically modified based on the affected pages to mark the affected pages as high-priority monitoring objects. For example, a higher monitoring frequency, a stricter exception threshold, etc. are set in the system. After ensuring that the system can load the new configuration in a timely manner, it starts to focus on the operating status of the affected pages. This can be achieved by calling the system's notification interface or sending a notification message. In addition, only by marking the affected pages as high-priority monitoring objects can the exception log be checked in time after the new version of the target project is released, new errors can be found, and alarm information can be generated.
[0050] Step S205 : monitoring the priority monitoring object based on a preset abnormality monitoring code to determine whether abnormality information corresponding to the affected page is detected.
[0051] In this embodiment, the exception monitoring code is pre-built code with exception monitoring capabilities. By integrating the exception monitoring code into the affected page, when an exception occurs during the execution of the affected page, i.e., when an exception is detected in the affected page, the exception monitoring code sends exception information to the system. The exception information may include error stack information, which can be extracted from the exception log.
[0052] Step S206: If yes, generate corresponding alarm information based on the abnormal information.
[0053] In this embodiment, the warning information may include at least the exception information and may further include the affected page address and the modified file information that may cause the error. The warning information may be obtained by integrating the exception information, the affected page address, and the modified file information that may cause the error.
[0054] Step S207: output the alarm information.
[0055] In this embodiment, the specific implementation process of the output processing of the alarm information will be further described in detail in subsequent specific embodiments of this application and will not be elaborated on here.
[0056] When the present application detects that a target project has undergone a version update, the modified file corresponding to the target project is obtained based on a preset version control command; then a pre-built dependency graph corresponding to the target project is obtained; and based on the dependency graph, page analysis is performed on the modified file to determine the affected pages corresponding to the modified file; then, a preset monitoring configuration file is updated based on the affected pages to mark the affected pages as priority monitoring objects; subsequently, the priority monitoring objects are monitored based on a preset abnormality monitoring code to determine whether abnormal information corresponding to the affected pages is detected; if so, corresponding alarm information is generated based on the abnormal information; and finally, the alarm information is output and processed. When the present application detects that a version update has been made to a target project, the modified file corresponding to the target project is obtained by using a version control command, and then a page analysis is performed on the modified file based on a pre-built dependency graph to determine the affected pages corresponding to the modified file, and the preset monitoring configuration file is updated based on the obtained affected pages to mark the affected pages as priority monitoring objects, and then the priority monitoring objects are monitored based on the use of anomaly monitoring codes, and when anomaly information corresponding to the affected pages is detected, corresponding alarm information is automatically generated based on the anomaly information and output, thereby enabling a quick and accurate analysis of the impact of the modified file on the target project, and dynamic monitoring of the affected pages associated with the modified file and real-time capture of anomalies, and subsequently outputting the alarm information generated based on the captured anomaly information to provide developers with comprehensive monitoring data, which helps developers to promptly discover and solve problems, thereby improving the stability of the system and user experience.
[0057] In some optional implementations, step S201 includes the following steps:
[0058] Calls a preset trigger.
[0059] In this embodiment, the trigger is a hook in the release process, such as a trigger in a CI / CD tool. When a new version is released for a project, the trigger is used to detect the version update event of each project in the system.
[0060] When a version update event corresponding to the target project is detected based on the trigger, difference data between a new version and an old version corresponding to the target project is acquired based on the version control command.
[0061] In this embodiment, the version control command is specifically a Git command. When a version update event corresponding to the target project is detected through the use of the trigger, the system uses the command git diff <old version tag><new version tag> to obtain the difference data between the new and old versions of the target project. For example, if the old version tag is v1.0 and the new version tag is v1.1, then git diff v1.0 v1.1 is executed.
[0062] The difference data is parsed to extract corresponding modified file information.
[0063] In this embodiment, the difference data output by the git diff command can be parsed to extract the changed file information, which may include the file path (such as src / components / Button.vue) and the file type (which can be determined based on the file suffix, such as .vue, .js, etc.).
[0064] The modified file information is collated and processed to generate a modified file corresponding to the target project.
[0065] In this embodiment, modified file information can be categorized into corresponding modules based on the project's predefined functional module division rules. For example, if the project is divided into modules based on business functions, src / components / Button.vue can be categorized into the public component module. Furthermore, the categorized modified file information is organized into a structured data format, such as JSON, to generate the target project's modified file. This modified file is then used as input data for subsequent dependency graph analysis.
[0066] The present application calls a preset trigger; when a version update event corresponding to the target project is detected based on the trigger, the difference data between the new version and the old version corresponding to the target project is obtained based on the version control command; the difference data is then parsed to extract the corresponding modified file information; and the modified file information is subsequently sorted and processed to generate a modified file corresponding to the target project. The present application calls a preset trigger; when a version update event corresponding to the target project is detected based on the trigger, the difference data between the new version and the old version corresponding to the target project is obtained based on the version control command; the difference data is then parsed to extract the corresponding modified file information, and the modified file information is subsequently sorted and processed, so that the modified file corresponding to the target project can be efficiently and accurately generated, the efficiency of obtaining the modified file is improved, and the data accuracy of the generated modified file is ensured.
[0067] In some optional implementations of this embodiment, before step S202, the electronic device may further perform the following steps:
[0068] Call the preset target script.
[0069] In this embodiment, the target script is a pre-built custom script that has the function of analyzing module dependencies of a project.
[0070] The target project is scanned based on the target script to obtain module dependency information of the target project.
[0071] In this embodiment, the target project is globally scanned by using the target script. During the project scanning process, the target script automatically generates and stores module dependency information of the target project.
[0072] The module dependency information is structured to obtain a corresponding dependency graph.
[0073] In this embodiment, the above-mentioned structure organization refers to organizing the obtained module dependency information into a dependency graph structure, for example: node: represents a module or file; edge: represents the dependency relationship between modules, thereby generating the dependency graph of the required target project.
[0074] The dependency graph is stored based on a preset storage strategy.
[0075] In this embodiment, there is no specific limitation on the selection of the above storage strategy, which can be determined according to actual business needs. For example, a storage method corresponding to a graph database or a custom data structure (such as an adjacency list) can be adopted.
[0076] The present application calls a preset target script; then scans the target project based on the target script to obtain the module dependency information of the target project; then structures the module dependency information to obtain the corresponding dependency graph; and subsequently stores and processes the dependency graph based on a preset storage strategy. The present application scans the target project by calling a preset target script to obtain the module dependency information of the target project, and then structures the module dependency information to automatically and accurately construct the corresponding dependency graph, thereby improving the construction efficiency and accuracy of the dependency graph. In addition, the dependency graph will be intelligently stored and processed based on the use of storage strategies, thereby ensuring the data security of the generated dependency graph and facilitating subsequent calls.
[0077] In some optional implementations, step S203 includes the following steps:
[0078] The modified file is used as a starting point, and recursive tracing processing is performed in the dependency graph according to a preset tracing strategy.
[0079] In this embodiment, the tracking strategy specifically includes the following: starting with the modified file, the dependency graph is searched for modules that directly reference it. A recursive search is performed on each referenced module until no further references are found. Specifically, with the modified file as the starting point, the corresponding recursive tracking process is performed in the dependency graph according to the tracking strategy.
[0080] During the recursive traversal of the dependency graph, all page entry points that directly or indirectly reference the modified file are recorded.
[0081] In this embodiment, while taking the modified file as the starting point and performing recursive tracing in the dependency graph according to the above-mentioned tracing strategy, all page entry points that directly or indirectly reference the modified file are synchronously recorded, such as HTML files, routing configurations of Vue components, and so on.
[0082] The page entry point is analyzed to determine the corresponding initially affected page.
[0083] In this embodiment, the entry point referencing the modified file is analyzed to determine the affected page range, which is used as the corresponding initial affected page range.
[0084] The initial affected pages are sorted based on a preset format to obtain affected pages corresponding to the modified file.
[0085] In this embodiment, the selection of the preset format is not specifically limited and can be determined according to actual business needs, for example, a table or list format can be used. Specifically, the initial affected pages can be organized into the preset format to obtain the affected pages corresponding to the modified file.
[0086] The present application takes the modified file as the starting point, and recursively traces the dependency graph according to a preset tracing strategy; then, during the recursive traversal of the dependency graph, records all page entry points that directly or indirectly reference the modified file; then analyzes the page entry points to determine the corresponding initial affected pages; and subsequently organizes the initial affected pages based on a preset format to obtain the affected pages corresponding to the modified file. The present application takes the modified file as the starting point, and recursively traces the dependency graph according to a tracing strategy; then, during the recursive traversal of the dependency graph, records all page entry points that directly or indirectly reference the modified file; then analyzes the page entry points to determine the corresponding initial affected pages; and then organizes the initial affected pages based on the use of a preset format, thereby achieving efficient and accurate determination of the affected pages corresponding to the modified file, effectively improving the efficiency of determining the affected pages, and ensuring the accuracy of the obtained affected pages.
[0087] In some optional implementations, step S207 includes the following steps:
[0088] Generate corresponding email content based on the warning information.
[0089] In this embodiment, the generated alarm information can be organized into a body content in the form of an email to obtain corresponding email content.
[0090] Determine a target developer corresponding to the target project, and obtain email address information of the target developer.
[0091] In this embodiment, the target developer refers to a developer related to the development work of the target project. In addition, the email address information of the target developer can be extracted by querying the communication information of the target developer.
[0092] Call the preset email sending library.
[0093] In this embodiment, the mail sending library is a tool that implements the mail sending function. The mail sending library may adopt Python's smtplib or an API application of a mail service provider.
[0094] Based on the email address information, the email content is sent to the target developer using the email sending library.
[0095] In this embodiment, the email content can be sent to the target developer corresponding to the email address information by using the email sending library.
[0096] This application generates corresponding email content based on the alarm information; then determines the target developer corresponding to the target project, and obtains the email address information of the target developer; then calls a preset email sending library; and subsequently, based on the email address information, uses the email sending library to send the email content to the target developer. This application generates corresponding email content based on the alarm information, then determines the target developer corresponding to the target project, and obtains the email address information of the target developer, and then, based on the obtained email address information, uses the email sending library to send the email content to the target developer to achieve intelligent reminder processing for abnormal information received on the affected pages, which is beneficial for the target developer to promptly discover abnormal situations and perform abnormal repair processing after receiving the alarm information, thereby reducing the impact on user experience.
[0097] In some optional implementations of this embodiment, after step S206, the electronic device may further perform the following steps:
[0098] Get the target exception type corresponding to the exception information.
[0099] In this embodiment, the above-mentioned abnormal information can be classified according to severity (such as crash, functional failure, performance degradation) and impact scope (such as a single user, all users) to obtain the target abnormality type matched by the abnormal information.
[0100] Call the preset repair strategy library.
[0101] In this embodiment, a repair strategy library for different exception types is pre-established based on actual business needs. For example, the repair strategy library includes the following strategies: Rollback strategy: Automatically roll back to the last stable version for exceptions caused by code or configuration changes. Restart strategy: Automatically restart the service for service process crashes. Degrade strategy: Automatically switch to a backup service or degrade functionality for performance issues caused by high concurrency. Notification strategy: Automatically notify relevant personnel for exceptions that cannot be automatically repaired.
[0102] A target repair strategy corresponding to the target anomaly type is retrieved from the repair strategy library.
[0103] In this embodiment, a designated abnormality type matching the target abnormality type may be queried from the repair policy library, and then a repair policy corresponding to the designated abnormality type may be extracted from the repair policy library and used as the target repair policy.
[0104] Perform corresponding abnormality repair processing on the abnormal information based on the target repair strategy.
[0105] In this embodiment, the above-mentioned target repair strategy can be automatically executed through a configuration management tool or cloud service management platform to perform anomaly repair processing for the above-mentioned anomaly information. After the anomaly repair process is executed, the repair effect can be further verified through monitoring tools, such as checking the service status and whether the anomaly in the log has disappeared. All anomalies and repair operations are then recorded to facilitate subsequent audits and troubleshooting. Repair records are regularly reviewed to optimize repair strategies. In addition, an anomaly repair knowledge base can be established to record repair methods for common anomalies, and historical anomaly data can be analyzed through machine learning to optimize repair strategies.
[0106] The present application obtains the target exception type corresponding to the exception information; then calls a preset repair strategy library; then queries the target repair strategy corresponding to the target exception type from the repair strategy library; and subsequently performs corresponding exception repair processing on the exception information based on the target repair strategy. The present application obtains the target exception type corresponding to the exception information; then queries the target repair strategy corresponding to the target exception type based on the use of the repair strategy library; and then performs corresponding exception repair processing on the exception information based on the use of the target repair strategy, thereby intelligently realizing automatic repair of exceptions, which is beneficial to improving the stability and availability of the system.
[0107] In some optional implementations of this embodiment, after step S207, the electronic device may further perform the following steps:
[0108] Collect abnormal situation data of the affected page within a preset time period.
[0109] In this embodiment, the selection of the preset time period is not specifically limited and can be determined based on actual business needs. For example, it can be any period of time after the release of a new version of the target project. During the preset time period, abnormality data of the affected pages is continuously collected, including the number of abnormalities, types, and distribution.
[0110] The abnormal situation data is analyzed based on a preset data analysis tool to obtain corresponding abnormal statistical data.
[0111] In this embodiment, the data analysis tool is a tool that has the function of performing data analysis and generating statistical reports. The collected abnormal situation data can be analyzed using the data analysis tool to generate corresponding statistical reports, which can be used as the abnormal statistical data.
[0112] A corresponding static report is constructed based on the abnormal statistical data.
[0113] In this embodiment, the above abnormal statistical data obtained after analysis can be organized into a static report, and the report content covers the overall health status of the page after publication, the frequency and distribution of abnormalities, etc.
[0114] Output processing is performed on the static report.
[0115] In this embodiment, there is no specific limitation on the output method of the static report. For example, the static report can be output in PDF or HTML format for developers to view and analyze.
[0116] This application collects abnormal situation data of the affected pages within a preset time period; then analyzes the abnormal situation data based on a preset data analysis tool to obtain corresponding abnormal statistical data; then constructs a corresponding static report based on the abnormal statistical data; and subsequently outputs and processes the static report. This application collects abnormal situation data of the affected pages within a preset time period; then analyzes the abnormal situation data based on the use of a data analysis tool to obtain corresponding abnormal statistical data; then constructs a corresponding static report based on the abnormal statistical data, thereby realizing the automatic generation of static reports and improving the efficiency of static report generation. In addition, the static report will be intelligently output to provide developers with comprehensive monitoring data, which can help developers discover and solve problems in a timely manner, thereby improving the stability of the system and user experience.
[0117] In some optional implementations, the user information obtained is obtained with the user's consent and complies with relevant laws and policies.
[0118] In addition, any software tools or components not provided by our company that appear in the embodiments of this application are merely examples and do not represent actual use.
[0119] In addition, the anomaly monitoring solution of this application has significantly improved the efficiency of code change impact analysis: the system quickly determines the affected pages through automatic analysis of Git change files and dependency graphs, avoiding the tedious process of manual troubleshooting. Enhanced anomaly locating capabilities: Focused monitoring of changed pages directly associates anomalies with code changes, significantly reducing problem locating time. Improved system stability and user experience: New anomalies are captured promptly within one week of release, and developers are reminded via email alerts to avoid problems remaining undiscovered for a long time and affecting user experience. Reduced development and operation and maintenance costs: The system integrates code changes with anomaly monitoring processes, reducing the workload of developers for manual analysis while reducing the operating costs of potential problems. Supports multi-scenario deployment and expansion: The system is suitable for a variety of scenarios such as front-end microservice architecture, multi-module applications, and single-page applications, and has good versatility and scalability.
[0120] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0121] It should be emphasized that in order to further ensure the privacy and security of the above-mentioned abnormal information, the above-mentioned abnormal information can also be stored in a node of a blockchain.
[0122] The blockchain referred to in this application refers to a new application model for computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms. Blockchain is essentially a decentralized database, a series of data blocks generated using cryptographic methods. Each data block contains information about a batch of network transactions, which is used to verify the validity of the information (to prevent counterfeiting) and generate the next block. Blockchain can include the blockchain underlying platform, the platform product service layer, and the application service layer.
[0123] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Artificial Intelligence (AI) is the theory, method, technology, and application system that uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use knowledge to achieve optimal results.
[0124] Fundamental AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interaction systems, and mechatronics. AI software technologies primarily encompass computer vision, robotics, biometrics, speech processing, natural language processing, and machine learning / deep learning.
[0125] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing related hardware via computer-readable instructions. The computer-readable instructions can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes in the above-described method embodiments. The aforementioned storage medium can be a non-volatile storage medium such as a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0126] It should be understood that although the steps in the flowcharts of the accompanying drawings are shown in sequence as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some of the steps in the flowcharts of the accompanying drawings 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 their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
[0127] Further references Figure 3 , as a response to the above Figure 2 In order to realize the method shown in the figure, the present application provides an embodiment of an abnormality monitoring device. Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0128] like Figure 3 As shown, the abnormality monitoring device 300 of this embodiment includes: a first acquisition module 301, a second acquisition module 302, an analysis module 303, an update module 304, a judgment module 305, a generation module 306 and a first output module 307.
[0129] The first acquisition module 301 is configured to acquire a modified file corresponding to the target project based on a preset version control command when detecting that the target project has undergone a version update;
[0130] A second acquisition module 302 is configured to acquire a pre-built dependency graph corresponding to the target project;
[0131] An analysis module 303 is configured to perform page analysis on the modified file based on the dependency graph to determine affected pages corresponding to the modified file;
[0132] An updating module 304 is configured to update a preset monitoring configuration file based on the affected page to mark the affected page as a priority monitoring object;
[0133] A determination module 305 is configured to monitor the priority monitoring object based on a preset abnormality monitoring code and determine whether abnormal information corresponding to the affected page is detected;
[0134] If yes, a generating module 306 is used to generate corresponding warning information based on the abnormal information;
[0135] The first output module 307 is configured to output the alarm information.
[0136] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the abnormality monitoring method in the aforementioned embodiment, and are not described in detail here.
[0137] In some optional implementations of this embodiment, the first obtaining module 301 includes:
[0138] The first calling submodule is used to call a preset trigger;
[0139] a first acquisition submodule, configured to acquire, based on the version control command, difference data between a new version and an old version corresponding to the target project when a version update event corresponding to the target project is detected based on the trigger;
[0140] A parsing submodule, configured to parse the difference data to extract corresponding modified file information;
[0141] The first generating submodule is used to organize and process the modified file information to generate a modified file corresponding to the target project.
[0142] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the abnormality monitoring method in the aforementioned embodiment, and are not described in detail here.
[0143] In some optional implementations of this embodiment, the abnormality monitoring device further includes:
[0144] The first calling module is used to call a preset target script;
[0145] A scanning module, configured to scan the target project based on the target script to obtain module dependency information of the target project;
[0146] A tidying module, used to structure the module dependency information to obtain a corresponding dependency graph;
[0147] A storage module is used to store the dependency graph based on a preset storage strategy.
[0148] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the abnormality monitoring method in the aforementioned embodiment, and are not described in detail here.
[0149] In some optional implementations of this embodiment, the analysis module 303 includes:
[0150] A processing submodule, configured to take the modified file as a starting point and perform recursive tracing processing in the dependency graph according to a preset tracing strategy;
[0151] A recording submodule, configured to record, during the recursive traversal of the dependency graph, all page entry points that directly or indirectly reference the modified file;
[0152] A determination submodule, configured to analyze the page entry point to determine the corresponding initially affected page;
[0153] The arranging submodule is configured to arrange the initially affected pages based on a preset format to obtain affected pages corresponding to the modified file.
[0154] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the abnormality monitoring method in the aforementioned embodiment, and are not described in detail here.
[0155] In some optional implementations of this embodiment, the first output module 307 includes:
[0156] A second generating submodule is used to generate corresponding email content based on the warning information;
[0157] A second acquisition submodule is used to determine the target developer corresponding to the target project and obtain the email address information of the target developer;
[0158] The second calling submodule is used to call the preset email sending library;
[0159] The sending submodule is used to send the email content to the target developer using the email sending library based on the email address information.
[0160] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the abnormality monitoring method in the aforementioned embodiment, and are not described in detail here.
[0161] In some optional implementations of this embodiment, the abnormality monitoring device further includes:
[0162] A third acquisition module is used to obtain a target abnormality type corresponding to the abnormal information;
[0163] The second calling module is used to call the preset repair strategy library;
[0164] A query module, configured to query the target repair strategy corresponding to the target anomaly type from the repair strategy library;
[0165] A repair module is used to perform corresponding abnormality repair processing on the abnormal information based on the target repair strategy.
[0166] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the abnormality monitoring method in the aforementioned embodiment, and are not described in detail here.
[0167] In some optional implementations of this embodiment, the abnormality monitoring device further includes:
[0168] A collection module, configured to collect abnormality data of the affected page within a preset time period;
[0169] A data analysis module is used to analyze the abnormal situation data based on a preset data analysis tool to obtain corresponding abnormal statistical data;
[0170] A construction module, configured to construct a corresponding static report based on the abnormal statistical data;
[0171] The second output module is used to output the static report.
[0172] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the abnormality monitoring method in the aforementioned embodiment, and are not described in detail here.
[0173] To solve the above technical problems, the present application also provides a computer device. Figure 4 , Figure 4 This is a basic structural block diagram of the computer device in this embodiment.
[0174] The computer device 4 includes a memory 41, a processor 42, and a network interface 43 that are interconnected through a system bus. It should be noted that the figure only shows a computer device 4 having components 41-43, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.
[0175] The computer device may be a desktop computer, notebook computer, PDA, cloud server, etc. The computer device may interact with the user via a keyboard, mouse, remote control, touchpad, or voice control device.
[0176] The memory 41 includes at least one type of readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 41 can be an internal storage unit of the computer device 4, such as the hard disk or memory of the computer device 4. In other embodiments, the memory 41 can also be an external storage device of the computer device 4, such as a plug-in hard disk equipped on the computer device 4, a smart memory card (SMC), a secure digital (SD) card, a flash memory card, etc. Of course, the memory 41 can also include both the internal storage unit of the computer device 4 and its external storage device. In this embodiment, the memory 41 is generally used to store the operating system and various application software installed on the computer device 4, such as computer-readable instructions of the abnormality monitoring method. In addition, the memory 41 can also be used to temporarily store various types of data that have been output or are to be output.
[0177] In some embodiments, the processor 42 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip. The processor 42 is generally used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is used to execute computer-readable instructions or process data stored in the memory 41, such as computer-readable instructions for executing the anomaly monitoring method.
[0178] The network interface 43 may include a wireless network interface or a wired network interface. The network interface 43 is generally used to establish a communication connection between the computer device 4 and other electronic devices.
[0179] Compared with the prior art, the embodiments of the present application have the following beneficial effects:
[0180] In an embodiment of the present application, when it is detected that a target project has undergone a version update, a modified file corresponding to the target project is obtained based on a preset version control command; then a pre-built dependency graph corresponding to the target project is obtained; and based on the dependency graph, a page analysis is performed on the modified file to determine the affected pages corresponding to the modified file; then, based on the affected pages, a preset monitoring configuration file is updated to mark the affected pages as priority monitoring objects; subsequently, the priority monitoring objects are monitored based on a preset abnormality monitoring code to determine whether abnormal information corresponding to the affected pages is detected; if so, corresponding alarm information is generated based on the abnormal information; and finally, the alarm information is output and processed. When the present application detects that a version update has been made to a target project, the modified file corresponding to the target project is obtained by using a version control command, and then a page analysis is performed on the modified file based on a pre-built dependency graph to determine the affected pages corresponding to the modified file, and the preset monitoring configuration file is updated based on the obtained affected pages to mark the affected pages as priority monitoring objects, and then the priority monitoring objects are monitored based on the use of anomaly monitoring codes, and when anomaly information corresponding to the affected pages is detected, corresponding alarm information is automatically generated based on the anomaly information and output, thereby enabling a quick and accurate analysis of the impact of the modified file on the target project, and dynamic monitoring of the affected pages associated with the modified file and real-time capture of anomalies, and subsequently outputting the alarm information generated based on the captured anomaly information to provide developers with comprehensive monitoring data, which helps developers to promptly discover and solve problems, thereby improving the stability of the system and user experience.
[0181] The present application also provides another embodiment, namely, providing a computer-readable storage medium, which stores computer-readable instructions. The computer-readable instructions can be executed by at least one processor to enable the at least one processor to perform the steps of the abnormality monitoring method as described above.
[0182] Compared with the prior art, the embodiments of the present application have the following beneficial effects:
[0183] In an embodiment of the present application, when it is detected that a target project has undergone a version update, a modified file corresponding to the target project is obtained based on a preset version control command; then a pre-built dependency graph corresponding to the target project is obtained; and based on the dependency graph, a page analysis is performed on the modified file to determine the affected pages corresponding to the modified file; then, based on the affected pages, a preset monitoring configuration file is updated to mark the affected pages as priority monitoring objects; subsequently, the priority monitoring objects are monitored based on a preset abnormality monitoring code to determine whether abnormal information corresponding to the affected pages is detected; if so, corresponding alarm information is generated based on the abnormal information; and finally, the alarm information is output and processed. When the present application detects that a version update has been made to a target project, the modified file corresponding to the target project is obtained by using a version control command, and then a page analysis is performed on the modified file based on a pre-built dependency graph to determine the affected pages corresponding to the modified file, and the preset monitoring configuration file is updated based on the obtained affected pages to mark the affected pages as priority monitoring objects, and then the priority monitoring objects are monitored based on the use of anomaly monitoring codes, and when anomaly information corresponding to the affected pages is detected, corresponding alarm information is automatically generated based on the anomaly information and output, thereby enabling a quick and accurate analysis of the impact of the modified file on the target project, and dynamic monitoring of the affected pages associated with the modified file and real-time capture of anomalies, and subsequently outputting the alarm information generated based on the captured anomaly information to provide developers with comprehensive monitoring data, which helps developers to promptly discover and solve problems, thereby improving the stability of the system and user experience.
[0184] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0185] Obviously, the embodiments described above are only some of the embodiments of the present application, rather than all of the embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application has been described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions described in the aforementioned specific embodiments, or to make equivalent replacements for some of the technical features therein. Any equivalent structure made using the contents of the present application specification and the accompanying drawings, directly or indirectly used in other related technical fields, is also within the scope of patent protection of the present application.
Claims
1. A method for abnormality monitoring, characterized in that: The steps include: When it is detected that the target project has been updated, the modified file corresponding to the target project is obtained based on a preset version control command; Obtain a pre-built dependency graph corresponding to the target project; Performing page analysis on the modified file based on the dependency graph to determine affected pages corresponding to the modified file; updating a preset monitoring configuration file based on the affected page to mark the affected page as a priority monitoring object; Monitoring the priority monitoring object based on a preset abnormality monitoring code to determine whether abnormal information corresponding to the affected page is detected; If so, generating corresponding alarm information based on the abnormal information; The warning information is outputted.
2. The abnormality monitoring method according to claim 1, characterized in that: When it is detected that the target project has been updated, the step of obtaining the modified file corresponding to the target project based on the preset version control command specifically includes: Call the preset trigger; When a version update event corresponding to the target project is detected based on the trigger, obtaining difference data between a new version and an old version corresponding to the target project based on the version control command; Parsing the difference data to extract corresponding modified file information; The modified file information is collated and processed to generate a modified file corresponding to the target project.
3. The abnormality monitoring method according to claim 1, characterized in that: Before the step of obtaining a pre-built dependency graph corresponding to the target project, the method further includes: Call the preset target script; Scan the target project based on the target script to obtain module dependency information of the target project; Structuring the module dependency information to obtain a corresponding dependency graph; The dependency graph is stored based on a preset storage strategy.
4. The abnormality monitoring method according to claim 1, characterized in that: The step of performing page analysis on the modified file based on the dependency graph to determine the affected pages corresponding to the modified file specifically includes: Taking the modified file as a starting point, and performing recursive tracing processing in the dependency graph according to a preset tracing strategy; During the recursive traversal of the dependency graph, all page entry points that directly or indirectly reference the modified file are recorded; Analyze the page entry point to determine the corresponding initially affected page; The initial affected pages are sorted based on a preset format to obtain affected pages corresponding to the modified file.
5. The abnormality monitoring method according to claim 1, characterized in that: The step of outputting the alarm information specifically includes: Generate corresponding email content based on the warning information; Determine the target developer corresponding to the target project and obtain the email address information of the target developer; Call the preset email sending library; Based on the email address information, the email content is sent to the target developer using the email sending library.
6. The abnormality monitoring method according to claim 1, characterized in that: After the step of generating corresponding alarm information based on the abnormal information, the method further includes: Obtaining a target exception type corresponding to the exception information; Call the preset repair strategy library; Querying a target repair strategy corresponding to the target anomaly type from the repair strategy library; Perform corresponding abnormality repair processing on the abnormal information based on the target repair strategy.
7. The abnormality monitoring method according to claim 1, characterized in that: After the step of outputting the alarm information, the method further includes: Collecting abnormal situation data of the affected page within a preset time period; Analyze the abnormal situation data based on a preset data analysis tool to obtain corresponding abnormal statistical data; Building a corresponding static report based on the abnormal statistical data; Output processing is performed on the static report.
8. An abnormality monitoring device, characterized in that: include: A first acquisition module is configured to acquire a modified file corresponding to the target project based on a preset version control command when detecting that the target project has undergone a version update; A second acquisition module is used to acquire a pre-built dependency graph corresponding to the target project; an analysis module, configured to perform page analysis on the modified file based on the dependency graph, and determine affected pages corresponding to the modified file; An updating module, configured to update a preset monitoring configuration file based on the affected page to mark the affected page as a priority monitoring object; a judgment module, configured to monitor the priority monitoring object based on a preset abnormality monitoring code, and determine whether abnormal information corresponding to the affected page is detected; A generating module, configured to generate corresponding alarm information based on the abnormal information; The first output module is used to output the alarm information.
9. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps of the abnormality monitoring method according to any one of claims 1 to 7 when executing the computer-readable instructions.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-readable instructions, which, when executed by a processor, implement the steps of the abnormality monitoring method according to any one of claims 1 to 7.
Citation Information
Cited By
Network equipment configuration management method and device, electronic equipment and storage medium
CN121037218A
