Alarm processing method and device and related equipment
By calculating the hash value of the alarm and using sequence identifiers and mutex locks to process alarm data, the problem of data inconsistency in multi-thread processing is solved, the accuracy and ease of alarm processing are achieved, and the system performance is improved.
Patent Information
- Application Number
- CN202411192930.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-28
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2044-08-28
AI Technical Summary
In complex network management systems, when multi-threads or multiple copies process alarm information, data inconsistency occurs due to thread preemption, making it impossible to accurately determine whether alarms are repeated, affecting the ease of user information filtering.
By calculating the hash value of the alarm, it determines whether there is a matching entry in the hash table, and uses sequence identification and mutex locks to process the alarm data to ensure the consistency and accuracy of the data and avoid missed judgments caused by multi-thread preemption. Or miscarriage of justice.
It effectively avoids data inconsistency problems caused by multi-thread preemption, ensures the accuracy of alarm processing and the ease of use of user information, and improves the performance and reliability of the system.
Smart Images

Figure CN118869439A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of alarm technology, and in particular to an alarm processing method, device and related equipment. Background Art
[0002] As the scale of business grows and networking becomes increasingly complex, a large amount of alarm information may be generated in the system, and higher and higher requirements are placed on the performance of the network management system in processing alarms. At present, multi-threading and multi-copy parallel processing is generally used to improve performance. However, since alarm data is not simply listed, it also needs to be processed logically such as duplicate judgment. It is stateful data. Simply using multi-threading or multi-copy accumulation will cause data inconsistency problems. That is, due to thread preemption, it may not be possible to accurately determine whether the alarm is repeated. Once an error occurs, it will confuse users in filtering information and reduce user usability. Summary of the invention
[0003] The present application provides an alarm processing method, apparatus and related equipment.
[0004] In a first aspect, the present application provides an alarm processing method, the method comprising:
[0005] Calculate the target hash value of the received target alarm;
[0006] Determine whether there is a target table entry matching the target hash value in the hash table, wherein an entry includes a hash value and an alarm sequence identifier corresponding to the alarm;
[0007] If it is determined that there is a target table entry matching the target hash value in the hash table, determining whether the target alarm sequence identifier corresponding to the target table entry is a first mark;
[0008] If it is determined that the target alarm sequence identifier is not the first mark, the target alarm is processed, and the correspondence between the processed alarm data and the target alarm sequence identifier is stored in an alarm database, wherein the alarm database maintains a mapping relationship between each alarm sequence identifier and the corresponding alarm data.
[0009] Optionally, a corresponding mutex lock is set for each hash value; the method further includes:
[0010] If it is determined that there is no target table entry matching the target hash value in the hash table, setting the target alarm sequence identifier corresponding to the target hash value to a first mark, and storing the target hash value and the first mark in the hash table;
[0011] Obtaining a mutex corresponding to the target hash value, processing the target alarm, and obtaining processed target alarm data;
[0012] Generate a second mark corresponding to the target alarm based on a preset algorithm, and modify the value of the target alarm sequence identifier in the target table entry from the first mark to the second mark;
[0013] The corresponding relationship between the target alarm data and the target alarm sequence identifier is stored in an alarm database.
[0014] Optionally, the method further comprises:
[0015] If it is determined that the target alarm sequence identifier is the first mark, periodically performing an operation of determining whether the target alarm sequence indicates the first mark;
[0016] When it is determined that the target alarm sequence identifier is not the first mark, the mutex corresponding to the target hash value is acquired, the target alarm is processed, and the corresponding relationship between the alarm data of the target alarm and the target alarm sequence identifier is stored in the alarm database.
[0017] Optionally, the step of calculating a target hash value of the received target alarm includes:
[0018] Based on the alarm key information of the target alarm, a target hash value of the target alarm is calculated.
[0019] In a second aspect, the present application provides an alarm processing device, the device comprising:
[0020] A calculation unit, used to calculate a target hash value of a received target alarm;
[0021] A determination unit, configured to determine whether there is a target table entry in the hash table that matches the target hash value, wherein one table entry includes a hash value of a corresponding alarm and an alarm sequence identifier;
[0022] If the judging unit determines that there is a target table entry matching the target hash value in the hash table, the judging unit is further configured to judge whether the target alarm sequence identifier corresponding to the target table entry is a first mark;
[0023] A processing unit, if the judgment unit determines that the target alarm sequence identifier is not the first mark, the processing unit is used to process the target alarm and store the corresponding relationship between the processed alarm data and the target alarm sequence identifier in an alarm database, wherein the alarm database maintains a mapping relationship between each alarm sequence identifier and the corresponding alarm data.
[0024] Optionally, a corresponding mutex lock is set for each hash value; the device further includes a setting unit, an updating unit and a storage unit:
[0025] If the judging unit determines that there is no target table entry matching the target hash value in the hash table, the setting unit is used to set the target alarm sequence identifier corresponding to the target hash value to a first mark, and store the target hash value and the first mark in the hash table;
[0026] The processing unit is used to obtain the mutex corresponding to the target hash value, process the target alarm, and obtain processed target alarm data;
[0027] The updating unit is used to generate a second mark corresponding to the target alarm based on a preset algorithm, and modify the value of the target alarm sequence identifier in the target table entry from the first mark to the second mark;
[0028] The storage unit is used to store the corresponding relationship between the target alarm data and the target alarm sequence identifier in an alarm database.
[0029] Optionally, if the judging unit determines that the target alarm sequence identifier is a first mark, the judging unit is further configured to periodically perform an operation of judging whether the target alarm sequence indicates a first mark;
[0030] When the judgment unit determines that the target alarm sequence identifier is not the first mark, the processing unit is used to obtain the mutex lock corresponding to the target hash value and process the target alarm, and the storage unit is used to store the correspondence between the alarm data of the target alarm and the target alarm sequence identifier in the alarm database.
[0031] Optionally, when calculating the target hash value of the received target alarm, the calculation unit is specifically used to:
[0032] Based on the alarm key information of the target alarm, a target hash value of the target alarm is calculated.
[0033] In a third aspect, an embodiment of the present application provides an alarm processing device, the alarm processing device comprising:
[0034] A memory for storing program instructions;
[0035] The processor is used to call the program instructions stored in the memory, and execute the steps of the method as described in any one of the first aspects above according to the obtained program instructions.
[0036] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable the computer to execute the steps of the method described in any one of the first aspects above.
[0037] In summary, the alarm processing method provided in the embodiment of the present application calculates the target hash value of the received target alarm; determines whether there is a target table entry in the hash table that matches the target hash value, wherein an entry includes the hash value and alarm sequence identifier of the corresponding alarm; if it is determined that there is a target table entry in the hash table that matches the target hash value, determines whether the target alarm sequence identifier corresponding to the target table entry is the first mark; if it is determined that the target alarm sequence identifier is not the first mark, processes the target alarm, and stores the corresponding relationship between the processed alarm data and the target alarm sequence identifier in an alarm database, wherein the alarm database maintains a mapping relationship between each alarm sequence identifier and the corresponding alarm data.
[0038] By adopting the alarm processing method provided in the embodiment of the present application, mutual exclusion locks are set for different types of alarms, and alarm processing can be performed in multiple threads or multiple copies. At the same time, sequential processing rules are set for the same type of alarms to avoid missed judgments or wrong judgments caused by multi-thread preemption, which may lead to errors or inconsistencies in the actual alarm data of the alarm target. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments of the present application or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings of the embodiments of the present application.
[0040] Figure 1 A schematic diagram of the logic of thread preemption mutex lock processing in the prior art;
[0041] Figure 2 A detailed flow chart of an alarm processing method provided in an embodiment of the present application;
[0042] Figure 3 A schematic diagram of the structure of an alarm processing device provided in an embodiment of the present application;
[0043] Figure 4 A schematic diagram of the hardware architecture of an alarm processing device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0044] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, rather than limiting the present application. The singular forms of "a", "said" and "the" used in the present application and claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to any or all possible combinations of one or more associated listed items.
[0045] It should be understood that, although the terms first, second, third, etc. may be used to describe various information in the embodiments of the present application, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, in addition, the word "if" used may be interpreted as "at..." or "when..." or "in response to determination".
[0046] Currently, to maintain consistency in distributed scenarios, mutual exclusion locks or distributed locks are used. For example, see Figure 1 The figure shows a logical diagram of thread preemption mutex lock processing in the prior art. A thread or replica that processes an alarm first acquires a mutex lock or a distributed lock when determining duplication. Only one thread or replica can operate the storage at the same time, thereby solving the problem of data inconsistency caused by thread preemption.
[0047] However, if multiple threads or replicas seize a mutex or distributed lock, it will cause a performance bottleneck. A large number of threads or replicas will be blocked in the step of waiting for the lock, resulting in performance degradation and failure to truly take advantage of the parallelism of multiple threads and multiple replicas.
[0048] The present application proposes a method of using serial number marking in combination with a database, which can ensure the consistency of repeated judgments of stateful alarm data in distributed scenarios and reduce blocking.
[0049] For example, see Figure 2 FIG. 1 is a detailed flow chart of an alarm processing method provided in an embodiment of the present application, and the method includes the following steps:
[0050] Step 200: Calculate the target hash value of the received target alarm;
[0051] In the embodiment of the present application, when calculating the target hash value of the received target alarm, a preferred implementation method is:
[0052] Based on the alarm key information of the above target alarm, calculate the target hash value of the above target alarm.
[0053] In practical applications, the alarm key information of the alarm is used as the basis for repeated alarm judgment, that is, the hash value calculated by the same alarm key information is the same. For example, the device identifier can be defined as the alarm key information, that is, the alarm generated by a device is defined as a repeated alarm of the device. Of course, in the specific implementation, the alarm key information can also be customized based on user needs, which is not specifically limited in the embodiments of the present application.
[0054] Specifically, when an alarm is received, the alarm key information of the alarm is obtained, and then based on the hash algorithm, the hash value of the alarm is calculated.
[0055] Step 210: Determine whether there is a target entry in the hash table that matches the target hash value.
[0056] Specifically, a table entry includes a hash value of the corresponding alarm and an alarm sequence identifier;
[0057] In actual applications, the alarm processing device locally maintains a hash table, in which entries of each received alarm and its corresponding alarm sequence identifier are maintained.
[0058] Then, after receiving the target alarm, it can be determined whether other alarms that are duplicate to the target alarm have been received by determining whether there is a target table entry in the hash table that matches the hash value of the target alarm.
[0059] For example, taking the hash value as the Key and the alarm sequence identifier as the Value as an example, it is determined whether there is a target table entry in the hash table whose Key value is the hash value of the target alarm.
[0060] Step 220: If it is determined that there is a target table entry matching the target hash value in the hash table, it is determined whether the target alarm sequence identifier corresponding to the target table entry is the first mark.
[0061] In the embodiment of the present application, a corresponding mutex is set for each hash value, so the above alarm processing method may further include the following steps:
[0062] If it is determined that there is no target table entry matching the target hash value in the hash table, the target alarm sequence identifier corresponding to the target hash value is set to a first mark, and the target hash value and the first mark are stored in the hash table.
[0063] For example, the Key value of the target alarm is Key1, and the initial value of the target alarm series mark is 0.
[0064] Next, obtain the mutex lock corresponding to the above-mentioned target hash value, process the above-mentioned target alarm, and obtain the processed target alarm data; generate the second mark corresponding to the above-mentioned target alarm based on the preset algorithm, and modify the value of the above-mentioned target alarm sequence identifier in the above-mentioned target table item from the first mark to the second mark; store the correspondence between the above-mentioned target alarm data and the above-mentioned target alarm sequence identifier in the alarm database.
[0065] That is to say, the target alarm is the first alarm of this type of alarm. At this time, the target hash value of the target alarm and the initial value of the target alarm sequence identifier (first mark, such as the initial value is 0) are directly maintained in the hash table. Then, the alarm processing process obtains the mutex corresponding to the target hash value, processes the target alarm, and obtains the processed target alarm data. At the same time, based on a preset algorithm (such as a snowflake algorithm, etc.), a second mark is generated for uniquely identifying the target alarm. That is, the initial value (first mark) of the alarm sequence identifier of each alarm is the same, but the second marks of the alarm sequence identifiers of different types of alarms (non-repeated alarms) are different.
[0066] After the second tag of the target alarm is generated, the value of the target alarm sequence identifier included in the target table entry in the hash table is modified from the first tag to the second tag, and the second tag is used to uniquely identify this type of alarm (target alarm). Finally, the mapping relationship between the target alarm data obtained by the parsing process and the second tag is stored in the alarm database, and the user can search for the alarm data corresponding to the second tag from the alarm database based on a second tag.
[0067] Step 230: If it is determined that the target alarm sequence identifier is not the first mark, the target alarm is processed, and the corresponding relationship between the processed alarm data and the target alarm sequence identifier is stored in the alarm database.
[0068] The alarm database maintains a mapping relationship between each alarm sequence identifier and the corresponding alarm data.
[0069] In an embodiment of the present application, if it is determined that the target alarm sequence identifier is not the first mark but the second mark, it means that the target alarm sequence is a repeated alarm, and an alarm of the same type as the target alarm has been processed before, that is, a second mark has been assigned to this type of alarm. At this time, the value of the target alarm sequence identifier in the hash table can be used as the second mark of the target alarm, and the mutex lock corresponding to the target hash value can be obtained. The target alarm is processed to obtain the processed target alarm data, and the mapping relationship between the target alarm data and the second mark of the target alarm is stored in the alarm database. In the alarm database, the data of each alarm can be updated / aggregated based on the second mark of the target alarm.
[0070] That is, the alarm data associated with the second mark of the target alarm stored in the alarm database is aggregated with the target alarm data.
[0071] Further, if it is determined that the target alarm sequence identifier is the first mark, an operation of determining whether the target alarm sequence indicates the first mark is periodically performed;
[0072] When it is determined that the target alarm sequence identifier is not the first mark, the mutex corresponding to the target hash value is acquired, the target alarm is processed, and the corresponding relationship between the alarm data of the target alarm and the target alarm sequence identifier is stored in the alarm database.
[0073] If the target alarm sequence identifier is determined to be the first mark, it means that the first alarm of this type has not been processed. At this time, the mutex lock corresponding to the target hash value cannot be obtained, and it is periodically determined whether the target alarm sequence identifier is updated to the second mark. Only after it is determined that the target alarm sequence identifier is updated to the second mark and there is no alarm sequence identifier corresponding to the target hash value as the first mark, the mutex lock corresponding to the target hash value is obtained, and the target alarm is subsequently processed.
[0074] Based on the same inventive concept as the above-mentioned embodiment of the invention, for example, refer to Figure 3 FIG. 1 is a schematic diagram of a structure of an alarm processing device provided in an embodiment of the present application, the device comprising:
[0075] A calculation unit 30, configured to calculate a target hash value of a received target alarm;
[0076] A judging unit 31 is used to judge whether there is a target table entry matching the target hash value in the hash table, wherein one table entry includes a hash value and an alarm sequence identifier corresponding to the alarm;
[0077] If the judging unit 31 determines that there is a target entry in the hash table that matches the target hash value, the judging unit 31 is further configured to judge whether the target alarm sequence identifier corresponding to the target entry is a first mark;
[0078] Processing unit 32, if the judgment unit 31 determines that the target alarm sequence identifier is not the first mark, then the processing unit 32 is used to process the target alarm and store the corresponding relationship between the processed alarm data and the target alarm sequence identifier in the alarm database, wherein the alarm database maintains a mapping relationship between each alarm sequence identifier and the corresponding alarm data.
[0079] Optionally, a corresponding mutex lock is set for each hash value; the device further includes a setting unit, an updating unit and a storage unit:
[0080] If the judging unit 31 determines that there is no target table entry matching the target hash value in the hash table, the setting unit is used to set the target alarm sequence identifier corresponding to the target hash value to a first mark, and store the target hash value and the first mark in the hash table;
[0081] The processing unit 32 is used to obtain the mutex corresponding to the target hash value, process the target alarm, and obtain processed target alarm data;
[0082] The updating unit is used to generate a second mark corresponding to the target alarm based on a preset algorithm, and modify the value of the target alarm sequence identifier in the target table entry from the first mark to the second mark;
[0083] The storage unit is used to store the corresponding relationship between the target alarm data and the target alarm sequence identifier in an alarm database.
[0084] Optionally, if the judging unit 31 determines that the target alarm sequence identifier is a first mark, the judging unit 31 is further configured to periodically perform an operation of judging whether the target alarm sequence indicates a first mark;
[0085] When the judgment unit 31 determines that the target alarm sequence identifier is not the first mark, the processing unit 32 is used to obtain the mutex lock corresponding to the target hash value and process the target alarm. The storage unit is used to store the correspondence between the alarm data of the target alarm and the target alarm sequence identifier in the alarm database.
[0086] Optionally, when calculating the target hash value of the received target alarm, the calculation unit 30 is specifically used to:
[0087] Based on the alarm key information of the target alarm, a target hash value of the target alarm is calculated.
[0088] The above units may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASIC), or one or more digital singnal processors (DSP), or one or more field programmable gate arrays (FPGA). For another example, when a certain unit above is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processors that can call program codes. For another example, these units may be integrated together and implemented in the form of a system-on-a-chip (SOC).
[0089] Furthermore, the alarm processing device provided in the embodiment of the present application, from the hardware level, the hardware architecture diagram of the alarm processing device can be seen in Figure 4 As shown, the alarm processing device may include: a memory 40 and a processor 41,
[0090] The memory 40 is used to store program instructions; the processor 41 calls the program instructions stored in the memory 40 and executes the above method embodiment according to the obtained program instructions. The specific implementation method and technical effect are similar and will not be repeated here.
[0091] Optionally, the present application also provides an alarm processing device, comprising at least one processing element (or chip) for executing the above method embodiment.
[0092] Optionally, the present application also provides a program product, such as a computer-readable storage medium, which stores computer-executable instructions, and the computer-executable instructions are used to enable the computer to execute the above method embodiments.
[0093] Here, the machine-readable storage medium may be any electronic, magnetic, optical or other physical storage device that may contain or store information, such as executable instructions, data, etc. For example, the machine-readable storage medium may be: RAM (RadomAccess Memory), volatile memory, non-volatile memory, flash memory, storage drive (such as hard disk drive), solid state drive, any type of storage disk (such as CD, DVD, etc.), or similar storage medium, or a combination thereof.
[0094] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver, a game console, a tablet computer, a wearable device or a combination of any of these devices.
[0095] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0096] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the embodiments of the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0097] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0098] Moreover, these computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0099] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0100] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. An alarm processing method, characterized in that: The method comprises: Calculate the target hash value of the received target alarm; Determine whether there is a target table entry matching the target hash value in the hash table, wherein an entry includes a hash value and an alarm sequence identifier corresponding to the alarm; If it is determined that there is a target table entry matching the target hash value in the hash table, determining whether the target alarm sequence identifier corresponding to the target table entry is a first mark; If it is determined that the target alarm sequence identifier is not the first mark, the target alarm is processed, and the correspondence between the processed alarm data and the target alarm sequence identifier is stored in an alarm database, wherein the alarm database maintains a mapping relationship between each alarm sequence identifier and the corresponding alarm data.
2. The method according to claim 1, characterized in that A corresponding mutex lock is set for each hash value; the method further includes: If it is determined that there is no target table entry matching the target hash value in the hash table, setting the target alarm sequence identifier corresponding to the target hash value to a first mark, and storing the target hash value and the first mark in the hash table; Obtaining a mutex corresponding to the target hash value, processing the target alarm, and obtaining processed target alarm data; Generate a second mark corresponding to the target alarm based on a preset algorithm, and modify the value of the target alarm sequence identifier in the target table entry from the first mark to the second mark; The corresponding relationship between the target alarm data and the target alarm sequence identifier is stored in an alarm database.
3. The method according to claim 1 or 2, characterized in that The method further comprises: If it is determined that the target alarm sequence identifier is the first mark, periodically performing an operation of determining whether the target alarm sequence indicates the first mark; When it is determined that the target alarm sequence identifier is not the first mark, the mutex corresponding to the target hash value is acquired, the target alarm is processed, and the corresponding relationship between the alarm data of the target alarm and the target alarm sequence identifier is stored in the alarm database.
4. The method according to claim 1, characterized in that The steps of calculating the target hash value of the received target alarm include: Based on the alarm key information of the target alarm, a target hash value of the target alarm is calculated.
5. An alarm processing device, characterized in that: The device comprises: A calculation unit, used to calculate a target hash value of a received target alarm; A determination unit, configured to determine whether there is a target table entry in the hash table that matches the target hash value, wherein one table entry includes a hash value of a corresponding alarm and an alarm sequence identifier; If the judging unit determines that there is a target table entry matching the target hash value in the hash table, the judging unit is further configured to judge whether the target alarm sequence identifier corresponding to the target table entry is a first mark; A processing unit, if the judgment unit determines that the target alarm sequence identifier is not the first mark, the processing unit is used to process the target alarm and store the corresponding relationship between the processed alarm data and the target alarm sequence identifier in an alarm database, wherein the alarm database maintains a mapping relationship between each alarm sequence identifier and the corresponding alarm data.
6. The device according to claim 5, characterized in that A corresponding mutex lock is set for each hash value; the device also includes a setting unit, an updating unit and a storage unit: If the judging unit determines that there is no target table entry matching the target hash value in the hash table, the setting unit is used to set the target alarm sequence identifier corresponding to the target hash value to a first mark, and store the target hash value and the first mark in the hash table; The processing unit is used to obtain the mutex corresponding to the target hash value, process the target alarm, and obtain processed target alarm data; The updating unit is used to generate a second mark corresponding to the target alarm based on a preset algorithm, and modify the value of the target alarm sequence identifier in the target table entry from the first mark to the second mark; The storage unit is used to store the corresponding relationship between the target alarm data and the target alarm sequence identifier in an alarm database.
7. The device according to claim 5 or 6, characterized in that The device also includes: If the determination unit determines that the target alarm sequence identifier is a first mark, the determination unit is further configured to periodically perform an operation of determining whether the target alarm sequence indicates a first mark; When the judgment unit determines that the target alarm sequence identifier is not the first mark, the processing unit is used to obtain the mutex lock corresponding to the target hash value and process the target alarm, and the storage unit is used to store the correspondence between the alarm data of the target alarm and the target alarm sequence identifier in the alarm database.
8. The device according to claim 5, characterized in that When calculating the target hash value of the received target alarm, the calculation unit is specifically used to: Based on the alarm key information of the target alarm, a target hash value of the target alarm is calculated.
9. An alarm processing device, characterized in that: The alarm processing device comprises: A memory for storing program instructions; A processor is used to call the program instructions stored in the memory, and execute the steps of the method according to any one of claims 1 to 4 according to the obtained program instructions.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable the computer to execute the steps of the method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Method for handling database storage of alarm information of network management system
CN103595569A
DDoS attack determination method and device
CN109889550A
Log processing method, device and apparatus, storage medium and log alarm system
CN111078513A
Prometheus-based alarm method, device and system
CN115733732A
Alarm processing method and device, electronic equipment and storage medium
CN118069673A
