Alarm analysis report generation method and device, equipment and readable storage medium

Through the stream processing framework and multithreaded multiplexer technology, the efficiency of frequent item set mining and alarm data analysis is improved, and the problem of low efficiency of frequent item set mining in traditional technology is solved, and efficient alarm data processing and analysis is realized. .

CN119210984APending Publication Date: 2024-12-27E SURFING VISION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410871507.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-28
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

In traditional technology, frequent item set mining algorithms are inefficient, resulting in low efficiency in alarm data processing and inability to effectively analyze and process large amounts of alarm data.

Method used

Adopt the distributed computing power of the stream processing framework, use the frequent item set mining algorithm to mine frequent item sets from the alarm data stream, and generate alarm analysis reports. Use multithreaded multiplexer to read data asynchronously to improve data reception efficiency. And generate association rules through bit operations and support degree calculation.

Benefits of technology

The efficiency of frequent item set mining and alarm data analysis and processing efficiency are improved, and the speed of candidate set generation and calculation efficiency of intersection between item sets is accelerated, real-time data reception and efficient analysis are realized.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119210984A_ABST
    Figure CN119210984A_ABST
Patent Text Reader

Abstract

The invention relates to an alarm analysis report generation method and device, equipment and a readable storage medium. The method comprises the following steps: acquiring alarm data generated when equipment gives an alarm, and converting the alarm data into a plurality of groups of data streams; mining a frequent item set from the data stream by utilizing a distributed computing capability of a stream processing framework and utilizing a frequent item set mining algorithm; and generating an alarm analysis report based on the frequent item set. By adopting the method, the efficiency of analyzing and processing the alarm can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of equipment operation and maintenance, and in particular to an alarm analysis report generation method, device, equipment and readable storage medium. Background Art

[0002] With the development of the Internet of Things and big data technology, various devices and systems generate a large amount of alarm data. For these alarm data, it is necessary to mine frequent item sets and analyze the frequent item sets to process the alarms.

[0003] In traditional technologies, the efficiency of mining frequent itemsets through frequent itemset mining algorithms is low. For example, the mining algorithm based on generate-test is very slow in generating candidate itemsets, resulting in low efficiency in mining frequent itemsets; another example is the algorithm based on vertical grid. When faced with a large amount of data, the computational efficiency of finding the intersection between itemsets is very low, resulting in low efficiency in mining frequent itemsets. Low efficiency in mining frequent itemsets will lead to low efficiency in analyzing and processing alarms.

[0004] Therefore, in practical applications, an efficient method for analyzing and processing alarms is urgently needed. Summary of the invention

[0005] Based on this, it is necessary to provide an alarm analysis report generation method, device, equipment and readable storage medium that can improve the efficiency of analyzing and processing alarms in response to the above technical problems.

[0006] In a first aspect, the present application provides a method for generating an alarm analysis report, comprising:

[0007] Obtain the alarm data generated when the device alarms, and convert it into multiple groups of data streams;

[0008] Using the distributed computing capability of the stream processing framework and the frequent item set mining algorithm, frequent item sets are mined from the data stream;

[0009] Generate an alarm analysis report based on the frequent itemsets.

[0010] In one embodiment, the obtaining of alarm data generated when a device alarm occurs includes:

[0011] Generate a first thread multiplexer and a second thread multiplexer; the first thread multiplexer is used to process connection events, and the second thread multiplexer is used to process read events;

[0012] The alarm data generated when the device alarm is asynchronously read from the data source based on the first thread multiplexer and the second thread multiplexer.

[0013] In one embodiment, the alarm data generated when the device alarm is asynchronously read from the data source based on the first thread multiplexer and the second thread multiplexer includes:

[0014] Registering a connection event with the first thread multiplexer; the connection event is used to monitor a connection request from a data source for sending data;

[0015] Polling a data stream event based on the first thread multiplexer, if a ready connection event is polled and the first thread multiplexer successfully establishes a connection with a data source corresponding to the connection event, registering a read event to the data stream event based on the first thread multiplexer;

[0016] Polling data stream events based on the second thread multiplexer, if a ready read event is polled, distributing the read event to a corresponding event handler;

[0017] The alarm data generated when the device alarms are asynchronously read from the data source based on the event processor.

[0018] In one embodiment, the alarm data generated when the reading device alarms includes:

[0019] Create direct memory objects;

[0020] Based on the direct memory object, the alarm data generated when the device alarms is read into the direct memory.

[0021] In one embodiment, generating an alarm analysis report based on the frequent itemsets includes:

[0022] Determine the non-empty subset of each frequent itemset;

[0023] Generate initial association rules corresponding to each non-empty subset;

[0024] Calculate the confidence of each initial association rule;

