CN110245055B - Keyword warning method and device based on log - Google Patents
Keyword warning method and device based on log Download PDFInfo
- Publication number
- CN110245055B CN110245055B CN201910436250.2A CN201910436250A CN110245055B CN 110245055 B CN110245055 B CN 110245055B CN 201910436250 A CN201910436250 A CN 201910436250A CN 110245055 B CN110245055 B CN 110245055B
- Authority
- CN
- China
- Prior art keywords
- notification
- keyword
- alarm
- voice
- target
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/32—Monitoring with visual or acoustical indication of the functioning of the machine
- G06F11/324—Display of status information
- G06F11/327—Alarm or error message display
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Telephonic Communication Services (AREA)
Abstract
The embodiment of the invention discloses a keyword warning method based on logs, which comprises the following steps: receiving an equipment operation log submitted by network equipment, and searching whether any alarm keyword in a preset alarm keyword set exists in the equipment operation log; if any alarm keyword exists in the equipment running log, extracting at least one notification keyword from the equipment running log according to a preset notification keyword set; acquiring alarm notification content corresponding to at least one notification keyword according to the notification keyword set mapping table, and splicing the alarm notification content with a target alarm notification template to generate voice notification information of the network equipment; and establishing voice communication with the appointed equipment, and after the voice communication is successfully established, voice broadcasting the voice notification information. The invention also correspondingly provides a keyword warning device based on the log. The invention simplifies the alarm notification information and improves the playing efficiency, the intelligibility and the alarm processing efficiency of the alarm information.
Description
Technical Field
The invention relates to the technical field of computers, in particular to a keyword warning method and device based on logs.
Background
With the rapid development of technologies such as computers, networks and the like, a plurality of network devices and complex application programs are required for the same project or the same area, and if a fault occurs in the operation process of the network device, troubleshooting is a huge project, so that the alarm technology is very important. At present, a special network device maintainer generally maintains the network device in real time, but once a fault occurs, the network device is generally maintained in a mode of carrying out gradual troubleshooting through system error reporting, so that the problem of solving the fault is found, and thus the fault is really repaired.
Certainly, the network device may also generate a corresponding operation log in the operation process, which records the operation process of the network device and the generation result of the related file, and the network device maintenance personnel may also read the log, thereby obtaining the alarm information recorded in the log and troubleshooting the fault, but the operation log of the network device is longer due to the complexity of the operation process, the time and the effort of the maintenance personnel are consumed to search the related alarm information from more log information, and the intelligibility of the log displaying the related information is not high, which results in the reduction of the alarm processing efficiency.
Disclosure of Invention
Therefore, the keyword alarm method based on the log is provided for solving the technical problems that time and labor are consumed for searching related alarm information in more log information, and the alarm processing efficiency is reduced due to low understandability of log display related information.
An embodiment of the present invention provides a log-based keyword warning method, including:
receiving an equipment operation log submitted by network equipment;
searching whether any alarm keyword in a preset alarm keyword set exists in the equipment operation log;
if any alarm keyword exists in the equipment running log, extracting at least one notification keyword from the equipment running log according to a preset notification keyword set;
acquiring alarm notification content corresponding to at least one notification keyword in the device operation log according to a notification keyword set mapping table, wherein the notification keyword set mapping table comprises the alarm notification content corresponding to each notification keyword;
generating voice notification information of the network equipment according to the splicing result of the alarm notification content corresponding to the at least one notification keyword and a preset target alarm notification template;
requesting to establish a voice call with a specified device, and after the voice call is successfully established, voice broadcasting the voice notification information to the specified device.
The generating of the voice notification information of the network device according to the splicing result of the alarm notification content corresponding to the at least one notification keyword and the preset target alarm notification template includes:
determining a notification content type corresponding to at least one notification keyword extracted from the device operation log, wherein the notification content type corresponding to the at least one notification keyword comprises a network device identifier, an alarm occurrence time, an alarm occurrence position, an alarm event identifier or an alarm event description;
determining corresponding target notification template voice from a plurality of alarm notification templates according to the notification content type corresponding to the at least one notification keyword, wherein the target notification template voice comprises the content adding position of the notification content type corresponding to the at least one notification keyword;
converting the alarm notification content corresponding to the at least one notification keyword into at least one alarm notification voice;
and according to the notification content type corresponding to the at least one notification keyword, adding the warning notification voice corresponding to the at least one notification keyword to the content adding position corresponding to the notification content type in the target notification template voice respectively to generate the voice notification information of the network equipment.
The generating of the voice notification information of the network device according to the splicing result of the alarm notification content corresponding to the at least one notification keyword and the preset target alarm notification template includes:
determining a notification content type corresponding to at least one notification keyword extracted from the device operation log, wherein the notification content type corresponding to the at least one notification keyword comprises a network device identifier, an alarm occurrence time, an alarm occurrence position, an alarm event identifier or an alarm event description;
determining a corresponding target alarm notification template from a plurality of alarm notification templates according to the notification content type corresponding to the at least one notification keyword, wherein the target alarm notification template comprises a content adding position of the notification content type corresponding to the at least one notification keyword;
according to the notification content type corresponding to the at least one notification keyword, adding the warning notification content corresponding to the at least one notification keyword to the content adding position corresponding to the notification content type in the target warning notification template, so as to obtain the splicing result of the warning notification content corresponding to the at least one notification keyword and the preset target warning notification template;
and converting the splicing result into voice notification information of the network equipment.
Optionally, the generating the voice notification information of the network device further includes:
detecting an initial language type of a statement where the at least one notification keyword extracted from the device operation log is located, and acquiring a target language type;
segmenting the sentence where the at least one notification keyword is located according to the initial language type to obtain a first element set forming the sentence where the at least one notification keyword is located, wherein each first element contained in the first element set is a word or a phrase;
translating each first element in the first element set into a first target element of a target language type, and acquiring a corresponding first target sentence pattern according to the first element set;
generating a first target sentence of the target language type according to the first target sentence pattern and each first target element obtained by translation;
replacing at least one first target element corresponding to the at least one notification keyword in the first target statement with alarm notification content corresponding to the at least one notification keyword to obtain an alarm notification statement of the statement where the at least one notification keyword is located;
and generating voice notification information of the network equipment according to a splicing result of the alarm notification statement of the at least one notification keyword and a preset target alarm notification template.
Optionally, the generating the voice notification information of the network device further includes:
under the condition that the length of the equipment running log is determined not to exceed a preset alarm length threshold value, detecting an initial language type of the equipment running log, and acquiring a target language type;
splitting the device running log into a plurality of log single sentences, and splitting any one of the log single sentences according to the initial language type to obtain a second element set forming any one of the log single sentences, wherein each second element contained in the second element set is a word or a phrase;
translating each second element in the second element set into a second target element of a target language type, and acquiring a corresponding second target sentence pattern according to the second element set;
generating a second target sentence of the target language type according to the second target sentence pattern and each second target element obtained by translation;
replacing at least one second target element corresponding to the at least one notification keyword in the second target statement with alarm notification content corresponding to the notification keyword;
and generating the voice notification information of the network equipment according to the splicing result of the alarm notification content and a preset target alarm notification template.
Optionally, the requesting and the specified device establish a voice call, and after the voice call is successfully established, the voice broadcasting the voice notification information to the specified device includes:
determining a plurality of terminal devices of the network device according to the device identifier of the network device and the at least one notification keyword extracted from the device operation log, wherein the plurality of terminal devices are the designated devices, and the designated devices at least comprise a first terminal device and a second terminal device;
requesting to establish a voice call with the first terminal equipment, and if the voice call is established successfully, broadcasting the voice notification information to the first terminal equipment in a voice mode; otherwise, requesting to establish voice communication with the second terminal equipment, if the voice communication is established successfully, then broadcasting the voice notification information to the second terminal equipment in a voice mode, and otherwise, returning to the step of executing the request to establish the voice communication with the first terminal equipment.
Another aspect of the embodiments of the present invention provides a keyword warning apparatus based on a log, including:
the receiving module is used for receiving the equipment running log submitted by the network equipment;
the searching module is used for searching whether any alarm keyword in a preset alarm keyword set exists in the equipment running log;
the search module is further configured to extract at least one notification keyword from the device running log according to a preset notification alarm keyword set if any alarm keyword exists in the device running log;
an obtaining module, configured to obtain, according to a notification keyword set mapping table, alarm notification content corresponding to each notification keyword in the device operation log, where the notification keyword set mapping table includes the alarm notification content corresponding to each notification keyword;
the processing module is used for generating voice notification information of the network equipment according to the splicing result of the alarm notification content corresponding to the at least one notification keyword and a preset target alarm notification template;
and the feedback module is used for requesting to establish a voice call with the specified equipment and broadcasting the voice notification information to the specified equipment in a voice mode after the voice call is successfully established.
Wherein the feedback module further comprises:
and the voice conversion unit is used for converting the alarm notification information into the voice notification information.
Another aspect of the embodiments of the present invention provides a keyword warning apparatus based on a log, including: a processor, a memory, a transmission device;
the processor is respectively connected with the memory and the transmission device, wherein the transmission device is used for transmitting data to a user, the memory is used for storing program codes, and the processor is used for calling the program codes to execute the log-based keyword alarm method in one aspect of the embodiment of the invention.
The embodiment of the invention searches whether any one of preset alarm keywords in a set of alarm keywords is stored in an equipment running log after the equipment running log submitted by network equipment is received, if so, at least one notification keyword is extracted from the equipment running log according to the set of the preset notification keywords, wherein the set of the notification keywords comprises the set of the alarm keywords, the alarm notification content corresponding to the at least one notification keyword obtained according to a mapping table of the set of the notification keywords is combined with a target alarm notification template to generate the voice notification information of the network equipment, a voice call is established with the specified equipment, and the voice notification information is broadcasted after the establishment is successful, so that the alarm notification information is simplified by arranging the equipment running log, the readability and the understandability of the alarm notification information are improved, and the voice broadcast is carried out, time and energy are saved, and the alarm processing efficiency is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Wherein:
fig. 1 is a flowchart of a keyword warning method based on a log according to an embodiment of the present invention;
fig. 2a is a schematic diagram illustrating a content relationship between an alert keyword set and a notification keyword set according to an embodiment of the present invention;
fig. 2b is a schematic diagram illustrating a content relationship between an alert keyword set and a notification keyword set according to another embodiment of the present invention;
fig. 2c is a schematic diagram illustrating a content relationship between an alert keyword set and a notification keyword set according to another embodiment of the present invention;
fig. 3 is a schematic diagram of a data processing procedure in a first implementation manner of generating a voice notification message according to an embodiment of the present invention;
fig. 4 is a schematic flowchart of a specific implementation procedure in a first implementation manner according to an embodiment of the present invention;
fig. 5 is a schematic flowchart of another specific implementation process in the first implementation manner according to an embodiment of the present invention;
fig. 6 is a schematic flowchart of another specific implementation procedure in the first implementation manner according to an embodiment of the present invention;
fig. 7 is a schematic diagram of a data processing procedure in a second implementation manner of generating a voice notification message according to an embodiment of the present invention;
fig. 8 is a schematic flowchart of a specific implementation process in a second implementation manner according to an embodiment of the present invention;
fig. 9 is a schematic flowchart of another specific implementation process in the second implementation manner according to the embodiment of the present invention;
fig. 10 is a flowchart illustrating a further specific implementation procedure in the second implementation manner according to an embodiment of the present invention;
fig. 11 is a keyword warning apparatus based on a log according to an embodiment of the present invention;
fig. 12 is a schematic structural diagram of a terminal device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, fig. 1 is a schematic flowchart of a keyword warning method based on a log according to an embodiment of the present invention. In the embodiment of the present invention, a device that executes the following log-based keyword warning method is referred to as a keyword warning apparatus, and the keyword warning apparatus may be a system composed of one or more devices, or a warning device, or may be a virtual apparatus integrated on a network device.
As shown in fig. 1, the log-based keyword warning process provided in the embodiment of the present invention may include the following steps:
step S101, receiving an equipment operation log submitted by the network equipment.
Specifically, during the operation of the network device, a lot of additional information may be generated, including basic information of the network device, request response information, execution process information, network connection information, and the like, and during the operation of the network device, the additional information may generate a corresponding file or be directly stored in an internal memory. The operation process recording file generated by the network device in the operation process is a plurality of device operation logs, the device operation logs may include the additional information, and the device operation logs may be stored in text formats such as ". log", ". txt", or directly stored in an internal memory of the network device in the form of data.
Specifically, when the network device is interrupted or reaches a preset query time or receives a log query related instruction, the keyword warning device performs traversal query on the multiple device operation logs, wherein any device operation log of the network device is received from the multiple device operation logs, and the following operations are performed.
Specifically, assuming that the network device is a switch, obtaining a plurality of device operation logs of the switch, performing traversal query on the plurality of device operation logs, and obtaining one device operation log of the switch from the device operation logs as follows:
Lujiazui access switches
Nov13 09:01:55 2018 SQ_SH_LJZ_25FW_10.38.253.7%%10STM/4/LINK STATUS CHANGE(t):-Slot=2;
Trap 1.3.6.1.4.1.25506.2.91.6.0.1<hh3c Stack Port Link Status Change>:Physical index of the member is 3,member ID is 2.Link status of the IRF port index 2 and member ID2 turned to 1.
step S102, searching whether any alarm keyword in a preset alarm keyword set exists in the equipment running log.
Specifically, the keyword warning apparatus further stores a preset warning keyword set, and may determine whether to trigger a warning through the preset warning keyword set, where the warning keyword set includes but is not limited to: error, warning, Neterror, proplem, shutdown, memer ID, and the like. Wherein error is an error, which indicates that the network device has an error and affects the main process; warning is an alarm, which indicates that a certain process of the network equipment is warned, but does not affect the main process; NetError is a network request error and generally indicates that a problem occurs in a network connection process; the problem is a problem and represents that the network equipment has a problem which is difficult to solve; shutdown is interruption, which indicates that the process is interrupted due to unknown fault of the network equipment; the member ID is member ID and indicates that the switch stack group is abnormal and the like. In an optional implementation manner, in order to ensure that the log-based keyword warning process is more convenient, the recognition efficiency of warning keywords is improved, and the success rate of triggering warning is improved, a plurality of warning keywords included in the warning keyword set may not be distinguished from each other in case of matching with the device operation log. Matching the equipment operation log with the alarm keyword set, searching the content in the alarm keyword set in the equipment operation log, if any alarm keyword in the alarm keyword set is searched in the equipment operation log, indicating that the equipment operation log is an alarm-related description log, thereby triggering an alarm, and executing step S103; otherwise, continuously traversing the plurality of equipment running logs, returning to execute the step S101, and acquiring the next equipment running log.
Specifically, the device operation log of the switch is matched with the alarm keyword set, and the first alarm keyword "member ID" in the alarm keyword set is found in the device operation log of the switch, so that the device operation log of the switch triggers an alarm, thereby executing step S103.
And step S103, extracting at least one notification keyword from the equipment operation log according to a preset notification keyword set.
Specifically, the keyword warning apparatus further stores a preset notification keyword set, where the notification keyword set may include, but is not limited to, an address, a component, a protocol, or warning content, and is respectively used to indicate a location, a type, and a related description of a warning, for example: SQ _ SH _ LJZ, OSPF, BGP, RIP, etc. Wherein SQ _ SH _ LJZ is a Lujiazui headquarters, indicates that a network device at the Lujiazui headquarters has a fault, and is used for indicating the position of alarm occurrence; OSPF is an internal gateway protocol of Open Shortest Path First, which is called Open Shortest Path First, and indicates that the OSPF protocol of the network device fails in the configuration or execution process, and is used for indicating the type of alarm; BGP is a Border Gateway protocol, which is called Border Gateway protocol totally, and represents that the connection of the network equipment fails when the network equipment exchanges information among routes, and is used for indicating the type of alarm; the RIP is an interior gateway Protocol of a Routing Information Protocol, which is called Routing Information Protocol, and indicates that a fault occurs when the network device performs Routing Information transfer within an autonomous system in which the network device is located, and is used to indicate a type of alarm occurrence, and the like. The notification keywords in the notification keyword set may be added or deleted or changed by the user according to needs, which is not limited herein. In an optional implementation manner, in order to ensure that the log-based keyword warning process is more convenient, the warning content is more detailed and understandable, so that the recognition rate of the notification keywords is improved, the feedback content of the warning information is enriched, and the case can be kept when any notification keyword in the notification keyword set is searched in the device operation log.
Optionally, in a possible implementation manner, the relationship between the notification keyword set and the alarm keyword set may be as shown in fig. 2a-2c, and a specific notification keyword set may include, but is not limited to, an alarm keyword set, as shown in fig. 2 a; or the notification keyword set and the alarm keyword set have partial content overlapping, as shown in fig. 2 b; or the content of the notification keyword set is completely different from the content of the alert keyword set, as shown in fig. 2 c.
And matching the equipment running log with the notification keyword set, and searching the content in the notification keyword set from the equipment running log so as to extract at least one notification keyword contained in the equipment running log.
Specifically, the device operation log of the switch is matched with the notification keyword set, and the first notification keyword "SQ _ SH _ LJZ" and the second notification keyword "member ID" are found in the device operation log of the switch.
Step S104, generating the voice notification information of the network device.
Specifically, the keyword warning apparatus further stores a notification keyword set mapping table, where the notification keyword set mapping table includes a notification keyword set, a notification content type corresponding to each notification keyword, a warning notification content corresponding to each notification keyword, and a contact associated with each notification keyword, where the notification content type corresponding to each notification keyword includes a network device identifier, a warning occurrence time, a warning occurrence position, a warning event identifier, or a warning event description. The keyword warning device also comprises a plurality of warning notification templates, and each warning notification template is different in the number of content adding positions and the types of notification content to which the content can be added.
The keyword warning device generates the voice notification information of the network device according to the splicing result of the warning notification content corresponding to the at least one notification keyword and a preset target warning notification template by acquiring the warning notification content corresponding to the at least one notification keyword in the device operation log.
Optionally, the notification keyword set mapping table may be shown in the following table, where content in the table is a corresponding optional embodiment assumed for the device operation log of the switch, and content added by a user may also be acquired, or other alarm related information may be acquired for integration:
optionally, in a first possible implementation manner of generating the voice notification information, the at least one alert notification content is converted into at least one alert notification voice, and the at least one alert notification voice is voice-spliced with the notification template voice of the target alert notification template to obtain the voice notification information, where the notification template voice of the target alert notification template may be stored in the keyword alert device in a form of multiple audio segments.
As shown in fig. 3, a data processing process in the first possible implementation manner for generating the voice notification information sequentially traverses multiple device operation logs of the network device, matches any device operation log with an alarm keyword set, triggers an alarm if any alarm keyword in the alarm keyword set is found in any operation log, searches for content in the notification keyword set in the device operation log, and finds at least one notification keyword: a first notification keyword, a second notification keyword …. And then obtaining the alarm notification content corresponding to the at least one notification keyword through a notification keyword set mapping table: the first alarm notification content and the second alarm notification content … convert the alarm notification content corresponding to the at least one notification keyword into an alarm notification voice: the first and second alarm notification voices … generate voice notification information based on the result of concatenating the at least one alarm notification voice with the notification template voice of the target alarm notification template. And feeding back the voice notification information to the appointed equipment corresponding to the appointed contact person, namely carrying out voice broadcasting. And continuously traversing the plurality of equipment running logs of the network equipment, executing the keyword warning process on each equipment running log until all the equipment running logs of the network equipment are processed, and ending the keyword warning process.
For the first possible implementation manner of generating the voice notification information, the following three specific implementation processes may be included:
specifically, in a specific implementation process under a first possible implementation manner of generating voice notification information, referring to fig. 4, fig. 4 is a flowchart of a specific implementation process under the first implementation manner provided by an embodiment of the present invention, where the keyword alert apparatus determines a notification content type corresponding to at least one notification keyword extracted from the device operation log, determines a corresponding target alert notification template from a plurality of alert notification templates according to the notification content type corresponding to the at least one notification keyword, and respectively adds the alert notification content corresponding to the at least one notification keyword to content adding positions corresponding to the notification content types in the target alert notification template according to the notification content type corresponding to the at least one notification keyword, so as to obtain a splicing result of the alert notification content corresponding to the at least one notification keyword and a preset target alert notification template, and generating the voice notification information of the network equipment according to the splicing result.
As shown in fig. 4, the method comprises the following steps:
s401, determining the notification content type of at least one notification keyword.
And determining the notification content type corresponding to the at least one notification keyword extracted from the device operation log and the number of the at least one notification keyword.
Specifically, in step S103, it can be known that the obtained device operation log of the switch includes two notification keywords, i.e., a first notification keyword "SQ _ SH _ LJZ" and a second notification keyword "member ID", and the notification content type of the first notification keyword "SQ _ SH _ LJZ" is an alarm occurrence location, and the notification content type of the second notification keyword "member ID" is an alarm event identifier, by performing lookup through the notification keyword set mapping table.
S402, selecting an alarm notification template according to the notification content type of the at least one notification keyword.
Specifically, a plurality of alarm notification templates are obtained, and a corresponding alarm notification template is determined according to the number of the at least one notification keyword and the notification content type corresponding to the at least one notification keyword. The number of content adding positions in the alarm notification template is the number of the at least one notification keyword, and the target alarm notification template includes the content adding position of the notification content type corresponding to the at least one notification keyword. Wherein, the alarm notification template may comprise a plurality of audio segments.
Specifically, when the alarm notification templates corresponding to the first notification keyword "SQ _ SH _ LJZ" and the second notification keyword "member ID" are searched, the notification template voices of the alarm notification templates including two content addition positions are searched from the plurality of alarm notification templates, and the two content addition positions may add the content whose notification content types are the alarm occurrence position and the alarm event identifier, respectively. Optionally, the above-mentioned alarm notification template may be "B fault occurs at a", where a type of the notification content to which the content may be added is an alarm occurrence location, and a type of the notification content to which the content may be added is an alarm event identifier, and the alarm notification template may be stored in two audio segments, which are a first audio segment "chu fa going" and a second audio segment "gu zhang", respectively. Optionally, the above-mentioned alarm notification template is an example of an optional template, and other feasible template styles may also be used as the alarm notification template.
S403, converting the alarm notification content corresponding to the notification keyword into alarm notification voice.
Specifically, the alarm notification content corresponding to the at least one notification keyword is obtained, and the at least one alarm notification content is converted into an alarm notification voice by performing voice conversion.
Specifically, it can be seen that the alarm notification content corresponding to at least one notification keyword in the switch is: the first alarm notification content corresponding to the first notification keyword "SQ _ SH _ LJZ" is "continental rise headquarters", the second alarm notification content corresponding to the second notification keyword "member ID" is "switch stacking group exception", the first alarm notification content and the second alarm notification content are converted into voices, and a first alarm notification voice "lu jia zui zong bu" and a second alarm notification voice "jiao hu ji dui di zu yi chang" are obtained.
S404, generating voice notification information according to the voice splicing result of the alarm notification voice and the notification template voice of the target alarm notification template.
Specifically, in a possible implementation manner, the target alarm notification template is stored in the keyword alarm device in a sequence of multiple audio segments, a content addition position of a notification content type is included between any two adjacent audio segments, alarm notification voices corresponding to each alarm notification content are respectively added to corresponding content addition positions in the target alarm notification template according to the notification content type of the alarm notification content, and the multiple audio segments and each alarm notification voice are sequentially spliced to generate voice notification information.
Specifically, it is known that the first alarm notification voice "lu jia zui zong bu" corresponding to the first notification keyword "SQ _ SH _ LJZ" is added to a in the alarm notification template according to the notification content type, and the second alarm notification voice "jiao huan ji dui zu chang" corresponding to the second notification keyword "member ID" is known to be added to B in the alarm notification template according to the notification content type, and the first alarm notification voice, the first audio segment, the second alarm notification voice, and the second audio segment are sequentially concatenated to generate the voice notification information "lu jia zui zong bu fa sheng jia ji huan di zu yi chang".
Specifically, in another specific implementation process under a first possible implementation manner of generating a voice notification message, referring to fig. 5, fig. 5 is a schematic flow diagram of another specific implementation process under the first implementation manner provided by the embodiment of the present invention, as shown in fig. 5, including the following steps:
s501, determining the notification content type of at least one notification keyword, and selecting an alarm notification template according to the notification content type.
Specifically, the process is the same as steps S401 to S402 in the first possible implementation manner of generating the alarm notification information, and is not described again here.
S502, acquiring an alarm notification statement, and converting the alarm notification statement into notification statement voice.
Specifically, detecting an initial language type of a statement where the at least one notification keyword extracted from the device operation log is located, and acquiring a target language type; segmenting the sentence where the at least one notification keyword is located according to the initial language type to obtain a first element set forming the sentence where the at least one notification keyword is located, wherein each first element contained in the first element set is a word or a phrase; translating each first element in the first element set into a first target element of a target language type, and acquiring a corresponding first target sentence pattern according to the element type of each first element in the first element set and the relative position of the first element in a sentence where at least one notification keyword is located; generating a first target sentence of the target language type according to the first target sentence pattern and each first target element obtained by translation; and replacing at least one first target element corresponding to at least one notification keyword in the first target statement with the alarm notification content corresponding to the notification keyword to obtain an alarm notification statement of the statement where the at least one notification keyword is located, and converting the alarm notification statement into notification statement voice.
Specifically, if the language type of the sentence to be translated is english and the target language type is chinese, the sentence to be translated is divided into a plurality of elements according to a preset semantic set of english words and phrases, each element is a word or a phrase, each element is translated into chinese, and specifically, the part of speech of each word and the relationship between adjacent words in the sentence are sequentially detected, so as to determine whether the word is in the phrase, for example, whether prepositions such as "of, in" exist or not is detected, and the sentence is further divided into a plurality of elements; obtaining the relative position and the part-of-speech of each element in the sentence to be translated, for example, the sentence to be translated is cut into 5 elements, the relative position of each element in the sentence to be translated is considered to be 1, 2, 3, 4, 5, the part-of-speech includes phrases, adjectives, nouns, etc., because of the grammatical structure of english, the first noun of english is the subject, verbs are the objects, etc., i.e., the target sentence is determined according to the relative position and the part-of-speech, or the accuracy of the target sentence can be increased by combining the grammatical structure of english, for example, the sentence to be translated is the "noun phrase article noun", the corresponding target sentence is obtained to be the "subject-language predicate", and because the article is a modification of noun, the verb article can be considered to be an element. If the language type of the sentence to be translated is Chinese and the target language type is English, segmenting the sentence to be translated into a plurality of elements through word segmentation processing, and translating each element into English; and determining a target sentence pattern by combining the Chinese grammar structure according to the relative position and the part of speech of each element in the sentence to be translated, and finely adjusting according to the English grammar structure to obtain the translated sentence. The word segmentation processing here is processing by a Chinese word segmentation technology. The above is a possible translation mode, and a related rule may be formulated according to specific needs to determine the target sentence pattern, which is not limited herein.
The first alarm notification content corresponding to the first notification keyword "SQ _ SH _ LJZ" is "continental family joint headquarters", and the second alarm notification content corresponding to the second notification keyword "member ID" is "switch stacking group abnormal". The sentence where the first notification keyword ' SQ _ SH _ LJZ ' is "Nov 1309: 01: 552018 SQ _ SH _ LJZ", the sentence is segmented to obtain a corresponding first element set ' Nov 1309: 01: 552018 ' and ' SQ _ SH _ LJZ ', the first element set ' Nov 1309: 01: 552018 ' is translated into ' 11.11.2018 No. 13: 09:01:55 ', the ' SQ _ SH _ LJZ ' is translated into ' SQ _ SH _ LJZ ', a corresponding first target sentence form ' main language ' is obtained according to the first element set, the first target sentence ' 11.13.11.2018 No. 09:01:55SQ _ SH _ LJZ ' is obtained, the first target element ' SQ _ SH _ LJZ ' is replaced by a first alarm notification content ' Luzui headquarters ', the first alarm notification sentence ' 11.11.13.11.11.2018.09: 55: SQ _ SH _ LJZ ' is obtained, the first target element ' SQ _ SH _ LJZ ' is replaced by a first alarm notification content ' Luzui ' and the sentence ' Lin _ SH _ LJZ ', the first alarm notification sentence ' ID2 ' is obtained, the first alarm notification sentence ' Anhui ' and the sentence ' ID2 ' and ' is the sentence ' statement ' Itotage The member ID2 turned to 1 ", translates the statement into the alarm content in chinese, and combines the alarm notification content corresponding to the second notification keyword" member ID "to obtain a second alarm notification statement" switch stack group exception is 2. The link state of the IRF port index and switch stack group exception 2 becomes 1. "the first warning statement is converted into the first warning statement voice" 2018 nian 11 yue 13 ha 9 dian 01 fen 55 miao lu jia zui zong bu ", and the second warning statement is converted into the second warning statement voice" jiao hu ji dui di zu yi chang wei 2.IRF duan kou suo yi he jia hu ji dui di zu yi chang 2 de lian jie Zhuang tai bian wei 1 "
If the first target element is a character of the initial language type and the character is not a proper noun, a short name thereof or a notification keyword when the first element is translated into the first target element of the target language type, the first target element can be deleted. The first target sentence pattern is obtained according to the position of each first element in the first element set in the sentence where the at least one notification keyword extracted from the device running log is located and the element type of each first element. The element type here may be a noun, a verb, an adjective, a coronet, and the like, and the element type of the resulting first target element may be a subject, a predicate, an object, a subject, and the like.
And S503, generating voice notification information according to the splicing result of the notification statement voice and the notification template voice of the target alarm notification template.
Specifically, in a possible implementation manner, the target alarm notification template is stored in the keyword alarm device in a sequence of multiple audio segments, a content addition position of a notification content type is included between any two adjacent audio segments, alarm notification voices corresponding to each alarm notification content are respectively added to corresponding content addition positions in the target alarm notification template according to the notification content type of the alarm notification content, the multiple audio segments and each alarm notification voice are sequentially spliced, and voice notification information is generated by combining the notification sentence voices.
Specifically, it is known that the target alarm notification template is "B failure occurred at a", and two audio segments are stored, where the two audio segments are respectively a first audio segment "chufa rendering" and a second audio segment "gu zhang", and a first alarm notification voice "lu jia zong bu" corresponding to the first notification keyword "SQ _ SH _ LJZ" is added to a in the alarm notification template according to a notification content type, and a second alarm notification voice "jiao hu ji dui di zu yi chang" corresponding to the second notification keyword "member ID" is known to be added to B in the audio notification template according to a notification content type, and the first alarm notification voice, the first alarm notification segment, the second alarm notification voice and the second audio segment are sequentially spliced, and the first notification voice, the second notification voice and the second notification statement are combined to generate the voice notification information "lu jia hua zhu zong gang dui di zu chi chang zu yi chang gu zhang: 2018 nian 11 yue 13 hao 9 dian 01 fen 55 miao lu jia zui zong bu jia hu ji huang 2.IRF duan kou duo di zu yi chang 2 de lian jie Zhuang tai bian wei 1.
Specifically, in yet another implementation process in a first possible implementation manner of generating voice notification information, referring to fig. 6, fig. 6 is a flowchart illustrating a further implementation process in the first implementation manner provided by an embodiment of the present invention, and as shown in fig. 6, the method includes the following steps:
s601, determining the notification content type of at least one notification keyword, and selecting an alarm notification template according to the notification content type.
Specifically, the process is the same as steps S401 to S402 in the first possible implementation manner of generating the alarm notification information, and is not described again here.
S602, obtaining the alarm notification content corresponding to the notification keyword, and translating the equipment running log if the length of the equipment running log does not exceed a preset alarm length threshold.
Specifically, the method includes acquiring an alarm notification content corresponding to the at least one notification keyword, and determining whether the length of the device operation log exceeds a preset alarm length threshold, if not, translating the content of the device operation log except the at least one notification keyword to obtain a log content in a specific language, where the translation process refers to an alarm notification content generation process in step S502 in fig. 5; otherwise, the first or the second possible implementation manner of generating the voice notification information may be performed.
Specifically, the first alarm notification content corresponding to the first notification keyword "SQ _ SH _ LJZ" is "continental rise headquarters", the second alarm notification content corresponding to the second notification keyword "member ID" is "switch stacking group abnormal", the length of the device operation log is obtained assuming that the preset alarm length threshold is 100 words, and the device operation log is translated into the alarm notification content in the specific language if the device operation log is known not to exceed the preset alarm length threshold. If the device operation log is a plurality of sentences, before the data to be translated is segmented, the data to be translated is segmented into a plurality of single sentences, then each single sentence is generated into a second target sentence, and a second target element corresponding to a notification keyword in the second target sentence is replaced by the alarm notification content of the notification keyword, as follows:
'Lujiazui' switch
11/2018, No. 13/month 09:01:55 the connection state of the continental rise and the rostral department changes: the interface is 2; the physical identification of the member is 3 and the switch stack exception is 2. The link state of the IRF port index and switch stack group exception 2 becomes 1. "
S603, obtaining notification log voice through the alarm notification content and the equipment running log, and splicing the notification log voice and the alarm notification template to generate voice notification information.
Specifically, the alarm notification content is converted into an alarm notification voice, and the log content is converted into a log voice, in a possible implementation manner, the target alarm notification template is stored in the keyword alarm device in a sequence of a plurality of audio segments, a content addition position of a notification content type is included between any two adjacent audio segments, alarm notification voices corresponding to each alarm notification content are respectively added to corresponding content addition positions in the target alarm notification template according to the notification content type of the alarm notification content, the plurality of audio segments and each alarm notification voice are sequentially spliced, and voice notification information is generated by combining the log voice.
Specifically, the target alarm notification template is known as "B failure at a", and is stored in two audio segments, namely, a first audio segment "chufa sheng" and a second audio segment "gu zhang", the first notification keyword "SQ _ SH _ LJZ" is converted into a first alarm notification voice "lu jia zui zong bu", which is added to a position a in the alarm notification template according to the notification content type, the second notification keyword "member ID" is converted into a second alarm notification voice "jiao hu ji dui di zu yi chang", which is known to be added to a position B in the alarm notification template according to the notification content type, the translation result of the device operation log is converted into log voice, and the first alarm notification voice and the first audio segment are sequentially spliced, and the second alarm notification voice and the second audio segment are combined with the log voice to generate voice notification information:
“lu jia zui zong bu chu fa sheng jiao huan ji dui die zu yi chang gu zhang:
Lu jia zui jie ru kai guan
2018 nian 11 yue 13 hao 09:01:55 lu jia zui zong bu de lian jie zhuang tai fa sheng gai bian:jie kou wei 2;cheng yuan de wu li biao shi wei 3,jiao huan ji dui die zu yi chang wei 2。IRF duankou suo yin he jiao huan ji dui die zu yi chang 2 de lian jie Zhuang tai bian wei 1.”
optionally, in a second possible implementation manner of generating the voice notification information, the at least one alert notification content is text-spliced with the notification text of the target alert notification template to obtain the alert notification information, and the alert notification information is converted into the voice notification information, where the target alert notification template is a text that can be inserted with content.
As shown in fig. 7, a data processing process in the second possible implementation manner for generating the voice notification information sequentially traverses multiple device operation logs of the network device, matches any device operation log with an alarm keyword set, triggers an alarm if any alarm keyword in the alarm keyword set is found in any operation log, searches for content in the notification keyword set in the device operation log, and finds at least one notification keyword: a first notification keyword, a second notification keyword …. And then obtaining the alarm notification content corresponding to the at least one notification keyword through a notification keyword set mapping table: the first alarm notification content and the second alarm notification content … are used for generating alarm notification information by combining the at least one alarm notification content with a target alarm notification template, converting the alarm notification information from a text form to a voice form and recording the converted alarm notification information as voice notification information. And feeding the voice alarm information back to the appointed equipment corresponding to the appointed contact person, namely carrying out voice broadcasting. And continuously traversing the plurality of equipment running logs of the network equipment, executing the keyword warning process on each equipment running log until all the equipment running logs of the network equipment are processed, and ending the keyword warning process. The designated device may be regarded as a terminal device to which the contact information of the designated contact person is bound.
For the second possible implementation manner of generating the voice notification information, the following three specific implementation processes may be included:
specifically, in a second possible implementation process of generating the voice notification information, referring to fig. 8, fig. 8 is a schematic flowchart of a specific implementation process in the second implementation manner according to an embodiment of the present invention.
As shown in fig. 8, the method comprises the following steps:
s801, determining a notification content type of at least one notification keyword.
Specifically, refer to the description of step S401 in fig. 4, which is not described herein again.
S802, selecting an alarm notification template according to the notification content type of the at least one notification keyword.
Specifically, the process of obtaining the alarm notification template is shown in step S402 in fig. 4, where the alarm notification template is a text with a content adding position.
Specifically, when the alarm notification templates corresponding to the first notification keyword "SQ _ SH _ LJZ" and the second notification keyword "member ID" are searched, an alarm notification template including two content addition positions is searched from the plurality of alarm notification templates, and the two content addition positions may add contents whose notification content types are the alarm occurrence position and the alarm event identifier, respectively. Optionally, the alarm notification template may be "a fault occurs at a position B", where a notification content type to which content may be added at the position a is an alarm occurrence position, and a notification content type to which content may be added at the position B is an alarm event identifier. Optionally, the above-mentioned alarm notification template is an example of an optional template, and other feasible template styles may also be used as the alarm notification template.
And S803, acquiring the alarm notification content corresponding to the at least one notification keyword, and generating alarm notification information by combining the alarm notification template.
Specifically, the alarm notification content corresponding to each notification keyword is obtained, and according to the notification content type corresponding to each notification keyword, the alarm notification content corresponding to each notification keyword is added to the corresponding content adding position in the target alarm notification template, so as to generate the alarm notification information of the network device.
Specifically, the alarm notification content corresponding to the at least one notification keyword is acquired, it is known that the first alarm notification content corresponding to the first notification keyword "SQ _ SH _ LJZ" is "continental rise headquarters", the second alarm notification content corresponding to the second notification keyword "member ID" is "switch stack group abnormal", the alarm notification contents corresponding to the two notification keywords are added to the alarm notification template according to the notification content types corresponding to the first notification keyword "SQ _ SH _ LJZ" and the second notification keyword "member ID", it is known that the first alarm notification content "continental rise headquarters" corresponding to the first notification keyword "SQ _ SH _ LJZ" is added to the a in the alarm notification template according to the notification content types, and the second alarm notification content "switch stack group abnormal" corresponding to the second notification keyword "member ID" is known to be added to the alarm notification content types And finally obtaining the alarm notification information of the network equipment switch at the position B in the notification template, wherein the alarm notification information is that abnormal faults of the switch stacking group occur at the position of the Tujia headquarters.
S804, the alarm notification information is converted into voice notification information.
Specifically, the content of the alarm notification information is identified, and the content of the alarm notification information is converted into voice through voice conversion to obtain voice notification information.
Specifically, the alarm notification information of the network equipment switch is converted into voice notification information' lu jia zui zong bu chu fa sheng jia hu ji di zu yi chang gu zhang.
Specifically, in another specific implementation process in a second possible implementation manner of generating voice notification information, referring to fig. 9, fig. 9 is a schematic flow diagram of another specific implementation process in the second implementation manner provided in the embodiment of the present invention, as shown in fig. 9, including the following steps:
s901, determining the notification content type of at least one notification keyword, and selecting an alarm notification template according to the notification content type.
Specifically, refer to the processes described in step S801 and step S802 shown in fig. 8, which are not described herein again.
S902, obtaining the alarm notification content corresponding to the notification keyword, and translating the sentence where the notification keyword is located.
Specifically, referring to step S502 in fig. 5, the translation result is not converted into a speech form, and the translation result of the sentence in which the notification keyword is located is combined with the alarm notification template to generate the alarm notification information.
As can be seen from step S502 in fig. 5, a first alarm notification statement "11/13/2018/09: 01:55 lujiazui headquarters" is obtained by the first notification keyword "SQ _ SH _ LJZ", and a second alarm notification statement "switch stack group abnormality is 2 is obtained by the second notification keyword" member ID ". The link state of the IRF port index and switch stack group exception 2 becomes 1. Specifically, the alarm notification statement obtained by translating the statement of each notification keyword is combined with the target alarm notification template to generate the alarm notification information of the network device.
Specifically, the first alarm notification statement and the second alarm notification statement are combined with the target alarm notification template "a fails to occur at B: c ", generating the alarm notification information of the network equipment switch:
"abnormal failure of switch stacking group occurs at the headquarters of the continental family: 11/2018, No. 13/09: 01:55 Lujiazu headquarters. The switch stack group exception is 2. The link state of the IRF port index and switch stack group exception 2 becomes 1. "
And S903, converting the alarm notification information into voice notification information.
Specifically, the content of the alarm notification information is identified, and the content of the alarm notification information is converted into voice through voice conversion to obtain voice notification information. The voice notification information refers to the voice notification information shown in step S503 in fig. 5.
Specifically, in another implementation process under a second possible implementation manner of generating voice notification information, referring to fig. 10, fig. 10 is a schematic flow diagram of another implementation process under the second implementation manner provided by the embodiment of the present invention, as shown in fig. 10, including the following steps:
s1001, determining the notification content type of at least one notification keyword, and selecting an alarm notification template according to the notification content type.
Specifically, the process is the same as steps S801 and S802 in fig. 8, and is not described again here.
S1002, obtaining alarm notification content corresponding to the notification keyword, and translating the equipment running log if the length of the equipment running log does not exceed a preset alarm length threshold.
Specifically, referring to the description in step S602 shown in fig. 6, a translation result of the device operation log is obtained, which is not described herein again.
S1003, combining the alarm notification content and the translation result of the device operation log with the alarm notification template to generate alarm notification information.
Specifically, the alarm notification information of the network device is generated by combining the alarm notification content corresponding to each notification keyword and the log content of the specific language with the target notification template.
Specifically, the first alarm notification content and the second alarm notification content corresponding to the first notification keyword and the second notification keyword, respectively, and the log content in the specific language are combined with the target notification template to generate the alarm notification information of the network device switch:
"abnormal failure of switch stacking group occurs at the headquarters of the continental family:
land family mouth access switch
11/2018, No. 13/month 09:01:55 the connection state of the continental rise and the rostral department changes: the interface is 2; the physical identification of the member is 3 and the switch stack exception is 2. The link state of the IRF port index and switch stack group exception 2 becomes 1. "
S1004, converts the alarm notification information into voice notification information.
Specifically, the content of the alarm notification information is identified, and the content of the alarm notification information is converted into voice through voice conversion to obtain voice notification information.
Specifically, the voice notification information converted from the alarm notification information of the network device switch is as follows:
“lu jia zui zong bu chu fa sheng jiao huan ji dui die zu yi chang gu zhang:
Lu jia zui jie ru kai guan
2018 nian 11 yue 13 hao 09:01:55 lu jia zui zong bu de lian jie zhuang tai fa sheng gai bian:jie kou wei 2;cheng yuan de wu li biao shi wei 3,jiao huan ji dui die zu yi chang wei2。IRF duan kou suo yin he jiao huan ji dui die zu yi chang 2 de lian jie Zhuang tai bian wei 1.”。
and step S105, broadcasting the voice notification information to the specified equipment in a voice mode.
Specifically, the notification keyword set mapping table includes a plurality of terminal devices associated with each notification keyword, and the network device also has a plurality of associated terminal devices. The type of the network device is determined according to the device identifier of the network device, a plurality of relevant terminal devices of the network device are obtained according to the type of the network device, a plurality of terminal devices corresponding to the at least one notification keyword extracted from the device operation log can be obtained through the notification keyword set mapping table, so that N terminal devices which are the plurality of relevant terminal devices of the network device and the plurality of terminal devices corresponding to the at least one notification keyword are obtained, the terminal devices are recorded as a first terminal device to an nth terminal device, and the first terminal device is determined as the designated device.
Specifically, a voice call is requested to be established with the first terminal device, if the voice call is established successfully, the voice notification information is broadcasted to the first terminal device in a voice mode, otherwise, the voice call is requested to be established with the second terminal device, if the voice call is established successfully, the voice notification information is broadcasted to the second terminal device in a voice mode, otherwise, the voice call is requested to be established with the third terminal device, similarly, the voice call is sequentially requested to be established with the fourth terminal device to the nth terminal device, if the voice call is not established successfully, the process of continuously executing the request to establish the voice call with the first terminal device is returned, until the voice call is established successfully, and the voice notification information is broadcasted to the terminal device corresponding to the successfully established voice call.
As can be seen from the notification keyword set mapping table, the terminal device associated with the first notification keyword "SQ _ SH _ LJZ" includes: the first terminal equipment corresponds to a first contact person, and the contact way is 136XXXX 2564; and the second terminal equipment corresponds to a second contact person and has a contact address of 136XXXX 2566. The terminal device associated with the second notification keyword "member ID" includes: the third terminal equipment corresponds to a third contact person, and the contact way is 153XXXX 4851; and the fourth terminal equipment corresponds to a fourth contact person, and the contact way is 153XXXX 4850. And if the call bound by the third terminal device is dialed for the second time, a third contact person corresponding to the third terminal device answers the call, the voice alarm information is played to the third terminal device, and the keyword alarm process is ended.
The terminal device is a device capable of receiving messages through a corresponding contact way, such as a mobile phone, a computer, and the like, and the terminal device has a function of receiving voice messages, specifically, obtains the contact way of a designated contact person, and establishes communication connection with the corresponding designated device through the contact way, and it can be considered that the designated contact way is bound on the designated device.
The log-based keyword warning process provided by the embodiment of the invention is characterized in that a warning is triggered by searching the warning keyword in the equipment running log, the voice notification information is generated by translating the notification keyword in the equipment running log, and the voice notification information is sent to the specified equipment, so that the fed-back voice notification information is simplified, and the playing efficiency, the intelligibility and the warning processing efficiency of the voice notification information are improved. Meanwhile, the instantaneity of alarm processing is improved by circularly contacting a plurality of terminal devices for a plurality of times.
Optionally, referring to fig. 11, fig. 11 is a log-based keyword warning apparatus according to an embodiment of the present invention, and as shown in fig. 11, the log-based keyword warning apparatus 110 may include: the device comprises a receiving module 1101, a searching module 1102, an obtaining module 1103, a processing module 1104 and a feedback module 1105. Specifically, the method comprises the following steps:
a receiving module 1101, configured to receive an equipment operation log submitted by a network equipment;
a searching module 1102, configured to search, in the device operation log, whether any alarm keyword in a preset alarm keyword set exists;
the searching module 1102 is further configured to, if any one of the alert keywords exists in the device operation log, extract at least one notification keyword from the device operation log according to a preset notification alert keyword;
an obtaining module 1103, configured to obtain, according to a notification keyword set mapping table, alarm notification content corresponding to at least one notification keyword in the device operation log, where the notification keyword set mapping table includes the alarm notification content corresponding to each notification keyword;
a processing module 1104, configured to generate voice notification information of the network device according to a splicing result of the alarm notification content corresponding to the at least one notification keyword and a preset target alarm notification template;
and a feedback module 1105, configured to request to establish a voice call with a specified device, and after the voice call is successfully established, voice broadcast the voice notification information to the specified device.
The processing module 1104 is specifically configured to:
determining a notification content type corresponding to at least one notification keyword extracted from the device operation log, wherein the notification content type corresponding to the at least one notification keyword comprises a network device identifier, an alarm occurrence time, an alarm occurrence position, an alarm event identifier or an alarm event description;
determining corresponding target notification template voice from a plurality of alarm notification templates according to the notification content type corresponding to the at least one notification keyword, wherein the target notification template voice comprises the content adding position of the notification content type corresponding to the at least one notification keyword;
converting the alarm notification content corresponding to the at least one notification keyword into at least one alarm notification voice;
and according to the notification content type corresponding to the at least one notification keyword, adding the warning notification voice corresponding to the at least one notification keyword to the content adding position corresponding to the notification content type in the target notification template voice respectively to generate the voice notification information of the network equipment.
The processing module 1104 is specifically configured to:
determining a notification content type corresponding to at least one notification keyword extracted from the device operation log, wherein the notification content type corresponding to the at least one notification keyword comprises a network device identifier, an alarm occurrence time, an alarm occurrence position, an alarm event identifier or an alarm event description;
determining a corresponding target alarm notification template from a plurality of alarm notification templates according to the notification content type corresponding to the at least one notification keyword, wherein the target alarm notification template comprises a content adding position of the notification content type corresponding to the at least one notification keyword;
according to the notification content type corresponding to the at least one notification keyword, adding the warning notification content corresponding to the at least one notification keyword to the content adding position corresponding to the notification content type in the target warning notification template, so as to obtain the splicing result of the warning notification content corresponding to the at least one notification keyword and the preset target warning notification template;
and converting the splicing result into voice notification information of the network equipment.
The processing module 1104 is further specifically configured to:
detecting an initial language type of a statement where the at least one notification keyword extracted from the device operation log is located, and acquiring a target language type;
segmenting the sentence where the at least one notification keyword is located according to the initial language type to obtain a first element set forming the sentence where the at least one notification keyword is located, wherein each first element contained in the first element set is a word or a phrase;
translating each first element in the first element set into a first target element of a target language type, and acquiring a corresponding first target sentence pattern according to the first element set;
generating a first target sentence of the target language type according to the first target sentence pattern and each first target element obtained by translation;
replacing at least one first target element corresponding to the at least one notification keyword in the first target statement with alarm notification content corresponding to the at least one notification keyword to obtain an alarm notification statement of the statement where the at least one notification keyword is located;
and generating voice notification information of the network equipment according to a splicing result of the alarm notification statement of the at least one notification keyword and a preset target alarm notification template.
The processing module 1104 is further specifically configured to:
under the condition that the length of the equipment running log is determined not to exceed a preset alarm length threshold value, detecting an initial language type of the equipment running log, and acquiring a target language type;
splitting the device running log into a plurality of log single sentences, and splitting any one of the log single sentences according to the initial language type to obtain a second element set forming any one of the log single sentences, wherein each second element contained in the second element set is a word or a phrase;
translating each second element in the second element set into a second target element of a target language type, and acquiring a corresponding second target sentence pattern according to the second element set;
generating a second target sentence of the target language type according to the second target sentence pattern and each second target element obtained by translation;
replacing at least one second target element corresponding to the at least one notification keyword in the second target statement with alarm notification content corresponding to the notification keyword;
and generating the voice notification information of the network equipment according to the splicing result of the alarm notification content and a preset target alarm notification template.
Wherein, the processing module 1104 is further configured to:
under the condition that the length of the equipment operation log is determined not to exceed a preset alarm length threshold, translating the contents of the equipment operation log except the at least one notification keyword according to a translation dictionary of a specific language to obtain log contents of the specific language, and combining the alarm notification contents corresponding to the notification keywords to obtain an alarm notification log of the equipment operation log;
and generating the voice notification information of the network equipment according to the splicing result of the alarm notification log and a preset target alarm notification template.
Wherein, the feedback module 1105 is further configured to:
determining a plurality of terminal devices of the network device according to the device identifier of the network device and the at least one notification keyword extracted from the device operation log, where the plurality of terminal devices are the designated device, and the designated device at least includes a first terminal device and a second terminal device;
requesting to establish a voice call with the first terminal device, and if the voice call is successfully established, broadcasting the voice notification information to the first terminal device in a voice mode; otherwise, requesting to establish voice communication with the second terminal equipment, if the voice communication is successfully established, then broadcasting the voice notification information to the second terminal equipment, otherwise, returning to the step of executing the request to establish voice communication with the first terminal equipment.
Wherein, the feedback module 1105 further includes:
and the voice conversion unit is used for converting the alarm notification information from a text form to a voice form.
In a specific implementation, the apparatus may execute, through the modules, implementation manners provided in the steps shown in fig. 1 to implement the functions implemented in the embodiments, which may specifically refer to corresponding descriptions provided in the steps in the log-based keyword warning method embodiment shown in fig. 1, and are not described herein again.
The invention provides a log-based keyword warning device, which searches any warning keyword in a preset warning keyword set in a device running log to trigger warning by receiving the device running log submitted by network equipment, extracts at least one notification keyword from the device running log through the preset notification keyword set, acquires warning notification content corresponding to the at least one notification keyword through a notification keyword set mapping table, generates voice notification information of the network equipment by combining a target warning notification template, and sends the voice notification information to designated equipment, so that the fed-back voice notification information is simplified, and the playing efficiency, the intelligibility and the warning processing efficiency of the voice notification information are improved.
Referring to fig. 12, fig. 12 is a schematic structural diagram of a terminal device according to an embodiment of the present invention. As shown in fig. 12, the terminal device in this embodiment may include: one or more processors 1201, memory 1202, and a transmitting device 1203. The processor 1201, the memory 1202, and the transmission device 1203 are connected by a bus 1204. The memory 1202 is for storing a computer program comprising program instructions, the transmission device 1203 being for transmitting data to a user; the processor 1201 is configured to execute the program instructions stored in the memory 1202 to perform the following operations:
receiving an equipment operation log submitted by network equipment;
searching whether any alarm keyword in a preset alarm keyword set exists in the equipment operation log;
if any one of the alarm keywords exists in the equipment running log, extracting at least one notification keyword from the equipment running log according to a preset notification keyword set;
acquiring alarm notification content corresponding to at least one notification keyword in the device running log according to a notification keyword set mapping table, wherein the notification keyword set mapping table comprises the alarm notification content corresponding to each notification keyword;
generating voice notification information of the network equipment according to the splicing result of the alarm notification content corresponding to the at least one notification keyword and a preset target alarm notification template;
requesting to establish a voice call with the appointed equipment, and after the voice call is successfully established, broadcasting the voice notification information to the appointed equipment in a voice mode.
In a specific implementation, the terminal device may execute the implementation manners provided in the steps in fig. 1 through the built-in functional modules, which may specifically refer to the description of the implementation manners provided in the steps in fig. 1, and is not described herein again.
An embodiment of the present invention provides a terminal device, including: a processor, a memory, and a transmission device, which execute the steps of the method shown in fig. 1 described above by the processor retrieving computer instructions in the memory. Through the computer instructions in the memory, the processor executes the log-based keyword warning process to obtain the processed warning notification information and sends the warning notification information to the designated equipment, so that the fed-back warning notification information is simplified, the readability of the warning notification information is improved, and the processing efficiency of warning is improved.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, where the computer program includes program instructions, and when the program instructions are executed by a processor, the method for warning a keyword based on a log provided in each step shown in fig. 1 is implemented.
The terms "first," "second," and the like in the description and in the claims and in the drawings of embodiments of the invention are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "comprises" and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, apparatus, product, or apparatus that comprises a list of steps or elements is not limited to the listed steps or modules, but may alternatively include other steps or modules not listed or inherent to such process, method, apparatus, product, or apparatus. Moreover, the term "at least" is used in a partial recitation to reflect implementation considerations and not merely to present implementation requirements for the method.
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present invention, and it is therefore to be understood that the invention is not limited by the scope of the appended claims.
Claims (9)
1. A keyword alarm method based on logs is characterized by comprising the following steps:
receiving an equipment operation log submitted by network equipment;
searching whether any alarm keyword in a preset alarm keyword set exists in the equipment operation log;
if any alarm keyword exists in the equipment running log, extracting at least one notification keyword from the equipment running log according to a preset notification keyword set;
acquiring alarm notification content corresponding to at least one notification keyword in the device operation log according to a notification keyword set mapping table, wherein the notification keyword set mapping table comprises the alarm notification content corresponding to each notification keyword;
determining a notification content type corresponding to at least one notification keyword extracted from the device operation log, wherein the notification content type corresponding to the at least one notification keyword comprises a network device identifier, an alarm occurrence time, an alarm occurrence position, an alarm event identifier or an alarm event description;
determining corresponding target notification template voice from a plurality of alarm notification templates according to the notification content type corresponding to the at least one notification keyword, wherein the target notification template voice comprises the content adding position of the notification content type corresponding to the at least one notification keyword;
converting the alarm notification content corresponding to the at least one notification keyword into at least one alarm notification voice;
according to the notification content type corresponding to the at least one notification keyword, adding the alarm notification voice corresponding to the at least one notification keyword to the content adding position corresponding to the notification content type in the target notification template voice respectively to generate voice notification information of the network equipment;
requesting to establish a voice call with a specified device, and after the voice call is successfully established, voice broadcasting the voice notification information to the specified device.
2. A keyword alarm method based on logs is characterized by comprising the following steps:
receiving an equipment operation log submitted by network equipment;
searching whether any alarm keyword in a preset alarm keyword set exists in the equipment operation log;
if any alarm keyword exists in the equipment running log, extracting at least one notification keyword from the equipment running log according to a preset notification keyword set;
acquiring alarm notification content corresponding to at least one notification keyword in the device operation log according to a notification keyword set mapping table, wherein the notification keyword set mapping table comprises the alarm notification content corresponding to each notification keyword;
determining a notification content type corresponding to at least one notification keyword extracted from the device operation log, wherein the notification content type corresponding to the at least one notification keyword comprises a network device identifier, an alarm occurrence time, an alarm occurrence position, an alarm event identifier or an alarm event description;
determining a corresponding target alarm notification template from a plurality of alarm notification templates according to the notification content type corresponding to the at least one notification keyword, wherein the target alarm notification template comprises a content adding position of the notification content type corresponding to the at least one notification keyword;
according to the notification content type corresponding to the at least one notification keyword, adding the alarm notification content corresponding to the at least one notification keyword to the content adding position corresponding to the notification content type in the target alarm notification template, so as to obtain the splicing result of the alarm notification content corresponding to the at least one notification keyword and a preset target alarm notification template;
generating voice notification information of the network equipment according to the splicing result;
requesting to establish a voice call with a specified device, and after the voice call is successfully established, voice broadcasting the voice notification information to the specified device.
3. The method of claim 1 or 2, wherein the generating voice notification information for the network device further comprises:
detecting an initial language type of a statement where the at least one notification keyword extracted from the device operation log is located, and acquiring a target language type;
segmenting the sentence where the at least one notification keyword is located according to the initial language type to obtain a first element set forming the sentence where the at least one notification keyword is located, wherein each first element contained in the first element set is a word or a phrase;
translating each first element in the first element set into a first target element of a target language type, and acquiring a corresponding first target sentence pattern according to the first element set;
generating a first target sentence of the target language type according to the first target sentence pattern and each first target element obtained by translation;
replacing a first target element corresponding to the at least one notification keyword in the first target statement with an alarm notification content corresponding to the at least one notification keyword to obtain an alarm notification statement of the statement in which the at least one notification keyword is located;
and generating voice notification information of the network equipment according to a splicing result of the alarm notification statement of the at least one notification keyword and a preset target alarm notification template.
4. The method of claim 1 or 2, wherein the generating voice notification information for the network device further comprises:
under the condition that the length of the equipment running log is determined not to exceed a preset alarm length threshold value, detecting an initial language type of the equipment running log, and acquiring a target language type;
splitting the device running log into a plurality of log single sentences, and splitting any one of the log single sentences according to the initial language type to obtain a second element set forming any one of the log single sentences, wherein each second element contained in the second element set is a word or a phrase;
translating each second element in the second element set into a second target element of a target language type, and acquiring a corresponding second target sentence pattern according to the second element set;
generating a second target sentence of the target language type according to the second target sentence pattern and each second target element obtained by translation;
replacing at least one second target element corresponding to the at least one notification keyword in the second target statement with alarm notification content corresponding to the notification keyword;
and generating the voice notification information of the network equipment according to the splicing result of the alarm notification content and a preset target alarm notification template.
5. The method of claim 1 or 2, wherein the requesting to establish a voice call with a specified device, and after the voice call is successfully established, the voice broadcasting the voice notification information to the specified device comprises:
determining a plurality of terminal devices of the network device according to the device identifier of the network device and the at least one notification keyword extracted from the device operation log, wherein the plurality of terminal devices are the designated devices, and the designated devices at least comprise a first terminal device and a second terminal device;
requesting to establish a voice call with the first terminal equipment, and if the voice call is established successfully, broadcasting the voice notification information to the first terminal equipment in a voice mode; otherwise, requesting to establish voice communication with the second terminal equipment, if the voice communication is established successfully, then broadcasting the voice notification information to the second terminal equipment in a voice mode, and otherwise, returning to the step of executing the request to establish the voice communication with the first terminal equipment.
6. A log-based keyword alert apparatus, the apparatus comprising:
the receiving module is used for receiving the equipment running log submitted by the network equipment;
the searching module is used for searching whether any alarm keyword in a preset alarm keyword set exists in the equipment running log;
the search module is further configured to extract at least one notification keyword from the device running log according to a preset notification keyword set if any one of the alarm keywords exists in the device running log;
an obtaining module, configured to obtain, according to a notification keyword set mapping table, alarm notification content corresponding to at least one notification keyword in the device operation log, where the notification keyword set mapping table includes the alarm notification content corresponding to each notification keyword;
the processing module is used for determining a notification content type corresponding to at least one notification keyword extracted from the device running log, wherein the notification content type corresponding to the at least one notification keyword comprises a network device identifier, an alarm occurrence time, an alarm occurrence position, an alarm event identifier or an alarm event description; determining corresponding target notification template voice from a plurality of alarm notification templates according to the notification content type corresponding to the at least one notification keyword, wherein the target notification template voice comprises the content adding position of the notification content type corresponding to the at least one notification keyword; converting the alarm notification content corresponding to the at least one notification keyword into at least one alarm notification voice; according to the notification content type corresponding to the at least one notification keyword, adding the alarm notification voice corresponding to the at least one notification keyword to the content adding position corresponding to the notification content type in the target notification template voice respectively to generate voice notification information of the network equipment;
and the feedback module is used for requesting to establish a voice call with the specified equipment and broadcasting the voice notification information to the specified equipment in a voice mode after the voice call is successfully established.
7. A log-based keyword alert apparatus, the apparatus comprising:
the receiving module is used for receiving the equipment running log submitted by the network equipment;
the searching module is used for searching whether any alarm keyword in a preset alarm keyword set exists in the equipment running log;
the search module is further configured to extract at least one notification keyword from the device running log according to a preset notification keyword set if any one of the alarm keywords exists in the device running log;
an obtaining module, configured to obtain, according to a notification keyword set mapping table, alarm notification content corresponding to at least one notification keyword in the device operation log, where the notification keyword set mapping table includes the alarm notification content corresponding to each notification keyword;
the processing module is used for determining a notification content type corresponding to at least one notification keyword extracted from the device running log, wherein the notification content type corresponding to the at least one notification keyword comprises a network device identifier, an alarm occurrence time, an alarm occurrence position, an alarm event identifier or an alarm event description; determining a corresponding target alarm notification template from a plurality of alarm notification templates according to the notification content type corresponding to the at least one notification keyword, wherein the target alarm notification template comprises a content adding position of the notification content type corresponding to the at least one notification keyword; according to the notification content type corresponding to the at least one notification keyword, adding the alarm notification content corresponding to the at least one notification keyword to the content adding position corresponding to the notification content type in the target alarm notification template, so as to obtain the splicing result of the alarm notification content corresponding to the at least one notification keyword and a preset target alarm notification template; generating voice notification information of the network equipment according to the splicing result;
and the feedback module is used for requesting to establish a voice call with the specified equipment and broadcasting the voice notification information to the specified equipment in a voice mode after the voice call is successfully established.
8. A key word alarm device based on log is characterized by comprising a processor, a memory and a transmission device;
the processor is connected to the memory and the transmission device, respectively, wherein the transmission device is configured to transmit data to a user, the memory is configured to store program code, and the processor is configured to call the program code to perform the method according to any one of claims 1 to 5.
9. A computer storage medium, characterized in that the computer storage medium stores a computer program comprising program instructions which, when executed by a processor, perform the method according to any one of claims 1-5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910436250.2A CN110245055B (en) | 2019-05-23 | 2019-05-23 | Keyword warning method and device based on log |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910436250.2A CN110245055B (en) | 2019-05-23 | 2019-05-23 | Keyword warning method and device based on log |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110245055A CN110245055A (en) | 2019-09-17 |
CN110245055B true CN110245055B (en) | 2022-05-03 |
Family
ID=67884863
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910436250.2A Active CN110245055B (en) | 2019-05-23 | 2019-05-23 | Keyword warning method and device based on log |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110245055B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112000883B (en) * | 2020-08-07 | 2022-05-24 | 苏州浪潮智能科技有限公司 | Method, device and equipment for automatically adjusting weight value and storage medium |
CN114006940A (en) * | 2021-12-31 | 2022-02-01 | 思创数码科技股份有限公司 | Building integrated management information pushing method, system, computer and storage medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109359026A (en) * | 2018-08-15 | 2019-02-19 | 中国平安人寿保险股份有限公司 | Log reporting method, device, electronic equipment and computer readable storage medium |
CN109783370A (en) * | 2018-12-25 | 2019-05-21 | 努比亚技术有限公司 | A kind of log grasping means, terminal and computer readable storage medium |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104184622A (en) * | 2014-09-09 | 2014-12-03 | 福建星网视易信息系统有限公司 | Log information notification method and system |
CN105740121B (en) * | 2016-01-26 | 2018-08-28 | 中国银行股份有限公司 | A kind of monitoring of daily record text and method for early warning, device |
CN108712294A (en) * | 2018-06-05 | 2018-10-26 | 陈艳 | A method of network equipment monitoring alarm is realized based on Syslog knowledge bases |
CN109637529A (en) * | 2018-11-01 | 2019-04-16 | 平安科技(深圳)有限公司 | Voice-based functional localization method, apparatus, computer equipment and storage medium |
-
2019
- 2019-05-23 CN CN201910436250.2A patent/CN110245055B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109359026A (en) * | 2018-08-15 | 2019-02-19 | 中国平安人寿保险股份有限公司 | Log reporting method, device, electronic equipment and computer readable storage medium |
CN109783370A (en) * | 2018-12-25 | 2019-05-21 | 努比亚技术有限公司 | A kind of log grasping means, terminal and computer readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN110245055A (en) | 2019-09-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9317501B2 (en) | Data security system for natural language translation | |
CN105224640B (en) | Method and equipment for extracting viewpoint | |
US11720756B2 (en) | Deriving multiple meaning representations for an utterance in a natural language understanding (NLU) framework | |
CN112738791B (en) | User information correlation backfill method, device, equipment and medium based on 5G core network | |
CN110245055B (en) | Keyword warning method and device based on log | |
US11087090B2 (en) | System for focused conversation context management in a reasoning agent/behavior engine of an agent automation system | |
EP2455936B1 (en) | Speech translation system, dictionary server, and program | |
JP2002041432A (en) | Chat system, terminal equipment, server device, and medium | |
KR20170030297A (en) | System, Apparatus and Method For Processing Natural Language, and Computer Readable Recording Medium | |
US11886818B2 (en) | Method and apparatus for detecting anomalies in mission critical environments | |
WO2018205704A1 (en) | Electronic device, intelligent voice navigation method and computer readable storage medium | |
WO2011106971A1 (en) | Method and system for diagnosing network management system faults | |
US10810375B2 (en) | Automated entity disambiguation | |
WO2015192447A1 (en) | Method, device and terminal for data processing | |
CN110768896B (en) | Session information processing method and device, readable storage medium and computer equipment | |
CN110245045B (en) | Keyword warning method and device based on log | |
CN109727594B (en) | Voice processing method and device | |
CN115086586A (en) | Method and device for generating double-recording video file | |
CN114979051A (en) | Message processing method and device, electronic equipment and storage medium | |
JP2008210214A (en) | Information processor, communication control processing function addition method and communication control processing function addition program | |
CN110674645B (en) | Information communication method for converting Chinese and English languages and electronic equipment | |
CN110502368B (en) | Dialogue fault tolerance method, central control equipment, system and readable storage medium | |
EP1569131A1 (en) | System and method of translation for wireless devices | |
Farid | The Analysis of Word Level Translation of User Manual for Samsung Galaxy | |
JP2005184583A (en) | Information processing apparatus and communication method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |