Fault alarm method and device, storage medium and electronic device
By obtaining log change information in the application system and matching keywords, the alarm mechanism is triggered in real time, the problems of poor alarm timeliness and low sensitivity in the existing technology are solved, and the first time when the problem occurs is realized. Reduces code intrusion and alarm bombing.
Patent Information
- Application Number
- CN202011233566.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-06
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2040-11-06
AI Technical Summary
In the prior art, fault alarm systems have problems such as poor alarm timeliness and low effective alarm sensitivity. Especially when applying system log change information processing, problems need to accumulate before they can identify faults and issue alarms, and common buried points are reported. The method is invasive to the code and can easily lead to alarm bombing.
By obtaining the log change information of the application system, matching keywords to trigger an alarm mechanism. When there is no keyword matching the excluded keyword, the corresponding log alarm will be triggered according to its occurrence frequency within the target time period, real-time monitoring and alarm will be achieved. , reduce intrusion into the code.
The faults are perceived and discovered as soon as the problem arises, which improves the timeliness and sensitivity of alarms, reduces the situation of alarm bombing, and improves the efficiency of business analysis.
Smart Images

Figure CN112395156B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of the Internet, and in particular to a fault alarm method and device, a storage medium and an electronic device. Background Art
[0002] In a production environment, various application systems will be deployed on numerous servers or containers (hereinafter collectively referred to as "servers"). During operation, these systems will output various logs to reflect the system status and feedback on business execution. By collecting and analyzing this log information, it is possible to analyze and monitor the data of an application system at the business level.
[0003] In the related technology, monitoring and alarming can be performed based on server hardware resources and system performance. The disadvantage is that the faults need to accumulate to a certain extent before the faults can be identified and alarms can be issued, which has some lag in timeliness. It is also possible to obtain fault alarm messages based on client-side point reporting, but the point reporting method usually requires predicting the point in advance, and the point reporting method is somewhat invasive to the code. In addition, the current monitoring and alarm systems generally have the problem of alarm bombardment, which results in the sensitivity of effective alarms being not high enough.
[0004] Therefore, there are problems in the related technology such as poor timeliness of warning and insufficient sensitivity of effective warning. Summary of the invention
[0005] The present application provides a fault alarm method and device, a storage medium and an electronic device, so as to at least solve the problem of poor alarm timeliness in the related art.
[0006] According to one aspect of an embodiment of the present application, a fault alarm method is provided, the method comprising:
[0007] Obtaining log change information of the application system, wherein the log change information is used to indicate that the first error log changes within a target time period;
[0008] Matching a first keyword in the first error log with a second keyword, wherein the second keyword is a keyword for which an alarm needs to be excluded;
[0009] In the case that there is no first keyword matching the second keyword in the first error log, a corresponding log alarm mechanism is triggered according to the appearance frequency of the first keyword in the target time period.
[0010] According to one aspect of an embodiment of the present application, a fault alarm device is provided, the device comprising:
[0011] A first acquisition module is used to acquire log change information of the application system, wherein the log change information is used to indicate that the first error log changes within a time period;
[0012] A first matching module, used for matching a first keyword in the first error log with a second keyword, wherein the second keyword is a keyword for which an alarm needs to be excluded;
[0013] A trigger module is used to trigger a corresponding log alarm mechanism according to the appearance frequency of the first keyword within the target time period when there is no first keyword matching the second keyword in the first error log.
[0014] Optionally, the first acquisition module includes:
[0015] A first acquisition unit is used to acquire log change sub-information of the plurality of application systems, wherein the log change sub-information is used to indicate that a first error sub-log has changed within a target time window, the first error sub-log belongs to the first error log, and the target time window is a time window within the target time period;
[0016] a classification unit, used to classify the application systems corresponding to the log change sub-information with the same keyword into the same application type, wherein the application type is used to indicate the category to which the application system belongs;
[0017] The aggregation unit is used to aggregate the log change sub-information of application systems under the same application type into the log change information.
[0018] Optionally, the device further comprises:
[0019] A second acquisition unit is used to acquire error statistics information of each application type in a plurality of applications after classifying the application systems corresponding to the log change sub-information with the same keyword as the same application type, wherein the error statistics information includes the error type, the error source and the alarm time;
[0020] The display unit is used to push the error statistics information under each application type to a target information window matching the application type in multiple information windows for display, wherein one information window among the multiple information windows is used to display the error statistics information under one application type.
[0021] Optionally, the trigger module includes:
[0022] The first sending unit is used to send a first alarm message to an alarm receiving end when the frequency of occurrence of the first keyword in the target time window is greater than or equal to a preset frequency, wherein the target frequency is used to represent a frequency value for sending the first alarm message.
[0023] Optionally, the trigger module further includes:
[0024] A first determining unit, configured to determine the duration of the target time window;
[0025] A storage unit, used for storing each of the first keywords appearing within the duration in a distributed cache;
[0026] A counting unit, used for counting the number of the first keywords in the distributed cache;
[0027] The second sending unit is used to send the number as a second alarm message to the alarm receiving end.
[0028] Optionally, the storage unit includes:
[0029] A generating subunit, configured to generate the first keyword in the order of an application name of the application system where the first keyword is located, subkeywords contained in the first keyword, current time, length of the target time window where the first keyword is located, and end time;
[0030] The storage subunit is used to store the first keyword in the distributed cache.
[0031] Optionally, the device further comprises:
[0032] a first determining module, configured to determine, before matching the first keyword in the first error log with the second keyword, whether there is a target error log in the first error log, wherein the target error log does not contain the keyword;
[0033] The first sending module is used to send a third alarm message according to the fault data represented in the target error log.
[0034] Optionally, the device further comprises:
[0035] The second sending module is used to send a fourth alarm message to the alarm receiving end after sending the third alarm message according to the fault data represented in the target error log, when the number of the third alarm messages is greater than or equal to the target alarm threshold, wherein the fourth alarm message is used to instruct the log monitoring platform to stop sending the third alarm message, and the target alarm threshold is the maximum alarm message value received by the alarm receiving end.
[0036] Optionally, the device further comprises:
[0037] A third sending module, configured to, after stopping sending the third warning message, obtain the number of the third warning messages again when the time from stopping sending the third warning message reaches a target duration, wherein the target duration is used to trigger the step of obtaining the number of the third warning messages again;
[0038] The fourth sending module is used to send the third alarm message according to the fault data represented in the target error log when the number of the third alarm messages obtained again is less than the target alarm threshold.
[0039] Optionally, the device further comprises:
[0040] The second matching module is used for not generating an alarm message if a first keyword matching the second keyword exists in the first error log after a corresponding log alarm mechanism is triggered according to the appearance frequency of the first keyword in the target time period.
[0041] Optionally, the device further comprises:
[0042] The second acquisition module is used to acquire the triggering operation performed on the target fault switch before acquiring the log change information of the application system;
[0043] A control module is used to control the sending operation or the closing operation of the alarm message according to the trigger operation and the function corresponding to the target fault switch.
[0044] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any embodiment of the fault alarm method when running.
[0045] According to another aspect of an embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps of any embodiment of the above-mentioned fault alarm method.
[0046] According to another aspect of the embodiments of the present application, a computer program product or a computer program is also provided, which includes computer instructions, and the computer instructions are stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps of any embodiment of the above-mentioned fault alarm method.
[0047] In an embodiment of the present application, the first error log is determined by obtaining log change information within the application system, and matching the first keyword with the second keyword in the first error log. When there is no first keyword that matches the second keyword, the corresponding log alarm mechanism is triggered according to the frequency of occurrence of the first keyword within the target time period. There is no need to accumulate problems, and only keyword comparison is required to determine whether there is a fault. Therefore, the problem can be perceived and discovered as soon as it occurs, thereby solving the problem of poor alarm timeliness in related technologies. At the same time, there is no need to predict the embedding points in advance, which reduces the intrusiveness to the code. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0049] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0050] Figure 1 is a schematic diagram of a hardware environment of an optional fault alarm method according to an embodiment of the present invention;
[0051] Figure 2 It is a flowchart of an optional fault alarm method according to an embodiment of the present application;
[0052] Figure 3 This is a schematic diagram of an optional alarm configuration page for monitoring logs according to an embodiment of the present application;
[0053] Figure 4 is a schematic diagram of an optional fault alarm system deployment architecture according to an embodiment of the present application;
[0054] Figure 5 This is a schematic diagram of an optional application system alarm interface of the same type according to an embodiment of the present application;
[0055] Figure 6 This is an optional alarm data trend diagram of a log fault according to an embodiment of the present application;
[0056] Figure 7 This is a schematic diagram of an optional fault alarm processing flow according to an embodiment of the present application;
[0057] Figure 8 is a structural block diagram of an optional fault alarm device according to an embodiment of the present application;
[0058] Fig. 9 It is a structural block diagram of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0059] 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 drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0060] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0061] An embodiment of the present application provides a fault alarm method, which can be applied to business scenarios in which real-time monitoring and alarming of logs are performed. For example, when the content of a log record changes, it usually causes reporting of errors, warnings, and other information. At this time, an alarm can be sent to a code engineer via SMS or email to prompt that the status of the current log record has changed, thereby facilitating the code engineer to accurately locate the problem when the program is abnormal and improving business analysis efficiency.
[0062] Optionally, in the embodiment of the present application, the above fault alarm method can be applied to Figure 1 In the hardware environment shown in the figure. Figure 1As shown, the terminal 102 may include a memory 104, a processor 106, and a display 108 (optional component). The terminal 102 may be connected to a server 112 via a network 110 for communication. The server 112 may be used to provide services (such as game services, application services, etc.) for the terminal or a client installed on the terminal. A database 114 may be set on the server 112 or independently of the server 112 to provide data storage services for the server 112. In addition, a processing engine 116 may be running in the server 112, and the processing engine 116 may be used to execute the steps executed by the server 112.
[0063] Optionally, the terminal 102 may be, but is not limited to, a terminal that can calculate data, such as a mobile terminal (e.g., a mobile phone, a tablet computer), a laptop, a PC (Personal Computer), etc. The above network may include, but is not limited to, a wireless network or a wired network. The wireless network includes: Bluetooth, WIFI (Wireless Fidelity) and other networks that implement wireless communication. The above wired network may include, but is not limited to: a wide area network, a metropolitan area network, and a local area network. The above server 112 may include, but is not limited to, any hardware device that can perform calculations.
[0064] In addition, in this embodiment, the above fault alarm method can also be applied to, but not limited to, an independent processing device with a relatively powerful processing capability without data interaction. For example, the processing device can be, but not limited to, a terminal device with a relatively powerful processing capability, that is, each operation in the above fault alarm method can be integrated in an independent processing device. The above is only an example, and this embodiment does not make any limitation to this.
[0065] In the embodiment of the present application, the above fault alarm method can be run on the server, specifically, as follows: Figure 2 As shown, Figure 2 The figure is a flow chart of an optional fault alarm method according to an embodiment of the present application. The flow of the method may include the following steps:
[0066] Step S201: The server obtains log change information of the application system, where the log change information is used to indicate that a first error log has changed within a target time period.
[0067] The embodiment of the present application uses LogMonitor as a log monitoring and alarm platform to monitor the log in real time and issue timely alarms for error logs. It should be noted that LogMonitor can monitor files or folders in the computer to check whether they have any records of changes. When there are changes, the platform will issue an alarm notification. The alarm method for the above fault is explained below.
[0068] Optionally, developers or operation and maintenance personnel configure the relevant information of the monitoring alarm application on the LogMonitor platform. The relevant information may include: application name, alarm group ID, alarm type, matching field, frequency condition, number of alarms, trigger time period, etc. For details, please refer to Figure 3 .
[0069] like Figure 4 In each application server of the LogMonitor platform provided in the embodiment of the present application, there are an application system, log information, and a log monitoring and alarm client. The relationship between the application system, log information, and log monitoring and alarm client is: the application system is used to output log information, and the log monitoring and alarm client monitors changes in the log information.
[0070] After the log monitoring alarm client obtains the log change information of the application system, it indicates that there is error log information in the current log information and an alarm message needs to be issued. The log change information is used to indicate that the first error log has changed within the target time period.
[0071] Step S202: Match the first keyword in the first error log with the second keyword, wherein the second keyword is the keyword for which the alarm needs to be eliminated.
[0072] Optionally, after the client of the LogMonitor platform provided in the embodiment of the present application monitors the error log, it supports reporting to the server for rule parsing and processing. The rule parsing and processing method is a method of controlling alarm reporting based on the frequency of occurrence of error keywords. In the embodiment of the present application, it means obtaining the first keyword in the above-mentioned first error log, the first keyword is the keyword that triggers the generation of the first error log, the first keyword can be a sub-keyword, for example, 404 Not Found (cannot be found) or a keyword set containing the sub-keyword, for example, the first keyword contains sub-keywords, application names, etc., wherein the first keyword contains the above-mentioned sub-keywords.
[0073] Check whether there is a keyword matching the preset second keyword in the current first keyword, the second keyword can be a keyword, for example, 404 Not Found (cannot be found) or a keyword set including multiple keywords, for example, 404 Not Found (cannot be found), 502 Bad Gateway (webpage error), 500-13 Server is too busy (server is too busy), and the second keyword is the keyword that needs to exclude the alarm, that is, if the first keyword that is the same as the second keyword is matched, the first keyword will not trigger the alarm message.
[0074] Step S203: When there is no first keyword matching the second keyword in the first error log, trigger a corresponding log alarm mechanism according to the appearance frequency of the first keyword in the target time period.
[0075] Optionally, in the above keyword matching process, if there is no first keyword matching the second keyword in the first error log, a corresponding log alarm mechanism is triggered according to the frequency of occurrence of the first keyword in the target time period. The log alarm mechanism here is a method of controlling alarm reporting based on the frequency of occurrence of the error keyword.
[0076] Optionally, in the fault alarm system deployment architecture diagram, such as Figure 4 , and also includes a log monitoring and alarm server cluster, wherein the log monitoring and alarm server cluster mainly includes two major functions: alarm configuration and alarm processing. Alarm processing may include four processing logics: log collection, rule parsing, log analysis, and sending alarms. More specifically, after the log collection module in the log monitoring and alarm server cluster collects the error log, it transmits the error log to the rule parsing module, performs log analysis based on the parsing result, determines the frequency of occurrence of keywords in the error log within the target time period, and then triggers the corresponding alarm mechanism, which can send an alarm message to the developer's client application and present it on the client in the form of an interface display; it can also be notified to the developer by telephone alarm, wherein when sending an alarm, it will also determine whether the telephone alarm rule is triggered. If the telephone alarm conditions are met, the relevant developer will be notified by telephone alarm. The telephone alarm rule here is an alarm rule set separately by the log monitoring and alarm server cluster, which is used to use telephone alarm to notify alarms only when the situation is urgent and serious.
[0077] In an embodiment of the present application, the first error log is determined by obtaining log change information within the application system, and matching the first keyword with the second keyword in the first error log. When there is no first keyword that matches the second keyword, the corresponding log alarm mechanism is triggered according to the frequency of occurrence of the first keyword within the target time period. There is no need to accumulate problems, and only keyword comparison is required to determine whether there is a fault. Therefore, the problem can be perceived and discovered as soon as it occurs, thereby solving the problem of poor alarm timeliness in related technologies. At the same time, there is no need to predict the embedding points in advance, which reduces the intrusiveness to the code.
[0078] As an optional embodiment, obtaining log change information of the application system includes:
[0079] Obtaining log change sub-information of multiple application systems, where the log change sub-information is used to indicate that a first error sub-log changes within a target time window, the first error sub-log belongs to a first error log, and the target time window is a time window within a target time period;
[0080] Classify the application systems with the same keywords in the log change sub-information into the same application type, where the application type is used to indicate the category to which the application system belongs;
[0081] The log change sub-information of application systems under the same application type is aggregated into log change information.
[0082] Optionally, the LogMonitor platform includes multiple application servers, each application server corresponds to multiple application systems. Therefore, in order to better collect error logs in the application system and to more optimally manage hundreds of alarm messages, the embodiment of the present application proposes that multiple application systems can be classified, and application systems of the same type can be classified together. When uploading alarm messages at a later stage, they can be published in the group to which the application system belongs.
[0083] In the embodiment of the present application, application systems with the same keywords collected in the same time window are classified as the same type, taking the time window (i.e., sliding window) as the unit. The same keyword here can be one keyword or multiple keywords. The embodiment of the present application does not make a specific limitation on the number of the same keywords.
[0084] The keyword will be stored in the distributed cache in the format of the application name of the application system where the keyword is located, the sub-keywords contained, the current time, the target time window length and the end time of the keyword. For example, there is a first keyword, and its storage format is: logcount#kfp#xxxx#2019-03-1911:03#600#2019-03-19 11:13#404Not Found, where logcount#kfp represents the log statistics name, xxxx represents the application name, 2019-03-1911:03 represents the current time, 600 represents the target time window length, 2019-03-19 11:13 represents the end time, and 404Not Found represents the sub-keyword. It should be noted that in the embodiment of the present application, the first keyword can be a keyword containing only sub-keywords, or it can be a keyword containing sub-keywords and other information (such as application name or target time window length).
[0085] Exemplarily, the application server of the LogMonitor platform obtains log change sub-information of multiple application systems, and the log change sub-information is used to indicate that the first error sub-log changes within the target time window, wherein the log change information includes the log change sub-information, the first error log includes the first error sub-log, and the target time window is a time window within the target time period. For example, the target time period can be set to 14:00-16:00, the target time window can be any time window within the target time period, and a time window step can be set to 30 minutes. At this time, 15:00-15:30 within the 14:00-16:00 time period can be selected as the target time window, and then the log changes of multiple application systems within the 15:00-15:30 time period are obtained. Since the log changes, erroneous log information will inevitably appear. At this time, the keyword information in the log change sub-information is obtained, and the application systems with the same keyword are classified as the same application type, and then the log change sub-information of the application system under the same application type is obtained. Since the log change information includes the log change sub-information, the log change information can be obtained by splicing and deduplication of multiple log change sub-information.
[0086] Exemplarily, error statistics information of each application type in multiple applications is obtained, wherein the error statistics information includes error type, error source, and alarm time; the error statistics information of each application type is pushed to a target information window matching the application type in multiple information windows for display, wherein one information window in the multiple information windows is used to display the error statistics information of one application type. Figure 5 As shown, Figure 5 It is a screenshot interface of the alarm message displayed in the enterprise communication application program received by the user. The current application system belongs to the "cooperative business PRD" business type. After obtaining the log change sub-information under the cooperative business PRD business type, the first error sub-log obtained will be selected according to the keyword matching situation and the keyword occurrence frequency. The corresponding log alarm mechanism is then selected, and then the alarm message under the same application type is sent to the corresponding business group established. This facilitates the classification of alarm messages, reduces the situation of sending alarm messages for other unrelated business types, and reduces the burden of checking each alarm message for back-end personnel.
[0087] The embodiment of the present application will classify the application systems that obtain the same keywords within the target time window into the same application type. In this way, the error logs obtained under the same application type usually have similar characteristics, which is conducive to the later feature statistics of the error logs. At the same time, the alarm messages issued by the application systems under the same application type can be placed in the same alarm prompt group, which is convenient for viewing and managing the alarm messages.
[0088] As an optional embodiment, triggering a corresponding log alarm mechanism according to the occurrence frequency of the first keyword within the target time period includes:
[0089] When the frequency of occurrence of the first keyword in the target time window is greater than or equal to the target frequency, a first alarm message is sent to the alarm receiving end, and the target frequency is used to represent the frequency value of sending the first alarm message.
[0090] Optionally, in an embodiment of the present application, a target frequency is set in advance, and the frequency value of the first keyword appearing in the target time window is counted, and the value is compared with the target frequency. When the frequency of the first keyword appearing in the target time window is greater than or equal to the target frequency, a first alarm message is sent to the alarm receiving end of the application server, wherein the target frequency is used to characterize the frequency value of sending the first alarm message. For example, in the target time window of 15:00-15:30 (i.e., within 30 minutes), when the frequency of the first keyword A appearing is 9 times (9 times is the target frequency) or more than 9 times, an alarm message (first alarm message) will be sent to the alarm receiving end.
[0091] In order to reduce the number of times alarm messages are sent, the embodiment of the present application can set a target threshold for the number of alarm messages in advance. An alarm message is sent to the server only when the frequency value of the first keyword appearing in the target time window is greater than or equal to the target threshold. This reduces the storage pressure on the server, reduces communication interactions, and saves network traffic consumption.
[0092] As an optional embodiment, triggering a corresponding log alarm mechanism according to the occurrence frequency of the first keyword within the target time period further includes:
[0093] Determine the length of the target time window;
[0094] Store each first keyword that appears within the duration in the distributed cache;
[0095] Count the number of first keywords in the distributed cache;
[0096] The number is used as the second alarm message and sent to the alarm receiving end.
[0097] Alternatively, if Figure 6As shown in the figure, the value on the ordinate represents the number of alarm messages sent, such as 0, 50, 100, 150, 200, etc., and the value on the abscissa represents the time points at which the alarm messages are sent, such as 00:00, 02:00, 04:00, 06:00, etc. From the figure, we can get the number of alarm messages sent by each application system in different time periods. According to the multiple lines shown in the figure, we can also get the entire data development trend of the alarm messages, which is used for later error log analysis and backtracking. Furthermore, since each application system is grouped according to the application type, it supports viewing the statistical view by application system dimension.
[0098] In an embodiment of the present application, a corresponding log alarm mechanism is triggered according to the frequency of occurrence of the first keyword in the target time window. Exemplarily, the step size (i.e., time length) of the target time window is first set, such as one hour, and then the timing starts at the first time the keyword is detected to appear. The current first time is the starting time point of the target time window, and then the end time point of the target time window is determined according to the step size of one hour. For example, the start node when the keyword (i.e., the first keyword) is detected to appear is 14:00, then according to the set step size of one hour, it is determined that the end time point of the current target time window falls at 15:00, and then the total number of the keyword appearing in the 14:00-15:00 time period is counted, the total number is stored in the distributed cache, and the number is sent to the alarm receiving end as an alarm message (i.e., the second alarm message).
[0099] The embodiment of the present application sends the total number of keyword occurrences within the target time window period as an alarm message to the platform server, which can not only clearly know the frequency of keyword occurrence but also reduce the number of alarm messages sent, avoid alarm bombardment, and save network traffic consumption.
[0100] As an optional embodiment, before matching the first keyword in the first error log with the second keyword, the method further includes:
[0101] Determining that a target error log exists in the first error log, wherein the target error log does not contain the keyword;
[0102] A third warning message is sent according to the fault data represented in the target error log.
[0103] Optionally, if there is a target error log in the acquired first error log, and the target error log does not contain any error keywords, wherein the first error log may be an error log or a set of error logs, when the first error log is an error log, an embodiment of the present application refers to that the first error log (i.e., the target error log) does not contain any error keywords, and when the first error log is a set of error logs, an embodiment of the present application refers to that there is an error log (i.e., the target error log) in the first error log that does not contain any error keywords, then all situations representing fault data in the target error log are sent to the platform server as an alarm message (third alarm message).
[0104] The embodiment of the present application sends each fault data in the target error log that does not contain keywords as an alarm message to the platform server, which can perceive and discover the problem as soon as the problem occurs, thereby improving the alarm sensitivity.
[0105] As an optional embodiment, after sending the third alarm message according to the fault data represented in the target error log, the method further includes:
[0106] When the number of the third alarm messages is greater than or equal to the preset alarm threshold, a fourth alarm message is sent to the alarm receiving end, wherein the fourth alarm message is used to instruct the log monitoring platform to stop sending the third alarm message, and the target alarm threshold is the maximum alarm message value received by the alarm receiving end.
[0107] Optionally, in the above embodiment, when the number of third alarm messages sent continuously is too large, it will usually cause receiving and storage pressure on the platform server, so the embodiment of the present application sets a target alarm threshold, which is used to control the number of third alarm messages sent, wherein the value of the target alarm threshold is the maximum alarm message value received by the alarm receiving end.
[0108] Exemplarily, the number of the third alarm message is compared with the target alarm threshold, and when the number of the third alarm message is greater than or equal to the target alarm threshold, a fourth alarm message is sent to the alarm receiving end, wherein the fourth alarm message is used to instruct the log monitoring platform to stop sending the third alarm message. For example, if there is too much data indicating a fault in the target error log, and the third alarm message sent within 1 minute exceeds the target alarm threshold, it is necessary to send a notification to the log monitoring alarm server cluster of the platform to stop sending the third alarm message, which may be the fourth alarm message, so that the log monitoring alarm server cluster no longer sends the third alarm message.
[0109] The embodiment of the present application controls the number of third alarm messages sent by setting a target alarm threshold, thereby reducing the pressure on the log monitoring platform to receive alarm messages.
[0110] As an optional embodiment, after stopping sending the third warning message, the method further includes:
[0111] When the time from stopping sending the third warning message reaches the target duration, obtaining the number of the third warning messages again, wherein the target duration is used to trigger the step of obtaining the number of the third warning messages again;
[0112] When the number of the third alarm messages acquired again is less than the target alarm threshold, the third alarm message is sent according to the fault data indicated in the target error log.
[0113] Optionally, when the time from stopping sending the third alarm message reaches the target duration, the number of the third alarm message is obtained again, and when the number of the third alarm message obtained again is less than the target alarm threshold, if the number of the third alarm message decreases to the value of the target alarm threshold, the third alarm message can be sent normally. The target duration is used to trigger the step of obtaining the number of the third alarm message again.
[0114] The embodiment of the present application can balance the receiving capacity of the platform server and provide timely feedback on the alarm situation by acquiring the number of third alarm messages at the alarm receiving end in real time and adjusting the sending method of the third alarm message in a timely manner, thereby achieving the purpose of improving the timeliness of the alarm.
[0115] As an optional embodiment, after triggering a corresponding log alarm mechanism according to the occurrence frequency of the first keyword within the target time period, the method further includes:
[0116] In the case where the first keyword matching the second keyword exists in the first error log, no alarm message is generated.
[0117] Optionally, the embodiment of the present application utilizes a keyword exclusion method, and does not generate an alarm message when a first keyword matching a second keyword exists in the first error log.
[0118] Exemplarily, the storage format of the first keyword is: logcount#kfp#xxxx#2019-03-1911:03#600#2019-03-19 11:13#404Not Found, and the second keyword may be part of the keywords that trigger the server alarm, for example, 404Not Found (cannot be found), 502Bad Gateway (webpage error), 500-13Server istoo busy (server is too busy), etc. The type of the second keyword can be configured as needed, which is not limited in the embodiment of the present application.
[0119] When matching the first keyword with the second keyword in the first error log, since the subkeyword of the first keyword and the second keyword both have the same keyword: 404 Not Found, no alarm message is generated for the first error log.
[0120] It should be noted that the second keyword set in the embodiment of the present application is usually a plurality of keywords that cause a higher probability of errors in the log. Therefore, in order to reduce the number of alarm messages and reduce the statistical pressure on alarm messages by backend staff, when an error log with the same keyword as the second keyword is matched, no alarm message will be generated.
[0121] The embodiment of the present application reduces the number of alarm messages and alleviates the statistical pressure of alarm messages on back-end staff by setting a method of excluding alarms by matching the second keyword.
[0122] As an optional embodiment, before obtaining the log change information of the application system, the method further includes:
[0123] Obtaining the triggering operation performed on the target fault switch;
[0124] According to the trigger operation and the function corresponding to the target fault switch, the control performs a sending operation or a closing operation on the alarm message.
[0125] Alternatively, if Figure 3 As shown, a global control switch (ie, target fault switch) is provided on the alarm configuration page of the monitoring log, which is used to perform alarm control on the entire LogMonitor platform. When the global control switch is turned off, no alarm message will be sent.
[0126] For example, when the user slides the button of the global control switch to the left or right, the LogMonitor platform will obtain the operation performed by the user on the global control switch and trigger the corresponding function of the global control switch according to the sliding direction. For example, when it is obtained that the user slides the global control switch button to the left, no alarm message will be sent. Only when the user slides the global control switch button to the right, the LogMonitor platform can send the alarm message.
[0127] In addition, in the above embodiments, the platform, LogMonitor platform, and log monitoring platform mentioned are all the same platform.
[0128] The embodiment of the present application can meet the user's global control needs for receiving alarm messages and improve the user experience by setting a global control switch.
[0129] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0130] As an optional embodiment, Figure 7 , Figure 7 This is a schematic diagram of an optional fault alarm processing flow according to an embodiment of the present application, and the specific steps are as follows:
[0131] Step S701, receiving an error log;
[0132] Step S702, obtaining alarm configuration;
[0133] Step S703, parsing the error log;
[0134] Step S704, determining whether the keyword in the error log (ie, the first keyword) matches the preset keyword (ie, the second keyword); if not, executing step S705, otherwise, no processing;
[0135] Step S705, determining whether the keywords in the error log meet the keyword frequency convergence rule; if not, executing step S706, otherwise, executing step S707;
[0136] Step S706, determining whether the number of alarms exceeds the target alarm threshold; if so, sending a notification to stop sending alarms, otherwise, sending a normal alarm;
[0137] Step S707, determine whether the keyword in the current error log appears for the first time, if so, send a first appearance alarm, otherwise, execute step S708;
[0138] It should be noted that in the embodiment of the present application, each keyword in the error log is stored in the distributed cache, so it is possible to determine whether the keyword in the current error log appears for the first time based on the keywords stored in the distributed cache.
[0139] Step S708, determine whether the keyword occurrence frequency in the current error log exceeds the target frequency threshold, if so, send the keyword occurrence frequency total number step, otherwise, send an alarm normally.
[0140] It should be noted that the above-mentioned keyword frequency convergence rule refers to whether there is a keyword in the error log. If so, the corresponding log alarm mechanism can be executed according to the keyword frequency. If not, the alarm is sent normally, and the number of alarms sent is controlled by comparing the number of alarms with the target alarm threshold.
[0141] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an 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 (Read-Only Memory, read-only memory) / RAM (Random Access Memory, random access memory), a magnetic disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the alarm method for the fault of each embodiment of the present application.
[0142] According to another aspect of an embodiment of the present application, a fault alarm device for implementing the above-mentioned fault alarm method is also provided. Figure 8 is a schematic diagram of an optional fault alarm device according to an embodiment of the present application, such as Figure 8 As shown, the device may include:
[0143] A first acquisition module 801 is used to acquire log change information of an application system, wherein the log change information is used to indicate that a first error log has changed within a time period;
[0144] A first matching module 802, connected to the first acquisition module 801, is used to match a first keyword in the first error log with a second keyword, wherein the second keyword is a keyword for which an alarm needs to be excluded;
[0145] The trigger module 803 is connected to the first matching module 802 and is used to trigger a corresponding log alarm mechanism according to the occurrence frequency of the first keyword in a target time period when there is no first keyword matching the second keyword in the first error log.
[0146] It should be noted that the first acquisition module 801 in this embodiment can be used to execute the above step S201, the first matching module 802 in this embodiment can be used to execute the above step S202, and the triggering module 803 in this embodiment can be used to execute the above step S203.
[0147] Through the above module, by obtaining the log change information in the application system, the first error log is determined, and the first keyword in the first error log is matched with the second keyword. When there is no first keyword matching the second keyword, the corresponding log alarm mechanism is triggered according to the frequency of occurrence of the first keyword in the target time period. There is no need to accumulate problems, and only keyword comparison is required to determine whether there is a fault. Therefore, the problem can be perceived and discovered at the first time it occurs, thereby solving the problem of poor alarm timeliness in related technologies. At the same time, there is no need to predict the embedding points in advance, which reduces the intrusion into the code.
[0148] As an optional embodiment, the first acquisition module includes:
[0149] A first acquisition unit is used to acquire log change sub-information of multiple application systems, wherein the log change sub-information is used to indicate that a first error sub-log changes within a target time window, the first error sub-log belongs to a first error log, and the target time window is a time window within a target time period;
[0150] A classification unit, used to classify application systems corresponding to the log change sub-information with the same keyword into the same application type, wherein the application type is used to indicate the category to which the application system belongs;
[0151] The aggregation unit is used to aggregate the log change sub-information of application systems under the same application type into log change information.
[0152] As an optional embodiment, the device further includes:
[0153] A second acquisition unit is used to obtain error statistics information of each application type in multiple applications after classifying the application systems corresponding to the log change sub-information with the same keyword as the same application type, wherein the error statistics information includes the error type, the error source and the alarm time;
[0154] The display unit is used to push the error statistics information under each application type to a target information window matching the application type in multiple information windows for display, wherein one information window among the multiple information windows is used to display the error statistics information under one application type.
[0155] As an optional embodiment, the trigger module includes:
[0156] The first sending unit is used to send a first alarm message to an alarm receiving end when the frequency of occurrence of the first keyword in a target time window is greater than or equal to a preset frequency, wherein the target frequency is used to represent a frequency value for sending the first alarm message.
[0157] As an optional embodiment, the trigger module further includes:
[0158] A first determining unit, used to determine the duration of the target time window;
[0159] A storage unit, used for storing each first keyword appearing within the duration into a distributed cache;
[0160] A statistical unit, used to count the number of first keywords in the distributed cache;
[0161] The second sending unit is used to send the number as a second alarm message to the alarm receiving end.
[0162] As an optional embodiment, the storage unit includes:
[0163] A generating subunit, used to generate the first keyword in the order of the application name of the application system where the first keyword is located, the subkeywords contained in the first keyword, the current time, the length of the target time window where the first keyword is located, and the end time;
[0164] The storage subunit is used to store the first keyword in the distributed cache.
[0165] As an optional embodiment, the device further includes:
[0166] A first determination module, used for determining, before matching the first keyword in the first error log with the second keyword, whether there is a target error log in the first error log, wherein the target error log does not contain the keyword;
[0167] The first sending module is used to send a third alarm message according to the fault data represented in the target error log.
[0168] As an optional embodiment, the device further includes:
[0169] The second sending module is used to send a fourth alarm message to the alarm receiving end after sending the third alarm message according to the fault data represented in the target error log, when the number of the third alarm messages is greater than or equal to the target alarm threshold, wherein the fourth alarm message is used to instruct the log monitoring platform to stop sending the third alarm message, and the target alarm threshold is the maximum alarm message value received by the alarm receiving end.
[0170] As an optional embodiment, the device further includes:
[0171] A third sending module, configured to, after stopping sending the third warning message, obtain the number of the third warning message again when the time from stopping sending the third warning message reaches a target duration, wherein the target duration is used to trigger the step of obtaining the number of the third warning message again;
[0172] The fourth sending module is used to send the third alarm message according to the fault data represented in the target error log when the number of the third alarm messages obtained again is less than the target alarm threshold.
[0173] As an optional embodiment, the device further includes:
[0174] The second matching module is used for not generating an alarm message if the first keyword matching the second keyword exists in the first error log after the corresponding log alarm mechanism is triggered according to the occurrence frequency of the first keyword in the target time period.
[0175] As an optional embodiment, the device further includes:
[0176] The second acquisition module is used to acquire the triggering operation performed on the target fault switch before acquiring the log change information of the application system;
[0177] The control module is used to control the sending operation or closing operation of the alarm message according to the trigger operation and the function corresponding to the target fault switch.
[0178] It should be noted that the examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the contents disclosed in the above embodiments. It should be noted that the above modules as part of the device can be run in Figure 1 In the hardware environment shown, it can be implemented by software or by hardware, wherein the hardware environment includes a network environment.
[0179] According to another aspect of an embodiment of the present application, an electronic device for implementing the above-mentioned fault alarm method is also provided. The electronic device may be a server, a terminal, or a combination thereof.
[0180] Fig. 9is a structural block diagram of an optional electronic device according to an embodiment of the present application, such as Fig. 9 As shown, it includes a processor 901, a communication interface 902, a memory 903 and a communication bus 904, wherein the processor 901, the communication interface 902 and the memory 903 communicate with each other through the communication bus 904, wherein,
[0181] Memory 903, used for storing computer programs;
[0182] The processor 901 is used to implement the following steps when executing the computer program stored in the memory 903:
[0183] S1, obtaining log change information of the application system, wherein the log change information is used to indicate that a first error log changes within a target time period;
[0184] S2, matching the first keyword in the first error log with the second keyword, wherein the second keyword is the keyword for which the alarm needs to be eliminated;
[0185] S3: When there is no first keyword matching the second keyword in the first error log, trigger a corresponding log alarm mechanism according to the appearance frequency of the first keyword in the target time period.
[0186] Optionally, in this embodiment, the communication bus may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig. 9 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0187] The communication interface is used for communication between the above electronic device and other devices.
[0188] The memory may include RAM, or may include non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0189] As an example, Fig. 9 As shown, the memory 903 may include but is not limited to the first acquisition module 801, the first matching module 802, and the trigger module 803 in the fault alarm device. In addition, it may also include but is not limited to other module units in the fault alarm device, which will not be repeated in this example.
[0190] The above-mentioned processor can be a general-purpose processor, which can include but not be limited to: CPU (Central Processing Unit), NP (Network Processor), etc.; it can also be DSP (Digital Signal Processing), ASIC (Application Specific Integrated Circuit), FPGA (Field-Programmable Gate Array) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0191] In addition, the above electronic device also includes: a display for displaying the fault alarm result.
[0192] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment will not be described in detail here.
[0193] It can be understood by those skilled in the art that Fig. 9 The structure shown is for illustration only. The device for implementing the above-mentioned fault alarm method may be a terminal device, which may be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (Mobile Internet Devices, MID), a PAD, and other terminal devices. Fig. 9 It does not limit the structure of the above electronic device. For example, the terminal device may also include Fig. 9 More or fewer components (such as network interfaces, display devices, etc.) shown in, or having Fig. 9 Different configurations shown.
[0194] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, which can include: a flash drive, ROM, RAM, a magnetic disk or an optical disk, etc.
[0195] According to another aspect of the embodiment of the present application, a storage medium is also provided. Optionally, in this embodiment, the storage medium can be used to execute the program code of the fault alarm method.
[0196] Optionally, in this embodiment, the storage medium may be located on at least one network device among a plurality of network devices in the network shown in the above embodiment.
[0197] Optionally, in this embodiment, the storage medium is configured to store program codes for executing the following steps:
[0198] S1, obtaining log change information of the application system, wherein the log change information is used to indicate that a first error log changes within a target time period;
[0199] S2, matching the first keyword in the first error log with the second keyword, wherein the second keyword is the keyword for which the alarm needs to be eliminated;
[0200] S3: When there is no first keyword matching the second keyword in the first error log, trigger a corresponding log alarm mechanism according to the appearance frequency of the first keyword in the target time period.
[0201] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, which will not be described in detail in this embodiment.
[0202] Optionally, in this embodiment, the storage medium may include, but is not limited to, various media that can store program codes, such as a USB flash drive, a ROM, a RAM, a mobile hard disk, a magnetic disk, or an optical disk.
[0203] According to another aspect of the embodiments of the present application, a computer program product or a computer program is also provided, which includes computer instructions, and the computer instructions are stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps of any embodiment of the above-mentioned fault alarm method.
[0204] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0205] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling one or more computer devices (which may be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
[0206] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0207] In the several embodiments provided in the present application, it should be understood that the disclosed client can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0208] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution provided in this embodiment.
[0209] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0210] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A fault alarm method, characterized in that: The method comprises: Obtaining log change information of the application system, wherein the log change information is used to indicate that the first error log changes within a target time period; Matching a first keyword with a second keyword in the first error log, wherein the second keyword is a keyword for which an alarm needs to be excluded, the second keyword is a plurality of keywords that cause a high probability of an error in the log, and the second keyword is used to reduce the number of alarm messages; In the case that there is no first keyword matching the second keyword in the first error log, triggering a corresponding log alarm mechanism according to the appearance frequency of the first keyword in the target time period; The triggering of a corresponding log alarm mechanism according to the occurrence frequency of the first keyword within the target time period includes: When the frequency of occurrence of the first keyword within the target time window is greater than or equal to the target frequency, a first alarm message is sent to the alarm receiving end, wherein the target frequency is used to represent the frequency value of sending the first alarm message, and the target time window is a time window within the target time period.
2. The method according to claim 1, characterized in that The obtaining of log change information of the application system includes: Acquire log change sub-information of the plurality of application systems, wherein the log change sub-information is used to indicate that a first error sub-log changes within a target time window, and the first error sub-log belongs to the first error log; Classifying the application systems corresponding to the log change sub-information with the same keyword into the same application type, wherein the application type is used to indicate the category to which the application system belongs; The log change sub-information of application systems under the same application type is aggregated into the log change information.
3. The method according to claim 2, characterized in that After classifying the application systems corresponding to the log change sub-information having the same keyword as the same application type, the method further includes: Obtain error statistics information for each application type in multiple applications, wherein the error statistics information includes error type, error source, and alarm time; The error statistics information under each application type is pushed to a target information window matching the application type among the multiple information windows for display, wherein one information window among the multiple information windows is used to display the error statistics information under one application type.
4. The method according to claim 2, characterized in that: The triggering of a corresponding log alarm mechanism according to the occurrence frequency of the first keyword within the target time period also includes: Determining the duration of the target time window; storing each of the first keywords that appear within the duration in a distributed cache; Counting the number of the first keywords in the distributed cache; The number is used as a second alarm message and sent to the alarm receiving end.
5. The method according to claim 4, characterized in that The storing each of the first keywords appearing within the duration into the distributed cache comprises: Generate the first keyword in the order of the application name of the application system where the first keyword is located, the subkeywords contained in the first keyword, the current time, the length of the target time window where the first keyword is located, and the end time; The first keyword is stored in the distributed cache.
6. The method according to claim 1, characterized in that Before matching the first keyword in the first error log with the second keyword, the method further includes: Determining that a target error log exists in the first error log, wherein the target error log does not contain the keyword; A third alarm message is sent according to the fault data represented in the target error log.
7. The method according to claim 6, characterized in that After sending the third warning message according to the fault data represented in the target error log, the method further includes: When the number of the third alarm messages is greater than or equal to the target alarm threshold, a fourth alarm message is sent to the alarm receiving end, wherein the fourth alarm message is used to instruct the log monitoring platform to stop sending the third alarm message, and the target alarm threshold is the maximum alarm message value received by the alarm receiving end.
8. The method according to claim 7, characterized in that After stopping sending the third warning message, the method further includes: When the time from stopping sending the third warning message reaches the target duration, obtaining the number of the third warning messages again, wherein the target duration is used to trigger the step of obtaining the number of the third warning messages again; When the number of the third alarm messages acquired again is less than the target alarm threshold, the third alarm message is sent according to the fault data represented in the target error log.
9. The method according to claim 1, characterized in that: After triggering a corresponding log alarm mechanism according to the occurrence frequency of the first keyword within the target time period, the method further includes: In the case where there is a first keyword matching the second keyword in the first error log, no alarm message is generated.
10. The method according to claim 1, characterized in that Before obtaining the log change information of the application system, the method further includes: Obtaining the triggering operation performed on the target fault switch; According to the trigger operation and the function corresponding to the target fault switch, control is performed to perform a sending operation or a closing operation on the alarm message.
11. A fault alarm device, characterized in that: The device comprises: A first acquisition module is used to acquire log change information of the application system, wherein the log change information is used to indicate that the first error log changes within a target time period; A first matching module, configured to match a first keyword in the first error log with a second keyword, wherein the second keyword is a keyword for which an alarm needs to be excluded, the second keyword is a plurality of keywords that cause a high probability of an error in the log, and the second keyword is used to reduce the number of alarm messages; a triggering module, configured to trigger a corresponding log alarm mechanism according to the appearance frequency of the first keyword within the target time period when there is no first keyword matching the second keyword in the first error log; The triggering of a corresponding log alarm mechanism according to the occurrence frequency of the first keyword within the target time period includes: When the frequency of occurrence of the first keyword within the target time window is greater than or equal to the target frequency, a first alarm message is sent to the alarm receiving end, wherein the target frequency is used to represent the frequency value of sending the first alarm message, and the target time window is a time window within the target time period.
12. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program is configured to execute the fault alarm method according to any one of claims 1 to 10 when running.
13. An electronic device comprising a memory and a processor, characterized in that: The memory stores a computer program, and the processor is configured to execute the fault alarm method according to any one of claims 1 to 10 through the computer program.
14. A computer program product or a computer program, wherein the computer program product or the computer program comprises computer instructions, wherein the computer instructions are stored in a computer-readable storage medium; a processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the fault alarm method described in any one of claims 1 to 10.