[0025] The initial association rule whose confidence is greater than or equal to the minimum confidence is taken as the target association rule;

[0026] Generate an alarm analysis report based on the target association rule.

[0027] In one embodiment, the alarm data includes data of at least one alarm transaction; each alarm transaction includes at least one alarm event; and the frequent item set mining algorithm is used to mine frequent item sets from each group of the data streams, including:

[0028] For any data stream:

[0029] Generate a frequent 1-item set based on the data stream; an element in the frequent 1-item set is an alarm event;

[0030] Determine the bit string corresponding to the frequent 1-item set;

[0031] Performing bit operations on the bit string to obtain a candidate item set;

[0032] Determine the support of each candidate item set respectively, and take the candidate item sets with support greater than or equal to the minimum support as the frequent item set subset;

[0033] The frequent item sets corresponding to all data streams are merged to obtain the frequent item sets.

[0034] In a second aspect, the present application also provides an alarm analysis report generating device, comprising:

[0035] The acquisition module is used to acquire the alarm data generated when the device alarms and convert it into multiple groups of data streams;

[0036] A mining module, used to utilize the distributed computing capability of the stream processing framework and a frequent itemset mining algorithm to mine frequent itemsets from the data stream;

[0037] A generating module is used to generate an alarm analysis report based on the frequent item sets.

[0038] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0039] Obtain the alarm data generated when the device alarms, and convert it into multiple groups of data streams;

[0040] Using the distributed computing capability of the stream processing framework and the frequent item set mining algorithm, frequent item sets are mined from the data stream;

[0041] Generate an alarm analysis report based on the frequent itemsets.

[0042] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:

[0043] Obtain the alarm data generated when the device alarms, and convert it into multiple groups of data streams;

[0044] Using the distributed computing capability of the stream processing framework and the frequent item set mining algorithm, frequent item sets are mined from the data stream;

[0045] Generate an alarm analysis report based on the frequent itemsets.

[0046] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0047] Obtain the alarm data generated when the device alarms, and convert it into multiple groups of data streams;

[0048] Using the distributed computing capability of the stream processing framework and the frequent item set mining algorithm, frequent item sets are mined from the data stream;

[0049] Generate an alarm analysis report based on the frequent itemsets.

[0050] The above-mentioned alarm analysis report generation method, device, equipment and readable storage medium obtain the alarm data generated when the device alarms and convert it into multiple groups of data streams; utilize the distributed computing power of the stream processing framework and the frequent item set mining algorithm to mine frequent item sets from the data stream; generate an alarm analysis report based on the frequent item sets, thereby solving the problem of low efficiency in mining frequent item sets, such as speeding up the generation of candidate item sets through distributed computing power, and improving the computational efficiency of finding intersections between item sets through distributed computing power. Therefore, by utilizing the distributed computing power of the stream processing framework to mine frequent item sets, the efficiency of mining frequent item sets can be improved, thereby improving the efficiency of analyzing and processing alarms. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0052] Figure 1 An application environment diagram of an alarm analysis report generation method in one embodiment;

[0053] Figure 2 A flowchart of a method for generating an alarm analysis report in one embodiment;

[0054] Figure 3 It is a structural block diagram of an alarm analysis report generating device in one embodiment;

[0055] Figure 4 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0056] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0057] The alarm analysis report generation method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. Among them, the terminal 102 can be but is not limited to various personal computers, laptops, smart phones, tablets, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, projection devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The head-mounted device can be a virtual reality (VR) device, an augmented reality (AR) device, smart glasses, etc. The server 104 can be a distributed system composed of multiple physical servers.

[0058] In an exemplary embodiment, Figure 2 As shown, a method for generating an alarm analysis report is provided, and the method is applied to Figure 1 The server 104 in the example is described as a distributed system, and the steps include the following steps 202 to 206. Among them:

[0059] Step 202: Acquire alarm data generated when a device alarm occurs, and convert it into multiple groups of data streams.

[0060] The alarm data includes data of at least one alarm transaction, and each alarm transaction includes at least one alarm event.

[0061] Among them, an alarm transaction generally refers to a collection or unit consisting of a series of related alarm events in the alarm management system (running on the server 104). These alarm events may be triggered by different sources (devices), but they have some correlation in terms of time, type or impact, etc. For example, the alarm transaction is a network failure, system abnormality, etc.

[0062] Among them, alarm events are notifications triggered when abnormalities or potential problems are detected in various systems and applications. If the alarm event is a network failure, the alarm event may include but is not limited to link error alarms, received signal loss alarms, and routing error alarms; if the alarm event is a system abnormality, the alarm event may include but is not limited to hardware abnormality alarms, software abnormality alarms, and system resource alarms.

