System and method for identifying and automatically repairing software exceptions based on dynamic behaviors

By designing an abnormality detection and automatic repair system based on dynamic behavior recognition in the software system, using machine learning algorithms to analyze software behavior data in real time, identify abnormalities and automatically trigger repairs, it solves the problem that traditional methods are difficult to cope with dynamically changing operating environments and manual repairs, and improves the stability and reliability of software operation and reduces maintenance costs.

CN119806959APending Publication Date: 2025-04-11BEIJING AEROSPACE CLOUD ROAD CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411857314.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-17
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

Traditional software abnormality detection methods are difficult to deal with dynamically changing operating environments, and the manual repair process is time-consuming and labor-intensive and easy to introduce new errors.

Method used

Design a system based on dynamic behavior recognition, including behavior monitoring module, behavior pattern recognition module, abnormal diagnosis module, automatic repair module, feedback optimization module and security and privacy protection module, and use machine learning algorithms to analyze software behavior data in real time, identify abnormalities and automatically trigger repairs.

Benefits of technology

It realizes rapid identification of software exceptions and automatic repair, improving the stability and reliability of software operation and reducing maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119806959A_ABST
    Figure CN119806959A_ABST
Patent Text Reader

Abstract

The invention discloses a system and a method for identifying and automatically repairing software exceptions based on dynamic behaviors. The system comprises a behavior monitoring module, a behavior pattern identification module, an exception diagnosis module, an automatic repairing module, a feedback optimization module and a security and privacy protection module. The method comprises the steps of data collection, data preprocessing, model training, anomaly detection, response and processing, user feedback integration, model iterative optimization and data storage and safety management. According to the method, the behavior mode during software operation is monitored in real time, an advanced mode recognition technology is utilized to quickly recognize abnormal behaviors, and a repair mechanism is automatically triggered, so that the stability and reliability of software operation are improved, and the maintenance cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of software testing and quality assurance, and in particular to a system and method for identifying software anomalies based on dynamic behavior and automatically repairing them. Background Art

[0002] As software systems become increasingly complex, abnormal behaviors that occur during software operation are difficult to predict and avoid. Traditional anomaly detection methods often rely on static code analysis or preset exception handling logic, which is difficult to cope with dynamically changing operating environments. In addition, the manual repair process after an anomaly occurs is not only time-consuming and labor-intensive, but may also introduce new errors.

[0003] In response to the above problems, how to quickly identify abnormal behavior and automatically trigger the repair mechanism has become a technical problem that people urgently need to solve. Summary of the invention

[0004] In view of the above technical problems in the related art, the present invention proposes a system and method for identifying software anomalies based on dynamic behavior and automatically repairing them, which can overcome the above shortcomings of the prior art.

[0005] To achieve the above technical objectives, the technical solution of the present invention is implemented as follows: A system for identifying software anomalies and automatically repairing them based on dynamic behavior, including a behavior monitoring module, a behavior pattern recognition module, an anomaly diagnosis module, an automatic repair module, a feedback optimization module, and a security and privacy protection module; The behavior monitoring module is used to collect various behavior data when the software is running in real time and pre-process the behavior data; The behavior pattern recognition module is used to extract key features from the preprocessed data to construct a feature set that reflects the software behavior pattern, use a machine learning algorithm to perform model training on the collected feature set, and evaluate the performance of the model through cross-validation; The abnormal diagnosis module is used to input the real-time collected data into the trained model for analysis, identify abnormal behavior, and trigger the early warning mechanism when abnormal behavior is detected; The automatic repair module is used to analyze the identified abnormal behavior, trigger the repair strategy according to the type and severity of the abnormal behavior, and verify the repair effect after the repair is completed; The feedback optimization module is used to feed back the repair results and new behavior data to the behavior pattern recognition module to update and improve the behavior pattern library; The security and privacy protection module is used to store behavior data and encrypt sensitive data.

[0006] Furthermore, the behavior data includes memory usage, CPU occupancy, network requests, user interactions, performance indicators, log files, and user operation records.

[0007] Furthermore, the repair strategy includes restarting services, rolling back changes, adjusting configuration parameters, and executing preset repair scripts.

[0008] Furthermore, the machine learning algorithm includes support vector machine, random forest, and neural network.

[0009] A method for identifying software anomalies based on dynamic behavior and automatically repairing them, using the system, with the following specific steps: S1 Data collection: collect various behavioral data when the software is running; S2 data preprocessing: cleaning, conversion and normalization of data; S3 model training: extract key features from preprocessed data to build feature sets, use machine learning algorithms to train models using historical data, and evaluate model performance through cross-validation; S4 Anomaly Detection: Input the real-time collected data into the trained model for analysis, identify abnormal behavior, and trigger the early warning mechanism when abnormal behavior is detected; S5 Response and Processing: Formulate corresponding repair strategies according to the type and severity of abnormal behavior. After the warning is triggered, the system automatically executes the preset repair strategy and verifies the repair effect after the repair is completed. S6 user feedback integration: collect the result data of each detection and repair, and adjust and improve the repair strategy according to the feedback results and actual needs; S6 model iterative optimization: input the collected result data of each detection and repair into the algorithm model for training and continuous optimization; S7 data storage and security management: store behavioral data and encrypt sensitive data.

[0010] Furthermore, the behavior data includes memory usage, CPU occupancy, network requests, user interactions, performance indicators, log files, and user operation records.

[0011] Furthermore, the repair strategy includes restarting services, rolling back changes, adjusting configuration parameters, and executing preset repair scripts.

[0012] Furthermore, the machine learning algorithm includes support vector machine, random forest, and neural network.

[0013] Beneficial effects of the present invention: The present invention monitors the behavior patterns of software during operation in real time, uses advanced pattern recognition technology to quickly identify abnormal behaviors, and automatically triggers a repair mechanism, thereby improving the stability and reliability of software operation and reducing maintenance costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0015] Figure 1 is a structural block diagram of a system for identifying software anomalies based on dynamic behavior and automatically repairing them according to an embodiment of the present invention; Figure 2 It is a flowchart of a method for identifying software anomalies based on dynamic behavior and automatically repairing them according to an embodiment of the present invention. DETAILED DESCRIPTION

[0016] The following will be combined with the accompanying drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field belong to the scope of protection of the present invention.

[0017] like Figure 1 As shown, a system for identifying software anomalies based on dynamic behavior and automatically repairing software anomalies according to an embodiment of the present invention includes a behavior monitoring module, a behavior pattern recognition module, an anomaly diagnosis module, an automatic repair module, a feedback optimization module, and a security and privacy protection module; The behavior monitoring module is used to collect various behavior data when the software is running in real time and pre-process the behavior data; The behavior pattern recognition module is used to extract key features from the preprocessed data to construct a feature set that reflects the software behavior pattern, use a machine learning algorithm to perform model training on the collected feature set, and evaluate the performance of the model through cross-validation; The abnormal diagnosis module is used to input the real-time collected data into the trained model for analysis, identify abnormal behavior, and trigger the early warning mechanism when abnormal behavior is detected; The automatic repair module is used to analyze the identified abnormal behavior, trigger the repair strategy according to the type and severity of the abnormal behavior, and verify the repair effect after the repair is completed; The feedback optimization module is used to feed back the repair results and new behavior data to the behavior pattern recognition module to update and improve the behavior pattern library; The security and privacy protection module is used to store behavior data and encrypt sensitive data.

[0018] like Figure 2 As shown, a method for identifying software anomalies based on dynamic behavior and automatically repairing them, using the system, the specific steps are as follows: S1 Data collection: collect various behavioral data when the software is running; S2 data preprocessing: cleaning, conversion and normalization of data; S3 model training: extract key features from preprocessed data to build feature sets, use machine learning algorithms to train models using historical data, and evaluate model performance through cross-validation; S4 Anomaly Detection: Input the real-time collected data into the trained model for analysis, identify abnormal behavior, and trigger the early warning mechanism when abnormal behavior is detected; S5 Response and Processing: Formulate corresponding repair strategies according to the type and severity of abnormal behavior. After the warning is triggered, the system automatically executes the preset repair strategy and verifies the repair effect after the repair is completed. S6 user feedback integration: collect the result data of each detection and repair, and adjust and improve the repair strategy according to the feedback results and actual needs; S6 model iterative optimization: input the collected result data of each detection and repair into the algorithm model for training and continuous optimization; S7 data storage and security management: store behavioral data and encrypt sensitive data.

