A method and apparatus for generating alert emails, a storage medium, and a computer device.

By generating alarm emails containing information such as log processing time, call chain relationships, processor utilization, and memory utilization, the problem of cumbersome system anomaly analysis process has been solved, improving fault analysis efficiency and developer experience.

CN115437891BActive Publication Date: 2026-11-10PINGAN YIQIANBAO E COMMERCE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211114486.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-14
Publication Date
2026-11-10
Estimated Expiration
2042-09-14

AI Technical Summary

Technical Problem

When an anomaly occurs in the existing system, the asynchronously pushed anomaly information is brief, which requires system developers to perform tedious and complex analysis, resulting in low efficiency in fault analysis and a poor developer experience.

Method used

Generate alert emails containing target information, including log processing time, call chain relationships, processor utilization, and memory utilization, simplifying the system problem analysis process.

Benefits of technology

By generating alert emails containing detailed target information, the efficiency of system problem analysis is improved, and the fault analysis experience for system developers is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115437891B_ABST
    Figure CN115437891B_ABST
Patent Text Reader

Abstract

This application relates to the field of artificial intelligence technology and discloses a method and apparatus, storage medium, and computer device for generating alarm emails. The method includes: receiving abnormal information and determining whether alarm email generation conditions are met based on the abnormal information; when met, obtaining a first log corresponding to the abnormal information based on the abnormal information, and determining target information based on the first log, the target information including log processing time, call chain relationship, processor utilization rate, and memory utilization rate; and generating the alarm email based on the target information. The target information in this application embodiment includes almost all the information that system developers want to use to locate system problems. Alarm emails containing target information can greatly simplify the system problem analysis process, improve the efficiency of system problem analysis, and enhance the fault analysis experience for system developers.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and in particular to a method and apparatus for generating alarm emails, a storage medium, and a computer device. Background Technology

[0002] During the current system's application, various anomalies frequently occur. When an anomaly occurs, the system can asynchronously push anomaly information to the corresponding terminals of the system developers as an alert. Then, the system developers can analyze the anomaly information received on the terminals to pinpoint the exact location of the system problem.

[0003] However, the exception information pushed asynchronously by the system is often quite brief, usually only including the log corresponding to the exception. System developers still need to perform a series of analysis tasks based on this log, which is tedious and complicated, resulting in low efficiency in fault analysis and a poor experience for system developers. Summary of the Invention

[0004] In view of this, this application provides a method and apparatus for generating alarm emails, a storage medium, and a computer device. The target information includes almost all the information that system developers want to use to locate system problems. Alarm emails containing target information can greatly simplify the system problem analysis process, improve the efficiency of system problem analysis, and enhance the fault analysis experience of system developers.

[0005] According to one aspect of this application, a method for generating alert emails is provided, comprising:

[0006] Receive abnormal information and determine whether the conditions for generating an alarm email are met based on the abnormal information;

[0007] When the condition is met, based on the abnormal information, the first log corresponding to the abnormal information is obtained, and the target information is determined based on the first log. The target information includes log processing time, call chain relationship, processor utilization rate, and memory utilization rate.

[0008] The alarm email is generated based on the target information.

[0009] According to another aspect of this application, an alarm email generation apparatus is provided, characterized in that it includes:

[0010] An abnormal information receiving module is used to receive abnormal information and determine whether the conditions for generating an alarm email are met based on the abnormal information.

[0011] The target information determination module is used to, when the condition is met, obtain the first log corresponding to the abnormal information based on the abnormal information, and determine the target information based on the first log. The target information includes log processing time, call chain relationship, processor utilization rate, and memory utilization rate.

[0012] An alarm email generation module is used to generate the alarm email based on the target information.

[0013] According to another aspect of this application, a storage medium is provided that stores a computer program thereon, which, when executed by a processor, implements the above-described method for generating alarm emails.

[0014] According to another aspect of this application, a computer device is provided, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor executes the program to implement the above-described method for generating alarm emails.

