Log processing method and device, equipment and medium

By determining the alarm level and alarm weight in log processing, and prioritizing the emergency alarm log, the problem of inability to effectively handle a large number of alarm logs in the prior art is solved, and system security and resource utilization are improved.

CN118945046APending Publication Date: 2024-11-12BEIJING YOUTEJIE INFORMATION TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410975656.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-19
Publication Date
2024-11-12

AI Technical Summary

Technical Problem

When the prior art processes a large number of alarm logs, it is impossible to effectively determine logs with higher urgency, resulting in reduced system security and excessive resource consumption.

Method used

By obtaining the rule identification, log alarm level and alarm parameters in the alarm log, determine the alarm level and alarm weight, and prioritizing the handling of alarm logs with higher urgency.

Benefits of technology

It improves the accuracy and efficiency of log processing, reduces resource consumption, and enhances the security of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118945046A_ABST
    Figure CN118945046A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a log processing method and device, equipment and a medium. The method is applied to the technical field of computers and comprises the steps that an alarm log generated by triggering an alarm rule is obtained, and the alarm log comprises a rule identifier corresponding to the alarm rule, a log alarm level and an alarm parameter; determining an alarm grade score corresponding to each alarm rule according to the log alarm grade and the rule identifier of the alarm log; determining an alarm weight corresponding to each alarm rule according to the rule identifier and the alarm parameter of the alarm log; and determining a target alarm rule according to the rule identifier, the alarm grade score and the alarm weight of the alarm log, and processing the alarm log corresponding to the target alarm rule. According to the technical scheme, the alarm log needing to be processed can be accurately determined, the accuracy and efficiency of log processing are improved, and resources needed by log processing are saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a log processing method, device, equipment and medium. Background Art

[0002] With the development of current network technology, various network attacks emerge in an endless stream. Therefore, in order to deal with various network attacks, the server sets up various alarm rules. When the network device is attacked, the alarm rules are triggered, and then the corresponding alarm logs are generated.

[0003] However, in order to deal with various network attacks or system errors, more and more network rules are being established, and a huge number of alarm logs are generated. The processing of alarm logs is also a major problem.

[0004] Currently, the processing of alarm logs mainly relies on chronological processing, that is, the earliest generated alarm log is processed first. However, this processing method cannot determine the high-risk logs with higher urgency when dealing with a large number of alarm logs, resulting in reduced system security. At the same time, the processing of all alarm logs will consume a lot of resources. Summary of the invention

[0005] The present invention provides a method, device, equipment and medium for log processing. Through the technical solution of the embodiments of the present invention, the alarm log to be processed can be accurately determined, the accuracy and efficiency of log processing can be improved, and the resources required for log processing can be saved.

[0006] In a first aspect, an embodiment of the present invention provides a log processing method, including:

[0007] Acquire an alarm log generated by triggering an alarm rule, wherein the alarm log includes a rule identifier of the corresponding alarm rule, a log alarm level, and alarm parameters;

[0008] Determine the alarm level corresponding to each alarm rule according to the alarm level and rule identifier of the alarm log;

[0009] Determine the alarm weight corresponding to each alarm rule according to the rule identifier and alarm parameters of the alarm log;

[0010] According to the rule identifier, alarm level score and alarm weight of the alarm log, a target alarm rule is determined, and the alarm log corresponding to the target alarm rule is processed.

[0011] The second invention, an embodiment of the present invention provides a log processing device, including:

[0012] An acquisition module is used to acquire an alarm log generated by triggering an alarm rule, wherein the alarm log includes a rule identifier of the corresponding alarm rule, a log alarm level, and alarm parameters;

[0013] An alarm level determination module is used to determine the alarm level corresponding to each alarm rule according to the log alarm level and rule identifier of the alarm log;

[0014] An alarm weight determination module is used to determine the alarm weight corresponding to each alarm rule according to the rule identifier and alarm parameters of the alarm log;

[0015] The processing module is used to determine the target alarm rule according to the rule identifier, alarm level score and alarm weight of the alarm log, and process the alarm log corresponding to the target alarm rule.

[0016] In a third aspect, an embodiment of the present invention provides an electronic device, the electronic device comprising:

[0017] at least one processor; and,

[0018] a memory communicatively connected to the at least one processor; wherein,

[0019] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute any one of the log processing methods in the embodiments of the present invention.