[0063] It is understandable that when an abnormality occurs in a device, in order to prompt the relevant personnel to handle the abnormality, the device will issue an alarm, and generate alarm data when it alarms, so that the relevant personnel or system can analyze the cause of the abnormality and determine the abnormality handling solution. Therefore, the purpose of obtaining the alarm data in the embodiment of the present application is to perform corresponding analysis so that the relevant personnel can handle the abnormality according to the analysis results.

[0064] It should be noted that the purpose of converting alarm data into multiple groups of data streams is to make the alarm data meet the use of the distributed system. Specifically, according to the current processing capacity of the distributed system, the alarm data is converted into a number of data streams corresponding to the processing capacity. For example, if there are 10 idle servers in the current distributed system, the alarm data can be divided into 10 groups of data streams at most.

[0065] In addition, conversion belongs to preprocessing operations, which can also include data cleaning, deduplication, etc. This preprocessing operation is targeted at alarm data, thereby ensuring the accuracy and consistency of the data.

[0066] Step 204 , using the distributed computing capability of the stream processing framework and the frequent itemset mining algorithm, frequent itemsets are mined from the data stream.

[0067] Among them, the stream processing framework is used to process the above data streams, and the distributed computing capabilities used are mainly the capabilities of task distribution, result recovery and result merging. For example, the alarm data includes the data of 10 alarm transactions, numbered 0 to 9, and the distributed system currently has 5 servers available, numbered 0 to 4. At this time, the data of alarm transactions numbered 0 and 5 can be assigned to the server numbered 0, and the data of alarm transactions numbered 1 and 6 can be assigned to the server numbered 1, and so on, so as to complete the task distribution. After the task distribution is completed, the task processing results returned by each server are recovered and the results are merged. Among them, the merged results are frequent item sets.

[0068] It should be noted that when processing tasks, each server assigned to a task uses a frequent itemset mining algorithm to mine frequent itemsets from the data stream.

[0069] Among them, frequent item set mining algorithms include but are not limited to Fmafibs algorithm and Apriori algorithm.

[0070] Among them, frequent itemsets, as the name implies, are sets of frequently occurring items.

[0071] Whether it appears frequently can be determined by a corresponding threshold, which can be set as needed. For example, for the data of 10 alarm transactions, if any item set appears 6 times in the data of the 10 alarm transactions, the item set is confirmed to be a frequent item set. If there are item set A and item set B, where item set A appears 3 times and item set B appears 7 times, then item set A is a non-frequent item set and item set B is a frequent item set.

[0072] In the embodiment of the present application, an item set refers to a set of alarm events.

[0073] Step 206: Generate an alarm analysis report based on the frequent itemsets.

[0074] Among them, the alarm analysis report is used for relevant personnel to dig out and discover the alarm cause of the alarm event. The reason why the alarm analysis report has this function is that it is obtained by determining the association between each alarm event from the frequent item set. According to this association, the relevant personnel can combine experience or relevant information to dig out and discover the alarm cause of the alarm event.

[0075] Therefore, the alarm analysis report generated based on the frequent item set is generated by utilizing the association between the alarm events in the frequent item set.

[0076] The above-mentioned alarm analysis report generation method, device, equipment and readable storage medium obtain the alarm data generated when the device alarms and convert it into multiple groups of data streams; utilize the distributed computing power of the stream processing framework and the frequent item set mining algorithm to mine frequent item sets from the data stream; generate alarm analysis reports based on frequent item sets, thereby solving the problem of low efficiency in mining frequent item sets, such as speeding up the generation of candidate item sets through distributed computing power, and improving the computational efficiency of finding intersections between item sets through distributed computing power. Therefore, by utilizing the distributed computing power of the stream processing framework to mine frequent item sets, the efficiency of mining frequent item sets can be improved, thereby improving the efficiency of analyzing and processing alarms.

[0077] Regarding the above steps of obtaining the alarm data generated when the device alarms, in actual applications, there is usually a problem that the alarm data cannot be received from the data source in real time, resulting in low efficiency in data reception.

[0078] In an exemplary embodiment, in order to solve the problem of low efficiency in data reception, when obtaining alarm data generated when a device alarm occurs, real-time data reception can be achieved through asynchronous reading, thereby solving the problem.

[0079] The asynchronous reading process is: generating a first thread multiplexer and a second thread multiplexer; the first thread multiplexer is used to process connection events, and the second thread multiplexer is used to process read events; based on the first thread multiplexer and the second thread multiplexer, the alarm data generated when the device alarm is asynchronously read from the data source.

[0080] Among them, the thread multiplexer is a non-blocking thread that can be used to receive all requests, which can be concurrent service requests. It can distribute the requests to corresponding working threads for processing according to the type of request, thereby realizing asynchronous reading of alarm data from multiple data sources.

