CN112947940A - Software fault positioning system based on machine learning algorithm - Google Patents

Software fault positioning system based on machine learning algorithm Download PDF

Info

Publication number
CN112947940A
CN112947940A CN202110335336.3A CN202110335336A CN112947940A CN 112947940 A CN112947940 A CN 112947940A CN 202110335336 A CN202110335336 A CN 202110335336A CN 112947940 A CN112947940 A CN 112947940A
Authority
CN
China
Prior art keywords
software program
path
statements
historical
failure
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
Application number
CN202110335336.3A
Other languages
Chinese (zh)
Inventor
江小彪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Greentown Information Technology Co ltd
Original Assignee
Hangzhou Greentown Information Technology Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Hangzhou Greentown Information Technology Co ltd filed Critical Hangzhou Greentown Information Technology Co ltd
Priority to CN202110335336.3A priority Critical patent/CN112947940A/en
Publication of CN112947940A publication Critical patent/CN112947940A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/43Checking; Contextual analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Quality & Reliability (AREA)
  • Computer Hardware Design (AREA)
  • Evolutionary Computation (AREA)
  • Computing Systems (AREA)
  • Medical Informatics (AREA)
  • Mathematical Physics (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Artificial Intelligence (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a software fault positioning system based on a machine learning algorithm, relates to the technical field of software fault positioning systems, and solves the technical problem that instruction sentences in a software program cannot be effectively analyzed in the prior art, so that the fault positioning accuracy of the software program is reduced; the invention detects the sentences of the software program after receiving the sentence detection signal through the sentence detection unit, judges whether the sentences in the software program have faults or not through labeling of different colors and analyzing the colors, and can accurately judge the positions of the fault instructions in the software program if the sentences have the faults, thereby improving the working efficiency of software fault positioning, simultaneously reducing the time of fault searching and reducing the influence of the faults on the software program.

Description

Software fault positioning system based on machine learning algorithm
Technical Field
The invention relates to the technical field of software fault positioning systems, in particular to a software fault positioning system based on a machine learning algorithm.
Background
Program analysis techniques have been widely used to solve many problems in the field of software engineering. For example, static analysis extracts information from the program code, helps the user analyze and understand the software, finds program defects, and the like; dynamically analyzing the one-time running condition of the analysis program so as to judge the sufficiency of the test, evaluating the test case, or providing support for the generation of the test case and the like; generally, program behavior is a description of the execution of software. Generally, analysis based on one-time program execution is not sufficient, and many complex problems cannot be solved, so that it is necessary to analyze program behaviors by using a statistical, data mining or mechanical method for multiple execution behaviors of a program.
However, in the prior art, instruction statements in the software program cannot be effectively analyzed, so that the accuracy of fault location of the software program is reduced.
Disclosure of Invention
The invention aims to provide a software fault positioning system based on a machine learning algorithm, wherein a sentence detection unit detects a sentence of a software program after receiving a sentence detection signal, whether the sentence in the software program has a fault is judged through labeling of different colors and analyzing the colors, and if the sentence has the fault, the position of a fault instruction in the software program can be accurately judged, so that the working efficiency of software fault positioning is improved, the fault searching time is reduced, and the influence of the fault on the software program is reduced.
The purpose of the invention can be realized by the following technical scheme:
a software fault positioning system based on a machine learning algorithm comprises a fault positioning platform, a data acquisition unit, a statement detection unit, a branch detection unit, a prediction analysis unit, a registration login unit and a database;
the system comprises a registration login unit, a database and a database, wherein the registration login unit is used for submitting management personnel information and detection personnel information to register by a manager and a detector through mobile phone terminals, and sending the successfully registered management personnel information and detection personnel information to the database for storage, the management personnel information comprises the name, age, time of entry of the manager and the mobile phone number of real name authentication of the person, and the detection personnel information comprises the name, age, time of entry of the detector and the mobile phone number of real name authentication of the person;
the data acquisition unit is used for acquiring data of the software program, acquiring the software program, dividing an entity of the software program into statements and branches, acquiring the operation type of the software program, wherein the operation type of the software program comprises successful operation and failed operation of the software program, then sending the entity and the operation type of the software program to the fault positioning platform, and marking the software program as i, wherein i is 1, 2, …, n and n is a positive integer;
after receiving the entity of the software program, the fault positioning platform detects statements and branches in the entity, then generates statement detection signals and branch detection signals and correspondingly sends the statement detection signals and the branch detection signals to a statement detection unit and a branch detection unit;
the statement detection unit detects statements of the software program after receiving statement detection signals;
after receiving the branch detection signal, the branch detection unit analyzes branch data of the software program, wherein the branch data of the software program comprises node data and length data, the node data is the number of nodes for converging instructions in a path of the software program, and the length data is the number of the instructions for dispersing the instructions in the path of the software program;
the prediction analysis unit performs failure prediction on the software program.
Further, the specific detection process of the sentence detection unit is as follows:
step S1: acquiring a statement in a software program in real time, marking the statement in the software program as o, o as 1, 2, …, m, m as a positive integer, and then acquiring a historical path of the software program, wherein the historical path of the software program comprises a historical failure path and a historical success path, the historical failure path is represented as an execution instruction of historical failure in the software program, and the historical success path is represented as an execution instruction of historical success in the software program;
step S2: comparing statements in the software program acquired in real time with a historical path of the software program, if the statements of the software program acquired in real time are statements appearing in the historical failure path, marking the statements of the corresponding software program in red, if the statements of the software program acquired in real time are statements appearing in the historical success path, marking the statements of the corresponding software program in green, and if the statements of the software program acquired in real time are both statements appearing in the historical failure path and statements appearing in the historical success path, marking the statements of the corresponding software program in yellow;
step S3: acquiring the total number of successful statements in the historical successful path and the execution number of the total number of successful statements in the historical successful path, and respectively marking the total number of successful statements in the historical successful path and the execution number of the total number of successful statements in the historical successful path as P and Po; acquiring the total number of failure statements in a historical failure path and the execution number of the total number of failure statements in the historical failure path, and respectively marking the total number of failure statements in the historical failure path and the execution number of the total number of failure statements in the historical failure path as K and Ko, wherein both Po and Ko can be acquired through program instrumentation, and the program instrumentation is a public prior art;
step S4: then obtaining the ratio BP of the execution number of the successful statements in the history success path to the total number, namely
Figure BDA0002997285660000031
Wherein β 1 is an error correction factor, the value thereof is 2.36, and the ratio BK of the execution number of the failure statements in the historical failure path to the total number thereof is obtained, that is, the ratio BK is obtained
Figure BDA0002997285660000032
Wherein, β 2 is an error correction factor, the value thereof is 1.28, and then the coverage ratio BZ of the historical successful path and the historical failed path is obtained, namely
Figure BDA0002997285660000033
Wherein, beta 3 is an error correction factor and takes a value of 1.59;
step S5: acquiring lengths of green and red color intervals, and marking the lengths of the green and red color intervals as CD, wherein the prior art is that the yellow color interval is positioned between the green color interval and the red color interval, namely, an upper limit value and a lower limit value of the yellow color interval are respectively marked as L1 and L2, and the prior art is that the value of the red color interval is smaller than that of the green color interval, so the minimum value of the red color interval is marked as SZmin;
step S6: by the formula
Figure BDA0002997285660000041
The color coefficient YSo of the sentence in the real-time software program is acquired, and then the color coefficient YSo of the sentence in the real-time software program is compared with an upper limit value L1 and a lower limit value L2 of the yellow color interval:
if the color coefficient YSo of the sentence in the real-time software program is larger than L1, the corresponding sentence is judged to be a green mark, namely the sentence in the corresponding real-time software program is a complete sentence, a sentence normal signal is generated, and the sentence normal signal is sent to a mobile phone terminal of a manager;
if the color coefficient YSo of the sentence in the real-time software program is less than L2, the corresponding sentence is judged to be a red mark, namely the sentence in the real-time software program is a fault sentence, the position of the fault sentence is sent to a fault positioning platform, and the fault positioning platform generates a software fault signal and sends the software fault signal and the position of the corresponding fault sentence to a mobile phone terminal of a detector;
and if the color coefficient L2 of the sentence in the real-time software program is not less than YSo and not more than L1, judging that the corresponding sentence is a yellow mark, namely the sentence in the corresponding real-time software program is an undetermined sentence, and sending the undetermined sentence and the corresponding color coefficient to the prediction analysis unit.
Further, the specific analysis process of the branch detection unit is as follows:
step SS 1: acquiring the number of nodes for instruction convergence in the software program path, and marking the number of the nodes for instruction convergence in the software program path as JDi;
step SS 2: acquiring the number of instructions of the instructions in the software program path after the instructions are scattered at the nodes, and marking the number of the instructions in the software program path after the instructions are scattered at the nodes as SLi;
step SS 3: by the formula
Figure BDA0002997285660000042
Obtaining a detection coefficient FZi of branches in the software program, wherein a1 and a2 are both preset proportionality coefficients, and a1 is greater than a2 is greater than 0;
step SS 4: the detection coefficient FZi of a branch in the software program is compared to a detection coefficient threshold for the branch:
if the detection coefficient FZi of the branch in the software program is not less than the detection coefficient threshold of the branch, judging that the branch detection in the software program is abnormal, marking the corresponding software program as a fussy-branch software program, and then sending the fussy-branch software program and the corresponding branch detection coefficient to a prediction analysis unit;
if the detection coefficient FZi of the branch in the software program is less than the detection coefficient threshold of the branch, the branch detection in the software program is judged to be normal, the corresponding software program is marked as a concise-branch software program, then the concise-branch software program and the corresponding branch detection coefficient are sent to a fault positioning platform, and after the concise-branch software program and the branch detection coefficient are received by the fault positioning platform, a normal-branch signal is generated and sent to a mobile phone terminal of a manager.
Further, after receiving the branch detection coefficient FZi and the color coefficient YSo corresponding to the pending statement, the prediction analysis unit performs fault prediction on the software program, and the specific prediction process is as follows:
randomly ordering branch detection coefficients FZi corresponding to a software program and color coefficients YSo corresponding to a to-be-determined statement, respectively setting different weights WFZi and WYSo for the branch detection coefficients and the color coefficients after random ordering, wherein WFZi + WYSo is 1, then substituting the branch detection coefficients FZi and the color coefficients YSo corresponding to the to-be-determined statement into a prediction analysis model, wherein the formula of the prediction analysis model is as follows
Figure BDA0002997285660000051
Wherein e is a natural constant, alpha is an error correction factor, the value is 1.74, v1 and v2 are both proportionality coefficients, and v1 is greater than v2 is greater than 0;
and then comparing the substituted calculated failure prediction analysis coefficient HS with a failure prediction analysis coefficient threshold value: if the calculated failure prediction analysis coefficient HS is not less than the failure prediction analysis coefficient threshold value, the failure occurrence rate of the corresponding software program is judged to be high, the corresponding software program is marked as a prediction abnormal software program, meanwhile, the prediction abnormal software program is sent to the mobile phone terminal of the administrator, if the calculated failure prediction analysis coefficient HS is less than the failure prediction analysis coefficient threshold value, the failure occurrence rate of the corresponding software program is judged to be low, the corresponding software program is marked as a prediction normal software program, and meanwhile, the prediction normal software program is sent to the mobile phone terminal of the administrator.
Compared with the prior art, the invention has the beneficial effects that:
1. in the invention, after receiving the statement detection signal, the statement detection unit detects the statement of the software program, judges whether the statement in the software program has a fault or not through labeling of different colors and analyzing the colors, and can accurately judge the position of a fault instruction in the software program if the statement has the fault, thereby improving the working efficiency of software fault positioning, simultaneously reducing the time of fault searching and reducing the influence of the fault on the software program;
2. according to the invention, the prediction analysis unit is used for predicting the fault of the software program, predicting the fault of the software program with the undetermined statement or the abnormal branch detection, constructing the prediction analysis model, and predicting the fault probability, so that the occurrence of the fault can be effectively prevented, the influence of the fault on the software program is reduced, and the use quality of a user is improved.
Drawings
In order to facilitate understanding for those skilled in the art, the present invention will be further described with reference to the accompanying drawings;
fig. 1 is a schematic block diagram of the present invention.
Detailed Description
The technical solutions of the present invention will be described clearly and completely with reference to the following embodiments, and it should be understood 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 shown in fig. 1, a software fault location system based on a machine learning algorithm includes a fault location platform, a data acquisition unit, a statement detection unit, a branch detection unit, a prediction analysis unit, a registration unit, and a database;
the registration login unit is used for submitting management personnel information and detection personnel information to register through mobile phone terminals by management personnel and detection personnel, and sending the management personnel information and the detection personnel information which are successfully registered to the database for storage, wherein the management personnel information comprises the name, the age, the time of entry and the mobile phone number of real name authentication of the person, and the detection personnel information comprises the name, the age, the time of entry and the mobile phone number of real name authentication of the person;
the data acquisition unit is used for acquiring data of the software program, acquiring the software program, dividing an entity of the software program into statements and branches, acquiring the operation type of the software program, wherein the operation type of the software program comprises successful operation and failed operation of the software program, then sending the entity and the operation type of the software program to the fault positioning platform, and marking the software program as i, wherein i is 1, 2, …, n and n is a positive integer;
after receiving the entity of the software program, the fault positioning platform detects statements and branches in the entity, then generates statement detection signals and branch detection signals and correspondingly sends the statement detection signals and the branch detection signals to a statement detection unit and a branch detection unit;
after receiving the statement detection signal, the statement detection unit detects the statement of the software program, and the specific detection process is as follows:
step S1: acquiring a statement in a software program in real time, marking the statement in the software program as o, o as 1, 2, …, m, m as a positive integer, and then acquiring a historical path of the software program, wherein the historical path of the software program comprises a historical failure path and a historical success path, the historical failure path is represented as an execution instruction of historical failure in the software program, and the historical success path is represented as an execution instruction of historical success in the software program;
step S2: comparing statements in the software program acquired in real time with a historical path of the software program, if the statements of the software program acquired in real time are statements appearing in the historical failure path, marking the statements of the corresponding software program in red, if the statements of the software program acquired in real time are statements appearing in the historical success path, marking the statements of the corresponding software program in green, and if the statements of the software program acquired in real time are both statements appearing in the historical failure path and statements appearing in the historical success path, marking the statements of the corresponding software program in yellow;
step S3: acquiring the total number of successful statements in the historical successful path and the execution number of the total number of successful statements in the historical successful path, and respectively marking the total number of successful statements in the historical successful path and the execution number of the total number of successful statements in the historical successful path as P and Po; acquiring the total number of failure statements in a historical failure path and the execution number of the total number of failure statements in the historical failure path, and respectively marking the total number of failure statements in the historical failure path and the execution number of the total number of failure statements in the historical failure path as K and Ko, wherein both Po and Ko can be acquired through program instrumentation, and the program instrumentation is a public prior art;
step S4: then obtaining the ratio BP of the execution number of the successful statements in the history success path to the total number, namely
Figure BDA0002997285660000081
Wherein β 1 is an error correction factor, the value thereof is 2.36, and the ratio BK of the execution number of the failure statements in the historical failure path to the total number thereof is obtained, that is, the ratio BK is obtained
Figure BDA0002997285660000082
Wherein, β 2 is an error correction factor, the value thereof is 1.28, and then the coverage ratio BZ of the historical successful path and the historical failed path is obtained, namely
Figure BDA0002997285660000083
Wherein, beta 3 is an error correction factor and takes a value of 1.59;
step S5: acquiring lengths of green and red color intervals, and marking the lengths of the green and red color intervals as CD, wherein the prior art is that the yellow color interval is positioned between the green color interval and the red color interval, namely, an upper limit value and a lower limit value of the yellow color interval are respectively marked as L1 and L2, and the prior art is that the value of the red color interval is smaller than that of the green color interval, so the minimum value of the red color interval is marked as SZmin;
step S6: by the formula
Figure BDA0002997285660000084
The color coefficient YSo of the sentence in the real-time software program is acquired, and then the color coefficient YSo of the sentence in the real-time software program is compared with an upper limit value L1 and a lower limit value L2 of the yellow color interval:
if the color coefficient YSo of the sentence in the real-time software program is larger than L1, the corresponding sentence is judged to be a green mark, namely the sentence in the corresponding real-time software program is a complete sentence, a sentence normal signal is generated, and the sentence normal signal is sent to a mobile phone terminal of a manager;
if the color coefficient YSo of the sentence in the real-time software program is less than L2, the corresponding sentence is judged to be a red mark, namely the sentence in the real-time software program is a fault sentence, the position of the fault sentence is sent to a fault positioning platform, and the fault positioning platform generates a software fault signal and sends the software fault signal and the position of the corresponding fault sentence to a mobile phone terminal of a detector;
if the color coefficient L2 of the sentence in the real-time software program is not less than YSo and not more than L1, judging that the corresponding sentence is a yellow mark, namely the sentence in the corresponding real-time software program is an undetermined sentence, and sending the undetermined sentence and the corresponding color coefficient to the prediction analysis unit;
after receiving the branch detection signal, the branch detection unit analyzes branch data of the software program, the branch data of the software program comprises node data and length data, the node data is the number of nodes for converging instructions in a path of the software program, and the length data is the number of instructions of the instructions in the path of the software program after the instructions are dispersed at the nodes, and the specific analysis process is as follows:
step SS 1: acquiring the number of nodes for instruction convergence in the software program path, and marking the number of the nodes for instruction convergence in the software program path as JDi;
step SS 2: acquiring the number of instructions of the instructions in the software program path after the instructions are scattered at the nodes, and marking the number of the instructions in the software program path after the instructions are scattered at the nodes as SLi;
step SS 3: by the formula
Figure BDA0002997285660000091
Obtaining a detection coefficient FZi of branches in the software program, wherein a1 and a2 are both preset proportionality coefficients, and a1 is greater than a2 is greater than 0;
step SS 4: the detection coefficient FZi of a branch in the software program is compared to a detection coefficient threshold for the branch:
if the detection coefficient FZi of the branch in the software program is not less than the detection coefficient threshold of the branch, judging that the branch detection in the software program is abnormal, marking the corresponding software program as a fussy-branch software program, and then sending the fussy-branch software program and the corresponding branch detection coefficient to a prediction analysis unit;
if the detection coefficient FZi of the branch in the software program is less than the detection coefficient threshold of the branch, judging that the branch detection in the software program is normal, marking the corresponding software program as a concise-branch software program, then sending the concise-branch software program and the corresponding branch detection coefficient to a fault positioning platform, and after receiving the concise-branch software program and the branch detection coefficient, the fault positioning platform generates a normal-branch signal and sends the normal-branch signal to a mobile phone terminal of a manager;
after receiving the branch detection coefficient FZi and the color coefficient YSo corresponding to the pending statement, the prediction analysis unit performs fault prediction on the software program, and the specific prediction process is as follows:
randomly ordering branch detection coefficients FZi corresponding to the software program and color coefficients YSo corresponding to the to-be-determined statement, respectively setting different weights WFZi and WYSo for the randomly ordered branch detection coefficients and color coefficients, wherein WFZi + WYSo is 1, and then, ordering the branch detection coefficients FZi and the color coefficients Y corresponding to the to-be-determined statementSo is substituted into a prediction analysis model, and the formula of the prediction analysis model is
Figure BDA0002997285660000101
Wherein e is a natural constant, alpha is an error correction factor, the value is 1.74, v1 and v2 are both proportionality coefficients, and v1 is greater than v2 is greater than 0;
and then comparing the substituted calculated failure prediction analysis coefficient HS with a failure prediction analysis coefficient threshold value: if the calculated failure prediction analysis coefficient HS is not less than the failure prediction analysis coefficient threshold value, the failure occurrence rate of the corresponding software program is judged to be high, the corresponding software program is marked as a prediction abnormal software program, meanwhile, the prediction abnormal software program is sent to the mobile phone terminal of the administrator, if the calculated failure prediction analysis coefficient HS is less than the failure prediction analysis coefficient threshold value, the failure occurrence rate of the corresponding software program is judged to be low, the corresponding software program is marked as a prediction normal software program, and meanwhile, the prediction normal software program is sent to the mobile phone terminal of the administrator.
The working principle of the invention is as follows:
when the fault locating device works, the data collection unit is used for collecting data of a software program, the software program is obtained, an entity of the software program is divided into sentences and branches, the operation type of the software program is obtained, the sentences and the branches in the entity are detected after the entity of the software program is received by the fault locating platform, the sentences of the software program are detected after a sentence detection signal is received by the sentence detection unit, the working efficiency of software fault locating is improved, the fault searching time is reduced, the influence of faults on the software program is reduced, the branch data of the software program is analyzed after the branch detection signal is received by the branch detection unit, the occurrence of faults can be effectively prevented, the influence of the faults on the software program is reduced, and the use quality of users is improved.
The above formulas are all calculated by taking the numerical value of the dimension, the formula is a formula which obtains the latest real situation by acquiring a large amount of data and performing software simulation, and the preset parameters in the formula are set by the technical personnel in the field according to the actual situation.
The foregoing is merely exemplary and illustrative of the present invention and various modifications, additions and substitutions may be made by those skilled in the art to the specific embodiments described without departing from the scope of the invention as defined in the following claims.

Claims (4)

1. A software fault positioning system based on a machine learning algorithm is characterized by comprising a fault positioning platform, a data acquisition unit, a statement detection unit, a prediction analysis unit and a branch detection unit;
the data acquisition unit is used for acquiring data of the software program, acquiring the software program, dividing an entity of the software program into statements and branches, acquiring the operation type of the software program, wherein the operation type of the software program comprises successful operation and failed operation of the software program, then sending the entity and the operation type of the software program to the fault positioning platform, and marking the software program as i, wherein i is 1, 2, …, n and n is a positive integer;
after receiving the entity of the software program, the fault positioning platform detects statements and branches in the entity, then generates statement detection signals and branch detection signals and correspondingly sends the statement detection signals and the branch detection signals to a statement detection unit and a branch detection unit;
the statement detection unit detects statements of the software program after receiving statement detection signals;
after receiving the branch detection signal, the branch detection unit analyzes branch data of the software program, wherein the branch data of the software program comprises node data and length data, the node data is the number of nodes for converging instructions in a path of the software program, and the length data is the number of the instructions for dispersing the instructions in the path of the software program;
the prediction analysis unit performs failure prediction on the software program.
2. The software fault location system based on machine learning algorithm as claimed in claim 1, wherein the specific detection process of the sentence detection unit is as follows:
step S1: acquiring a statement in a software program in real time, marking the statement in the software program as o, o as 1, 2, …, m, m as a positive integer, and then acquiring a historical path of the software program, wherein the historical path of the software program comprises a historical failure path and a historical success path, the historical failure path is represented as an execution instruction of historical failure in the software program, and the historical success path is represented as an execution instruction of historical success in the software program;
step S2: comparing statements in the software program acquired in real time with a historical path of the software program, if the statements of the software program acquired in real time are statements appearing in the historical failure path, marking the statements of the corresponding software program in red, if the statements of the software program acquired in real time are statements appearing in the historical success path, marking the statements of the corresponding software program in green, and if the statements of the software program acquired in real time are both statements appearing in the historical failure path and statements appearing in the historical success path, marking the statements of the corresponding software program in yellow;
step S3: acquiring the total number of successful statements in the historical successful path and the execution number of the total number of successful statements in the historical successful path, and respectively marking the total number of successful statements in the historical successful path and the execution number of the total number of successful statements in the historical successful path as P and Po; acquiring the total number of failure statements in a historical failure path and the execution number of the total number of failure statements in the historical failure path, and respectively marking the total number of failure statements in the historical failure path and the execution number of the total number of failure statements in the historical failure path as K and Ko, wherein both Po and Ko can be acquired through program instrumentation, and the program instrumentation is a public prior art;
step S4: then obtaining the ratio BP of the execution number of the successful statements in the history success path to the total number, namely
Figure FDA0002997285650000021
Wherein beta 1 isAn error correction factor with a value of 2.36 is obtained, and a ratio BK of the execution number and the total number of the failure statements in the historical failure path is obtained, namely
Figure FDA0002997285650000022
Wherein, β 2 is an error correction factor, the value thereof is 1.28, and then the coverage ratio BZ of the historical successful path and the historical failed path is obtained, namely
Figure FDA0002997285650000023
Wherein, beta 3 is an error correction factor and takes a value of 1.59;
step S5: acquiring the lengths of green and red color intervals, and marking the lengths of the green and red color intervals as CDs;
step S6: by the formula
Figure FDA0002997285650000024
The color coefficient YSo of the sentence in the real-time software program is obtained and then the color coefficient YSo of the sentence in the real-time software program is compared with the upper limit value L1 and the lower limit value L2 of the yellow color interval.
3. The software fault location system based on machine learning algorithm as claimed in claim 1, wherein the specific analysis process of the branch detection unit is as follows:
obtaining the node number of instruction aggregation in the software program path and the instruction number of the instructions in the software program path after the nodes are dispersed, and obtaining the node number of the instruction aggregation in the software program path and the instruction number of the instructions in the software program path after the nodes are dispersed by a formula
Figure FDA0002997285650000031
The detection coefficient FZi of the branch in the software program is obtained, and the detection coefficient FZi of the branch in the software program is compared with the detection coefficient threshold of the branch.
4. The software fault location system based on machine learning algorithm of claim 1, wherein the prediction analysis unit performs fault prediction on the software program after receiving the branch detection coefficient FZi and the color coefficient YSo corresponding to the pending statement, and the specific prediction process is as follows:
randomly ordering branch detection coefficients FZi corresponding to a software program and color coefficients YSo corresponding to a to-be-determined statement, respectively setting different weights WFZi and WYSo for the branch detection coefficients and the color coefficients after random ordering, wherein WFZi + WYSo is 1, then substituting the branch detection coefficients FZi and the color coefficients YSo corresponding to the to-be-determined statement into a prediction analysis model, wherein the formula of the prediction analysis model is as follows
Figure FDA0002997285650000032
Wherein e is a natural constant, alpha is an error correction factor, the value is 1.74, v1 and v2 are both proportionality coefficients, and v1 is greater than v2 is greater than 0;
and then comparing the substituted calculated failure prediction analysis coefficient HS with a failure prediction analysis coefficient threshold value: if the calculated failure prediction analysis coefficient HS is not less than the failure prediction analysis coefficient threshold value, the failure occurrence rate of the corresponding software program is judged to be high, the corresponding software program is marked as a prediction abnormal software program, meanwhile, the prediction abnormal software program is sent to the mobile phone terminal of the administrator, if the calculated failure prediction analysis coefficient HS is less than the failure prediction analysis coefficient threshold value, the failure occurrence rate of the corresponding software program is judged to be low, the corresponding software program is marked as a prediction normal software program, and meanwhile, the prediction normal software program is sent to the mobile phone terminal of the administrator.
CN202110335336.3A 2021-03-29 2021-03-29 Software fault positioning system based on machine learning algorithm Pending CN112947940A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110335336.3A CN112947940A (en) 2021-03-29 2021-03-29 Software fault positioning system based on machine learning algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110335336.3A CN112947940A (en) 2021-03-29 2021-03-29 Software fault positioning system based on machine learning algorithm

Publications (1)

Publication Number Publication Date
CN112947940A true CN112947940A (en) 2021-06-11

Family

ID=76227283

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110335336.3A Pending CN112947940A (en) 2021-03-29 2021-03-29 Software fault positioning system based on machine learning algorithm

Country Status (1)

Country Link
CN (1) CN112947940A (en)

Similar Documents

Publication Publication Date Title
CN112162878B (en) Database fault discovery method and device, electronic equipment and storage medium
CN110210512B (en) Automatic log anomaly detection method and system
CN111126824B (en) Multi-index correlation model training method and multi-index anomaly analysis method
CN114024837B (en) Fault root cause positioning method of micro-service system
CN113328872B (en) Fault repairing method, device and storage medium
CN110955550B (en) Cloud platform fault positioning method, device, equipment and storage medium
CN108964995A (en) Log correlation analysis method based on time shaft event
CN116450399B (en) Fault diagnosis and root cause positioning method for micro service system
CN109002391A (en) The method of automatic detection embedded software interface testing data
CN100514307C (en) Test cost-sensitive system failure position finding method and its device
CN111541559A (en) Fault positioning method based on causal rule
CN113391943A (en) Micro-service fault root cause positioning method and device based on cause and effect inference
CN109783324A (en) System runs method for early warning and device
CN111984442A (en) Method and device for detecting abnormality of computer cluster system, and storage medium
CN113392893A (en) Method, device, storage medium and computer program product for positioning service fault
KR20140051678A (en) Apparatus and method for fault management of smart devices
CN105516206A (en) Network intrusion detection method and system based on partial least squares
CN114691521A (en) Software testing platform based on artificial intelligence
CN113891342A (en) Base station inspection method and device, electronic equipment and storage medium
CN112947940A (en) Software fault positioning system based on machine learning algorithm
CN110807014A (en) Cross validation based station data anomaly discrimination method and device
CN110069382A (en) Software supervision method, server, terminal device, computer equipment and medium
CN115576831A (en) Test case recommendation method, device, equipment and storage medium
CN115587312A (en) Fault point positioning method and system based on multi-dimensional big data analysis
CN111694752B (en) Application testing method, electronic device and storage medium

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20210611

RJ01 Rejection of invention patent application after publication