[0020] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement any log processing method according to the embodiments of the present invention when executed.

[0021] The embodiment of the present invention provides a method, device, equipment and medium for log processing, the method comprising: obtaining an alarm log generated by triggering an alarm rule, wherein the alarm log includes a rule identifier, a log alarm level and an alarm parameter of the corresponding alarm rule; determining the alarm level score corresponding to each alarm rule according to the log alarm level and rule identifier of the alarm log; determining the alarm weight corresponding to each alarm rule according to the rule identifier and alarm parameter of the alarm log; determining the target alarm rule according to the rule identifier, alarm level score and alarm weight of the alarm log, and processing the alarm log corresponding to the target alarm rule. Specifically, by determining the alarm level score and alarm weight corresponding to the alarm rule, the target alarm rule can be determined, and the alarm log corresponding to the target alarm rule is an alarm log with a higher degree of urgency, and then the alarm log corresponding to the target alarm rule can be processed preferentially. Through this method, the alarm log with a higher degree of urgency can be accurately determined, and the security of the system can be improved. At the same time, through this method, the problem of serious resource consumption caused by processing all alarm logs can be avoided, and the resources required for processing alarm logs can be saved. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0023] Figure 1 A flow chart of a log processing method provided in Embodiment 1 of the present invention;

[0024] Figure 2 A flow chart of a log processing method provided in Embodiment 2 of the present invention;

[0025] Figure 3 A schematic diagram of the structure of a log processing device provided in Embodiment 3 of the present invention;

[0026] Figure 4 A schematic diagram of the structure of an electronic device provided in Embodiment 4 of the present invention. DETAILED DESCRIPTION

[0027] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0028] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention 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 interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0029] It should be noted that the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved in the technical solution of the present disclosure are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0030] Embodiment 1

[0031] Figure 1 This is a flow chart of a log processing method provided in the first embodiment of the present invention, which is applicable to the case of determining the processing priority of an alarm log. For example, the processing priority of an alarm log is determined based on the alarm level and alarm weight of an alarm rule. The method can be executed by a log processing device, which can be implemented by software and / or hardware and can be configured in various computers or servers.

[0032] like Figure 1 As shown, including:

[0033] Step 110: Obtain an alarm log generated by triggering an alarm rule, wherein the alarm log includes a rule identifier of the corresponding alarm rule, a log alarm level, and alarm parameters.

[0034] Among them, the alarm rules are established to deal with various types of network attacks or system errors. If the alarm rules are triggered, the corresponding alarm logs will be generated. The alarm log includes: the rule identifier of the corresponding alarm rule, the log alarm level and the alarm parameters. The corresponding alarm rule can be determined by the alarm identifier of the alarm log. The log alarm level is preset when the log is generated, and the preset method can be based on time, equipment or other interfaces. If it is set based on time, the alarm logs generated in different periods of the day can be preset to different levels. Exemplarily, the log alarm level of the alarm log generated at night is higher than the log alarm level of the alarm log generated during the day, or different log alarm levels are set depending on the type of network equipment.

[0035] Specifically, all alarm logs generated by triggering various alarm rules within a preset time period can be obtained. Then, the alarm logs that should be processed first are determined by the method of the embodiment of the present invention.

[0036] Step 120: Determine the alarm level corresponding to each alarm rule according to the alarm level and rule identifier of the alarm log.

[0037] Among them, the alarm level score of the alarm rule is used to measure the urgency of the alarm rule. The higher the alarm level score, the more urgent the alarm log under the alarm rule is and should be processed with priority. Furthermore, the alarm level score can be determined by the log alarm level of each alarm log under the alarm rule.

[0038] Optionally, step 120 includes:

[0039] Clustering the alarm logs based on the rule identifiers to generate clusters, wherein the alarm logs in different clusters correspond to different alarm rules;

[0040] For any cluster, according to the log alarm level of each alarm log in the cluster, combined with a preset level score table, determine the level score of each alarm log in the cluster;

[0041] According to the grade of each alarm log in the cluster, the alarm grade of the alarm rule represented by the cluster is determined.

[0042] The grade score table records the grade points corresponding to each log alarm grade. For example, the higher the log alarm grade, the higher the corresponding grade point.