[0015] By employing the above technical solutions, this application provides a method, apparatus, storage medium, and computer device for generating alarm emails. Upon receiving abnormal information from a system experiencing an anomaly, the system first determines whether the received abnormal information meets the conditions for alarm email generation. If the conditions are met, the system retrieves a first log corresponding to the received abnormal information (i.e., the log created when the anomaly occurred). Then, based on the first log, target information is determined. This target information may include log processing time, call chain relationships, processor utilization, memory utilization, and other information. Once the target information is determined, an alarm email can be generated. The target information in this application's embodiments includes almost all the information that system developers want to use to locate system problems. Alarm emails containing target information can greatly simplify the system problem analysis process, improve the efficiency of system problem analysis, and enhance the fault analysis experience for system developers.

[0016] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description

[0017] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0018] Figure 1 A flowchart illustrating a method for generating alarm emails according to an embodiment of this application is shown.

[0019] Figure 2 A flowchart illustrating another method for generating alarm emails provided in an embodiment of this application is shown.

[0020] Figure 3 A schematic diagram of the structure of an alarm email generation device provided in an embodiment of this application is shown;

[0021] Figure 4 A schematic diagram of another alarm email generation device provided in an embodiment of this application is shown. Detailed Implementation

[0022] The present application will be described in detail below with reference to the accompanying drawings and embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in the embodiments of the present application can be combined with each other.

[0023] This embodiment provides a method for generating alarm emails, such as... Figure 1 As shown, the method includes:

[0024] Step 101: Receive abnormal information and determine whether the conditions for generating an alarm email are met based on the abnormal information;

[0025] The alarm email generation method provided in this application can be applied to a monitoring platform. If a system experiences an anomaly, an anomaly message can be generated and sent to the monitoring platform. When the monitoring platform receives the anomaly message from the system experiencing the anomaly, it first determines whether the received anomaly message meets the alarm email generation conditions. Here, the alarm email generation condition can be a frequency condition for the anomaly message. For example, the alarm email generation condition is that if the number of times an anomaly message for a certain function of a certain system is sent exceeds a preset threshold, then a corresponding alarm email is generated. After receiving the anomaly message, the system's unique identifier and function unique identifier carried in the anomaly message can be used to determine the number of times the anomaly message for that function of the system has been sent. If the number of times the anomaly message is sent exceeds the preset threshold, then a corresponding alarm email can be generated. Assuming the preset threshold for function a of system A is 5 times, and after receiving an anomaly message for function a of system A, it is determined that the number of times the anomaly message has been sent is 4 (i.e., this is the 4th time it has been sent), then no alarm email is generated this time. An alarm email will be generated the next time an anomaly message for function a of system A is received. Here, the number of times the anomaly message is sent is accumulated until it is reset to zero after the alarm email is generated.

[0026] Step 102: When the condition is met, based on the abnormal information, obtain the first log corresponding to the abnormal information, and determine the target information based on the first log. The target information includes log processing time, call chain relationship, processor utilization rate, and memory utilization rate.

[0027] In this embodiment, if the conditions for generating an alarm email are met after receiving the received exception information, then the first log corresponding to the exception information (i.e., the log created when the exception occurred) can be retrieved from the system that sent the exception information. Then, the target information can be determined based on the first log. Here, the target information can be log processing time, call chain relationships, processor utilization, memory utilization, etc., and may also include other information. Log processing time refers to the processing time corresponding to each log entry, and call chain relationships refer to the call relationships between systems during system application. The target information includes almost all the information that system developers want to use to locate system problems, allowing them to quickly and easily find issues in the system.

[0028] Step 103: Generate the alarm email based on the target information.

[0029] In this embodiment, after the target information is determined, an alarm email can be generated using the target information. Furthermore, the alarm email can also be sent to the terminal corresponding to the system developer, allowing the system developer to quickly locate system problems directly through the alarm email received on the terminal.

[0030] By applying the technical solution of this embodiment, upon receiving an anomaly message from a system experiencing an anomaly, it can first be determined whether the received anomaly message meets the conditions for generating an alarm email. If the conditions for generating an alarm email are met after receiving the anomaly message, then the first log corresponding to the anomaly message (i.e., the log created when the anomaly occurred) can be obtained from the system that sent the anomaly message, based on the received anomaly message. Then, the target information can be determined based on the first log. Here, the target information can be log processing time, call chain relationships, processor utilization, memory utilization, etc., and may also include other information. After determining the target information, an alarm email can be generated using the target information. The target information in this embodiment includes almost all the information that system developers want to use to locate system problems. Alarm emails containing target information can greatly simplify the system problem analysis process, improve the efficiency of system problem analysis, and enhance the fault analysis experience for system developers.