[0081] It is understandable that the thread multiplexer can receive specific requests through corresponding settings. Among them, the first thread multiplexer for processing connection events receives connection requests, and the second thread multiplexer for processing read events receives read requests.

[0082] The data source may be the terminal mentioned above, or other servers that collect alarm data of the terminal.

[0083] Exemplarily, after the first thread multiplexer and the second thread multiplexer are generated, the first thread multiplexer and the second thread multiplexer cooperate to complete the task of asynchronously reading the alarm data generated when the device alarm is generated from the data source.

[0084] When the first thread multiplexer and the second thread multiplexer cooperate, it is first necessary to register a connection event with the first thread multiplexer; the connection event is used to monitor the connection request of the data source for sending data.

[0085] Among them, registration is equivalent to informing the first thread multiplexer that it needs to pay attention to the corresponding connection event.

[0086] Exemplarily, during registration, it is necessary to provide the first thread multiplexer with corresponding information of the corresponding connection event, such as port information for connecting to the data source.

[0087] Secondly, based on the first thread multiplexer polling data stream events, if a ready connection event is polled and the first thread multiplexer successfully establishes a connection with the data source corresponding to the connection event, the read event is registered to the data stream event based on the first thread multiplexer.

[0088] Polling is to query all data stream events in turn to determine whether there is a ready connection event.

[0089] Among them, ready events refer to various events generated in the process of network communication, file I / O, etc., such as data arrival, connection establishment, connection disconnection, etc. Ready connection events are connection establishment, that is, the data source initiates a connection request to the server.

[0090] Exemplarily, after polling a ready connection event from a data stream event, the first thread multiplexer starts to process the connection event, that is, establishes a connection with the data source corresponding to the connection event, and corresponding operations such as verification are required during the connection establishment process. After the connection is successfully established, the preparation stage for data reading is entered, that is, waiting for the corresponding worker thread to read the data. In the preparation stage, it is necessary to register the read event to the data stream event based on the first thread multiplexer. The registration process is similar to the registration process of the above-mentioned connection event, and will not be repeated here.

[0091] Afterwards, the data stream event is polled based on the second thread multiplexer. If a ready read event is polled, the read event is distributed to the corresponding event handler.

[0092] The second thread multiplexer is for read events, and detects whether there is a read event ready by polling data stream events.

[0093] The event processor is a working thread for processing read events, that is, the work of reading data is completed by the event processor.

[0094] For the event processor, it can be a data reading thread pool, which can be created using the ThreadPoolExecutor class in the JAVA language. During the creation process, an object of the thread task class DataReadTask that reads the dial test response data is created. When the DataReadTask task class is created, it receives the ready event clientChannel parameter. The DataReadTask task class is submitted to the thread pool for asynchronous execution.

[0095] Finally, the alarm data generated when the device alarm occurs is asynchronously read from the data source based on the event processor.

[0096] It can be understood that by reading the alarm data in the above manner, it is possible to receive the alarm data from various data sources in real time and to achieve asynchronous reception, thereby avoiding the problems of thread blocking and resource waste caused by waiting for data.

[0097] In an exemplary embodiment, in order to improve the efficiency and performance of receiving alarm data, thereby further improving the utilization of server resources, this embodiment reads the alarm data generated when the device alarm occurs by creating a direct memory object, and based on the direct memory object, reads the alarm data generated when the device alarm occurs into the direct memory.

[0098] Among them, the creation of direct memory objects is also implemented in JAVA language, that is, in the implementation of the run() method in the DataReadTask task class, the allocateDirect() method in the ByteBuffer class is used to create a DirectByteBuffer type object buffer, and clientChannel.read(buffer) is used to read the alarm data directly into the direct memory.

[0099] In an exemplary embodiment, the step of generating an alarm analysis report based on frequent itemsets includes:

[0100] Determine the non-empty subsets of each frequent itemset. If the frequent itemset is {a, b}, then its non-empty subsets include {a}, {b}, and {a, b}.

[0101] Generate initial association rules corresponding to each non-empty subset.

[0102] That is, for each non-empty subset f, an initial association rule of the form "f→Lf" is generated, where L refers to an alarm event and "→" refers to "if...then...". This initial association rule means that if the alarm event in f occurs, then the alarm events in the alarm event L except f will also occur.

[0103] It can be understood that for each non-empty subset, the initial association rule can be formed with any alarm transaction.

[0104] However, most of the initial association rules are not valid, that is, if the alarm event in f occurs, then the alarm events other than f in L may not necessarily occur, and the probability of not occurring is relatively high. Among them, L is the item set corresponding to an alarm event. Therefore, it is necessary to calculate the reliability of each initial association rule, and confirm the initial association rule with a reliability less than the minimum reliability as an association rule that "will not occur".

