CN113032175A - Abnormal program classification method and device - Google Patents
Abnormal program classification method and device Download PDFInfo
- Publication number
- CN113032175A CN113032175A CN202110285313.6A CN202110285313A CN113032175A CN 113032175 A CN113032175 A CN 113032175A CN 202110285313 A CN202110285313 A CN 202110285313A CN 113032175 A CN113032175 A CN 113032175A
- Authority
- CN
- China
- Prior art keywords
- program
- error
- abnormal
- vector
- log
- 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.)
- Pending
Links
- 230000002159 abnormal effect Effects 0.000 title claims abstract description 102
- 238000000034 method Methods 0.000 title claims abstract description 43
- 239000013598 vector Substances 0.000 claims abstract description 120
- 238000013145 classification model Methods 0.000 claims abstract description 46
- 230000006870 function Effects 0.000 claims description 27
- 238000004590 computer program Methods 0.000 claims description 15
- 238000012804 iterative process Methods 0.000 claims description 4
- 238000012545 processing Methods 0.000 claims description 4
- 238000012360 testing method Methods 0.000 abstract description 12
- 238000013473 artificial intelligence Methods 0.000 abstract description 2
- 230000007613 environmental effect Effects 0.000 description 13
- 238000012706 support-vector machine Methods 0.000 description 7
- 238000012549 training Methods 0.000 description 7
- 238000010586 diagram Methods 0.000 description 6
- 230000008569 process Effects 0.000 description 6
- 238000013461 design Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000010801 machine learning Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- 230000005856 abnormality Effects 0.000 description 1
- 210000001072 colon Anatomy 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012163 sequencing technique Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/0703—Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
- G06F11/0766—Error or fault reporting or storing
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention provides an abnormal program classification method and device, and belongs to the technical field of artificial intelligence. The abnormal program classification method comprises the following steps: acquiring a current program error log, and generating a current program error vector according to error program characteristics in the current program error log; inputting the current program error vector into a program exception classification model created based on the historical program error vector to obtain an exception log vector; and outputting the type of the abnormal program according to the abnormal log vector. The invention can obviously improve the abnormity analysis efficiency of the program in the test stage.
Description
Technical Field
The invention relates to the technical field of artificial intelligence, in particular to an abnormal program classification method and device.
Background
In the program testing stage, two types of exceptions may occur in the program, one is an environmental problem, such as a network connection failure, a database password error, and other errors unrelated to the program itself; one is program problems such as null pointer exceptions, data type errors, and program logic errors. Typically, environmental issues require analysis by environmental configurators and program issues require analysis by program developers. In the existing flow, when a program is abnormal, a tester often finds a program developer to analyze the log because the tester cannot understand the log, and then the developer judges whether the program problem belongs to an environmental problem or a program problem; if the program problem is solved, the developer analyzes the program problem, and if the program problem is solved, the developer transfers the program problem to the environment configurator for analysis.
Such a flow actually affects the flow efficiency of the anomaly analysis of the test phase program because the probability of the environmental problem occurring in the development process of some systems involving complex and numerous environmental variables is not low. If the abnormal type of the program can be identified in advance when the program is abnormal, the program is transferred to a corresponding responsible person for analysis at the first time, and the efficiency of the test process is remarkably improved.
Disclosure of Invention
The main purpose of the embodiments of the present invention is to provide a method and an apparatus for classifying an abnormal program, which can distinguish the type of the abnormal program according to a program log when an error occurs in the program, and significantly improve the efficiency of analyzing the abnormality of the program in a test stage.
In order to achieve the above object, an embodiment of the present invention provides an abnormal program classification method, including:
acquiring a current program error log, and generating a current program error vector according to error program characteristics in the current program error log;
inputting the current program error vector into a program exception classification model created based on the historical program error vector to obtain an exception log vector;
and outputting the type of the abnormal program according to the abnormal log vector.
An embodiment of the present invention further provides an abnormal program classification apparatus, including:
the acquisition module is used for acquiring a current program error log and generating a current program error vector according to error program characteristics in the current program error log;
the abnormal log vector module is used for inputting the current program error vector into a program abnormal classification model established based on the historical program error vector to obtain an abnormal log vector;
and the abnormal program type module is used for outputting the type of the abnormal program according to the abnormal log vector.
The embodiment of the invention also provides computer equipment which comprises a memory, a processor and a computer program which is stored on the memory and runs on the processor, wherein the processor realizes the steps of the abnormal program classification method when executing the computer program.
The embodiment of the invention also provides a computer readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the abnormal program classification method are realized.
According to the abnormal program classification method and device, the current program error vector is generated according to the error program characteristics in the current program error log, then the current program error vector is input into the program abnormal classification model to obtain the abnormal log vector, and finally the type of the abnormal program is output according to the abnormal log vector, so that the abnormal analysis efficiency of the program in the test stage is remarkably 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 will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained based on these drawings without creative efforts.
FIG. 1 is a flow chart of a method for exception classification in accordance with an embodiment of the present invention;
FIG. 2 is a flow chart of a method for exception classification according to another embodiment of the present invention;
FIG. 3 is a flow diagram of creating a program exception classification model in an embodiment of the present invention;
FIG. 4 is a flow diagram of creating a program exception classification model in another embodiment of the invention;
FIG. 5 is a flow chart for generating historical program error vectors;
FIG. 6 is a block diagram showing the structure of an exception handler sorting apparatus according to an embodiment of the present invention;
fig. 7 is a block diagram of a computer device in the 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.
As will be appreciated by one skilled in the art, embodiments of the present invention may be embodied as a system, apparatus, device, method, or computer program product. Accordingly, the present disclosure may be embodied in the form of: entirely hardware, entirely software (including firmware, resident software, micro-code, etc.), or a combination of hardware and software.
In view of the fact that the prior art affects the efficiency of the abnormal analysis process of the test stage program, the embodiment of the invention provides an abnormal program classification method which can judge the type of an abnormal program according to a program log when the program has an error, so that a tester can inform a corresponding worker to perform analysis in advance, and the abnormal analysis efficiency of the test stage program is remarkably improved.
FIG. 1 is a flowchart illustrating an exception classification method according to an embodiment of the present invention. FIG. 2 is a flowchart of an exception program classification method according to another embodiment of the present invention. As shown in fig. 1-2, the exception program classification method includes:
s101: and acquiring a current program error log, and generating a current program error vector according to the error program characteristics in the current program error log.
When the program is abnormal, the invention inputs the error log of the current program and obtains the error vector of the current program through the error program characteristics selected in the training stage. For example, error program features include DatabaseException (database exception), Duplicate, NullPointerException (null pointer exception), FileNotFoundException (file lookup failure exception), MySQLSyntaxErrorException (mysql syntax exception), dense (reject), ":", "/" and "@". A bag-of-words model, represented using boolean values, may convert the characteristics of an error program that occurs in a current program error log into a current program error vector.
S102: and inputting the current program error vector into a program exception classification model created based on the historical program error vector to obtain an exception log vector.
The invention uses a support vector machine classifier (program abnormal classification model) obtained by training of historical program error vectors to classify according to the current program error vector: if the abnormal log vector is the environmental abnormal log vector, the current program is classified as an environmental configuration problem, and an environmental configuration personnel is informed to process the current program; if the exception log vector is a program exception log vector, then the current program is classified as a program error problem, at which point the program developer is notified to handle.
S103: and outputting the type of the abnormal program according to the abnormal log vector.
For example, the environment exception log vector is (0,0,0,1,0,1,1,1,0), the program exception log vector is (0,0,0,1,0,0,1,0,0), when the exception log vector is (0,0,0,1,0,1,1,1,0), the type of exception program is an environment configuration problem; when the exception log vector is (0,0,0,1,0,0, 0), the type of exception program is a program error problem.
The execution subject of the abnormal program classification method shown in fig. 1 may be a computer. As can be seen from the process shown in fig. 1, the abnormal program classification method according to the embodiment of the present invention generates a current program error vector according to the error program characteristics in the current program error log, inputs the current program error vector into the program abnormal classification model to obtain an abnormal log vector, and outputs the type of the abnormal program according to the abnormal log vector, thereby significantly improving the abnormal analysis efficiency of the program in the test phase.
FIG. 3 is a flow chart of creating a program exception classification model in an embodiment of the present invention. FIG. 4 is a flow chart of creating a program exception classification model in another embodiment of the present invention. As shown in fig. 3-4, creating a program exception classification model based on historical program error vectors includes:
the following iterative process is performed:
s201: and determining a prediction abnormal log vector according to the historical program error vector and the classification model parameters.
FIG. 5 is a flow chart for generating a historical program error vector. As shown in fig. 5, before executing S201, the method further includes:
s301: and acquiring a historical program error log, and determining word characteristics according to the word frequency and the reverse file frequency of each word in the historical program error log.
A large number of historical program error logs can be obtained to serve as a training set, and the historical program error logs can be divided into two types: environmental problem error logs and program problem error logs.
The program abnormity classification model is classified through the characteristics of a historical program error log, text classification belongs to a typical high-dimensional classification problem, too many characteristics can increase the operation amount of classification, and the efficiency of classification is influenced, so that characteristic selection is indispensable before the model is trained. If a word occurs with a high frequency in one error log but rarely in other error logs, the word is considered to have a good degree of discrimination for abnormal program classification.
In one embodiment, determining word characteristics according to the word frequency and the reverse file frequency of each word in the historical program error log comprises: determining the word frequency-reverse file frequency of each word according to the word frequency and the reverse file frequency of each word in the historical program error log, sequencing the word frequency-reverse file frequency from big to small, and determining the word sequenced before a preset word threshold value as a word characteristic.
In specific implementation, the word frequency-inverse file frequency of each word can be determined by the following formula:
TF-IDFi=TFi×IDFi;
wherein, TF-IDFiWord frequency for the ith word-inverse document frequency, TFiFor the word frequency of the i-th word,IDFithe inverse file frequency for the ith word.
In one embodiment, before performing S301, the method further includes:
1. and determining the word frequency of each word according to the occurrence frequency of each word in the historical program error log and the total word number of the historical program error log.
In specific implementation, the word frequency of each word can be determined by the following formula:
wherein, TFiIs the word frequency of the ith word, FiIs the number of occurrences of the ith word in the historical bug log, and T is the total number of words in the historical bug log (training set).
2. And determining the reverse file frequency of each word according to the total number of the historical program error logs and the number of the historical program error logs corresponding to each word.
In specific implementation, the reverse file frequency of each word can be determined by the following formula:
wherein, IDFiReverse file frequency for the ith word, D is the total number of historical bug logs (in the training set), EiThe number of historical program error logs corresponding to the ith word (including the number of historical program error logs for the ith word). The denominator is increased by 1 in order to avoid the denominator becoming 0. IDFiThe larger the word i, the less the historical program error log containing the word i, and the word i has good discrimination.
S302: and generating error program characteristics according to the word characteristics and the preset symbol characteristics.
The error program characteristics include word characteristics and preset symbol characteristics. In conventional text classification, the feature extraction stage typically removes symbolic features (e.g., special symbols or punctuation) from the text, because symbols are generally considered to have no semantic information and thus do not contribute to classification. However, in the application scenario of the exception classification of the present invention, the environmental problem is usually related to resources such as database, network and file system, so once the environmental problem occurs, there is a high possibility that url (unique resource locator) is output in the error log. Therefore, after the selection of the word feature is completed by using the TF-IDF, the invention also adds the symbol features which are frequently appeared in the url, such as symbol colons (: marks), left slashes (/) and @ symbols, and the like, into the error program features so as to improve the accuracy of classification.
S303: historical program error vectors are generated based on the error program characteristics.
There are many methods for representing features of text classification, and a bag-of-words model represented by boolean values is a relatively simple and commonly used one, namely, a boolean variable is used to represent a historical program error log to generate a corresponding historical program error vector according to error program features. E.g. vector Yk=[X1,X2,...Xi,...,Xn],YkFor historical program error vectors corresponding to the kth historical program error log, XiRepresents the ith error program characteristic when XiWhen 0, the ith error program characteristic does not appear in the kth historical program error log, and when X is not equal toiWhen 1, this means that the ith error program characteristic exists in the kth historical program error log.
S202: and determining a loss function according to the predicted abnormal log vector and the corresponding actual abnormal log vector.
S203: and judging whether the loss function is smaller than or equal to a preset loss function threshold value.
S204: and when the loss function is smaller than or equal to the preset loss function threshold value, creating a program abnormity classification model according to the classification model parameters.
Wherein, the program abnormity classification model is a support vector machine model. The method is characterized in that a program is divided into an environment configuration problem and a program error problem according to an error log of the program, the problem is actually a two-class classification problem, and a Support Vector Machine (SVM) is a common Machine learning method with a good effect in the two-class classification problem and is often used for text classification problems such as spam classification, spam classification and the like. The support vector machine is essentially used for solving the maximum interval hyperplane which can correctly divide the training set according to the training data set, and converting the classification problem into a convex quadratic programming problem. The maximum interval hyperplane of the support vector machine is only related to the support vector, so that the maximum interval hyperplane has a good effect on the problem of small samples, and the support vector machine is selected as the classifier.
S205: and when the loss function is larger than the preset loss function threshold, updating the classification model parameters according to the loss function, and continuously executing iterative processing.
The specific process of the embodiment of the invention is as follows:
1. obtaining a historical program error log, determining the word frequency of each word according to the occurrence frequency of each word in the historical program error log and the total word number of the historical program error log, and determining the reverse file frequency of each word according to the total number of the historical program error log and the historical program error log number corresponding to each word.
2. And determining word characteristics according to the word frequency and the reverse file frequency of each word in the historical program error log.
3. And generating error program characteristics according to the word characteristics and the preset symbol characteristics, and generating historical program error vectors according to the error program characteristics.
4. And determining a prediction abnormal log vector according to the historical program error vector and the classification model parameters.
5. And determining a loss function according to the predicted abnormal log vector and the corresponding actual abnormal log vector. And (4) when the loss function is smaller than or equal to the preset loss function threshold, establishing a program abnormity classification model according to the classification model parameters, otherwise, updating the classification model parameters according to the loss function, and returning to the step 4.
6. And acquiring a current program error log, and generating a current program error vector according to the error program characteristics in the current program error log.
7. And inputting the current program error vector into a program exception classification model created based on the historical program error vector to obtain an exception log vector.
8. And outputting the type of the abnormal program according to the abnormal log vector.
In conclusion, the invention can judge whether the program has an environmental problem or a program problem in advance according to the program error log when the program has an error by using the machine learning method, and the tester can inform the corresponding worker to analyze the program at the first time, thereby obviously improving the abnormal analysis efficiency of the program in the test stage.
FIG. 6 is a block diagram of an exception handler sorting apparatus according to an embodiment of the present invention. As shown in fig. 6, the abnormal program classifying device includes:
the acquisition module is used for acquiring a current program error log and generating a current program error vector according to error program characteristics in the current program error log;
the abnormal log vector module is used for inputting the current program error vector into a program abnormal classification model established based on the historical program error vector to obtain an abnormal log vector;
and the abnormal program type module is used for outputting the type of the abnormal program according to the abnormal log vector.
In one embodiment, the method further comprises the following steps: a program exception classification model creation module for performing an iterative process of:
determining a prediction abnormal log vector according to the historical program error vector and the classification model parameter;
determining a loss function according to the predicted abnormal log vector and the corresponding actual abnormal log vector;
and when the loss function is smaller than or equal to the preset loss function threshold value, establishing a program abnormity classification model according to the classification model parameters, otherwise, updating the classification model parameters according to the loss function, and continuously executing iterative processing.
In one embodiment, the method further comprises the following steps:
the word characteristic module is used for acquiring a historical program error log and determining word characteristics according to the word frequency and the reverse file frequency of each word in the historical program error log;
the error program characteristic module is used for generating the error program characteristic according to the word characteristic and the preset symbol characteristic;
and the historical program error vector module is used for generating a historical program error vector according to the error program characteristic.
In one embodiment, the method further comprises the following steps:
the word frequency determining module is used for determining the word frequency of each word according to the occurrence frequency of each word in the historical program error log and the total word number of the historical program error log;
and the reverse file frequency module is used for determining the reverse file frequency of each word according to the total number of the historical program error logs and the number of the historical program error logs corresponding to each word.
To sum up, the abnormal program classification device according to the embodiment of the present invention generates a current program error vector according to the error program characteristics in the current program error log, inputs the current program error vector into the program abnormal classification model to obtain an abnormal log vector, and outputs the type of the abnormal program according to the abnormal log vector, thereby significantly improving the abnormal analysis efficiency of the program in the test stage.
The embodiment of the present invention further provides a specific implementation manner of a computer device, which can implement all the steps in the abnormal program classification method in the above embodiment. Fig. 7 is a block diagram of a computer device in an embodiment of the present invention, and referring to fig. 7, the computer device specifically includes the following:
a processor (processor)701 and a memory (memory) 702.
The processor 701 is configured to call the computer program in the memory 702, and the processor implements all the steps in the abnormal program classification method in the above embodiment when executing the computer program, for example, the processor implements the following steps when executing the computer program:
acquiring a current program error log, and generating a current program error vector according to error program characteristics in the current program error log;
inputting the current program error vector into a program exception classification model created based on the historical program error vector to obtain an exception log vector;
and outputting the type of the abnormal program according to the abnormal log vector.
To sum up, the computer device of the embodiment of the present invention generates a current program error vector according to the error program features in the current program error log, inputs the current program error vector into the program exception classification model to obtain an exception log vector, and outputs the type of the exception program according to the exception log vector, thereby significantly improving the exception analysis efficiency of the program in the test stage.
An embodiment of the present invention further provides a computer-readable storage medium capable of implementing all the steps in the abnormal program classifying method in the foregoing embodiment, where the computer-readable storage medium stores a computer program, and the computer program implements all the steps of the abnormal program classifying method in the foregoing embodiment when executed by a processor, for example, the processor implements the following steps when executing the computer program:
acquiring a current program error log, and generating a current program error vector according to error program characteristics in the current program error log;
inputting the current program error vector into a program exception classification model created based on the historical program error vector to obtain an exception log vector;
and outputting the type of the abnormal program according to the abnormal log vector.
To sum up, the computer-readable storage medium according to the embodiment of the present invention generates a current program error vector according to error program features in a current program error log, inputs the current program error vector into a program exception classification model to obtain an exception log vector, and outputs the type of an exception program according to the exception log vector, thereby significantly improving the exception analysis efficiency of the program in the test stage.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are only exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.
Those of skill in the art will further appreciate that the various illustrative logical blocks, units, and steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate the interchangeability of hardware and software, various illustrative components, elements, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as hardware or software depends upon the particular application and design requirements of the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present embodiments.
The various illustrative logical blocks, or elements, or devices described in connection with the embodiments disclosed herein may be implemented or performed with a general purpose processor, a digital signal processor, an Application Specific Integrated Circuit (ASIC), a field programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof designed to perform the functions described herein. A general-purpose processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. A processor may also be implemented as a combination of computing devices, e.g., a digital signal processor and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a digital signal processor core, or any other similar configuration.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may be stored in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. For example, a storage medium may be coupled to the processor such the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an ASIC, which may be located in a user terminal. In the alternative, the processor and the storage medium may reside in different components in a user terminal.
In one or more exemplary designs, the functions described above in connection with the embodiments of the invention may be implemented in hardware, software, firmware, or any combination of the three. If implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media that facilitate transfer of a computer program from one place to another. Storage media may be any available media that can be accessed by a general purpose or special purpose computer. For example, such computer-readable media can include, but is not limited to, RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to carry or store program code in the form of instructions or data structures and which can be read by a general-purpose or special-purpose computer, or a general-purpose or special-purpose processor. Additionally, any connection is properly termed a computer-readable medium, and, thus, is included if the software is transmitted from a website, server, or other remote source via a coaxial cable, fiber optic cable, twisted pair, Digital Subscriber Line (DSL), or wirelessly, e.g., infrared, radio, and microwave. Such discs (disk) and disks (disc) include compact disks, laser disks, optical disks, DVDs, floppy disks and blu-ray disks where disks usually reproduce data magnetically, while disks usually reproduce data optically with lasers. Combinations of the above may also be included in the computer-readable medium.
Claims (10)
1. An abnormal program classification method, comprising:
acquiring a current program error log, and generating a current program error vector according to error program characteristics in the current program error log;
inputting the current program error vector into a program exception classification model created based on the historical program error vector to obtain an exception log vector;
and outputting the type of the abnormal program according to the abnormal log vector.
2. The abnormal program classification method of claim 1, wherein creating a program exception classification model based on historical program error vectors comprises:
the following iterative process is performed:
determining a prediction abnormal log vector according to the historical program error vector and the classification model parameter;
determining a loss function according to the predicted abnormal log vector and the corresponding actual abnormal log vector;
and when the loss function is smaller than or equal to a preset loss function threshold value, creating the program abnormity classification model according to the classification model parameters, otherwise, updating the classification model parameters according to the loss function, and continuously executing the iterative processing.
3. The abnormal program classification method according to claim 2, further comprising:
acquiring a historical program error log, and determining word characteristics according to the word frequency and the reverse file frequency of each word in the historical program error log;
generating the error program characteristic according to the word characteristic and a preset symbol characteristic;
and generating a historical program error vector according to the error program characteristic.
4. The abnormal program classification method according to claim 3, further comprising:
determining the word frequency of each word according to the occurrence frequency of each word in the historical program error log and the total word number of the historical program error log;
and determining the reverse file frequency of each word according to the total number of the historical program error logs and the number of the historical program error logs corresponding to each word.
5. An exception program sorting apparatus comprising:
the acquisition module is used for acquiring a current program error log and generating a current program error vector according to error program characteristics in the current program error log;
the abnormal log vector module is used for inputting the current program error vector into a program abnormal classification model established based on the historical program error vector to obtain an abnormal log vector;
and the abnormal program type module is used for outputting the type of the abnormal program according to the abnormal log vector.
6. The abnormal program classification apparatus according to claim 5, further comprising: a program exception classification model creation module for performing an iterative process of:
determining a prediction abnormal log vector according to the historical program error vector and the classification model parameter;
determining a loss function according to the predicted abnormal log vector and the corresponding actual abnormal log vector;
and when the loss function is smaller than or equal to a preset loss function threshold value, creating the program abnormity classification model according to the classification model parameters, otherwise, updating the classification model parameters according to the loss function, and continuously executing the iterative processing.
7. The abnormal program classification apparatus according to claim 6, further comprising:
the word characteristic module is used for acquiring a historical program error log and determining word characteristics according to the word frequency and the reverse file frequency of each word in the historical program error log;
the error program characteristic module is used for generating the error program characteristic according to the word characteristic and the preset symbol characteristic;
and the historical program error vector module is used for generating a historical program error vector according to the error program characteristic.
8. The abnormal program classification apparatus according to claim 7, further comprising:
the word frequency determining module is used for determining the word frequency of each word according to the occurrence frequency of each word in the historical program error log and the total word number of the historical program error log;
and the reverse file frequency module is used for determining the reverse file frequency of each word according to the total number of the historical program error logs and the number of the historical program error logs corresponding to each word.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and running on the processor, characterized in that the processor implements the steps of the exception program classification method of any one of claims 1 to 4 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the exception program classification method according to any one of claims 1 to 4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110285313.6A CN113032175A (en) | 2021-03-17 | 2021-03-17 | Abnormal program classification method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110285313.6A CN113032175A (en) | 2021-03-17 | 2021-03-17 | Abnormal program classification method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113032175A true CN113032175A (en) | 2021-06-25 |
Family
ID=76471042
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110285313.6A Pending CN113032175A (en) | 2021-03-17 | 2021-03-17 | Abnormal program classification method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113032175A (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20200065220A1 (en) * | 2018-08-24 | 2020-02-27 | International Business Machines Corporation | Detecting software build errors using machine learning |
CN111984442A (en) * | 2019-05-22 | 2020-11-24 | 中兴通讯股份有限公司 | Method and device for detecting abnormality of computer cluster system, and storage medium |
CN112256517A (en) * | 2020-08-28 | 2021-01-22 | 苏州浪潮智能科技有限公司 | Log analysis method and device of virtualization platform based on LSTM-DSSM |
-
2021
- 2021-03-17 CN CN202110285313.6A patent/CN113032175A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20200065220A1 (en) * | 2018-08-24 | 2020-02-27 | International Business Machines Corporation | Detecting software build errors using machine learning |
CN111984442A (en) * | 2019-05-22 | 2020-11-24 | 中兴通讯股份有限公司 | Method and device for detecting abnormality of computer cluster system, and storage medium |
CN112256517A (en) * | 2020-08-28 | 2021-01-22 | 苏州浪潮智能科技有限公司 | Log analysis method and device of virtualization platform based on LSTM-DSSM |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11790256B2 (en) | Analyzing test result failures using artificial intelligence models | |
US11243834B1 (en) | Log parsing template generation | |
WO2019150079A1 (en) | Methods and apparatus for identifying an impact of a portion of a file on machine learning classification of malicious content | |
US10970449B2 (en) | Learning framework for software-hardware model generation and verification | |
Vervaet | Monilog: An automated log-based anomaly detection system for cloud computing infrastructures | |
Lal et al. | LogOptPlus: Learning to optimize logging in catch and if programming constructs | |
CN111950580A (en) | Prediction accuracy of classifiers using a balanced training set | |
CN116361788A (en) | Binary software vulnerability prediction method based on machine learning | |
CN117807481B (en) | Fault identification method, training device, training equipment and training medium | |
CN118193274A (en) | Exception handling method, device, equipment and readable medium for distributed system | |
Rücker et al. | FlexParser—The adaptive log file parser for continuous results in a changing world | |
CN117873888A (en) | Deep learning-based efficient PDF application program fuzzy test case generation method | |
CN117669484A (en) | Chip simulation log checking method, device and readable medium | |
WO2021183382A1 (en) | Graph-based method for inductive bug localization | |
CN114756401B (en) | Abnormal node detection method, device, equipment and medium based on log | |
CN115345600B (en) | RPA flow generation method and device | |
CN113313134A (en) | Cluster fault repairing method and model training method, device and server thereof | |
CN113032175A (en) | Abnormal program classification method and device | |
US20210397544A1 (en) | Crowdsourced Proactive Testing System for Named Entity Recognition Models in IT Support | |
CN113316786B (en) | Method for identifying exploit toolkits | |
CN113569953A (en) | Training method and device of classification model and electronic equipment | |
Qian et al. | Semantic-based false alarm detection approach via machine learning | |
US11526606B1 (en) | Configuring machine learning model thresholds in models using imbalanced data sets | |
CN117290856B (en) | Intelligent test management system based on software automation test technology | |
CN116170241A (en) | Intrusion detection method, system and equipment of industrial control system |
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 |