[0031] Furthermore, as a refinement and extension of the specific implementation of the above embodiments, and to fully illustrate the specific implementation process of this embodiment, another method for generating alarm emails is provided, such as... Figure 2 As shown, the method includes:

[0032] Step 201: Receive abnormal information and determine whether the conditions for generating an alarm email are met based on the abnormal information;

[0033] In this embodiment, when the monitoring platform receives an anomaly message from a system experiencing an anomaly, it first determines whether the received anomaly message meets the conditions for generating an alarm email. Here, the alarm email generation condition can be a frequency condition for the anomaly message. For example, the alarm email generation condition could be that if the number of times an anomaly message for a certain function of a certain system is sent exceeds a preset threshold, then a corresponding alarm email is generated. Therefore, upon receiving an anomaly message, the system's unique identifier and function's unique identifier carried in the anomaly message can be used to determine the number of times the anomaly message for that function of that system has been sent. If the number of times the anomaly message is sent exceeds the preset threshold, then a corresponding alarm email can be generated. Assuming the preset threshold for function a of system A is 5 times, and after receiving an anomaly message for function a of system A, the number of times the anomaly message has been sent is determined to be 4 times (i.e., this is the 4th time it has been sent), then no alarm email is generated this time. An alarm email will be generated the next time an anomaly message for function a of system A is received. Here, the number of times the anomaly message is sent is accumulated and reset to zero after an alarm email is generated.

[0034] Step 202: When the condition is met, based on the abnormal information, obtain the first log corresponding to the abnormal information, and determine the target information based on the first log. The target information includes log processing time, call chain relationship, processor utilization rate, and memory utilization rate.

[0035] In this embodiment, if the conditions for generating an alarm email are met after receiving the received exception information, then the first log corresponding to the exception information (i.e., the log created when the exception occurred) can be retrieved from the system that sent the exception information. Then, the target information can be determined based on the first log. Here, the target information can be log processing time, call chain relationships, processor utilization, memory utilization, etc., and may also include other information. Log processing time refers to the processing time corresponding to each log entry, and call chain relationships refer to the call relationships between systems during system application. The target information includes almost all the information that system developers want to use to locate system problems, allowing them to quickly and easily find issues in the system.

[0036] Step 203: Based on the target information, generate a visualization file and determine the access path corresponding to the visualization file; based on the access path, generate the alarm email.

[0037] In this embodiment, after determining the target information, a visualization file can be generated based on the target information. Here, the visualization file can be a visualized .htlm file. After generating the visualization file, the access path corresponding to the visualization file can be further determined, for example: http: / / ip:port / xxx.htlm. This access path can then be included when generating an alert email. Upon receiving the alert email, system developers can access the visualization interface corresponding to the visualization file using this access path, where the target information can be directly displayed. This embodiment of the application includes a visualization file containing the target information in the alert email via an access path. This allows system developers receiving the alert email to simply send the access path to other system developers, enabling them to also see the target information, facilitating discussion and reporting.

[0038] Furthermore, to ensure system information security and prevent the leakage of target information, when system developers obtain visualization files through the access path, an authentication interface can be displayed first after clicking the access path. System developers can enter their identity identifier on the authentication interface, and only after successful verification can they obtain the visualization file. This effectively prevents the leakage of target information, thereby ensuring system information security. Here, when obtaining visualization files through the access path, it is optional whether the system developer receiving the alert email and other personnel receiving the access path from the system developer both need to authenticate, or whether the system developer receiving the alert email does not need to authenticate, while other personnel receiving the access path from the system developer need to authenticate. This requirement is not specified here.