[0105] Among them, the reliability is the probability of occurrence, which can be calculated by the calculation formula P(Lf|f). P(Lf|f) represents the probability that if the alarm event in f occurs, then the alarm event in L except f will also occur.

[0106] The minimum trust level can be set as needed, and this embodiment does not limit it.

[0107] Accordingly, the initial association rule with a trust greater than or equal to the minimum trust is used as the target association rule, which is meaningful for alarm analysis. Finally, an alarm analysis report is generated based on the target association rule, and the alarm analysis report can at least include the association between the alarm event and the alarm transaction in the target association rule. For example, the content in the alarm analysis report may include: when alarm event a occurs, other alarm events in alarm transaction A (including at least alarm event a) are also likely to occur, so it is recommended to handle alarm event a in conjunction with alarm transaction A.

[0108] In an exemplary embodiment, the step of mining frequent itemsets from each group of data streams using a frequent itemset mining algorithm includes:

[0109] For any data stream:

[0110] Generate a frequent 1-item set based on the data stream; an element in the frequent 1-item set is an alarm event.

[0111] Among them, a frequent 1-item set is a set that includes only one item.

[0112] Exemplarily, the frequent 1-item set is obtained by calculating the support of each item in the data stream and determining whether each support is greater than or equal to the minimum support. The support corresponding to the frequent 1-item set is greater than or equal to the minimum support. The minimum support can be set as needed, and this embodiment is not limited. The support refers to the probability of an item appearing in an alarm transaction. For example, there are 10 alarm transactions. For item A that appears in 4 alarm transactions, its support is 0.4. If the minimum support is less than or equal to 0.4, such as the minimum support is 0.3, then item A is a frequent 1-item set.

[0113] To facilitate determination of a frequent itemset subset, this embodiment determines a bit string corresponding to a frequent 1-itemset.

[0114] The bit string is a string of binary values, which is used to record whether the frequent 1-item set appears in all items corresponding to the data stream. In specific operations, a unique ID can be assigned to the set. For example, the IDs of all items included in the data stream are 1, 2, 3, and 4, respectively. Among them, the items with IDs 2 and 3 are frequent 1-item sets, then the bit string of the item with ID 2 is 0100, and the bit string of the item with ID 3 is 0010. Among them, "1" in the bit string represents that the item is a frequent 1-item set, and "0" represents that the item is an infrequent 1-item set.

[0115] After that, bit operations are performed on the bit string to obtain the candidate item set.

[0116] The bit operation may include a bitwise OR operation, a bitwise AND operation, etc. Taking the bitwise OR operation as an example, for the bit strings "0100" and "0010", after the bitwise OR operation, "0110" is obtained, that is, a candidate 2-item set can be obtained, and the candidate 2-item set includes two items, and the IDs are 2 and 3 respectively.

[0117] It can be understood that by performing bit operations on the bit strings corresponding to all frequent 1-item sets in pairs, several candidate 2-item sets can be obtained. On this basis, bit operations are performed on the bit strings corresponding to the candidate 2-item sets, and so on, candidate k-item sets can be obtained, that is, the candidate item set is finally obtained, which includes all item sets from the candidate 2-item set to the candidate k-item set.

[0118] In one embodiment, if the bit string is long, such as the bit string is 01000010, the divide-and-conquer idea can be used to group the long bit string, that is, the data set or item set is grouped according to the value of the selected grouping bit, such as dividing the bit string "01000010" into "0010" and "0010".

[0119] Among them, data points or item sets with the same grouping bit values ​​are classified into the same group, and each group also generates candidate item sets using the bit operation method. For example, there are bit strings "01000010" and "01100001". After the bit string "01000010" is divided into "0100" and "0010", and after the bit string "01100010" is divided into "0110" and "0001", "0100" and "0110" are grouped into one group, and "0010" and "0001" are grouped into another group.

[0120] The grouped bit strings may still have frequent item sets. In this case, you can select the bit strings to be connected and perform logical operations on them bit by bit. The bits at the corresponding positions are calculated according to the specified logical operation rules to generate new bits. The result bits after the logical operation are combined bit by bit to generate new bit strings. For example, there are bit strings "10101000", "01000010" and "01100001". After grouping, two groups are obtained, among which the first group is: "1010", "0100" and "0110", and the second group is: "1000", "0010" and "0001". Each group is bitwise ORed in pairs to obtain the operation results. The operation results of the first group are "1110" and "0110", and the operation results of the second group are "1010", "1001" and "0011". At this time, the operation results of the first group and the second group are combined to obtain six groups of bit strings, that is, each operation result of the first group is combined with each operation result of the second group. For example, the calculation result "1110" of the first group is combined with the calculation result "1010" of the second group to obtain "11101010".

