Software anomaly detection method and device and electronic equipment

A software abnormality and detection method technology, applied in software testing/debugging, program control devices, multi-programming devices, etc., can solve problems such as time consumption, poor time accuracy, and inability to achieve millisecond-level time accuracy, achieving increased Time Accuracy, Performance Improvement Effect

Pending Publication Date: 2022-02-01
苏州挚途科技有限公司
View PDF0 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] In terms of implementation, the above method maintains the running time of a function inside each function, traverses all monitoring function data structures at regular intervals, and adds 1 to its counters in turn. If there are n The monitoring function, the time complexity is O(n), and there may be hundreds or thousands of functions that need to be monitored during the actual software running process, the computer performance loss of the above method is relatively large
[0005] In terms of time accuracy, because the traversal itself consumes CPU (Central Processing Unit, central processing unit) and is also very time-consuming, the time accuracy of the above method is generally 1 second, which cannot achieve millisecond-level time accuracy, and the performance of the algorithm is low. poor time precision

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Software anomaly detection method and device and electronic equipment
  • Software anomaly detection method and device and electronic equipment
  • Software anomaly detection method and device and electronic equipment

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0037] This embodiment provides a software anomaly detection method, see figure 1 A flow chart of a software anomaly detection method shown, the software anomaly detection method includes the following steps:

[0038] Step S102, waking up the target thread every preset time unit.

[0039] In the embodiment of the present invention, the timer component of the time wheel can be initialized at the same time as software initialization. Moreover, after the above two initialization traps are completed, a thread can be created in the process where the software is located, which is called the target thread. The target thread wakes up every preset time unit, and the time unit can be 1-2 milliseconds, and is used to perform software exception checking operations.

[0040] Step S104, using the target thread to determine the timeout event of the function under test in the software based on the time wheel.

[0041] The time wheel is a scheduling model created to solve efficient scheduli...

Embodiment 2

[0048] This embodiment provides another software anomaly detection method, which is implemented on the basis of the above embodiments; see figure 2 A flow chart of another software anomaly detection method is shown, the software anomaly detection method includes the following steps:

[0049] Step S202, waking up the target thread every preset time unit.

[0050] The time wheel is the basis of the implementation of the method provided in this embodiment, so the time wheel will be introduced first. The time wheel is a timer similar to a clock. The time wheel in this embodiment provides three functions: adding a timeout event, deleting a timeout event, and checking whether there is an event that has timed out at the current time point. The accuracy of the time wheel and the maximum timeout time that can be set can be dynamically adjusted according to actual needs. According to the needs of this embodiment, a time wheel with a time accuracy of 1 millisecond and a maximum timeout...

Embodiment 3

[0080] Corresponding to the above method embodiment, the embodiment of the present invention provides a software anomaly detection device, see image 3 A schematic structural diagram of an abnormality detection device is shown, the abnormality detection device includes:

[0081] The target thread wake-up module 31 is used to wake up the target thread every preset time unit at intervals;

[0082] Overtime event determination module 32, for determining the overtime event of the function to be tested in the software based on the time wheel by the target thread;

[0083] The timeout event processing module 33 is configured to execute an event processing function corresponding to the function to be tested.

[0084] The software anomaly detection device provided by the embodiment of the present invention can determine the timeout event of the function to be tested in the software based on the time wheel through the target thread, and execute the event processing function correspond...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention provides a software anomaly detection method and device and electronic equipment. The method comprises the following steps: waking up a target thread every preset time unit; determining a timeout event of a to-be-tested function in the software based on the time wheel through the target thread; executing the event processing function corresponding to the to-be-tested function. In the mode, the function anomaly detection is realized based on the time wheel algorithm, the software anomaly detection performance can be improved, the software anomaly detection time precision can be increased, the detected performance loss is irrelevant to the number of tasks to be detected, and the detection of a large number of to-be-tested functions can be supported.

Description

technical field [0001] The invention relates to the technical field of software processing, in particular to a software anomaly detection method, device and electronic equipment. Background technique [0002] When the software is running, it essentially opens up threads in the process, and realizes related functions through function loops and nested operations. Generally speaking, for software anomaly detection, it is mainly to detect the timeout and deadlock of the function operation of the software. [0003] In terms of function, the above method only mentions timeout detection and deadlock detection (in fact, it is also a function that does not return after timeout), and the detection content is less. [0004] In terms of implementation, the above method maintains the running time of a function inside each function, traverses all monitoring function data structures at regular intervals, and adds 1 to its counters in turn. If there are n If the monitored function is used...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F11/36G06F9/52G06F9/4401G06F9/448
CPCG06F11/3688G06F9/524G06F9/4418G06F9/4482
Inventor 何知俊李东军朱浩杨旭建
Owner 苏州挚途科技有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products