[0043] Specifically, the alarm rule corresponding to the alarm log can be determined through the rule identifier of the alarm log, and then the alarm logs with the same alarm rule can be clustered into the same cluster. For each alarm log in any cluster, the alarm level of the alarm rule represented by the cluster can be determined through the alarm level and level score table of each alarm log. Exemplarily, the level scores of each alarm log can be added and normalized to determine the alarm level of the alarm rule.

[0044] Step 130: Determine the alarm weight corresponding to each alarm rule according to the rule identifier and alarm parameters of the alarm log.

[0045] Specifically, the alarm parameters characterize the key attributes of network attacks or network errors. Alarm parameters include alarm fields and alarm field values. For example, the alarm field may include network interface, IP, and access volume. The alarm field value may include the specific content of fields such as network interface, IP, and access volume. The alarm weight corresponding to the alarm rule is used to determine whether the alarm log corresponding to the alarm rule should be processed with priority. The alarm weight can also characterize the urgency of the corresponding alarm rule. Exemplarily, the higher the alarm weight, the more urgent the alarm log corresponding to the alarm rule is and should be processed with priority.

[0046] Step 140: Determine a target alarm rule according to the rule identifier, alarm level score and alarm weight of the alarm log, and process the alarm log corresponding to the target alarm rule.

[0047] Among them, the alarm log corresponding to the target alarm rule is an alarm log of high risk or one that should be processed with priority.

[0048] Specifically, the target alarm rule can be determined according to the rule identifier, alarm level and alarm weight of the alarm log, and then the high-risk or priority alarm logs corresponding to the target alarm rule are processed preferentially. The specific processing method is not limited in the present invention. It should be noted that the target alarm rule in the embodiment of the present invention needs to be determined jointly by the alarm level and alarm weight of the alarm rule.

[0049] Optionally, before determining the target alarm rule according to the rule identifier, alarm level score and alarm weight of the alarm log, the method further includes:

[0050] Determine the numerical range of alarm level points and alarm weights;

[0051] Normalizing the alarm level score and the alarm weight according to the numerical range of the alarm level score and the alarm weight, and determining the normalized alarm level score and the alarm weight;

[0052] According to the rule identifier, alarm level and alarm weight of the alarm log, the target alarm rule is determined, including:

[0053] The target alarm rule is determined according to the rule identifier of the alarm log, the normalized alarm level score and the alarm weight.

[0054] Specifically, since the numerical ranges of the alarm level points and the alarm weights may be different, in order to solve the large calculation errors caused by different numerical ranges, the alarm level points and the alarm weights need to be normalized so that their numerical ranges are the same. Furthermore, the normalized alarm level points and alarm weights can be used to determine the target alarm rules to improve the accuracy of determining the target alarm rules.

[0055] The embodiment of the present invention provides a method for log processing, which includes: obtaining an alarm log generated by triggering an alarm rule, wherein the alarm log includes a rule identifier, a log alarm level and an alarm parameter of the corresponding alarm rule; determining the alarm level score corresponding to each alarm rule according to the log alarm level and rule identifier of the alarm log; determining the alarm weight corresponding to each alarm rule according to the rule identifier and alarm parameter of the alarm log; determining the target alarm rule according to the rule identifier, the alarm level score and the alarm weight of the alarm log, and processing the alarm log corresponding to the target alarm rule. Specifically, by determining the alarm level score and the alarm weight corresponding to the alarm rule, the target alarm rule can be determined, and the alarm log corresponding to the target alarm rule is an alarm log with a higher degree of urgency, and then the alarm log corresponding to the target alarm rule can be processed preferentially. Through this method, the alarm log with a higher degree of urgency can be accurately determined, and the security of the system can be improved. At the same time, through this method, the problem of serious resource consumption caused by processing all alarm logs can be avoided, and the resources required for processing alarm logs can be saved.

[0056] Embodiment 2

[0057] Figure 2 A flowchart of a log processing method provided in Embodiment 2 of the present invention, based on the above embodiment, further defines a method for determining the alarm weight corresponding to each alarm rule according to the rule identifier and alarm parameters of the alarm log, such as Figure 2 As shown, including:

[0058] Step 210: Obtain an alarm log generated by triggering an alarm rule, wherein the alarm log includes a rule identifier of the corresponding alarm rule, a log alarm level, and alarm parameters.

[0059] Step 220: Determine the alarm level corresponding to each alarm rule according to the alarm level and rule identifier of the alarm log.

[0060] Step 230: Determine the field ratio of each alarm field according to the number of each alarm field in the alarm log.