[0039] Optionally, in this embodiment, step 202, "determining the log processing time based on the first log," includes: identifying a globally unique identifier contained in the first log based on the first log; obtaining a second log containing the globally unique identifier based on the globally unique identifier; taking any two adjacent second logs as a log combination, calculating the time difference between the log creation time of the first second log in the log combination and the log creation time of the second second log, and using the time difference as the log processing time corresponding to the first second log.

[0040] In this embodiment, each log entry may contain a globally unique identifier, which indicates which logs were generated under the same functional usage. After obtaining the first log, the globally unique identifier can be identified from it. After determining the globally unique identifier from the first log, all second logs containing that globally unique identifier can be obtained based on it. Multiple second logs may be included, and each second log may contain a first log. Next, the second logs can be grouped in pairs. Specifically, two adjacent second logs can be grouped together as a log combination. The two logs in a log combination can be named "First Second Log" and "Second Second Log," respectively. Each log entry corresponds to a log creation time, so the creation time of the first second log and the creation time of the second second log can be determined separately. The time difference between these two creation times can be used as the log processing time of the first second log. Here, the creation time of the first second log must be earlier than the creation time of the second second log. For example, if there are ten second log entries, then the first and second second log entries can be grouped together, the second and third second log entries together, and so on, up to the ninth and tenth second log entries. The time difference calculated for the log entries corresponding to the first and second second log entries is the log processing time for the first second log entry, the time difference calculated for the log entries corresponding to the second and third second log entries is the log processing time for the second second log entry, and so on, up to the log entries corresponding to the ninth and tenth second log entries is the log processing time for the ninth second log entry. This application, by calculating log processing times, can help system developers quickly determine which log entry(s) have significantly longer processing times than the others, assisting them in finding the longer-consuming second log entries and helping them quickly identify the cause of system anomalies.

[0041] Optionally, after "obtaining the second log containing the globally unique identifier" in step 202, the method further includes: sorting the second log according to the log creation time, and extracting the system name corresponding to each second log from the sorted second log; and determining the call chain relationship based on the system name.

[0042] In this embodiment, since each log entry corresponds to a log creation time, the second logs can be sorted according to their creation time, specifically in ascending order. Next, the system name corresponding to each second log entry can be determined from the sorted second logs. Then, the corresponding call chain relationship can be determined based on the system name corresponding to each second log entry. Specifically, starting with the first second log entry, the corresponding system name can be extracted. Then, following the sorted order, the system names can be extracted sequentially from the remaining second logs, with each extracted system name being different from the previous one. For example, if there are ten second log entries, where the system names corresponding to the first to third second log entries are system A, the fourth and fifth second log entries are system B, the sixth second log entry is system A, the seventh and eighth second log entries are system C, and the ninth and tenth second log entries are system B, then the system names corresponding to the first, fourth, sixth, seventh, and ninth second log entries can be extracted to obtain the call chain relationship. This application embodiment automatically generates call chain relationships, enabling system developers to quickly determine the entire call process based on these relationships, eliminating the need for manual determination of the call chain by system developers. This significantly improves the efficiency and accuracy of system fault analysis.

[0043] Optionally, in this embodiment of the application, the step 202 of "determining processor utilization and memory utilization based on the first log" includes: identifying an abnormal system based on the first log; and obtaining the processor utilization and memory utilization corresponding to when the abnormal system generated the first log.

[0044] In this embodiment, the system that is experiencing an anomaly can be identified from the first log. Then, the processor and memory usage rates of the system at the time the first log was generated can be obtained. These processor and memory usage rates can also help analyze which part of the system is experiencing the anomaly. By obtaining processor and memory usage rates, this embodiment can assist system developers in their analysis, improving the efficiency and accuracy of the analysis, and ultimately enhancing the fault analysis experience for system developers.

[0045] Optionally, in this embodiment of the application, the target information may further include target query data; the "determining target information based on the first log" in step 202 includes: identifying whether there is a query-type SQL statement in the first log, and when there is, determining the corresponding target query data from the target database based on the SQL statement.