[0121] After obtaining the candidate item sets, the support of each candidate item set is determined respectively, and the candidate item sets with support greater than or equal to the minimum support are taken as frequent item set subsets.

[0122] It can be understood that the candidate item set is quickly generated by bit operation, which cannot guarantee that the operation result meets the requirement that the support is greater than or equal to the minimum support. Therefore, it is also necessary to determine whether the support of each candidate item set is greater than or equal to the minimum support to finally obtain the frequent item set subset.

[0123] In one embodiment, it can be seen from the above implementation that the process from the bit string corresponding to the frequent 1-item set to the candidate item set is a cyclic process. In this cyclic process, after the bit operation, a large number of candidate 2-item sets, candidate 3-item sets, ..., candidate k-item sets will be generated, and there may be a large number of item sets whose corresponding support is less than the minimum support. It is unnecessary for these item sets that do not meet the requirements to participate in the subsequent bit operation. Therefore, in order to improve the efficiency of obtaining the candidate item set, after obtaining the result of the bit operation in each round of circulation, the support can be calculated, and the item sets that do not meet the requirements are eliminated, and the item sets that meet the requirements are sent to the next round of circulation.

[0124] Finally, the frequent item set subsets corresponding to all data streams are merged to obtain the frequent item set, that is, the calculation results in all servers are merged to obtain the final result.

[0125] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0126] Based on the same inventive concept, the embodiment of the present application also provides an alarm analysis report generation device for implementing the alarm analysis report generation method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more alarm analysis report generation device embodiments provided below can refer to the limitations of the alarm analysis report generation method above, and will not be repeated here.

[0127] In an exemplary embodiment, Figure 3As shown, a device for generating an alarm analysis report is provided, including: an acquisition module 302, a mining module 304 and a generation module 306, wherein:

[0128] The acquisition module 302 is used to acquire the alarm data generated when the device alarms, and convert it into multiple groups of data streams;

[0129] A mining module 304 is used to utilize the distributed computing capability of the stream processing framework and a frequent itemset mining algorithm to mine frequent itemsets from the data stream;

[0130] The generating module 306 is used to generate an alarm analysis report based on the frequent itemsets.

[0131] In one embodiment, the acquisition module 302 includes:

[0132] A generating unit, generating a first thread multiplexer and a second thread multiplexer; the first thread multiplexer is used to process a connection event, and the second thread multiplexer is used to process a read event;

[0133] The reading unit asynchronously reads the alarm data generated when the device alarms from a data source based on the first thread multiplexer and the second thread multiplexer.

[0134] In one embodiment, the reading unit is specifically used for:

[0135] Registering a connection event with the first thread multiplexer; the connection event is used to monitor a connection request from a data source for sending data;

[0136] Polling a data stream event based on the first thread multiplexer, if a ready connection event is polled and the first thread multiplexer successfully establishes a connection with a data source corresponding to the connection event, registering a read event to the data stream event based on the first thread multiplexer;

[0137] Polling data stream events based on the second thread multiplexer, if a ready read event is polled, distributing the read event to a corresponding event handler;

[0138] The alarm data generated when the device alarms are asynchronously read from the data source based on the event processor.

[0139] In one embodiment, the reading unit is specifically used for:

[0140] Create direct memory objects;

[0141] Based on the direct memory object, the alarm data generated when the device alarms is read into the direct memory.

[0142] In one embodiment, the generating module 306 is specifically used for:

[0143] Determine the non-empty subset of each frequent itemset;

[0144] Generate initial association rules corresponding to each non-empty subset;

[0145] Calculate the confidence of each initial association rule;

[0146] The initial association rule whose confidence is greater than or equal to the minimum confidence is taken as the target association rule;

[0147] Generate an alarm analysis report based on the target association rule.

[0148] In one embodiment, the alarm data includes data of at least one alarm transaction; each alarm transaction includes at least one alarm event; the mining module 304 is specifically used to:

[0149] For any data stream:

[0150] Generate a frequent 1-item set based on the data stream; an element in the frequent 1-item set is an alarm event;

[0151] Determine the bit string corresponding to the frequent 1-item set;

[0152] Performing bit operations on the bit string to obtain a candidate item set;

[0153] Determine the support of each candidate item set respectively, and take the candidate item sets with support greater than or equal to the minimum support as the frequent item set subset;

[0154] The frequent item sets corresponding to all data streams are merged to obtain the frequent item sets.

[0155] The embodiment of the alarm analysis report generating device in this embodiment is basically the same as the embodiments of each step of the above-mentioned alarm analysis report generating method, and will not be repeated here.

[0156] Each module in the above alarm analysis report generation device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.

[0157] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 4As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device can be used to store data such as frequent item sets and data streams. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for generating an alarm analysis report is implemented.