[0061] The alarm parameter includes an alarm field, and the alarm field ratio is: the ratio of the number of each alarm field of the alarm parameter to the number of all alarm fields of the alarm parameter. For example, the quotient of the sum of the number of each alarm field of the alarm parameter and the sum of the number of each alarm field of all alarm parameters can be calculated to obtain the ratio of each alarm field of the alarm parameter.

[0062] Specifically, the field ratio of the alarm field can represent the frequency of occurrence of the alarm field of the alarm parameter within a preset time period. It can be understood that if the alarm field of a certain alarm parameter frequently appears in all alarm logs within a period of time, then the alarm parameter may be a key alarm parameter.

[0063] For example, if the alarm log includes alarm parameters A and B, the alarm fields of alarm parameter A include a1 and a2, and the alarm fields of B include b1 and b2. The number of a1 is 5, the number of a2 is 3, the number of b1 is 5, and the number of b2 is 8. Then the field proportion of alarm parameter A is Similarly, the field proportion of alarm parameter B is Alarm parameter B may be a key alarm parameter.

[0064] Furthermore, the alarm parameter also includes an alarm field value, and the alarm field and the alarm field value are stored in the form of a key-value pair, wherein the alarm field is a key and the alarm field value is a value. The alarm field value is the actual value of the alarm parameter. For example, when the alarm parameter is the number of visits, the alarm field is "number of visits" and the alarm field value is the specific number of visits.

[0065] Step 240: For the alarm log of any cluster, determine the alarm weight corresponding to the alarm rule represented by the cluster according to the field ratio of the alarm field in the alarm log.

[0066] Optionally, this step includes:

[0067] Based on the alarm logs in the cluster, determine the number of each alarm field in the cluster;

[0068] According to the number of each alarm field in the cluster and the field ratio of the alarm field, the alarm weight corresponding to the alarm rule represented by the cluster is determined.

[0069] Specifically, the alarm logs in the clusters are all generated by the same alarm rule. Therefore, the number of alarm fields generated by the alarm rule can be determined by calculating the number of alarm fields in each cluster. It is understandable that if the alarm field of a certain alarm parameter frequently appears in all alarm logs within a period of time, then the alarm parameter may be a critical high-risk alarm parameter. Furthermore, if a large number of alarm fields of high-risk alarm parameters appear in a certain alarm rule, it indicates that the alarm rule is a critical alarm rule, and the alarm log corresponding to the alarm rule should be processed first. It should be noted that in actual calculations, the alarm weight of a certain alarm rule needs to be determined by combining the field ratio of the alarm parameter and the number of alarm fields of the alarm parameter in the alarm rule for weighted determination.

[0070] For example, assume that there are alarm parameters A and B, whose field proportions are 0.2 and 0.8 respectively; in each alarm log of alarm rule X, the alarm field of alarm parameter A appears 5 times, and the alarm field of B appears 3 times; in each alarm log of alarm rule Y, the alarm field of alarm parameter A appears 8 times, and the alarm field of B appears 2 times, then the alarm weight of alarm rule X is 5*0.2+3*0.8=3.4, and the alarm weight of alarm rule Y is: 8*0.2+2*0.8=3.2, that is, the alarm log corresponding to alarm rule X has a higher urgency.

[0071] Step 250: Determine the alarm priority of each alarm rule according to the rule identifier, alarm level score and alarm weight of the alarm log.

[0072] Specifically, by calculating the sum of the alarm level points and alarm weights corresponding to the alarm rules, the evaluation points of the alarm rules can be determined. By sorting the evaluation points of each alarm rule, the priority of each alarm rule can be determined. For example, the higher the evaluation score of the alarm rule, the higher the alarm priority.

[0073] In this way, the alarm level and the alarm weight of the alarm rule can be combined to obtain an evaluation score representing the urgency of the alarm rule. The higher the evaluation score, the more urgent the alarm log under the alarm rule is, and the higher the evaluation score, the more urgent the alarm log should be.

[0074] Step 260: According to the alarm priority, determine the alarm rule whose alarm priority meets the preset priority condition as the target alarm rule.

[0075] Specifically, if the alarm priority of the alarm rule meets the preset priority condition, it means that the urgency of the alarm rule is high, and the alarm log corresponding to the alarm rule should be processed first, otherwise, it does not need to be processed or can be processed later. The preset priority condition can be to determine the alarm rule with the highest alarm priority as the target alarm rule, or to determine the alarm rules corresponding to the top 3 alarm priorities as the target alarm rules.