[0046] In this embodiment, the target information, in addition to log processing time, call chain relationships, processor utilization, and memory utilization, may also include target query data. Specifically, it can be determined from the first log whether it contains a query-type SQL (Structured Query Language) statement. If it exists, the target query data can be determined from the target database based on this SQL statement. Here, the target database can be the storage space corresponding to various data generated during the abnormal system application process. When the abnormal information meets the alarm email generation conditions, if there is an SQL statement in the first log, the corresponding target query data is immediately queried from the target database based on the SQL statement, which can effectively ensure the authenticity and validity of the target query data. Since the data in the target database may be constantly changing, if the system developers subsequently query the corresponding target query data from the target database based on the SQL statement, the data may have changed significantly, making the query inaccurate. This embodiment automatically obtains the target query data based on the SQL statement in the first log, making the acquisition of target query data more accurate and helping system developers locate system anomalies.

[0047] In this embodiment of the application, optionally, after "generating a visualization file based on the target information" in step 203, the method further includes: marking any log processing time when any log processing time exceeds a preset processing time; and / or marking the processor utilization rate when the processor utilization rate exceeds a first utilization rate; and / or marking the memory utilization rate when the memory utilization rate exceeds a second utilization rate.

[0048] In this embodiment, after generating the visualization file, if any of the multiple log processing times in the target information exceeds the preset processing time, it indicates that an anomaly is very likely to occur during the printing of the log corresponding to that log processing time. At this time, the log processing time can be marked, such as by highlighting or using special colors. This can serve as a prompt when system developers view the visualization file, making it easier for them to quickly see which target information is likely to be abnormal.

[0049] Similarly, if the processor utilization rate in the target information exceeds the first utilization rate, it indicates that the processor utilization rate was high when the system sent the abnormal information, which is very likely due to a system computing problem. In this case, the processor utilization rate can be marked, and the marking method can be the same as the marking method for log processing time. This can serve as a prompt for system developers when viewing the visualization file, making it easier for them to quickly see which target information is likely to be abnormal.

[0050] Similarly, if the memory usage rate in the target information exceeds the second highest usage rate, it indicates that the memory usage rate was high when the system sent abnormal information, which is very likely due to an anomaly caused by a system calculation problem. In this case, the memory usage rate can be marked, using the same marking method as the log processing time. This can serve as a prompt for system developers when viewing visualization files, allowing them to quickly identify which target information is likely to be abnormal.

[0051] Furthermore, as Figure 1 To specifically implement the method, this application provides an alarm email generation device, such as... Figure 3 As shown, the device includes:

[0052] An abnormal information receiving module is used to receive abnormal information and determine whether the conditions for generating an alarm email are met based on the abnormal information.

[0053] The target information determination module is used to, when the condition is met, obtain the first log corresponding to the abnormal information based on the abnormal information, and determine the target information based on the first log. The target information includes log processing time, call chain relationship, processor utilization rate, and memory utilization rate.

[0054] An alarm email generation module is used to generate the alarm email based on the target information.

[0055] Furthermore, as Figure 1 To specifically implement the method, this application provides another alarm email generation device, such as... Figure 4 As shown, the device includes:

[0056] An abnormal information receiving module is used to receive abnormal information and determine whether the conditions for generating an alarm email are met based on the abnormal information.

[0057] The target information determination module is used to, when the condition is met, obtain the first log corresponding to the abnormal information based on the abnormal information, and determine the target information based on the first log. The target information includes log processing time, call chain relationship, processor utilization rate, and memory utilization rate.

[0058] An alarm email generation module is used to generate the alarm email based on the target information.

[0059] Optionally, the target information determination module includes:

[0060] An identification unit is configured to identify a globally unique identifier contained in the first log based on the first log.

[0061] The log acquisition unit is used to acquire a second log containing the globally unique identifier based on the globally unique identifier;

[0062] The time calculation unit is used to take any two adjacent second logs as a log combination, calculate the time difference between the log creation time of the first second log in the log combination and the log creation time of the second second log, and use the time difference as the log processing time corresponding to the first second log.

[0063] Optionally, the device further includes:

[0064] The sorting module is used to sort the second logs according to their creation time after obtaining the second logs containing the globally unique identifier, and to extract the system name corresponding to each second log from the sorted second logs.

[0065] The call chain determination module is used to determine the call chain relationship based on the system name.

[0066] Optionally, the target information determination module includes:

[0067] The identification unit is used to identify abnormal systems based on the first log;

[0068] The utilization rate determination unit is used to obtain the processor utilization rate and the memory utilization rate corresponding to the time when the abnormal system generates the first log.

[0069] Optionally, the target information determination module includes:

[0070] The data determination unit is used to identify whether there is a query-type SQL statement in the first log, and when it exists, to determine the corresponding target query data from the target database based on the SQL statement.

[0071] Optionally, the alarm email generation module includes:

[0072] The path determination unit is used to generate a visualization file based on the target information and determine the access path corresponding to the visualization file.

[0073] The email generation unit is used to generate the alarm email based on the access path.

[0074] Optionally, the device further includes:

[0075] The first marking module is used to mark any log processing time exceeding a preset processing time after generating the visualization file based on the target information; and / or,

[0076] The second marking module is used to mark the processor utilization rate when it exceeds a first utilization rate after generating the visualization file based on the target information; and / or,

[0077] The third marking module is used to mark the memory usage rate when the memory usage rate exceeds the second usage rate after the visualization file is generated based on the target information.

[0078] It should be noted that other corresponding descriptions of the functional units involved in the alarm email generation apparatus provided in this application embodiment can be found in the following references. Figures 1 to 2 The corresponding descriptions in the method will not be repeated here.

[0079] Based on the above, Figures 1 to 2 Accordingly, this application also provides a storage medium storing a computer program, which, when executed by a processor, implements the above-described method. Figures 1 to 2 The method for generating alert emails is shown.

[0080] Based on this understanding, the technical solution of this application can be embodied in the form of a software product. This software product can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, or portable hard drive), and includes several instructions to cause a computer device (such as a personal computer, server, or network device) to execute the methods described in the various implementation scenarios of this application.

[0081] Based on the above, Figures 1 to 2 The method shown, and Figures 3 to 4 To achieve the above objectives, the present application also provides a computer device, specifically a personal computer, server, network device, etc., as shown in the virtual device embodiment. This computer device includes a storage medium and a processor; the storage medium stores a computer program; the processor executes the computer program to achieve the above-described objectives. Figures 1 to 2 The method for generating alert emails is shown.

[0082] Optionally, the computer device may also include a user interface, a network interface, a camera, radio frequency (RF) circuitry, sensors, audio circuitry, a Wi-Fi module, etc. The user interface may include a display screen, input units such as a keyboard, etc., and optional user interfaces may also include USB interfaces, card reader interfaces, etc. The network interface may optionally include standard wired interfaces, wireless interfaces (such as Bluetooth interfaces, Wi-Fi interfaces), etc.

[0083] Those skilled in the art will understand that the computer device structure provided in this embodiment does not constitute a limitation on the computer device, and may include more or fewer components, or combine certain components, or have different component arrangements.

[0084] The storage medium may also include an operating system and a network communication module. The operating system is a program that manages and stores the hardware and software resources of a computer device, supporting the operation of information processing programs and other software and / or programs. The network communication module is used to enable communication between the various components within the storage medium, as well as communication with other hardware and software within the physical device.

[0085] Through the above description of the implementation methods, those skilled in the art can clearly understand that this application can be implemented using software plus necessary general-purpose hardware platforms, or it can be implemented using hardware. Upon receiving an exception message sent by a system experiencing an anomaly, it can first be determined whether the received exception message meets the conditions for generating an alarm email. If the conditions for generating an alarm email are met after receiving the exception message, then based on the received exception message, the first log corresponding to the exception message can be obtained from the system that sent the exception message, i.e., the log created when the anomaly occurred. Then, based on the first log, target information can be determined. Here, target information can be log processing time, call chain relationships, processor utilization, memory utilization, etc., and may also include other information. After determining the target information, an alarm email can be generated using the target information. The target information in this application embodiment includes almost all the information that system developers want to use to locate system problems. Alarm emails containing target information can greatly simplify the system problem analysis process, improve the efficiency of system problem analysis, and enhance the fault analysis experience for system developers.