[0019] The behavior data includes memory usage, CPU occupancy, network requests, user interactions, performance indicators, log files, and user operation records.

[0020] The repair strategy includes restarting services, rolling back changes, adjusting configuration parameters, and executing preset repair scripts.

[0021] The machine learning algorithms include support vector machines, random forests, and neural networks. In order to facilitate understanding of the above technical solutions of the present invention, the above technical solutions of the present invention are described in detail below through specific usage methods.

[0022] In specific use, according to the system and method for identifying software anomalies based on dynamic behavior and automatically repairing the software anomalies described in the present invention, the specific implementation scheme is as follows: 1. System architecture design First, the overall architecture of the system needs to be designed, which usually includes a data acquisition module, a behavior pattern recognition module, an anomaly detection module, an automatic repair module, and a feedback optimization module.

[0023] 1.1 Data acquisition module: responsible for collecting real-time operation data from the software system, including performance indicators, log files, user operation records, etc.

[0024] 1.2 Behavior pattern recognition module: pre-process the collected data and extract key information through feature engineering to build a behavior pattern model.

[0025] 1.3 Anomaly detection module: Use machine learning algorithms (such as support vector machines, random forests, neural networks, etc.) to analyze real-time data, compare it with the constructed behavior pattern model, and identify abnormal behaviors.

[0026] 1.4 Automatic repair module: According to the detected abnormality type, it automatically triggers the preset repair strategy, such as restarting the service, isolating the faulty node, adjusting the resource configuration, etc.

[0027] 1.5 Feedback optimization module: collects the result data of each detection and repair, continuously optimizes the algorithm model, and improves the accuracy and efficiency of the system.

[0028] 2. Data Collection and Preprocessing 2.1 Data collection: Collect software system operation data through monitoring tools, log analysis and other means.

[0029] 2.2 Data preprocessing: Clean, transform and normalize the data to improve the quality of subsequent analysis.

[0030] 3. Behavioral pattern recognition and modeling 3.1 Feature Engineering: Extract key features from preprocessed data and construct a feature set that can reflect software behavior patterns.

[0031] 3.2 Model training: Select a suitable machine learning algorithm and use historical data for model training so that the model can accurately identify the behavior patterns of the software.

[0032] 3.3 Model evaluation: Evaluate the performance of the model through methods such as cross-validation to ensure its accuracy and stability.

[0033] 4. Anomaly detection and warning 4.1 Real-time detection: Input the real-time collected data into the trained model for analysis to identify abnormal behavior.

[0034] 4.2 Early warning mechanism: Once abnormal behavior is detected, the early warning mechanism is immediately triggered to notify the administrator or automatically start the repair process.

[0035] 5. Design and implementation of automatic repair strategies 5.1 Strategy formulation: Develop corresponding repair strategies based on the type and severity of abnormal behavior.

[0036] 5.2 Automatic execution: After the early warning is triggered, the system automatically executes the preset repair strategy, such as restarting the service, isolating the faulty node, etc.

[0037] 5.3 Effect verification: After the repair is completed, verify the repair effect to ensure that the system has resumed normal operation.

[0038] 6. Feedback and Optimization 6.1 Data collection: Collect the result data of each detection and repair, including anomaly type, repair strategy, repair effect, etc.

[0039] 6.2 Model optimization: Based on the collected data, the algorithm model is continuously optimized to improve the accuracy and efficiency of the system.

[0040] 6.3 Strategy Adjustment: Adjust and improve the repair strategy based on feedback results and actual needs.

[0041] 7. Security and Privacy Protection 7.1 Data encryption: Encrypt sensitive data to ensure the security of data transmission and storage.

[0042] 7.2 Access Control: Implement strict access control policies to prevent unauthorized access and operations.

[0043] 7.3 Compliance: Ensure that the system complies with the requirements of relevant laws and regulations and protect user privacy and data security.

[0044] By implementing the above steps, a software anomaly detection and automatic repair system based on dynamic behavior pattern recognition can be built to achieve real-time monitoring, anomaly detection and automatic repair of the software system, thereby improving the system's reliability and business continuity.