[0076] Step 270: Process the alarm log corresponding to the target alarm rule.

[0077] The embodiment of the present invention provides a method for log processing. The method can determine the alarm priority of each alarm rule by determining the alarm level and alarm weight corresponding to the alarm rule, and then the alarm rule whose alarm priority meets the preset priority condition can be used as the target alarm rule, and the alarm log corresponding to the target alarm rule can be processed preferentially. Through this method, the alarm rules with high urgency can be accurately determined, and the urgent alarm logs that need to be processed preferentially can be processed, thereby improving the security of the system. At the same time, through this method, the problem of serious resource consumption caused by processing all alarm logs can be avoided, and the resources required for processing alarm logs can be saved.

[0078] Embodiment 3

[0079] Figure 3 This is a schematic diagram of the structure of a log processing device provided by Embodiment 3 of the present invention. Figure 3 As shown, the device comprises:

[0080] The acquisition module 310 is used to acquire the alarm log generated by triggering the alarm rule, wherein the alarm log includes the rule identifier of the corresponding alarm rule, the log alarm level and the alarm parameters;

[0081] The alarm level determination module 320 is used to determine the alarm level corresponding to each alarm rule according to the log alarm level and rule identifier of the alarm log;

[0082] The alarm weight determination module 330 is used to determine the alarm weight corresponding to each alarm rule according to the rule identifier and alarm parameters of the alarm log;

[0083] The processing module 340 is used to determine the target alarm rule according to the rule identifier, alarm level score and alarm weight of the alarm log, and process the alarm log corresponding to the target alarm rule.

[0084] The device of the embodiment of the present invention can determine the target alarm rule by determining the alarm level and the alarm weight corresponding to the alarm rule. The alarm log corresponding to the target alarm rule is an alarm log with a higher urgency, and the alarm log corresponding to the target alarm rule can be processed preferentially. Through this method, the alarm log with a higher urgency can be accurately determined, and the security of the system can be improved. At the same time, through this method, the problem of serious resource consumption caused by processing all alarm logs can be avoided, and the resources required for processing alarm logs can be saved.

[0085] Optionally, the alarm level determination module 320 includes:

[0086] A cluster generation unit, configured to cluster the alarm logs based on the rule identifiers to generate clusters, wherein the alarm logs in different clusters correspond to different alarm rules;

[0087] A grade calculation unit, for determining the grade of each alarm log in any cluster according to the log alarm grade of each alarm log in the cluster in combination with a preset grade score table;

[0088] The alarm level determination unit is used to determine the alarm level of the alarm rule represented by the cluster according to the level of each alarm log in the cluster.

[0089] Optionally, the alarm parameter includes an alarm field; the alarm weight determination module 330 includes:

[0090] A field ratio determination unit, used to determine the field ratio of each alarm field according to the number of each alarm field in the alarm log;

[0091] The alarm weight determination unit is used to determine, for an alarm log of any cluster, an alarm weight corresponding to an alarm rule represented by the cluster according to a field ratio of an alarm field in the alarm log.

[0092] Optionally, the alarm parameter also includes an alarm field value, and the alarm field and the alarm field value are saved in the form of a key-value pair, wherein the alarm field is the key and the alarm field value is the value.

[0093] Optionally, the alarm weight determination unit includes:

[0094] The alarm field quantity determination subunit is used to determine the quantity of each alarm field in the cluster based on the alarm log in the cluster;

[0095] The alarm weight determination subunit is used to determine the alarm weight corresponding to the alarm rule represented by the cluster according to the number of each alarm field in the cluster and the field ratio of the alarm field.

[0096] Optionally, the processing module 340 includes:

[0097] A priority determination unit, used to determine the alarm priority of each alarm rule according to the rule identifier, alarm level score and alarm weight of the alarm log;

[0098] The processing unit is used to determine, according to the alarm priority, an alarm rule whose alarm priority satisfies a preset priority condition as a target alarm rule.

[0099] Optionally, the embodiment of the present invention further includes: a normalization module.

[0100] The normalization module includes:

[0101] A value range determination unit, used to determine the value range of the alarm level and the alarm weight;

[0102] A normalization unit, used to normalize the alarm level score and the alarm weight according to the numerical range of the alarm level score and the alarm weight, and determine the normalized alarm level score and the alarm weight;

