CN117131453A - Abnormality diagnosis method and device, electronic equipment and storage medium - Google Patents

Abnormality diagnosis method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN117131453A
CN117131453A CN202311162355.6A CN202311162355A CN117131453A CN 117131453 A CN117131453 A CN 117131453A CN 202311162355 A CN202311162355 A CN 202311162355A CN 117131453 A CN117131453 A CN 117131453A
Authority
CN
China
Prior art keywords
event
log
diagnosed
equipment
coordinate axis
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
CN202311162355.6A
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 Hikrobot Co Ltd
Original Assignee
Hangzhou Hikrobot 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 Hikrobot Co Ltd filed Critical Hangzhou Hikrobot Co Ltd
Priority to CN202311162355.6A priority Critical patent/CN117131453A/en
Publication of CN117131453A publication Critical patent/CN117131453A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/243Classification techniques relating to the number of classes
    • G06F18/2433Single-class perspective, e.g. one-against-all classification; Novelty detection; Outlier detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/904Browsing; Visualisation therefor
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N17/00Diagnosis, testing or measuring for television systems or their details
    • H04N17/002Diagnosis, testing or measuring for television systems or their details for television cameras

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Computation (AREA)
  • Evolutionary Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • General Health & Medical Sciences (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the application provides an abnormality diagnosis method, an abnormality diagnosis device, electronic equipment and a storage medium, wherein the abnormality diagnosis method is applied to the electronic equipment, and the electronic equipment is provided with upper-layer software for providing service for equipment to be diagnosed; the abnormality diagnosis method includes: acquiring each event reported by equipment to be diagnosed, and acquiring a work log which is generated by upper software and related to the equipment to be diagnosed; analyzing the event information of each event and the log content of the work log to obtain an abnormal message of the equipment to be diagnosed; and displaying the abnormal message distribution information of the equipment to be diagnosed according to the abnormal message. The abnormality diagnosis method provided by the embodiment of the application can reduce the difficulty of abnormality diagnosis of the equipment to be diagnosed and improve the efficiency of abnormality diagnosis of the equipment to be diagnosed.

Description

Abnormality diagnosis method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to an anomaly diagnosis method, an anomaly diagnosis device, an electronic device, and a storage medium.
Background
During the working process of the device, the device may have the anomalies caused by different reasons such as packet loss, data packet anomaly, IO triggering anomaly, device disconnection and the like. In the related art, the client software for operating the device to be diagnosed may be upper-level software of the device to be diagnosed. When performing abnormality diagnosis on the equipment to be diagnosed, a technician is usually required to look up each log entry in a work log of the equipment to be diagnosed, which is recorded by upper software of the equipment to be diagnosed, one by one, determine an abnormal log entry in each log entry, and then determine an abnormal condition of the equipment to be diagnosed according to the abnormal log entry.
However, during the operation of the device to be diagnosed, a large number of work logs about the device to be diagnosed are often generated. Since the amount of the work log on the device to be diagnosed is large and the reading and understanding difficulties are high, the difficulty of performing abnormality diagnosis in the related art is high and the efficiency is low.
Disclosure of Invention
The embodiment of the application aims to provide an abnormality diagnosis method, an abnormality diagnosis device, electronic equipment and a storage medium, so as to reduce the difficulty of abnormality diagnosis of equipment and improve the efficiency of abnormality diagnosis of the equipment. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present application provides an anomaly diagnosis method, which is applied to an electronic device, where the electronic device is installed with upper software that provides services for a device to be diagnosed; the method comprises the following steps:
acquiring each event reported by the equipment to be diagnosed, and acquiring a work log which is generated by the upper layer software and related to the equipment to be diagnosed;
analyzing the event information of each event and the log content of the work log to obtain an abnormal message of the equipment to be diagnosed; wherein the exception message includes: abnormal events in the events and/or abnormal log entries in the work log; the event information of each event includes: event type and timestamp; the log content of each log entry in the work log includes: log type and system time;
And displaying the abnormal message distribution information of the equipment to be diagnosed according to the abnormal message.
Optionally, in a specific implementation manner, the analyzing the event information of each event and the log content of the work log to obtain the abnormal message of the device to be diagnosed includes:
according to each preset period, each event reported by the equipment to be diagnosed in the preset period and each newly added log entry in the work log are read respectively, and the read each event and each log entry are analyzed to obtain an abnormal message of the equipment to be diagnosed.
Optionally, in a specific implementation manner, the displaying, according to the anomaly message, anomaly message distribution information of the device to be diagnosed includes:
displaying a broken line connecting each target point in a first coordinate system taking the system time as a first coordinate axis and taking the number of message entries as a second coordinate axis, and highlighting a designated point in each target point;
wherein, for each target point, the coordinates of the target point on the first coordinate axis are: the target point represents the time of the preset period, and the coordinates of the target point on the second coordinate axis are as follows: within the preset period represented by the target point, the sum of the number of events reported by the equipment to be diagnosed and the number of newly-added log entries in the work log; the specified points are as follows: there is a target point corresponding to a preset period of the abnormal message.
Optionally, in a specific implementation manner, the method further includes:
displaying each event distribution point and/or each log distribution point in a second coordinate system which takes the system time as a first coordinate axis and takes the message type as a second coordinate axis;
wherein, for each event distribution point, the coordinates of the event distribution point on the first coordinate axis are: the system time corresponding to the time stamp of the event represented by the event distribution point; the coordinates of the event distribution point on the second coordinate axis are as follows: the event type of the event characterized by the event distribution point; for each log distribution point, the coordinates of the log distribution point on the first coordinate axis are as follows: the system time of the log entry represented by the log distribution point; the coordinates of the journal distribution point on the second coordinate axis are as follows: the log distribution point characterizes the log type of the log entry.
Optionally, in a specific implementation manner, the event includes an IO event, and the method further includes:
according to the obtained IO events reported by the equipment to be diagnosed, displaying IO waveform diagrams of the IO channels of the equipment to be diagnosed, and highlighting abnormal waveforms in each IO waveform diagram; the IO waveform diagram of each IO channel takes the system time as a first coordinate axis.
Optionally, in a specific implementation manner, the method further includes:
after each event is acquired, adding a specified item about the event in a preset table;
after each log entry is obtained, adding a specified entry related to the log entry in the preset table;
wherein the specified entry includes at least one of a system time, a type, a device identification, and specific content.
In a second aspect, an embodiment of the present application provides an abnormality diagnosis apparatus applied to an electronic device, the electronic device being installed with upper-layer software that provides services for a device to be diagnosed; the device comprises:
the event acquisition module is used for acquiring each event reported by the equipment to be diagnosed and acquiring a work log which is generated by the upper software and related to the equipment to be diagnosed;
the information analysis module is used for analyzing the event information of each event and the log content of the work log to obtain an abnormal message of the equipment to be diagnosed; wherein the exception message includes: abnormal events in the events and/or abnormal log entries in the work log; the event information of each event includes: event type and timestamp; the log content of each log entry in the work log includes: log type and system time;
And the information display module is used for displaying the abnormal information distribution information of the equipment to be diagnosed according to the abnormal information.
Optionally, in a specific implementation manner, the information parsing module is specifically configured to:
according to each preset period, respectively reading each event reported by the equipment to be diagnosed and each newly added log entry in the work log in the preset period, and analyzing each read event and each log entry to obtain an abnormal message of the equipment to be diagnosed;
optionally, in a specific implementation manner, the information display module is specifically configured to:
displaying a broken line connecting each target point in a first coordinate system taking the system time as a first coordinate axis and taking the number of message entries as a second coordinate axis, and highlighting a designated point in each target point;
wherein, for each target point, the coordinates of the target point on the first coordinate axis are: the target point represents the time of the preset period, and the coordinates of the target point on the second coordinate axis are as follows: within the preset period represented by the target point, the sum of the number of events reported by the equipment to be diagnosed and the number of newly-added log entries in the work log; the specified points are as follows: the target point corresponding to the preset period of the abnormal message exists;
Optionally, in a specific implementation manner, the apparatus further includes:
the distribution point display module is used for displaying each event distribution point and/or each log distribution point in a second coordinate system taking the system time as a first coordinate axis and the message type as a second coordinate axis;
wherein, for each event distribution point, the coordinates of the event distribution point on the first coordinate axis are: the system time corresponding to the time stamp of the event represented by the event distribution point; the coordinates of the event distribution point on the second coordinate axis are as follows: the event type of the event characterized by the event distribution point; for each log distribution point, the coordinates of the log distribution point on the first coordinate axis are as follows: the system time of the log entry represented by the log distribution point; the coordinates of the journal distribution point on the second coordinate axis are as follows: the log type of the log entry characterized by the log distribution point;
optionally, in a specific implementation manner, the event includes an IO event, and the apparatus further includes:
the waveform diagram display module is used for displaying the IO waveform diagrams of all IO channels of the equipment to be diagnosed according to all the IO events reported by the equipment to be diagnosed, and highlighting abnormal waveforms in each IO waveform diagram; the IO waveform diagram of each IO channel takes the system time as a first coordinate axis;
Optionally, in a specific implementation manner, the apparatus further includes:
the event entry adding module is used for adding a specified entry about an event in a preset table after each event is acquired;
the log entry adding module is used for adding a specified entry related to one log entry in the preset table after the log entry is obtained;
wherein the specified entry includes at least one of a system time, a type, a device identification, and specific content.
In a third aspect, an embodiment of the present application provides an electronic device, including:
a memory for storing a computer program;
and the processor is used for realizing any one of the abnormality diagnosis methods when executing the program stored in the memory.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having stored therein a computer program which, when executed by a processor, implements any one of the above-described abnormality diagnosis methods.
The embodiments of the present application also provide a computer program product comprising instructions which, when run on a computer, cause the computer to perform any of the above-described anomaly diagnosis methods.
The embodiment of the application has the beneficial effects that:
in the above, by applying the scheme provided by the embodiment of the application, the upper layer software for providing services for the device to be diagnosed can be installed on the electronic device, each event occurring in the device to be diagnosed can be reported to the electronic device by the device to be diagnosed, and the upper layer software can generate a log about the device to be diagnosed. When defect diagnosis is carried out, the electronic equipment can acquire all events reported by the equipment to be diagnosed, and acquire a work log which is generated by upper software and related to the equipment to be diagnosed. The event information of each event may include: event type and timestamp; the log content of each log entry in the work log may include: log type and system time; an exception event in each event, and/or an exception log entry in the work log may be used as an exception message. The electronic equipment can analyze the acquired event information of each event and the log content of the acquired work log to obtain an abnormal message of the equipment to be diagnosed, and further, according to the abnormal message, the abnormal message distribution information of the equipment to be diagnosed is displayed.
Based on the above, since the abnormality information may include the abnormality log entries in the work log, when the technician performs abnormality diagnosis on the device to be diagnosed, it is no longer necessary to determine the abnormality log entries in each log entry by checking each log entry in the work log one by one, but the abnormality log entries in each log entry may be determined directly by the abnormality message distribution information of the device to be diagnosed shown by the electronic device more intuitively. Therefore, the scheme provided by the embodiment of the application can reduce the difficulty of carrying out abnormality diagnosis on the equipment to be diagnosed and improve the efficiency of carrying out abnormality diagnosis on the equipment to be diagnosed.
In addition, because the anomaly information can also comprise the anomaly event in each event reported by the equipment to be diagnosed, when the technician performs anomaly diagnosis on the equipment to be diagnosed, the technician can determine the anomaly log entry in each log entry and the anomaly event in each event through the anomaly message distribution information of the equipment to be diagnosed, which is displayed by the electronic equipment, and perform anomaly diagnosis on the equipment to be diagnosed according to the anomaly log entry in each log entry and the anomaly event in each event. Therefore, compared with the method for determining the abnormal condition of the equipment to be diagnosed according to the abnormal log entry, the method and the equipment for diagnosing the abnormal condition of the equipment to be diagnosed can further improve the accuracy of diagnosing the abnormal condition of the equipment to be diagnosed.
Of course, it is not necessary for any one product or method of practicing the application to achieve all of the advantages set forth above at the same time.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the application, and other embodiments may be obtained according to these drawings to those skilled in the art.
FIG. 1 is a schematic flow chart of an abnormality diagnosis method according to an embodiment of the present application;
FIG. 2 is a schematic flow chart of an abnormality diagnosis method according to an embodiment of the present application;
FIG. 3 is a schematic flow chart of an abnormality diagnosis method according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a broken line connecting each target point in a first coordinate system according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a log distribution point in a second coordinate system according to an embodiment of the present application;
fig. 6 is an IO waveform diagram of each IO channel of an acquisition card and a camera according to an embodiment of the present application;
FIG. 7 is a schematic view showing the effect of highlighting a specified log entry in a preset table shown in Table 1 according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of an abnormality diagnosis device according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. Based on the embodiments of the present application, all other embodiments obtained by the person skilled in the art based on the present application are included in the scope of protection of the present application.
In the related art, when the client software for operating the device to be diagnosed may be used as the upper software of the device to be diagnosed and perform the abnormality diagnosis on the device to be diagnosed, a technician is usually required to look up each log entry in the work log of the device to be diagnosed recorded by the upper software of the device to be diagnosed one by one, determine the abnormal log entry in each log entry, and further determine the abnormality of the device to be diagnosed according to the abnormal log entry.
However, during the operation of the device to be diagnosed, a large number of work logs about the device to be diagnosed are often generated. Since the amount of the work log on the device to be diagnosed is large and the reading and understanding difficulties are high, the difficulty of performing abnormality diagnosis in the related art is high and the efficiency is low.
Based on the above, the embodiment of the application provides an abnormality diagnosis method.
The method is suitable for various scenes in which abnormality diagnosis is required for the equipment, such as a scene in which abnormality diagnosis is required for independent equipment, a scene in which defect detection is performed for equipment in a system consisting of a plurality of equipment, and the like. Based on this, the embodiment of the present application does not specifically limit the application scenario of the method.
And, the method can be applied to various electronic devices which can perform data processing and are installed with upper software for providing services for devices to be diagnosed, such as mobile phones, notebook computers, desktop computers, and the like. The electronic device may be an independent electronic device or a device cluster formed by a plurality of electronic devices, which is not particularly limited in the embodiment of the present application, and is hereinafter referred to as an electronic device.
The abnormality diagnosis method provided by the embodiment of the application can comprise the following steps:
acquiring each event reported by the equipment to be diagnosed, and acquiring a work log which is generated by the upper layer software and related to the equipment to be diagnosed;
analyzing the event information of each event and the log content of the work log to obtain an abnormal message of the equipment to be diagnosed; wherein the exception message includes: abnormal events in the events and/or abnormal log entries in the work log; the event information of each event includes: event type and timestamp; the log content of each log entry in the work log includes: log type and system time;
And displaying the abnormal message distribution information of the equipment to be diagnosed according to the abnormal message.
In the above, by applying the scheme provided by the embodiment of the application, the upper layer software for providing services for the device to be diagnosed can be installed on the electronic device, each event occurring in the device to be diagnosed can be reported to the electronic device by the device to be diagnosed, and the upper layer software can generate a log about the device to be diagnosed. When defect diagnosis is carried out, the electronic equipment can acquire all events reported by the equipment to be diagnosed, and acquire a work log which is generated by upper software and related to the equipment to be diagnosed. The event information of each event may include: event type and timestamp; the log content of each log entry in the work log may include: log type and system time; an exception event in each event, and/or an exception log entry in the work log may be used as an exception message. The electronic equipment can analyze the acquired event information of each event and the log content of the acquired work log to obtain an abnormal message of the equipment to be diagnosed, and further, according to the abnormal message, the abnormal message distribution information of the equipment to be diagnosed is displayed.
Based on the above, since the abnormality information may include the abnormality log entries in the work log, when the technician performs abnormality diagnosis on the device to be diagnosed, it is no longer necessary to determine the abnormality log entries in each log entry by checking each log entry in the work log one by one, but the abnormality log entries in each log entry may be determined directly by the abnormality message distribution information of the device to be diagnosed shown by the electronic device more intuitively. Therefore, the scheme provided by the embodiment of the application can reduce the difficulty of carrying out abnormality diagnosis on the equipment to be diagnosed and improve the efficiency of carrying out abnormality diagnosis on the equipment to be diagnosed.
In addition, because the anomaly information can also comprise the anomaly event in each event reported by the equipment to be diagnosed, when the technician performs anomaly diagnosis on the equipment to be diagnosed, the technician can determine the anomaly log entry in each log entry and the anomaly event in each event through the anomaly message distribution information of the equipment to be diagnosed, which is displayed by the electronic equipment, and perform anomaly diagnosis on the equipment to be diagnosed according to the anomaly log entry in each log entry and the anomaly event in each event. Therefore, compared with the method for determining the abnormal condition of the equipment to be diagnosed according to the abnormal log entry, the method and the equipment for diagnosing the abnormal condition of the equipment to be diagnosed can further improve the accuracy of diagnosing the abnormal condition of the equipment to be diagnosed.
Next, a specific description will be given of an abnormality diagnosis method provided in an embodiment of the present application with reference to the accompanying drawings.
Fig. 1 is a schematic flow chart of an abnormality diagnosis method according to an embodiment of the present application, as shown in fig. 1, the method may include the following steps S101 to S103.
S101: and acquiring each event reported by the equipment to be diagnosed, and acquiring a work log which is generated by upper software and related to the equipment to be diagnosed.
The user can operate the device to be diagnosed through the client software, such as controlling the device to be diagnosed to execute a specified action and the like, and the client software for operating the device to be diagnosed can be used as upper-layer software of the device to be diagnosed, wherein the upper-layer software can be installed on the device to be diagnosed or other devices in communication connection with the electronic device. In order for the electronic device to provide services for the device to be diagnosed, upper-level software for providing services for the device to be diagnosed may be installed on the electronic device.
For example, the device to be diagnosed may be an industrial production device, and in order for the electronic device to realize control of each industrial production device, upper-layer software that can control each industrial production device may be installed on the electronic device.
For another example, the electronic device may be an industrial control computer, the device to be diagnosed may be an industrial camera and an image acquisition card, and in order for the industrial control computer to realize operations such as controlling the industrial camera, acquiring an image acquired by the industrial camera through the image acquisition card, upper software for realizing the operations may be installed on the industrial control computer.
Alternatively, the upper layer software may be a software development kit (Software Development Kit, SDK) for developing the device to be diagnosed.
The device to be diagnosed may send each event occurring inside the device to be diagnosed to the electronic device, and upper software installed on the electronic device to provide services for the device to be diagnosed may generate a work log about the device to be diagnosed according to the services provided by the upper software for the device to be diagnosed. When abnormality detection is performed on equipment to be diagnosed, the electronic equipment can acquire all events reported by the equipment to be diagnosed, and acquire a work log which is generated by upper software and related to the equipment to be diagnosed.
The format of the event reported to the electronic device by the device to be diagnosed and the format of the work log generated by the upper layer software about the device to be diagnosed can be set by a person skilled in the art according to specific application conditions, and the embodiment of the application is not limited specifically.
Optionally, the event information of each event reported to the electronic device by the device to be diagnosed may include a time stamp, an event type, an event channel, and an event description of the event.
Optionally, the event types of the event reported to the electronic device by the device to be diagnosed may be classified into a normal event, an abnormal event, and an IO (Input/Output) event, where the event channel may be an IO channel related to the IO event, and the timestamp may be determined based on a start-up time of the device to be diagnosed.
For example, if the device to be diagnosed receives the image data a through the IO channel 1 at 10 seconds after the device to be diagnosed is started, the timestamp in the event information of the event reported to the electronic device by the device to be diagnosed may be 10 seconds, the event type may be an IO event, the event channel may be the IO channel 1, and the event description may be the received image data a.
Optionally, the log content generated by the upper layer software for each log entry of the work log of the device to be diagnosed may include system time, log type, code location, log information, and solution.
Optionally, the log types may be classified into a debug log, a regular log, a warning log, and an error log, the solution may be a solution to the device exception corresponding to the error log, and the system time may be a local time generated by the log entry.
In addition, the time for the electronic device to acquire each event reported by the device to be diagnosed and the time for acquiring the log of the device to be diagnosed generated by the upper software can be set by those skilled in the art according to specific application conditions, and the embodiment of the application is not limited specifically.
Optionally, the device to be diagnosed may report, in real time, each event occurring inside the device to be diagnosed, and the electronic device may obtain, in real time, each event reported by the device to be diagnosed.
Optionally, when the electronic device starts to perform the abnormal diagnosis on the device to be diagnosed, an event reporting instruction for prompting the device to be diagnosed to report an event is sent to the device to be diagnosed, and further, after receiving the event reporting instruction, the device to be diagnosed can report each event occurring in the device to be diagnosed to the electronic device in real time in response to the event reporting instruction, and the electronic device can acquire each event reported by the device to be diagnosed in real time.
Optionally, the device to be diagnosed may report each event occurring inside the device to the electronic device according to the specified period, and further, the electronic device may obtain each event reported by the device to be diagnosed according to the specified period.
Alternatively, the electronic device may acquire, in real time, a work log generated by the upper layer software with respect to the device to be diagnosed.
Alternatively, the electronic device may acquire the work log about the device to be diagnosed, which is generated by the upper layer software, according to the target period.
Alternatively, the electronic device may acquire a work log about the device to be diagnosed, which is generated by the upper software in a specified time range, when starting to perform abnormality diagnosis on the device to be diagnosed.
Optionally, the electronic device may acquire each event reported by the device to be diagnosed and the work log generated by the upper software on the device to be diagnosed through a multi-process read-only mode, so that normal operation of the device to be diagnosed and the upper software of the device to be diagnosed is not affected while the device to be diagnosed performs abnormal diagnosis.
S102: and analyzing the event information of each event and the log content of the work log to obtain the abnormal information of the equipment to be diagnosed.
Wherein the exception message comprises: abnormal events in each event, and/or abnormal log entries in the work log; the event information of each event includes: event type and timestamp; the log content of each log entry in the work log includes: log type and system time.
For each event, the event information of the event may include: event type and timestamp; the electronic device analyzes the acquired event information of each event, and can determine the abnormal event in each time. For each log entry in the work log, the log content of the log entry may include: log type and system time; the electronic device analyzes the log content of the obtained work log of the device to be diagnosed, and can determine abnormal log entries in the work log. Further, the abnormal event among the events determined by the electronic device and/or the abnormal log entry in the work log may be used as an abnormal message about the device to be diagnosed.
Optionally, the event types may include: normal events and abnormal events; the log types may include: normal log, error log, and warning log. When the electronic device analyzes the event information of each event, the electronic device can determine the event with the event type of the abnormal event as the abnormal event; when the log content of the work log is analyzed, the log entry whose log type is the error log included in the built-in content can be determined as an abnormal log entry.
Optionally, in order to improve the real-time performance of the anomaly diagnosis, the electronic device may read each event reported by the device to be diagnosed in real time, read each newly-added log entry in the working log in real time, and analyze each event and each log entry read in real time, so as to obtain the anomaly message of the device to be diagnosed.
Optionally, in one specific implementation manner, as shown in fig. 2, step S102 is described above: analyzing the event information of each event and the log content of the work log to obtain an abnormal message of the device to be diagnosed, which may include the following step S201.
S201: according to each preset period, each event reported by the equipment to be diagnosed in the preset period and each newly added log entry in the work log are read respectively, and the read each event and each log entry are analyzed to obtain an abnormal message of the equipment to be diagnosed.
The preset period may be set by a person skilled in the art according to a specific application, and the embodiment of the present application is not specifically limited.
For example, the preset period may be 1 second, and then, the electronic device may respectively read each event reported by the device to be diagnosed and each newly added log entry in the work log within 1 second after each preset period is finished, that is, every 1 second interval, and parse each read event and each log entry to obtain an abnormal message of the device to be diagnosed.
However, the data reading capability of the electronic device may be limited, so if more events and newly added log entries in the work log are reported by the device to be diagnosed in a certain preset period, the electronic device may not be able to read all the events and the newly added log entries in the work log reported by the device to be diagnosed in the preset period at one time. Further, alternatively, the electronic device may read each event from the unresolved events by a first reading number and read each log entry from the unresolved work log by a second reading number according to each preset period.
The first reading number and the second reading number may be set by those skilled in the art according to specific application situations (for example, data reading capability of the electronic device, etc.), and the embodiment of the present application is not limited specifically.
For example, the first number of readings may be 20, the second number of readings may be 10, and for a certain preset period, there are 21 unresolved events, and 9 unresolved logs. Furthermore, for the preset period, the electronic device may read 20 events from the 21 unresolved events, and read the 9 unresolved logs.
S103: and displaying the abnormal message distribution information of the equipment to be diagnosed according to the abnormal message.
After obtaining the abnormal information of the equipment to be diagnosed, the electronic equipment can display the abnormal information distribution information of the equipment to be diagnosed according to the obtained abnormal information.
Optionally, the abnormal message subsection information may include distribution time of the abnormal message and/or distribution position of the abnormal message.
For example, the above-mentioned abnormal message subsection information may include a distribution time of the abnormal message, and further, the electronic device may determine, according to a timestamp included in the event information of the abnormal event in each event, a system time corresponding to the abnormal event in each event, as the distribution time of the abnormal event in each event; and determining the system time included in the log content of the abnormal log entries in the work log as the distribution time of the abnormal log entries in the work log. And then, the distribution time of the abnormal events in each event and/or the distribution time of the abnormal log entries in the work log are displayed as the abnormal message distribution information of the equipment to be diagnosed.
For example, the above-mentioned abnormal message subsection information may include a distribution position of the abnormal message, and further, the electronic device may display each obtained event and work log, and highlight the abnormal event in each displayed event, and highlight an abnormal log entry in the displayed work log, thereby realizing display of the distribution position of the abnormal message of the device to be diagnosed.
Optionally, the above information of the abnormal message part may further include the number of abnormal messages in a preset period.
Alternatively, in a specific implementation manner, as shown in fig. 3, the step S103 may include the following step S301, corresponding to the step S201.
S301: in a first coordinate system with the system time as a first coordinate axis and the number of message entries as a second coordinate axis, a broken line connecting each target point is displayed and a specified point in each target point is highlighted.
Wherein, for each target point, the coordinates of the target point on the first coordinate axis are: the target point represents the time of a preset period, and the coordinates of the target point on the second coordinate axis are as follows: within a preset period represented by the target point, the sum of the number of events reported by the equipment to be diagnosed and the number of newly added log entries in the work log; the specified points are: there is a target point corresponding to a preset period of the abnormal message.
That is, if the abnormal message of the device to be diagnosed is determined according to the preset period, when the abnormal message distribution information of the device to be diagnosed is displayed according to the abnormal message, the time of the preset period may be taken as the coordinates on the first coordinate axis for each preset period, the sum of the number of events reported by the device to be diagnosed and the number of newly added log entries in the work log is taken as the coordinates on the second coordinate axis within the preset period, the target point representing the preset period is determined in the first coordinate system with the system time as the first coordinate axis and the number of message entries as the second coordinate axis, the target point corresponding to the preset period in which the abnormal message exists is determined as the designated point, then the broken line connecting the respective target points is displayed in the first coordinate system, and the designated point in the respective target points is highlighted. Further, the broken line connecting each target point and each specified point in the first coordinate system shown contain the abnormal message distribution information of the device to be diagnosed.
The time of each preset period may be various time points included in the preset period, and, for example, the time of each period may be the end time of the period. With respect to the time of each preset period, the embodiment of the present application is not particularly limited.
For example, when the designated points in the respective target points are highlighted by black dot marks, in the first coordinate system having the system time as the axis of abscissa and the number of message entries as the axis of ordinate, a broken line connecting the respective target points is displayed and the designated points in the respective target points are highlighted, a graph as shown in fig. 4 can be obtained.
Based on the above, since the abnormality information may include the abnormality log entries in the work log, when the technician performs abnormality diagnosis on the device to be diagnosed, it is no longer necessary to determine the abnormality log entries in each log entry by checking each log entry in the work log one by one, but the abnormality log entries in each log entry may be determined directly by the abnormality message distribution information of the device to be diagnosed shown by the electronic device more intuitively. Therefore, the scheme provided by the embodiment of the application can reduce the difficulty of carrying out abnormality diagnosis on the equipment to be diagnosed and improve the efficiency of carrying out abnormality diagnosis on the equipment to be diagnosed.
In addition, because the anomaly information can also comprise the anomaly event in each event reported by the equipment to be diagnosed, when the technician performs anomaly diagnosis on the equipment to be diagnosed, the technician can determine the anomaly log entry in each log entry and the anomaly event in each event through the anomaly message distribution information of the equipment to be diagnosed, which is displayed by the electronic equipment, and perform anomaly diagnosis on the equipment to be diagnosed according to the anomaly log entry in each log entry and the anomaly event in each event. Therefore, compared with the method for determining the abnormal condition of the equipment to be diagnosed according to the abnormal log entry, the method and the equipment for diagnosing the abnormal condition of the equipment to be diagnosed can further improve the accuracy of diagnosing the abnormal condition of the equipment to be diagnosed.
Optionally, in a specific implementation manner, the abnormality diagnosis method provided by the embodiment of the present application may further include the following step 11.
Step 11: and displaying each event distribution point and/or each log distribution point in a second coordinate system taking the system time as a first coordinate axis and taking the message type as a second coordinate axis.
Wherein, for each event distribution point, the coordinates of the event distribution point on the first coordinate axis are: the system time corresponding to the time stamp of the event represented by the event distribution point; the coordinates of the event distribution point on the second coordinate axis are as follows: the event type of the event characterized by the event distribution point; for each log distribution point, the abscissa of the log distribution point is: the system time of the log entry represented by the log distribution point; the ordinate of the journal distribution point is: the log distribution point characterizes the log type of the log entry.
When abnormality diagnosis is carried out on equipment to be diagnosed, for each acquired event, the system time corresponding to the time stamp of the event can be taken as a coordinate on a first coordinate axis, the event type of the event is taken as a coordinate on a second coordinate axis, and an event distribution point representing the event is determined in a second coordinate system taking the system time as the first coordinate axis and the message type as the second coordinate axis; for each log entry in the obtained work log, the system time of the log entry can be used as a coordinate on a first coordinate axis, the log type of the log entry is used as a coordinate on a second coordinate axis, and a log distribution point representing the log entry is determined in a second coordinate system which takes the system time as the first coordinate axis and the message type as the second coordinate axis. Furthermore, each event distribution point and/or each log distribution point can be displayed in a second coordinate system with the system time as a first coordinate axis and the message type as a second coordinate axis.
Optionally, the electronic device may respond to the message distribution view request about the specified time period, and display each event distribution point and/or each log distribution point in a second coordinate system with the system time as a first coordinate axis and the message type as a second coordinate axis.
For example, the log types may include an Error log (Error), a Warning log (Warning), a regular log (Info), and a Debug log (Debug), and the electronic device may exhibit effects of respective log distribution points in a second coordinate system having a system time as a first coordinate axis and a message type as a second coordinate axis in response to a message distribution view request with respect to a time period between time 1 and time 7 as shown in fig. 5.
Alternatively, the user may send a message distribution view request to the electronic device for a specified time period by selecting the specified time period in the first coordinate system.
Optionally, the electronic device may also present specific content of a specified event or a specified log entry in response to a content viewing request for the specified event or the specified log entry.
For example, as shown in fig. 5, the user may send a content viewing request for a specified log entry to the electronic device by moving a mouse cursor to the log distribution point a characterizing the specified log entry or clicking on the log distribution point a characterizing the specified log entry, the electronic device may accept the content viewing request, and in response to the content viewing request for the specified log entry, the system time of the specified log entry is shown in fig. 5 as time t6 and log information F of the specified log entry.
Alternatively, the user may change the time range of the specified time period by dragging the first coordinate axis of the second coordinate system.
Based on the above, the technician can determine the specific distribution situation of the abnormal message according to each event distribution point and/or each log distribution point displayed in the second coordinate system, and determine the abnormal situation of the equipment to be diagnosed according to the specific distribution situation of the abnormal message. Therefore, by applying the specific implementation manner, the efficiency and the accuracy of abnormality diagnosis of the equipment can be further improved.
Optionally, in a specific implementation manner, the event may include an IO event, and further, the abnormality diagnosis method provided by the embodiment of the present application may further include the following step 21.
Step 21: according to the obtained IO events reported by the equipment to be diagnosed, IO waveform diagrams of the IO channels of the equipment to be diagnosed are displayed, and abnormal waveforms are highlighted in each IO waveform diagram.
The IO waveform diagram of each IO channel may use the system time as a first coordinate axis.
In each IO event, there may be information indicating whether the IO event is an input event or an output event. When the equipment to be diagnosed is subjected to abnormal diagnosis, the electronic equipment can respectively represent an input event and an output event by taking the system time as a first coordinate axis and high level and low level, and further, according to the obtained IO events reported by the equipment to be diagnosed, the IO waveform diagrams of the IO channels of the equipment to be diagnosed are determined. For each IO waveform map determined, the electronic device may also determine an abnormal waveform in the IO waveform map and highlight the abnormal waveform in the IO waveform map.
For example, the device to be diagnosed may include an acquisition card and a camera, and an IO channel of the acquisition card includes: channel 1, channel 2, and channel 3, the IO channel of the camera includes: the IO waveform diagrams of the channels 4, 5 and 6 of the device to be diagnosed according to the obtained IO events reported by the device to be diagnosed by using the system time as the first coordinate axis may be shown in fig. 6.
Based on the above, when the specific implementation manner is applied, a technician can determine the triggering condition of each IO channel of the equipment to be diagnosed according to the IO waveform diagram of each IO channel of the equipment to be diagnosed when carrying out the abnormality diagnosis on the equipment to be diagnosed, and further take the triggering condition of each IO channel and the abnormal waveform highlighted in each IO waveform diagram as the basis of the abnormality diagnosis on the equipment to be diagnosed, thereby further improving the efficiency of carrying out the abnormality diagnosis on the equipment to be diagnosed.
Optionally, in a specific implementation manner, the abnormality diagnosis method provided by the embodiment of the present application may further include the following steps 31 to 32.
Step 31: after each event is acquired, a specified entry for the event is added to the preset table.
Step 32: after each log entry is acquired, a specified entry for the log entry is added to the preset table.
Wherein the specified entry includes at least one of a system time, a type, a device identification, and specific content.
That is, when performing abnormality diagnosis of the device to be diagnosed, a preset table may be set, and after each time an event is acquired, the electronic device may add a specified entry for the event in the preset table; after each log entry is acquired, a specified entry for the log entry is added to the preset table. Further, the technician can view various events and work logs about the device to be diagnosed by viewing the preset table when performing abnormality diagnosis of the device to be diagnosed.
For example, when the apparatus to be diagnosed includes the industrial camera 1 and the acquisition card 1, the specified items include a system time, a type, an apparatus identification, and a specific content, the preset table may be as shown in table 1. After each acquisition of an event or log entry, the electronic device may add the system time, type, device identification, and specific content for the event or log entry in table 1. Further, when the technician performs abnormality diagnosis on the industrial camera 1, by looking up table 1, it can be understood that when the system time is time t9, the upper software generates a warning log of the industrial camera 1, and the specific content of the warning log is log information I; and the industrial camera 1 has an abnormal event at a system time of time t10, and the specific content of the abnormal event is an event description G.
Table 1:
system time Type(s) Device identification Detailed description of the preferred embodiments
Time t1 IO event Industrial camera 1 Description of event A
Time t2 Debug log Acquisition card 1 Log information B
At time t3 Conventional log Industrial camera 1 Log information C
At time t4 Routine events Acquisition card 1 Description of event D
At time t5 Conventional log Industrial camera 1 Log information E
At time t6 Conventional log Industrial camera 1 Log information F
At time t7 Routine events Acquisition card 1 Event description G
Time t8 Conventional log Industrial camera 1 Log information H
At time t9 Warning log Industrial camera 1 Journal information I
At time t10 Abnormal event Industrial camera 1 Event description G
Time t11 Warning log Acquisition card 1 Log information K
Time t12 Error log Acquisition card 1 Log information L
Optionally, the electronic device may further locate, in the preset table, a specified event and/or a specified log entry corresponding to the view request in response to the view request about the specified event and/or the specified log entry.
Alternatively, the above-described viewing request for the specified event may include at least one of contents included in the specified entry for the specified event, and the above-described viewing request for the specified log entry may include at least one of contents included in the specified entry for the specified log entry.
Optionally, the user may send a view request about the specified event and/or the specified log entry to the electronic device by clicking on the target point in the first coordinate system in the above embodiment, clicking on the specified point in the first coordinate system in the above embodiment, clicking on the event distribution point in the second coordinate system in the above embodiment, clicking on the log distribution point in the second coordinate system in the above embodiment, or selecting a certain section of waveform in the above IO waveform diagram, or the like.
Illustratively, as shown in FIG. 5, the user may send a view request to the electronic device for a specified journal entry by clicking on journal distribution point A in the second coordinate system. The electronic device may locate and highlight a specified log entry corresponding to the view request in a preset table as shown in table 1 in response to the view request. Also, the effect of the electronic device locating and highlighting the specified log entry corresponding to the view request in the preset table as shown in table 1 may be as shown in fig. 7.
Optionally, in each of the foregoing specific implementations, the time range of the first coordinate axis may be determined based on the current time and a preset duration; alternatively, the time range of the above-described first coordinate axis may be determined based on the current time and the abnormality diagnosis start time of the device to be diagnosed.
For example, the starting time of the time range of the first coordinate axis may be a difference between the current time and the preset duration, and the final time may be the current time.
For example, the start time of the time range of the first coordinate axis may be an abnormality diagnosis start time of the device to be diagnosed, and the end time may be a current time.
It should be noted that, the time ranges of the first coordinate axes may be adjusted by the user, and may be set by those skilled in the art according to specific application situations, and the embodiments of the present application are not limited herein specifically.
As shown in fig. 8, the embodiment of the application also provides an abnormality diagnosis device, which is applied to an electronic device, wherein the electronic device is provided with upper-layer software for providing services for the device to be diagnosed; the abnormality diagnosis device may include the following modules.
An event obtaining module 801, configured to obtain each event reported by the device to be diagnosed, and obtain a work log about the device to be diagnosed generated by the upper layer software;
an information parsing module 802, configured to parse event information of each event and log content of the work log, so as to obtain an abnormal message of the device to be diagnosed; wherein the exception message includes: abnormal events in the events and/or abnormal log entries in the work log; the event information of each event includes: event type and timestamp; the log content of each log entry in the work log includes: log type and system time;
And the information display module 803 is configured to display the abnormal message distribution information of the device to be diagnosed according to the abnormal message.
In the above, by applying the scheme provided by the embodiment of the application, the upper layer software for providing services for the device to be diagnosed can be installed on the electronic device, each event occurring in the device to be diagnosed can be reported to the electronic device by the device to be diagnosed, and the upper layer software can generate a log about the device to be diagnosed. When defect diagnosis is carried out, the electronic equipment can acquire all events reported by the equipment to be diagnosed, and acquire a work log which is generated by upper software and related to the equipment to be diagnosed. The event information of each event may include: event type and timestamp; the log content of each log entry in the work log may include: log type and system time; an exception event in each event, and/or an exception log entry in the work log may be used as an exception message. The electronic equipment can analyze the acquired event information of each event and the log content of the acquired work log to obtain an abnormal message of the equipment to be diagnosed, and further, according to the abnormal message, the abnormal message distribution information of the equipment to be diagnosed is displayed.
Based on the above, since the abnormality information may include the abnormality log entries in the work log, when the technician performs abnormality diagnosis on the device to be diagnosed, it is no longer necessary to determine the abnormality log entries in each log entry by checking each log entry in the work log one by one, but the abnormality log entries in each log entry may be determined directly by the abnormality message distribution information of the device to be diagnosed shown by the electronic device more intuitively. Therefore, the scheme provided by the embodiment of the application can reduce the difficulty of carrying out abnormality diagnosis on the equipment to be diagnosed and improve the efficiency of carrying out abnormality diagnosis on the equipment to be diagnosed.
In addition, because the anomaly information can also comprise the anomaly event in each event reported by the equipment to be diagnosed, when the technician performs anomaly diagnosis on the equipment to be diagnosed, the technician can determine the anomaly log entry in each log entry and the anomaly event in each event through the anomaly message distribution information of the equipment to be diagnosed, which is displayed by the electronic equipment, and perform anomaly diagnosis on the equipment to be diagnosed according to the anomaly log entry in each log entry and the anomaly event in each event. Therefore, compared with the method for determining the abnormal condition of the equipment to be diagnosed according to the abnormal log entry, the method and the equipment for diagnosing the abnormal condition of the equipment to be diagnosed can further improve the accuracy of diagnosing the abnormal condition of the equipment to be diagnosed.
Optionally, in a specific implementation manner, the information parsing module is specifically configured to:
according to each preset period, respectively reading each event reported by the equipment to be diagnosed and each newly added log entry in the work log in the preset period, and analyzing each read event and each log entry to obtain an abnormal message of the equipment to be diagnosed;
optionally, in a specific implementation manner, the information display module is specifically configured to:
displaying a broken line connecting each target point in a first coordinate system taking the system time as a first coordinate axis and taking the number of message entries as a second coordinate axis, and highlighting a designated point in each target point;
wherein, for each target point, the coordinates of the target point on the first coordinate axis are: the target point represents the time of the preset period, and the coordinates of the target point on the second coordinate axis are as follows: within the preset period represented by the target point, the sum of the number of events reported by the equipment to be diagnosed and the number of newly-added log entries in the work log; the specified points are as follows: the target point corresponding to the preset period of the abnormal message exists;
Optionally, in a specific implementation manner, the apparatus further includes:
the distribution point display module is used for displaying each event distribution point and/or each log distribution point in a second coordinate system taking the system time as a first coordinate axis and the message type as a second coordinate axis;
wherein, for each event distribution point, the coordinates of the event distribution point on the first coordinate axis are: the system time corresponding to the time stamp of the event represented by the event distribution point; the coordinates of the event distribution point on the second coordinate axis are as follows: the event type of the event characterized by the event distribution point; for each log distribution point, the coordinates of the log distribution point on the first coordinate axis are as follows: the system time of the log entry represented by the log distribution point; the coordinates of the journal distribution point on the second coordinate axis are as follows: the log type of the log entry characterized by the log distribution point;
optionally, in a specific implementation manner, the event includes an IO event, and the apparatus further includes:
the waveform diagram display module is used for displaying the IO waveform diagrams of all IO channels of the equipment to be diagnosed according to all the IO events reported by the equipment to be diagnosed, and highlighting abnormal waveforms in each IO waveform diagram; the IO waveform diagram of each IO channel takes the system time as a first coordinate axis;
Optionally, in a specific implementation manner, the apparatus further includes:
the event entry adding module is used for adding a specified entry about an event in a preset table after each event is acquired;
the log entry adding module is used for adding a specified entry related to one log entry in the preset table after the log entry is obtained;
wherein the specified entry includes at least one of a system time, a type, a device identification, and specific content.
The embodiment of the application also provides an electronic device, as shown in fig. 9, including:
a memory 901 for storing a computer program;
the processor 902 is configured to implement any of the abnormality diagnosis methods provided in the embodiments of the present application when executing the program stored in the memory 901.
And the electronic device may further include a communication bus and/or a communication interface, where the processor 902, the communication interface, and the memory 901 perform communication with each other via the communication bus.
The communication bus mentioned above for the electronic devices may be a peripheral component interconnect standard (Peripheral Component Interconnect, PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, etc. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the electronic device and other devices.
The Memory may include random access Memory (Random Access Memory, RAM) or may include Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but also digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
In yet another embodiment of the present application, there is also provided a computer-readable storage medium having stored therein a computer program which, when executed by a processor, implements the steps of any of the above-described abnormality diagnosis methods.
In yet another embodiment of the present application, there is also provided a computer program product containing instructions that, when run on a computer, cause the computer to perform any of the anomaly diagnosis methods of the above embodiments.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present application, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, by wired (e.g., coaxial cable, optical fiber, digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., a floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a Solid State Disk (SSD), etc.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for the apparatus embodiments, the electronic device embodiments, the computer-readable storage medium embodiments, and the computer program product embodiments, the description is relatively simple, and reference should be made to the description of method embodiments in part, since they are substantially similar to the method embodiments.
The foregoing description is only of the preferred embodiments of the present application and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims (10)

1. An abnormality diagnosis method is characterized by being applied to electronic equipment, wherein the electronic equipment is provided with upper-layer software for providing services for equipment to be diagnosed; the method comprises the following steps:
acquiring each event reported by the equipment to be diagnosed, and acquiring a work log which is generated by the upper layer software and related to the equipment to be diagnosed;
analyzing the event information of each event and the log content of the work log to obtain an abnormal message of the equipment to be diagnosed; wherein the exception message includes: abnormal events in the events and/or abnormal log entries in the work log; the event information of each event includes: event type and timestamp; the log content of each log entry in the work log includes: log type and system time;
and displaying the abnormal message distribution information of the equipment to be diagnosed according to the abnormal message.
2. The method according to claim 1, wherein the parsing the event information of the respective events and the log content of the work log to obtain the abnormal message of the device to be diagnosed includes:
according to each preset period, each event reported by the equipment to be diagnosed in the preset period and each newly added log entry in the work log are read respectively, and the read each event and each log entry are analyzed to obtain an abnormal message of the equipment to be diagnosed.
3. The method according to claim 2, wherein the presenting the abnormality message distribution information of the device to be diagnosed according to the abnormality message includes:
displaying a broken line connecting each target point in a first coordinate system taking the system time as a first coordinate axis and taking the number of message entries as a second coordinate axis, and highlighting a designated point in each target point;
wherein, for each target point, the coordinates of the target point on the first coordinate axis are: the target point represents the time of the preset period, and the coordinates of the target point on the second coordinate axis are as follows: within the preset period represented by the target point, the sum of the number of events reported by the equipment to be diagnosed and the number of newly-added log entries in the work log; the specified points are as follows: there is a target point corresponding to a preset period of the abnormal message.
4. The method according to claim 1, wherein the method further comprises:
displaying each event distribution point and/or each log distribution point in a second coordinate system which takes the system time as a first coordinate axis and takes the message type as a second coordinate axis;
wherein, for each event distribution point, the coordinates of the event distribution point on the first coordinate axis are: the system time corresponding to the time stamp of the event represented by the event distribution point; the coordinates of the event distribution point on the second coordinate axis are as follows: the event type of the event characterized by the event distribution point; for each log distribution point, the coordinates of the log distribution point on the first coordinate axis are as follows: the system time of the log entry represented by the log distribution point; the coordinates of the journal distribution point on the second coordinate axis are as follows: the log distribution point characterizes the log type of the log entry.
5. The method of claim 1, wherein the event comprises an IO event, the method further comprising:
according to the obtained IO events reported by the equipment to be diagnosed, displaying IO waveform diagrams of the IO channels of the equipment to be diagnosed, and highlighting abnormal waveforms in each IO waveform diagram; the IO waveform diagram of each IO channel takes the system time as a first coordinate axis.
6. The method according to any one of claims 1-5, further comprising:
after each event is acquired, adding a specified item about the event in a preset table;
after each log entry is obtained, adding a specified entry related to the log entry in the preset table;
wherein the specified entry includes at least one of a system time, a type, a device identification, and specific content.
7. An abnormality diagnosis apparatus, characterized by being applied to an electronic device that is installed with upper-layer software that serves a device to be diagnosed; the device comprises:
the event acquisition module is used for acquiring each event reported by the equipment to be diagnosed and acquiring a work log which is generated by the upper software and related to the equipment to be diagnosed;
the information analysis module is used for analyzing the event information of each event and the log content of the work log to obtain an abnormal message of the equipment to be diagnosed; wherein the exception message includes: abnormal events in the events and/or abnormal log entries in the work log; the event information of each event includes: event type and timestamp; the log content of each log entry in the work log includes: log type and system time;
And the information display module is used for displaying the abnormal information distribution information of the equipment to be diagnosed according to the abnormal information.
8. The apparatus of claim 7, wherein the device comprises a plurality of sensors,
the information analysis module is specifically used for:
according to each preset period, respectively reading each event reported by the equipment to be diagnosed and each newly added log entry in the work log in the preset period, and analyzing each read event and each log entry to obtain an abnormal message of the equipment to be diagnosed;
and/or the number of the groups of groups,
the information display module is specifically used for:
displaying a broken line connecting each target point in a first coordinate system taking the system time as a first coordinate axis and taking the number of message entries as a second coordinate axis, and highlighting a designated point in each target point;
wherein, for each target point, the coordinates of the target point on the first coordinate axis are: the target point represents the time of the preset period, and the coordinates of the target point on the second coordinate axis are as follows: within the preset period represented by the target point, the sum of the number of events reported by the equipment to be diagnosed and the number of newly-added log entries in the work log; the specified points are as follows: the target point corresponding to the preset period of the abnormal message exists;
And/or the number of the groups of groups,
the apparatus further comprises:
the distribution point display module is used for displaying each event distribution point and/or each log distribution point in a second coordinate system taking the system time as a first coordinate axis and the message type as a second coordinate axis;
wherein, for each event distribution point, the coordinates of the event distribution point on the first coordinate axis are: the system time corresponding to the time stamp of the event represented by the event distribution point; the coordinates of the event distribution point on the second coordinate axis are as follows: the event type of the event characterized by the event distribution point; for each log distribution point, the coordinates of the log distribution point on the first coordinate axis are as follows: the system time of the log entry represented by the log distribution point; the coordinates of the journal distribution point on the second coordinate axis are as follows: the log type of the log entry characterized by the log distribution point;
and/or the number of the groups of groups,
the event includes an IO event, the apparatus further comprising:
the waveform diagram display module is used for displaying the IO waveform diagrams of all IO channels of the equipment to be diagnosed according to all the IO events reported by the equipment to be diagnosed, and highlighting abnormal waveforms in each IO waveform diagram; the IO waveform diagram of each IO channel takes the system time as a first coordinate axis;
And/or the number of the groups of groups,
the apparatus further comprises:
the event entry adding module is used for adding a specified entry about an event in a preset table after each event is acquired;
the log entry adding module is used for adding a specified entry related to one log entry in the preset table after the log entry is obtained;
wherein the specified entry includes at least one of a system time, a type, a device identification, and specific content.
9. An electronic device, comprising:
a memory for storing a computer program;
a processor for implementing the method of any of claims 1-6 when executing a program stored on a memory.
10. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a computer program which, when executed by a processor, implements the method of any of claims 1-6.
CN202311162355.6A 2023-09-08 2023-09-08 Abnormality diagnosis method and device, electronic equipment and storage medium Pending CN117131453A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311162355.6A CN117131453A (en) 2023-09-08 2023-09-08 Abnormality diagnosis method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311162355.6A CN117131453A (en) 2023-09-08 2023-09-08 Abnormality diagnosis method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117131453A true CN117131453A (en) 2023-11-28

Family

ID=88854431

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311162355.6A Pending CN117131453A (en) 2023-09-08 2023-09-08 Abnormality diagnosis method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117131453A (en)

Similar Documents

Publication Publication Date Title
CN108683562B (en) Anomaly detection positioning method and device, computer equipment and storage medium
CN109284269B (en) Abnormal log analysis method and device, storage medium and server
CN108388514B (en) Interface automation test method, device, equipment and computer readable storage medium
CN110727572A (en) Buried point data processing method, device, equipment and storage medium
CN110069413B (en) Test data communication, test method, device, equipment and storage medium
CN110674034A (en) Health examination method and device, electronic equipment and storage medium
CN111309606B (en) Page exception handling method and device, computer equipment and storage medium
CN112306833A (en) Application program crash statistical method and device, computer equipment and storage medium
CN110515758B (en) Fault positioning method and device, computer equipment and storage medium
CN109558315B (en) Method, device and equipment for determining test range
CN112241362A (en) Test method, test device, server and storage medium
CN110943887B (en) Probe scheduling method, device, equipment and storage medium
CN111046393B (en) Vulnerability information uploading method and device, terminal equipment and storage medium
CN116738091A (en) Page monitoring method and device, electronic equipment and storage medium
CN115022201B (en) Data processing function test method, device, equipment and storage medium
CN112948224A (en) Data processing method, device, terminal and storage medium
CN107342917B (en) Method and apparatus for detecting network device performance
CN113377648B (en) Software system diagnosis method, device, electronic equipment and computer readable medium
CN117131453A (en) Abnormality diagnosis method and device, electronic equipment and storage medium
CN111274143B (en) Buried point test method, buried point test device, buried point test equipment and storage medium
CN115129575A (en) Code coverage result generation method and device
CN114968696A (en) Index monitoring method, electronic equipment and chip system
CN113238940A (en) Interface test result comparison method, device, equipment and storage medium
CN112559368A (en) Interface automation test method and its use case generation method, equipment and storage medium
CN112162954A (en) User operation log generation method, user operation log generation device

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