[0086] Those skilled in the art will understand that the accompanying drawings are merely schematic diagrams of a preferred embodiment, and the modules or processes shown in the drawings are not necessarily essential for implementing this application. Those skilled in the art will understand that the modules in the apparatus of the embodiment can be distributed within the apparatus of the embodiment as described, or can be modified to be located in one or more apparatuses different from this embodiment. The modules of the above-described embodiment can be combined into one module, or further divided into multiple sub-modules.

[0087] The serial numbers in this application are for descriptive purposes only and do not represent the superiority or inferiority of any particular implementation scenario. The above disclosures are merely a few specific implementation scenarios of this application; however, this application is not limited thereto, and any variations conceived by those skilled in the art should fall within the protection scope of this application.

Claims

1. A method for generating alert emails, characterized in that, include: Upon receiving abnormal information, the system determines the number of times the abnormal information is sent based on the system unique identifier and function unique identifier carried in the abnormal information. If the number of times the abnormal information is sent exceeds a preset threshold, it is determined that the conditions for generating an alarm email are met, and the number of times the abnormal information is sent is cleared to zero. Based on the anomaly information, obtain the first log created when the anomaly occurred, corresponding to the anomaly information, and identify the globally unique identifier contained in the first log based on the first log; obtain the second log containing the globally unique identifier based on the globally unique identifier; combine any two adjacent second logs as a log group, calculate the time difference between the log creation time of the first second log in the log group and the log creation time of the second second log, and use the time difference as the log processing time corresponding to the first second log; The second log is sorted according to its creation time, and the system name corresponding to each second log is extracted from the sorted second log; based on the system name, the call chain relationship is determined; Based on the first log, identify the abnormal system; Obtain the processor usage and memory usage corresponding to the time when the abnormal system generates the first log; Identify whether there is a query-type SQL statement in the first log, and if so, determine the corresponding target query data from the target database based on the SQL statement; Based on the target information, an alarm email is generated, including: generating the alarm email based on the log processing time, the call chain relationship, the processor utilization rate, the memory utilization rate, and the target query data.

2. The method according to claim 1, characterized in that, The generation of alarm emails based on target information includes: Based on the target information, a visualization file is generated, and the access path corresponding to the visualization file is determined; The alarm email is generated based on the access path.

3. The method according to claim 2, characterized in that, After generating the visualization file based on the target information, the method further includes: When any of the log processing times exceeds a preset processing time, the log processing time will be marked; and / or, When the processor utilization rate exceeds a first utilization rate, the processor utilization rate is marked; and / or, When the memory usage rate exceeds the second usage rate, the memory usage rate is marked.

4. An alarm email generation device, characterized in that, include: An abnormal information receiving module is used to receive abnormal information, determine the corresponding number of times the abnormal information is sent based on the system unique identifier and function unique identifier carried in the abnormal information, and if the number of times the abnormal information is sent exceeds a preset threshold, it is determined that the alarm email generation condition is met and the number of times the abnormal information is sent is cleared to zero. The target information determination module is used to obtain a first log corresponding to the anomaly information and created when the anomaly occurs, based on the anomaly information, and to identify a globally unique identifier contained in the first log based on the first log; to obtain a second log containing the globally unique identifier based on the globally unique identifier; to combine any two adjacent second logs as a log group, to calculate the time difference between the log creation time of the first second log in the log group and the log creation time of the second second log, and to use the time difference as the log processing time corresponding to the first second log; The second log is sorted according to its creation time, and the system name corresponding to each second log is extracted from the sorted second log; based on the system name, the call chain relationship is determined; Based on the first log, identify the abnormal system; Obtain the processor usage and memory usage corresponding to the time when the abnormal system generates the first log; Identify whether there is a query-type SQL statement in the first log, and if so, determine the corresponding target query data from the target database based on the SQL statement; The alarm email generation module is used to generate the alarm email based on the log processing time, the call chain relationship, the processor utilization rate, the memory utilization rate, and the target query data.

5. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 3.

6. A computer device, comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method of any one of claims 1 to 3.

Citation Information

Patent Citations

  • Log data processing method and device, log data display method and device, equipment and storage medium

    CN111338910A

  • Abnormity alarm method, access log generation method and operation and maintenance system

    CN113312241A