Event processing method, device, equipment and medium
By generating and updating event keywords, detecting keyword lists, and calculating event importance, the problem of low efficiency in manual evaluation of event importance is solved, and automated event importance evaluation is realized, and work efficiency is improved.
Patent Information
- Application Number
- CN202210554169.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-19
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2042-05-19
AI Technical Summary
In the prior art, the importance of the incident by manually evaluating the importance of the incident has high requirements for staff, large workload, repetitive and cumbersome workload, and low operational efficiency.
By generating target keywords corresponding to the event based on the event description text of the pending event, update the total number of historical events stored in the preset database, the total number of events corresponding to each keyword, and the total number of events corresponding to each keyword; detect whether the keyword is in the preset blacklist or whitelist; if not, determine the total number of events corresponding to the keyword; finally calculate the importance of the pending event based on the total number of historical events and the total number of events corresponding to the keyword.
It realizes that the importance of the event is automatically determined based on the word information contained in the event description text, and effectively and quantifiably express the importance of the event, which improves the operation efficiency and reduces the burden on staff.
Smart Images

Figure CN115129538B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to an event processing method, device, equipment and medium. Background Art
[0002] During the operation of the operation and maintenance monitoring system, the system information generated by the operation and maintenance monitoring system to inform users about the current performance indicators, faults, abnormal status, etc. of the system is called an event. Events include but are not limited to alarms, notifications, and alerts.
[0003] When the operation and maintenance monitoring system is running, a large number of events will be generated. It is necessary to determine the importance of each event so as to filter out unimportant events from a large number of events based on the importance of each event.
[0004] In the related art, the staff usually makes manual judgment based on the fault site and operation and maintenance experience to evaluate the importance of the event. Manually evaluating the importance of an event places high demands on the staff, and the workload is large, repetitive and cumbersome, and the operation efficiency is low. Summary of the invention
[0005] The present invention provides an event processing method, device, equipment and medium to solve the problem in the related art that manually evaluating the importance of events has high requirements for staff, large workload, repetitive and cumbersome work, and low operating efficiency.
[0006] According to one aspect of the present invention, there is provided an event processing method, comprising:
[0007] Generating at least one target keyword corresponding to the event to be processed according to the event description text of the event to be processed;
[0008] According to each of the target keywords, the total number of historical events, each keyword, and the total number of events corresponding to each keyword stored in the preset database are updated; wherein the total number of events corresponding to each keyword is the total number of events containing the keyword in the event description text;
[0009] Detecting whether each of the target keywords is in a preset keyword blacklist or keyword whitelist;
[0010] If each of the target keywords is not in the preset keyword blacklist or keyword whitelist, then determining the total number of events corresponding to each of the target keywords according to each of the keywords stored in the preset database and the total number of events corresponding to each of the keywords;
[0011] The importance of the event to be processed is calculated according to the total number of historical events and the total number of events corresponding to each of the target keywords.
[0012] According to another aspect of the present invention, there is provided an event processing device, comprising:
[0013] A keyword generation module, used to generate at least one target keyword corresponding to the event to be processed according to the event description text of the event to be processed;
[0014] A database update module, used to update the total number of historical events, each keyword, and the total number of events corresponding to each keyword stored in a preset database according to each target keyword; wherein the total number of events corresponding to each keyword is the total number of events containing the keyword in the event description text;
[0015] A keyword detection module, used to detect whether each of the target keywords is in a preset keyword blacklist or keyword whitelist;
[0016] A quantity determination module, configured to determine the total number of events corresponding to each target keyword based on each keyword stored in the preset database and the total number of events corresponding to each keyword if each target keyword is not in the preset keyword blacklist or keyword whitelist;
[0017] The importance calculation module is used to calculate the importance of the event to be processed according to the total number of historical events and the total number of events corresponding to each target keyword.
[0018] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0019] at least one processor; and
[0020] a memory communicatively connected to the at least one processor; wherein,
[0021] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the event processing method described in any embodiment of the present invention.
[0022] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the event processing method described in any embodiment of the present invention when executed.
[0023] The technical solution of the embodiment of the present invention generates at least one target keyword corresponding to the event to be processed according to the event description text of the event to be processed; then, according to each target keyword, updates the total number of historical events, each keyword, and the total number of events corresponding to each keyword stored in a preset database; detects whether each target keyword is in a preset keyword blacklist or keyword whitelist; if each target keyword is not in the preset keyword blacklist or keyword whitelist, determines the total number of events corresponding to each target keyword according to each keyword stored in the preset database and the total number of events corresponding to each keyword; finally, calculates the importance of the event to be processed according to the total number of historical events and the total number of events corresponding to each target keyword, solves the problem in the related art that manually evaluating the importance of events has high requirements for staff, large workload, repetitive and cumbersome work, and low operating efficiency, and achieves the beneficial effect of automatically determining the importance of events according to the word information contained in the event description text of the events, and effectively and quantifiably expressing the importance of events.
[0024] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0026] Figure 1 The present invention provides a flowchart of an event processing method according to the first embodiment of the present invention.
[0027] Figure 2 This is a flow chart of an event processing method provided in Embodiment 2 of the present invention.
[0028] Figure 3 A schematic diagram of the structure of an event processing device provided in Embodiment 3 of the present invention.
[0029] Figure 4 A schematic diagram of the structure of an electronic device for implementing the event processing method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0030] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0031] It should be noted that the terms "target", "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "comprise", "include" and "have" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0032] Embodiment 1
[0033] Figure 1 This is a flow chart of an event processing method provided in the first embodiment of the present invention. This embodiment can be applied to determine the importance of each event, so as to filter out unimportant events from a large number of events according to the importance of each event. The method can be executed by an event processing device, which can be implemented in the form of hardware and / or software, and can be configured in an electronic device. Figure 1 As shown, the method includes:
[0034] Step 101: Generate at least one target keyword corresponding to the event to be processed according to the event description text of the event to be processed.
[0035] Optionally, the event to be processed is an event that needs to be processed by the electronic device at the current moment to determine the importance. The event description text of the event to be processed is a text used to describe the event. The at least one target keyword corresponding to the event to be processed is at least one valid word contained in the event description text of the event to be processed.
[0036] Optionally, generating at least one target keyword corresponding to the event to be processed according to the event description text of the event to be processed includes: performing word segmentation on the event description text of the event to be processed to obtain a plurality of words; removing stop words from the plurality of words to obtain at least one valid word among the plurality of words; and determining the at least one valid word as at least one target keyword corresponding to the event to be processed.
[0037] Optionally, a preset set of stop words is stored in the electronic device. Stop words are certain words or characters that are automatically filtered out before or after processing text in information retrieval to save storage space and improve search efficiency. These words or characters are called stop words. For example, words such as "le", "de", "shi", etc.
[0038] Optionally, perform word segmentation on the event description text of the event to be processed to obtain a plurality of words, and then remove the stop words from the plurality of words. The remaining words are the at least one valid word among the plurality of words. Determine the at least one valid word as at least one target keyword corresponding to the event to be processed.
[0039] Step 102: Update the total number of historical events, each keyword, and the total number of events corresponding to each keyword stored in the preset database according to each of the target keywords.
[0040] Wherein, the total number of events corresponding to each keyword is the total number of events whose event description text contains the keyword.
[0041] Optionally, the preset database is used to store the total number of historical events, each keyword, and the total number of events corresponding to each keyword.
[0042] Optionally, store each keyword and the total number of events corresponding to each keyword in the preset database in the form of an inverted index.
[0043] The total number of historical events stored in the preset database is the total number of events processed by the electronic device. Exemplarily, the total number of historical events is 2000. Each keyword stored in the preset database is a different valid word included in the event description texts of all the events processed by the electronic device.
[0044] Optionally, the total number of events corresponding to each keyword is the total number of events whose event description text contains the keyword among all the events processed by the electronic device. For each keyword, perform the following operations: among all the events processed by the electronic device, filter out the events whose event description text contains the keyword; count the total number of events whose event description text contains the keyword, and determine the counted total number as the total number of events corresponding to the keyword.
[0045] Exemplarily, the total number of events processed by the electronic device is 2000. For a certain keyword, among the 2000 events processed by the electronic device, the events whose event description texts contain the keyword are screened, and then 100 events whose event description texts contain the keyword are screened. The total number of events whose event description texts contain the keyword is counted, and the total number "100" obtained by counting is determined as the total number of events corresponding to the keyword.
[0046] Optionally, the event to be processed is a new event processed by the electronic device. The electronic device needs to timely update the total number of historical events, each keyword, and the total number of events corresponding to each keyword stored in the preset database according to the relevant information of the new event processed.
[0047] Optionally, the total number of historical events, each keyword, and the total number of events corresponding to each keyword stored in the preset database are updated according to each of the target keywords, including: adding 1 to the total number of historical events stored in the preset database; performing the following operations for each target keyword: searching for the keyword that is the same as the currently processed target keyword among the keywords stored in the preset database; if the keyword that is the same as the currently processed target keyword is queried, adding 1 to the total number of events corresponding to the keyword; if the keyword that is the same as the currently processed target keyword is not queried, storing the current processing target keyword and the total number of initial events corresponding to the current processing target keyword in the preset database; wherein the total number of initial events is 1.
[0048] Optionally, the event to be processed is a new event processed by the electronic device, and the total number of events processed by the electronic device is increased by 1, so the total number of historical events stored in the preset database is increased by 1.
[0049] Optionally, if a keyword identical to the currently processed target keyword is queried, indicating that the currently processed target keyword has been stored in a preset database, and the event to be processed is a new event whose event description text contains the currently processed target keyword, then the total number of events corresponding to the keyword is increased by 1.
[0050] Optionally, if no keyword identical to the currently processed target keyword is found, indicating that the currently processed target keyword is a new valid word that is not stored in the preset database, the first time an event containing the currently processed target keyword appears in the event description text, the currently processed target keyword and the total number of initial events corresponding to the currently processed target keyword are stored in the preset database; wherein the total number of initial events is 1.
[0051] Step 103: Detect whether each of the target keywords is in a preset keyword blacklist or keyword whitelist.
[0052] Optionally, the preset keyword blacklist includes at least one unimportant word input by the user. An unimportant word is a word that can be ignored during the calculation of the importance of an event.
[0053] Optionally, the preset keyword whitelist contains at least one important word input by the user. Important words are words that are included in the event description text of the event that the user needs to focus on. If any one of the target keywords of the event is in the preset keyword whitelist, indicating that the event is an event that needs to be focused on, the importance of the event is determined to be the preset maximum importance.
[0054] Optionally, detecting whether each of the target keywords is in a preset keyword blacklist includes: performing the following operations for each target keyword: detecting whether the preset keyword blacklist contains the same words as the target keyword; if the preset keyword blacklist contains the same words as the target keyword, determining that the target keyword is in the preset keyword blacklist; if the preset keyword blacklist does not contain the same words as the target keyword, determining that the target keyword is not in the preset keyword blacklist.
[0055] Optionally, detecting whether each of the target keywords is in a preset keyword whitelist includes: performing the following operations for each target keyword: detecting whether the preset keyword whitelist contains the same words as the target keyword; if the preset keyword whitelist contains the same words as the target keyword, determining that the target keyword is in the preset keyword whitelist; if the preset keyword whitelist does not contain the same words as the target keyword, determining that the target keyword is not in the preset keyword whitelist.
[0056] Step 104: If the target keywords are not in the preset keyword blacklist or keyword whitelist, the total number of events corresponding to the target keywords is determined according to the keywords stored in the preset database and the total number of events corresponding to the keywords.
[0057] Optionally, the total number of events corresponding to each target keyword is determined based on each keyword stored in the preset database and the total number of events corresponding to each keyword, including: performing the following operations for each target keyword: searching for the keyword that is the same as the currently processed target keyword among the keywords stored in the preset database; determining the total number of events corresponding to the keyword that is the same as the currently processed target keyword as the total number of events corresponding to the currently processed target keyword.
[0058] Step 105: Calculate the importance of the event to be processed according to the total number of historical events and the total number of events corresponding to each target keyword.
[0059] Optionally, the importance of the event to be processed is calculated based on the total number of historical events and the total number of events corresponding to each target keyword, including: calculating the occurrence probability of each target keyword based on the total number of historical events and the total number of events corresponding to each target keyword; calculating the occurrence probability of the event to be processed based on the occurrence probability of each target keyword; calculating the importance of the event to be processed based on the occurrence probability of the event to be processed and a preset importance calculation formula.
[0060] Optionally, the occurrence probability of the target keyword is the probability of the target keyword appearing in the event description text of the event. The occurrence probability of the pending event is the probability of the pending event appearing in the system operation.
[0061] Optionally, calculating the occurrence probability of each target keyword according to the total number of historical events and the total number of events corresponding to each target keyword includes: calculating the occurrence probability of the i-th target keyword among the target keywords using the following calculation formula:
[0062]
[0063] Among them, P(w i ) is the probability of occurrence of the i-th target keyword among the target keywords, C(w i ) is the total number of events corresponding to the i-th target keyword among the target keywords, C is the total number of historical events, i=0, ...k, k is the total number of target keywords corresponding to the events to be processed, that is, the total number of valid words contained in the event description text of the events to be processed.
[0064] Optionally, calculating the occurrence probability of the event to be processed according to the occurrence probability of each of the target keywords includes: using the following calculation formula to calculate the occurrence probability of the event to be processed:
[0065] p=avg(V), V={P(w i )|i=0,...k},
[0066] Where p is the probability of occurrence of the event to be processed, P(w i) is the occurrence probability of the i-th target keyword among the target keywords, i=0, ...k, k is the total number of target keywords corresponding to the event to be processed, that is, the total number of valid words contained in the event description text of the event to be processed. The occurrence probability of the event to be processed is the average value of the occurrence probabilities of the target keywords corresponding to the event to be processed.
[0067] Optionally, the occurrence probability of the event to be processed may also be a valid statistical indicator value such as the median, maximum value, harmonic mean, etc. of the occurrence probabilities of each target keyword corresponding to the event to be processed.
[0068] Optionally, calculating the importance of the event to be processed according to the occurrence probability of the event to be processed and a preset importance calculation formula includes: calculating the importance of the event to be processed using the following preset importance calculation formula:
[0069] Entropy=-p*log2(p)-(1-p)*log2(1-p),
[0070] Wherein, Entropy is the importance of the event to be processed, and p is the probability of occurrence of the event to be processed. The preset importance calculation formula is an importance calculation formula based on the cross entropy formula. The importance is distributed between [0, 1]. The greater the importance, the greater the importance of the event.
[0071] Under normal circumstances, the frequency of occurrence of a word in the event description text is too high or too low, indicating that the importance of the word is not high. For example, words such as "error" and "normal" often appear in alarms. The probability of occurrence of an event is too high or too low, indicating that the importance of the event is not high. Based on the common cross entropy formula, the importance of the event to be processed is calculated according to the probability of occurrence of the event to be processed. When the probability of occurrence of an event is too high or too low, the importance of the event is low; when the probability of occurrence of an event is close to the middle value, the importance of the event is high. The importance of an event can be expressed effectively and quantifiably based on the preset importance calculation formula, and the calculation is simple.
[0072] Optionally, after detecting whether each of the target keywords is in a preset keyword blacklist or a keyword whitelist, it also includes: if each of the target keywords is not in the preset keyword whitelist, and there is a first target keyword among the target keywords that is in the preset keyword blacklist, then according to each keyword stored in the preset database, and the total number of events corresponding to each keyword, determine the total number of events corresponding to the target keywords other than the first target keyword in each of the target keywords except the first target keyword; according to the total number of historical events and the total number of events corresponding to the target keywords other than the first target keyword, calculate the importance of the event to be processed.
[0073] Optionally, the first target keyword is one or more target keywords in a preset keyword blacklist among the target keywords. If the target keywords are not in a preset keyword whitelist, and the first target keyword in the target keywords is in a preset keyword blacklist, the first target keyword is filtered when calculating the importance of the event to be processed.
[0074] Optionally, after detecting whether each of the target keywords is in a preset keyword blacklist or keyword whitelist, it also includes: if there is a second target keyword in the preset keyword whitelist among the target keywords, determining that the importance of the event to be processed is a preset maximum importance.
[0075] Optionally, the second target keyword is one or more target keywords in a preset keyword whitelist among the target keywords. If the second target keyword exists in the preset keyword whitelist among the target keywords, it indicates that the event to be processed is an event that needs to be focused on, and the importance of the event to be processed is determined to be a preset maximum importance. The preset maximum importance is the preset maximum importance.
[0076] Exemplarily, the importance is distributed between [0, 1], and the preset maximum importance is 1. If the second target keyword in each of the target keywords is in the preset keyword whitelist, indicating that the event to be processed is an event that requires special attention, then the importance of the event to be processed is determined to be 1.
[0077] The technical solution of the embodiment of the present invention generates at least one target keyword corresponding to the event to be processed according to the event description text of the event to be processed; then, according to each target keyword, updates the total number of historical events, each keyword, and the total number of events corresponding to each keyword stored in a preset database; detects whether each target keyword is in a preset keyword blacklist or keyword whitelist; if each target keyword is not in the preset keyword blacklist or keyword whitelist, determines the total number of events corresponding to each target keyword according to each keyword stored in the preset database and the total number of events corresponding to each keyword; finally, calculates the importance of the event to be processed according to the total number of historical events and the total number of events corresponding to each target keyword, solves the problem in the related art that manually evaluating the importance of events has high requirements for staff, large workload, repetitive and cumbersome work, and low operating efficiency, and achieves the beneficial effect of automatically determining the importance of events according to the word information contained in the event description text of the events, and effectively and quantifiably expressing the importance of events.
[0078] The scheme for determining the importance of an event in the embodiment of the present invention has the advantages of high computational efficiency and low resource occupation, and also has certain scalability.
[0079] Embodiment 2
[0080] Figure 2 This is a flow chart of an event processing method provided in Embodiment 2 of the present invention. This embodiment of the present invention can be combined with each optional solution in one or more of the above embodiments. Figure 2 As shown, the method includes:
[0081] Step 201: Generate at least one target keyword corresponding to the event to be processed according to the event description text of the event to be processed.
[0082] Step 202: According to each of the target keywords, the total number of historical events, each keyword, and the total number of events corresponding to each keyword stored in a preset database are updated.
[0083] The total number of events corresponding to each keyword is the total number of events containing the keyword in the event description text.
[0084] Step 203: Detect whether each of the target keywords is in a preset keyword blacklist or keyword whitelist.
[0085] Step 204: If the target keywords are not in the preset keyword blacklist or keyword whitelist, the total number of events corresponding to the target keywords is determined according to the keywords stored in the preset database and the total number of events corresponding to the keywords.
[0086] Step 205: Calculate the occurrence probability of each target keyword according to the total number of historical events and the total number of events corresponding to each target keyword.
[0087] Optionally, calculating the occurrence probability of each target keyword according to the total number of historical events and the total number of events corresponding to each target keyword includes: calculating the occurrence probability of the i-th target keyword among the target keywords using the following calculation formula:
[0088]
[0089] Among them, P(w i ) is the probability of occurrence of the i-th target keyword among the target keywords, C(w i) is the total number of events corresponding to the i-th target keyword among the target keywords, C is the total number of historical events, i=0, ...k, k is the total number of target keywords corresponding to the events to be processed, that is, the total number of valid words contained in the event description text of the events to be processed.
[0090] Step 206: Calculate the occurrence probability of the event to be processed according to the occurrence probability of each target keyword.
[0091] Optionally, calculating the occurrence probability of the event to be processed according to the occurrence probability of each of the target keywords includes: using the following calculation formula to calculate the occurrence probability of the event to be processed:
[0092] p=avg(V), V={P(w i )|i=0,...k},
[0093] Where p is the probability of occurrence of the event to be processed, P(w i ) is the occurrence probability of the i-th target keyword among the target keywords, i=0, ...k, k is the total number of target keywords corresponding to the event to be processed, that is, the total number of valid words contained in the event description text of the event to be processed. The occurrence probability of the event to be processed is the average value of the occurrence probabilities of the target keywords corresponding to the event to be processed.
[0094] Optionally, the occurrence probability of the event to be processed may also be a valid statistical indicator value such as the median, maximum value, harmonic mean, etc. of the occurrence probabilities of each target keyword corresponding to the event to be processed.
[0095] Step 207: Calculate the importance of the event to be processed according to the occurrence probability of the event to be processed and a preset importance calculation formula.
[0096] Optionally, calculating the importance of the event to be processed according to the occurrence probability of the event to be processed and a preset importance calculation formula includes: calculating the importance of the event to be processed using the following preset importance calculation formula:
[0097] Entropy=-p*log2(p)-(1-p)*log2(1-p),
[0098] Wherein, Entropy is the importance of the event to be processed, and p is the probability of occurrence of the event to be processed. The preset importance calculation formula is an importance calculation formula based on the cross entropy formula. The importance is distributed between [0, 1]. The greater the importance, the greater the importance of the event.
[0099] Under normal circumstances, the frequency of occurrence of a word in the event description text is too high or too low, indicating that the importance of the word is not high. For example, words such as "error" and "normal" often appear in alarms. The probability of occurrence of an event is too high or too low, indicating that the importance of the event is not high. Based on the common cross entropy formula, the importance of the event to be processed is calculated according to the probability of occurrence of the event to be processed. When the probability of occurrence of an event is too high or too low, the importance of the event is low; when the probability of occurrence of an event is close to the middle value, the importance of the event is high.
[0100] The technical solution of the embodiment of the present invention has the beneficial effect of automatically determining the importance of an event based on the word information contained in the event description text of the event, and can effectively and quantifiably express the importance of the event.
[0101] Embodiment 3
[0102] Figure 3 FIG. 1 is a schematic diagram of the structure of an event processing device provided in Embodiment 3 of the present invention. The device may be configured in an electronic device. Figure 3 As shown, the device includes: a keyword generating module 301 , a database updating module 302 , a keyword detecting module 303 , a quantity determining module 304 and an importance calculating module 305 .
[0103] Among them, the keyword generation module 301 is used to generate at least one target keyword corresponding to the event to be processed according to the event description text of the event to be processed; the database update module 302 is used to update the total number of historical events, each keyword, and the total number of events corresponding to each keyword stored in the preset database according to each of the target keywords; wherein the total number of events corresponding to each keyword is the total number of events containing the keyword in the event description text; the keyword detection module 303 is used to detect whether each of the target keywords is in the preset keyword blacklist or keyword whitelist; the quantity determination module 304 is used to determine the total number of events corresponding to each of the target keywords according to each of the keywords stored in the preset database and the total number of events corresponding to each of the keywords if each of the target keywords is not in the preset keyword blacklist or keyword whitelist; the importance calculation module 305 is used to calculate the importance of the event to be processed according to the total number of historical events and the total number of events corresponding to each of the target keywords.
[0104] The technical solution of the embodiment of the present invention generates at least one target keyword corresponding to the event to be processed according to the event description text of the event to be processed; then, according to each target keyword, updates the total number of historical events, each keyword, and the total number of events corresponding to each keyword stored in a preset database; detects whether each target keyword is in a preset keyword blacklist or keyword whitelist; if each target keyword is not in the preset keyword blacklist or keyword whitelist, determines the total number of events corresponding to each target keyword according to each keyword stored in the preset database and the total number of events corresponding to each keyword; finally, calculates the importance of the event to be processed according to the total number of historical events and the total number of events corresponding to each target keyword, solves the problem in the related art that manually evaluating the importance of events has high requirements for staff, large workload, repetitive and cumbersome work, and low operating efficiency, and achieves the beneficial effect of automatically determining the importance of events according to the word information contained in the event description text of the events, and effectively and quantifiably expressing the importance of events.
[0105] In an optional implementation of an embodiment of the present invention, optionally, the keyword generation module 301 is specifically used to: perform word segmentation processing on the event description text of the event to be processed to obtain multiple words; remove stop words from the multiple words to obtain at least one valid word from the multiple words; determine the at least one valid word as at least one target keyword corresponding to the event to be processed.
[0106] In an optional implementation of an embodiment of the present invention, optionally, the database update module 302 is specifically used to: increase the total number of historical events stored in the preset database by 1; perform the following operations for each target keyword: search for the keyword that is the same as the currently processed target keyword among the keywords stored in the preset database; if the keyword that is the same as the currently processed target keyword is queried, increase the total number of events corresponding to the keyword by 1; if the keyword that is the same as the currently processed target keyword is not queried, store the current processing target keyword and the total number of initial events corresponding to the current processing target keyword in the preset database; wherein the total number of initial events is 1.
[0107] In an optional implementation of an embodiment of the present invention, optionally, the quantity determination module 304 is specifically used to: perform the following operations for each target keyword: query the keywords that are the same as the currently processed target keyword among the keywords stored in the preset database; determine the total number of events corresponding to the keywords that are the same as the currently processed target keyword as the total number of events corresponding to the currently processed target keyword.
[0108] In an optional implementation of an embodiment of the present invention, optionally, the importance calculation module 305 is specifically used to: calculate the occurrence probability of each target keyword based on the total number of historical events and the total number of events corresponding to each target keyword; calculate the occurrence probability of the event to be processed based on the occurrence probability of each target keyword; calculate the importance of the event to be processed based on the occurrence probability of the event to be processed and a preset importance calculation formula.
[0109] In an optional implementation of an embodiment of the present invention, optionally, the event processing device also includes: an alternative quantity determination module, which is used to determine the total number of events corresponding to the target keywords other than the first target keyword among the target keywords based on the keywords stored in the preset database and the total number of events corresponding to each keyword if the target keywords are not in the preset keyword whitelist and there is a first target keyword in the target keywords that is in the preset keyword blacklist; an alternative importance calculation module, which is used to calculate the importance of the event to be processed based on the total number of historical events and the total number of events corresponding to the target keywords other than the first target keyword.
[0110] In an optional implementation of an embodiment of the present invention, optionally, the event processing device also includes: an importance determination module, which is used to determine the importance of the event to be processed as a preset maximum importance if there is a second target keyword in each of the target keywords in the preset keyword whitelist.
[0111] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0112] The above-mentioned event processing device can execute the event processing method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the event processing method.
[0113] Embodiment 4
[0114] Figure 4A schematic diagram of the structure of an electronic device 10 that can be used to implement the event processing method of an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0115] like Figure 4 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program built from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0116] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0117] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as an event processing method.
[0118] In some embodiments, the event handling method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is built into the RAM 13 and executed by the processor 11, one or more steps of the event handling method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the event handling method in any other appropriate manner (e.g., by means of firmware).
[0119] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0120] The computer programs for implementing the event processing method of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0121] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0122] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0123] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0124] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0125] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0126] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. An event processing method, characterized in that: include: Generating at least one target keyword corresponding to the event to be processed according to the event description text of the event to be processed; According to each of the target keywords, the total number of historical events, each keyword, and the total number of events corresponding to each keyword stored in the preset database are updated; wherein the total number of events corresponding to each keyword is the total number of events containing the keyword in the event description text; Detecting whether each of the target keywords is in a preset keyword blacklist or keyword whitelist; wherein the preset keyword blacklist contains at least one unimportant word input by the user, and the unimportant word is a word that can be ignored in the process of calculating the importance of the event; the preset keyword whitelist contains at least one important word input by the user, and the important word is a word that will be included in the event description text of the event that the user needs to focus on; If each of the target keywords is not in the preset keyword blacklist or keyword whitelist, then determining the total number of events corresponding to each of the target keywords according to each of the keywords stored in the preset database and the total number of events corresponding to each of the keywords; Calculate the importance of the event to be processed according to the total number of historical events and the total number of events corresponding to each target keyword; The updating of the total number of historical events, the keywords, and the total number of events corresponding to the keywords stored in the preset database according to the target keywords includes: Add 1 to the total number of historical events stored in the preset database; For each target keyword, perform the following actions: Searching for a keyword that is the same as the currently processed target keyword among the keywords stored in the preset database; If the same keyword as the currently processed target keyword is found, the total number of events corresponding to the keyword is increased by 1; If no keyword identical to the currently processed target keyword is found, the currently processed target keyword and the total number of initial events corresponding to the currently processed target keyword are stored in the preset database; wherein the total number of initial events is 1.
2. The method according to claim 1, characterized in that The step of generating at least one target keyword corresponding to the event to be processed according to the event description text of the event to be processed includes: Perform word segmentation on the event description text of the event to be processed to obtain multiple words; removing stop words from the plurality of words to obtain at least one valid word from the plurality of words; The at least one valid word is determined as at least one target keyword corresponding to the event to be processed.
3. The method according to claim 1, characterized in that The determining the total number of events corresponding to each target keyword according to each keyword stored in the preset database and the total number of events corresponding to each keyword includes: For each target keyword, perform the following actions: Searching for a keyword that is the same as the currently processed target keyword among the keywords stored in the preset database; The total number of events corresponding to the keyword that is the same as the current processing target keyword is determined as the total number of events corresponding to the current processing target keyword.
4. The method according to claim 1, characterized in that: The calculating the importance of the event to be processed according to the total number of historical events and the total number of events corresponding to each target keyword includes: Calculate the occurrence probability of each target keyword according to the total number of historical events and the total number of events corresponding to each target keyword; Calculating the occurrence probability of the event to be processed according to the occurrence probability of each target keyword; The importance of the event to be processed is calculated according to the occurrence probability of the event to be processed and a preset importance calculation formula.
5. The method according to claim 4, characterized in that After detecting whether each of the target keywords is in a preset keyword blacklist or keyword whitelist, the method further includes: If each of the target keywords is not in the preset keyword whitelist, and a first target keyword among the target keywords is in the preset keyword blacklist, then according to each keyword stored in the preset database and the total number of events corresponding to each keyword, determine the total number of events corresponding to the target keywords other than the first target keyword among the target keywords; The importance of the event to be processed is calculated according to the total number of historical events and the total number of events corresponding to the target keyword except the first target keyword.
6. The method according to claim 5, characterized in that After detecting whether each of the target keywords is in a preset keyword blacklist or keyword whitelist, the method further includes: If there is a second target keyword in each of the target keywords that is in the preset keyword whitelist, the importance of the event to be processed is determined to be the preset maximum importance.
7. An event processing device, characterized in that: include: A keyword generation module, used to generate at least one target keyword corresponding to the event to be processed according to the event description text of the event to be processed; A database update module, used to update the total number of historical events, each keyword, and the total number of events corresponding to each keyword stored in a preset database according to each target keyword; wherein the total number of events corresponding to each keyword is the total number of events containing the keyword in the event description text; A keyword detection module, used to detect whether each of the target keywords is in a preset keyword blacklist or keyword whitelist; wherein the preset keyword blacklist contains at least one unimportant word input by the user, and the unimportant word is a word that can be ignored in the process of calculating the importance of the event; the preset keyword whitelist contains at least one important word input by the user, and the important word is a word that will be included in the event description text of the event that the user needs to focus on; A quantity determination module, configured to determine the total number of events corresponding to each target keyword based on each keyword stored in the preset database and the total number of events corresponding to each keyword if each target keyword is not in the preset keyword blacklist or keyword whitelist; An importance calculation module, used to calculate the importance of the event to be processed according to the total number of historical events and the total number of events corresponding to each target keyword; The database update module is specifically used to: increase the total number of historical events stored in the preset database by 1; perform the following operations for each target keyword: search for the keyword that is the same as the currently processed target keyword among the keywords stored in the preset database; if the keyword that is the same as the currently processed target keyword is queried, increase the total number of events corresponding to the keyword by 1; if the keyword that is the same as the currently processed target keyword is not queried, store the current processing target keyword and the total number of initial events corresponding to the current processing target keyword in the preset database; wherein the total number of initial events is 1.
8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the event processing method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the event processing method according to any one of claims 1 to 6 when executed.
Citation Information
Patent Citations
Alarm event processing method and device
CN113986657A