[0158] Those skilled in the art will understand that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0159] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0160] Obtain the alarm data generated when the device alarms, and convert it into multiple groups of data streams;

[0161] Using the distributed computing capability of the stream processing framework and the frequent item set mining algorithm, frequent item sets are mined from the data stream;

[0162] Generate an alarm analysis report based on the frequent itemsets.

[0163] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0164] Generate a first thread multiplexer and a second thread multiplexer; the first thread multiplexer is used to process connection events, and the second thread multiplexer is used to process read events;

[0165] The alarm data generated when the device alarm is asynchronously read from the data source based on the first thread multiplexer and the second thread multiplexer.

[0166] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0167] Registering a connection event with the first thread multiplexer; the connection event is used to monitor a connection request from a data source for sending data;

[0168] Polling a data stream event based on the first thread multiplexer, if a ready connection event is polled and the first thread multiplexer successfully establishes a connection with a data source corresponding to the connection event, registering a read event to the data stream event based on the first thread multiplexer;

[0169] Polling data stream events based on the second thread multiplexer, if a ready read event is polled, distributing the read event to a corresponding event handler;

[0170] The alarm data generated when the device alarms are asynchronously read from the data source based on the event processor.

[0171] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0172] Create direct memory objects;

[0173] Based on the direct memory object, the alarm data generated when the device alarms is read into the direct memory.

[0174] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0175] Determine the non-empty subset of each frequent itemset;

[0176] Generate initial association rules corresponding to each non-empty subset;

[0177] Calculate the confidence of each initial association rule;

[0178] The initial association rule whose confidence is greater than or equal to the minimum confidence is taken as the target association rule;

[0179] Generate an alarm analysis report based on the target association rule.

[0180] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0181] For any data stream:

[0182] Generate a frequent 1-item set based on the data stream; an element in the frequent 1-item set is an alarm event;

[0183] Determine the bit string corresponding to the frequent 1-item set;

[0184] Performing bit operations on the bit string to obtain a candidate item set;

[0185] Determine the support of each candidate item set respectively, and take the candidate item sets with support greater than or equal to the minimum support as the frequent item set subset;

[0186] The frequent item sets corresponding to all data streams are merged to obtain the frequent item sets.

[0187] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0188] Obtain the alarm data generated when the device alarms, and convert it into multiple groups of data streams;

[0189] Using the distributed computing capability of the stream processing framework and the frequent item set mining algorithm, frequent item sets are mined from the data stream;

[0190] Generate an alarm analysis report based on the frequent itemsets.

[0191] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0192] Generate a first thread multiplexer and a second thread multiplexer; the first thread multiplexer is used to process connection events, and the second thread multiplexer is used to process read events;

[0193] The alarm data generated when the device alarm is asynchronously read from the data source based on the first thread multiplexer and the second thread multiplexer.

[0194] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0195] Registering a connection event with the first thread multiplexer; the connection event is used to monitor a connection request from a data source for sending data;

[0196] Polling a data stream event based on the first thread multiplexer, if a ready connection event is polled and the first thread multiplexer successfully establishes a connection with a data source corresponding to the connection event, registering a read event to the data stream event based on the first thread multiplexer;

[0197] Polling data stream events based on the second thread multiplexer, if a ready read event is polled, distributing the read event to a corresponding event handler;

[0198] The alarm data generated when the device alarms are asynchronously read from the data source based on the event processor.

[0199] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0200] Create direct memory objects;

[0201] Based on the direct memory object, the alarm data generated when the device alarms is read into the direct memory.

[0202] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0203] Determine the non-empty subset of each frequent itemset;

[0204] Generate initial association rules corresponding to each non-empty subset;

[0205] Calculate the confidence of each initial association rule;

[0206] The initial association rule whose confidence is greater than or equal to the minimum confidence is taken as the target association rule;

[0207] Generate an alarm analysis report based on the target association rule.

[0208] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0209] For any data stream:

[0210] Generate a frequent 1-item set based on the data stream; an element in the frequent 1-item set is an alarm event;

[0211] Determine the bit string corresponding to the frequent 1-item set;

[0212] Performing bit operations on the bit string to obtain a candidate item set;

[0213] Determine the support of each candidate item set respectively, and take the candidate item sets with support greater than or equal to the minimum support as the frequent item set subset;

[0214] The frequent item sets corresponding to all data streams are merged to obtain the frequent item sets.

[0215] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:

[0216] Obtain the alarm data generated when the device alarms, and convert it into multiple groups of data streams;

[0217] Using the distributed computing capability of the stream processing framework and the frequent item set mining algorithm, frequent item sets are mined from the data stream;

[0218] Generate an alarm analysis report based on the frequent itemsets.

[0219] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0220] Generate a first thread multiplexer and a second thread multiplexer; the first thread multiplexer is used to process connection events, and the second thread multiplexer is used to process read events;