[0045] Real-time detection and rapid response: By real-time monitoring of software behavior, anomalies can be quickly identified and responded to, reducing the impact of anomalies on software operation; Accurate diagnosis and automatic repair: Using machine learning algorithms to identify behavioral patterns, improve the accuracy of anomaly diagnosis, and automatically trigger repair mechanisms to reduce the need for manual intervention; Continuous learning and optimization: Through feedback mechanisms, the system can continuously learn and self-optimize, and continuously improve the ability to detect and repair anomalies; Reduce maintenance costs: Reduce the time and cost of manual repairs, and improve the efficiency and effectiveness of software maintenance.

[0046] In summary, with the help of the above-mentioned technical solution of the present invention, by real-time monitoring of the behavior patterns of the software during runtime, using advanced pattern recognition technology to quickly identify abnormal behaviors and automatically triggering repair mechanisms, the stability and reliability of software operation are improved and maintenance costs are reduced.

[0047] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A system for identifying software anomalies based on dynamic behavior and automatically repairing them, characterized in that: It includes behavior monitoring module, behavior pattern recognition module, abnormal diagnosis module, automatic repair module, feedback optimization module and security and privacy protection module; The behavior monitoring module is used to collect various behavior data when the software is running in real time and pre-process the behavior data; The behavior pattern recognition module is used to extract key features from the preprocessed data to construct a feature set that reflects the software behavior pattern, use a machine learning algorithm to perform model training on the collected feature set, and evaluate the performance of the model through cross-validation; The abnormal diagnosis module is used to input the real-time collected data into the trained model for analysis, identify abnormal behavior, and trigger the early warning mechanism when abnormal behavior is detected; The automatic repair module is used to analyze the identified abnormal behavior, trigger the repair strategy according to the type and severity of the abnormal behavior, and verify the repair effect after the repair is completed; The feedback optimization module is used to feed back the repair results and new behavior data to the behavior pattern recognition module to update and improve the behavior pattern library; The security and privacy protection module is used to store behavior data and encrypt sensitive data.

2. The system for identifying software anomalies based on dynamic behavior and automatically repairing them according to claim 1, characterized in that: The behavior data includes memory usage, CPU occupancy, network requests, user interactions, performance indicators, log files, and user operation records.

3. The system for identifying software anomalies based on dynamic behavior and automatically repairing them according to claim 1, characterized in that: The repair strategy includes restarting services, rolling back changes, adjusting configuration parameters, and executing preset repair scripts.

4. The system for identifying software anomalies based on dynamic behavior and automatically repairing them according to claim 1, characterized in that: The machine learning algorithms include support vector machines, random forests, and neural networks.

5. A method for identifying software anomalies based on dynamic behavior and automatically repairing them, characterized in that: Using the system described in any one of claims 1 to 4, the specific steps are as follows: S1 Data collection: collect various behavioral data when the software is running; S2 data preprocessing: cleaning, conversion and normalization of data; S3 model training: extract key features from preprocessed data to build feature sets, use machine learning algorithms to train models using historical data, and evaluate model performance through cross-validation; S4 Anomaly Detection: Input the real-time collected data into the trained model for analysis, identify abnormal behavior, and trigger the early warning mechanism when abnormal behavior is detected; S5 Response and Processing: Formulate corresponding repair strategies according to the type and severity of abnormal behavior. After the warning is triggered, the system automatically executes the preset repair strategy and verifies the repair effect after the repair is completed. S6 user feedback integration: collect the result data of each detection and repair, and adjust and improve the repair strategy according to the feedback results and actual needs; S6 model iterative optimization: input the collected result data of each detection and repair into the algorithm model for training and continuous optimization; S7 data storage and security management: store behavioral data and encrypt sensitive data.

6. The method for identifying software anomalies based on dynamic behavior and automatically repairing them according to claim 5, characterized in that: The behavior data includes memory usage, CPU occupancy, network requests, user interactions, performance indicators, log files, and user operation records.

7. The method for identifying software anomalies based on dynamic behavior and automatically repairing them according to claim 5, characterized in that: The repair strategy includes restarting services, rolling back changes, adjusting configuration parameters, and executing preset repair scripts.

8. The method for identifying software anomalies based on dynamic behavior and automatically repairing them according to claim 5, characterized in that: The machine learning algorithms include support vector machines, random forests, and neural networks.