[0103] The processing unit is used to determine the target alarm rule according to the rule identifier of the alarm log, the normalized alarm level score and the alarm weight.

[0104] The log processing device provided in the embodiment of the present invention can execute the log processing method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0105] Embodiment 4

[0106] Figure 4 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0107] like Figure 4As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0108] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0109] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a log processing method.

[0110] In some embodiments, the method of log processing may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the method of log processing described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the method of log processing in any other appropriate manner (e.g., by means of firmware).

[0111] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0112] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0113] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0114] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0115] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0116] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0117] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0118] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A log processing method, characterized in that: include: Acquire an alarm log generated by triggering an alarm rule, wherein the alarm log includes a rule identifier of the corresponding alarm rule, a log alarm level, and alarm parameters; Determine the alarm level corresponding to each alarm rule according to the alarm level and rule identifier of the alarm log; Determine the alarm weight corresponding to each alarm rule according to the rule identifier and alarm parameters of the alarm log; According to the rule identifier, alarm level score and alarm weight of the alarm log, a target alarm rule is determined, and the alarm log corresponding to the target alarm rule is processed.

2. The method according to claim 1, characterized in that The step of determining the alarm level corresponding to each alarm rule according to the alarm level and rule identifier of the alarm log includes: Clustering the alarm logs based on the rule identifiers to generate clusters, wherein the alarm logs in different clusters correspond to different alarm rules; For any cluster, according to the log alarm level of each alarm log in the cluster, combined with a preset level score table, determine the level score of each alarm log in the cluster; According to the grade of each alarm log in the cluster, the alarm grade of the alarm rule represented by the cluster is determined.

3. The method according to claim 2, characterized in that The alarm parameter includes an alarm field; The determining the alarm weight corresponding to each alarm rule according to the rule identifier and the alarm parameter of the alarm log includes: Determine the field ratio of each alarm field according to the number of each alarm field in the alarm log; For the alarm log of any cluster, the alarm weight corresponding to the alarm rule represented by the cluster is determined according to the field ratio of the alarm field in the alarm log.

4. The method according to claim 3, characterized in that The alarm parameter also includes an alarm field value, and the alarm field and the alarm field value are stored in a key-value pair format, wherein the alarm field is a key and the alarm field value is a value.

5. The method according to claim 3, characterized in that: The step of determining, for the alarm log of any cluster, the alarm weight corresponding to the alarm rule represented by the cluster according to the field ratio of the alarm field in the alarm log includes: Based on the alarm logs in the cluster, determine the number of each alarm field in the cluster; According to the number of each alarm field in the cluster and the field ratio of the alarm field, the alarm weight corresponding to the alarm rule represented by the cluster is determined.

6. The method according to claim 1, characterized in that The step of determining a target alarm rule according to the rule identifier, alarm level score and alarm weight of the alarm log includes: Determine the alarm priority of each alarm rule according to the rule identifier, alarm level score and alarm weight of the alarm log; According to the alarm priority, an alarm rule whose alarm priority meets a preset priority condition is determined as a target alarm rule.

7. The method according to any one of claims 1 to 6, characterized in that Before determining the target alarm rule according to the rule identifier, alarm level score and alarm weight of the alarm log, the method further includes: Determine the numerical range of alarm level points and alarm weights; Normalizing the alarm level score and the alarm weight according to the numerical range of the alarm level score and the alarm weight, and determining the normalized alarm level score and the alarm weight; According to the rule identifier, alarm level and alarm weight of the alarm log, the target alarm rule is determined, including: The target alarm rule is determined according to the rule identifier of the alarm log, the normalized alarm level score and the alarm weight.

8. A log processing device, characterized in that: include: An acquisition module is used to acquire an alarm log generated by triggering an alarm rule, wherein the alarm log includes a rule identifier of the corresponding alarm rule, a log alarm level, and alarm parameters; An alarm level determination module is used to determine the alarm level corresponding to each alarm rule according to the log alarm level and rule identifier of the alarm log; An alarm weight determination module is used to determine the alarm weight corresponding to each alarm rule according to the rule identifier and alarm parameters of the alarm log; The processing module is used to determine the target alarm rule according to the rule identifier, alarm level score and alarm weight of the alarm log, and process the alarm log corresponding to the target alarm rule.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the log processing method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the log processing method according to any one of claims 1 to 7 when executed.