[0221] The alarm data generated when the device alarm is asynchronously read from the data source based on the first thread multiplexer and the second thread multiplexer.

[0222] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0223] Registering a connection event with the first thread multiplexer; the connection event is used to monitor a connection request from a data source for sending data;

[0224] Polling a data stream event based on the first thread multiplexer, if a ready connection event is polled and the first thread multiplexer successfully establishes a connection with a data source corresponding to the connection event, registering a read event to the data stream event based on the first thread multiplexer;

[0225] Polling data stream events based on the second thread multiplexer, if a ready read event is polled, distributing the read event to a corresponding event handler;

[0226] The alarm data generated when the device alarms are asynchronously read from the data source based on the event processor.

[0227] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0228] Create direct memory objects;

[0229] Based on the direct memory object, the alarm data generated when the device alarms is read into the direct memory.

[0230] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0231] Determine the non-empty subset of each frequent itemset;

[0232] Generate initial association rules corresponding to each non-empty subset;

[0233] Calculate the confidence of each initial association rule;

[0234] The initial association rule whose confidence is greater than or equal to the minimum confidence is taken as the target association rule;

[0235] Generate an alarm analysis report based on the target association rule.

[0236] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0237] For any data stream:

[0238] Generate a frequent 1-item set based on the data stream; an element in the frequent 1-item set is an alarm event;

[0239] Determine the bit string corresponding to the frequent 1-item set;

[0240] Performing bit operations on the bit string to obtain a candidate item set;

[0241] Determine the support of each candidate item set respectively, and take the candidate item sets with support greater than or equal to the minimum support as the frequent item set subset;

[0242] The frequent item sets corresponding to all data streams are merged to obtain the frequent item sets.

[0243] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0244] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0245] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for generating an alarm analysis report, characterized in that: The method comprises: Obtain the alarm data generated when the device alarms, and convert it into multiple groups of data streams; Using the distributed computing capability of the stream processing framework and the frequent item set mining algorithm, frequent item sets are mined from the data stream; Generate an alarm analysis report based on the frequent itemsets.

2. The method according to claim 1, characterized in that The alarm data generated when obtaining the device alarm includes: Generate a first thread multiplexer and a second thread multiplexer; the first thread multiplexer is used to process connection events, and the second thread multiplexer is used to process read events; The alarm data generated when the device alarm is asynchronously read from the data source based on the first thread multiplexer and the second thread multiplexer.

3. The method according to claim 2, characterized in that The alarm data generated when the device alarm is asynchronously read from the data source based on the first thread multiplexer and the second thread multiplexer includes: Registering a connection event with the first thread multiplexer; the connection event is used to monitor a connection request from a data source for sending data; Polling a data stream event based on the first thread multiplexer, if a ready connection event is polled and the first thread multiplexer successfully establishes a connection with a data source corresponding to the connection event, registering a read event to the data stream event based on the first thread multiplexer; Polling data stream events based on the second thread multiplexer, if a ready read event is polled, distributing the read event to a corresponding event handler; The alarm data generated when the device alarms are asynchronously read from the data source based on the event processor.

4. The method according to claim 2 or 3, characterized in that: The alarm data generated when the reading device alarms includes: Create direct memory objects; Based on the direct memory object, the alarm data generated when the device alarms is read into the direct memory.

5. The method according to claim 1, characterized in that: The generating of an alarm analysis report based on the frequent itemsets includes: Determine the non-empty subset of each frequent itemset; Generate initial association rules corresponding to each non-empty subset; Calculate the confidence of each initial association rule; The initial association rule whose confidence is greater than or equal to the minimum confidence is taken as the target association rule; Generate an alarm analysis report based on the target association rule.

6. The method according to claim 1, characterized in that The alarm data includes data of at least one alarm transaction; each alarm transaction includes at least one alarm event; The method of using a frequent item set mining algorithm to mine frequent item sets from each group of the data streams includes: For any data stream: Generate a frequent 1-item set based on the data stream; an element in the frequent 1-item set is an alarm event; Determine the bit string corresponding to the frequent 1-item set; Performing bit operations on the bit string to obtain a candidate item set; Determine the support of each candidate item set respectively, and take the candidate item sets with support greater than or equal to the minimum support as the frequent item set subset; The frequent item sets corresponding to all data streams are merged to obtain the frequent item sets.

7. An alarm analysis report generating device, characterized in that: The device comprises: The acquisition module is used to acquire the alarm data generated when the device alarms and convert it into multiple groups of data streams; A mining module, used to utilize the distributed computing capability of the stream processing framework and a frequent itemset mining algorithm to mine frequent itemsets from the data stream; A generating module is used to generate an alarm analysis report based on the frequent item sets.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.