Alarm information processing method and device, medium and program product

Through static scanning technology, multi-dimensional alarm information collection is generated, and the coupling analysis of multi-dimensional feature parameters is carried out to automatically determine the processing strategy, which solves the problems of excessive alarm number, unclear information and cumbersome processing procedures in static scanning technology, and achieves efficient alarm information processing and code quality improvement.

CN119807018AInactive Publication Date: 2025-04-11INSPUR SUZHOU INTELLIGENT TECH CO LTD +1

Patent Information

Application Number
CN202510300702.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-14
Publication Date
2025-04-11
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

When facing large code bases and complex projects, static scanning technology has problems such as excessive number of alarms, unclear information, and cumbersome processing procedures, which leads developers to spend a lot of time manually processing alarms, which increases workload and may lead to important alarms being ignored.

Method used

By statically scanning the code in the target project, a multi-dimensional alarm information collection is generated, and the multi-dimensional characteristic parameters of the alarm information are determined, including a combination of alarm type, location, description, and repair suggestions. These characteristic parameters are coupled and analyzed to obtain the classification results of the alarm information, and the processing strategy is automatically determined based on the classification results and the policy mapping relationship.

Benefits of technology

It realizes automatic classification of alarm information and mapping of processing strategies, reduces the time and energy of developers to manually filter and process alarms, reduces the occurrence of false alarms and underreports, and allows developers to pay more efficient attention to alarm information, improving development efficiency and code quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119807018A_ABST
    Figure CN119807018A_ABST
Patent Text Reader

Abstract

The invention discloses an alarm information processing method and device, a medium and a program product, relates to the technical field of data processing, and is used for solving the technical problems of too many alarms, indefinite information and tedious processing flow in related static scanning technologies. According to the scheme, multi-dimensional feature parameter extraction and classification are carried out on the alarm information, systematic coupling analysis is carried out on feature parameters of four dimensions of alarm types, alarm positions, alarm description and repair suggestions, corresponding classification results are obtained, corresponding processing strategies can be automatically allocated to the alarm information, and the alarm information processing efficiency is improved. The tedious process of manually screening and processing a large amount of alarm information by developers is avoided; besides, the automatic classification and strategy mapping relation can reduce false alarms and missing alarms, so that developers can pay more efficient attention to the alarm information, the development efficiency is improved, the code quality in the target project is ensured, and the technical effects of reducing manual intervention and improving the processing efficiency of the alarm information are achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a method, device, medium and program product for processing alarm information. Background Art

[0002] Static scanning technology detects potential defects, security vulnerabilities, and code quality issues in the code by analyzing source code or compiled code (without actually running the program). It uses technical means such as syntax analysis, data flow analysis, and control flow analysis to identify code snippets that do not meet coding standards, have security risks, or may cause runtime errors, and generate corresponding warning information. Static scanning technology can find problems during the code writing or compilation stage to prevent problems from being exposed during runtime or in the production environment.

[0003] At present, static scanning technology has problems such as too many warnings, unclear information, and cumbersome processing procedures when facing large code bases and complex projects. These problems cause developers to spend a lot of time manually processing warnings, increasing the workload and may cause important warnings to be ignored, thus affecting code quality and development efficiency. Summary of the invention

[0004] The present application provides a method, device, medium and program product for processing alarm information, so as to at least solve the problems existing in the related art of excessive number of alarms, unclear information and complicated processing procedures.

[0005] The present application provides a method for processing alarm information, comprising: statically scanning the code in a target project to generate a multi-dimensional alarm information set; determining the multi-dimensional feature parameters of the alarm information in the alarm information set; the multi-dimensional feature parameters include a combination of an alarm type, an alarm location, an alarm description, and a repair suggestion; coupling analysis of the alarm type, the alarm location, the alarm description, and the repair suggestion to obtain a classification result of the alarm information; determining a target processing strategy corresponding to the classification result of the alarm information according to the classification result and a strategy mapping relationship, and processing the alarm information according to the target processing strategy.

[0006] The present application also provides an electronic device, comprising: a memory for storing a computer program; and a processor for implementing the steps of any of the above-mentioned methods for processing alarm information when executing the computer program.

[0007] The present application also provides a computer-readable storage medium, in which a computer program is stored, wherein when the computer program is executed by a processor, the steps of any of the above-mentioned methods for processing alarm information are implemented.

[0008] The present application also provides a computer program product, including a computer program, which implements the steps of any of the above-mentioned alarm information processing methods when the computer program is executed by a processor.

[0009] Through this application, multi-dimensional feature parameters of alarm information are extracted and classified, and feature parameters of four dimensions, namely, alarm information, alarm location, alarm description, and repair suggestion, are systematically coupled and analyzed to obtain corresponding classification results, thereby automatically assigning corresponding processing strategies to the alarm information, thus avoiding the tedious process of developers manually screening and processing a large amount of alarm information; in addition, automated classification and strategy mapping relationships can reduce false positives and missed positives, allowing developers to pay more attention to alarm information more efficiently, thereby improving development efficiency and ensuring code quality in the target project, thus achieving the technical effect of reducing manual intervention and improving the efficiency of alarm information processing. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0011] Figure 1 An overall flow chart of a method for processing alarm information provided by an embodiment of the present application;

[0012] Figure 2 A flowchart of obtaining a classification result according to a first priority provided in an embodiment of the present application;

[0013] Figure 3 A flowchart of merging similar alarm information provided in an embodiment of the present application;

[0014] Figure 4 A flowchart of obtaining a classification result according to a second priority level provided in an embodiment of the present application;

[0015] Figure 5 A flowchart for calculating a total score provided in an embodiment of the present application;

[0016] Figure 6 A schematic diagram of an electronic device provided in an embodiment of the present application;

[0017] Figure 7 A schematic diagram of a computer-readable storage medium provided in an embodiment of the present application. DETAILED DESCRIPTION

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

[0019] It should be noted that, in the description of this application, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. The terms "first", "second", etc. in this application are used to distinguish similar objects, and are not used to describe a specific order or sequence.

[0020] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0021] The embodiment of the present application provides a method for processing alarm information, and the method is described in detail in combination with the execution flow of the method for processing alarm information. Among them, static scanning technology is a technical means for detecting potential code problems during the code development process. It analyzes the unrunning code to identify defects, security vulnerabilities, code quality problems, etc., and can find problems in advance during the code writing or compilation stage to avoid these problems from being exposed during runtime or in the production environment, thereby improving code quality and security. Static scanning tools are specific software tools that implement static scanning technology. They use technical means such as syntax analysis, data flow analysis, and control flow analysis to scan the code and generate alarm information. These tools can be independent software or integrated into the development environment to help developers quickly locate and fix problems in the code. Common static scanning tools include SonarQube, Pylint, Checkstyle, etc. Natural Language Processing (NLP) technology is an interdisciplinary field that combines computer science and linguistics, aiming to enable computers to understand, interpret and generate natural language. By analyzing the structure, semantics and context of language, NLP technology can process text data and achieve functions such as language translation, sentiment analysis, text classification, speech recognition and question-answering systems. It is widely used in fields such as automated document processing.

[0022] like Figure 1 As shown, the method includes:

[0023] S11: Perform static scanning on the code in the target project to generate a multi-dimensional warning information set.

[0024] In this step, a multi-dimensional set of alarm information is generated by statically scanning the code in the target project. During the static scanning process, the static scanning tool will parse the source code or compiled code, and use technical means such as syntax analysis, data flow analysis, and control flow analysis to detect potential defects, security vulnerabilities, or quality issues in the code. This scan result is not just a simple error or warning, but a set of alarm information containing information in multiple dimensions, including but not limited to the type of problem, location, severity, scope of impact, etc. These dimensional alarm information provides richer data support for subsequent classification and processing, and helps to achieve more accurate alarm analysis and formulation of processing strategies.

[0025] S12: Determine multi-dimensional characteristic parameters of the alarm information in the alarm information set; the multi-dimensional characteristic parameters include a combination of alarm type, alarm location, alarm description, and repair suggestion.

[0026] S13: Perform coupling analysis on the alarm type, alarm location, alarm description and repair suggestion to obtain a classification result of the alarm information.

[0027] In this step, based on the alarm information set generated during the static scanning process, multi-dimensional feature parameters are further extracted, and the alarm information is classified according to these parameters. In some embodiments, the multi-dimensional feature parameters include a combination of alarm type, alarm location, alarm description, and repair suggestions, but are not limited to the multi-dimensional feature parameters only including the above four types, and can also include other feature parameters, which are not listed in this application. Among them, the alarm type (reflects the severity and potential impact of the alarm, for example, the alarm type can include security vulnerabilities, code quality, and coding specification alarms), the alarm location (such as the specific number of lines of code or file location), the alarm description (reflects the clarity and completeness of the alarm description), and the repair suggestion (for example, adding or deleting a punctuation mark, modifying a line of code, etc.). These feature parameters can be combined to form different dimensions to describe the specific situation of each alarm. By extracting these multi-dimensional feature parameters, different types of alarms can be classified more accurately, making subsequent processing more targeted, and being able to perform more efficient and accurate repairs or optimizations based on the specific characteristics of the alarm.

[0028] The design idea of ​​describing the multi-dimensional feature parameters as a combination of alarm type, alarm location, alarm description, and repair suggestions in this embodiment is to construct a multi-dimensional classification system with dynamic strategy mapping capabilities by systematically coupling and analyzing the feature parameters of the four dimensions of alarm type, alarm location, alarm description, and repair suggestions. Compared with the processing mode that only relies on a single alarm type or static rules in other schemes, the coordinated determination of the alarm type and alarm location in this embodiment can accurately locate the context of code defects. For example, for the same "null pointer exception" type alarm, combined with its different position characteristics inside the loop body or interface boundary, it can distinguish the differentiated processing strategies of the underlying logic error and the external call risk; in addition, the linkage analysis of the alarm description and the repair suggestion in this application breaks through the limitation of the traditional alarm system that only provides standardized suggestions, such as extracting the semantic features in the description (such as error triggering conditions, impact range, etc.) through natural language processing technology, and establishing a weighted association with the feasibility and implementation cost of the repair suggestion, so that the processing strategy decision process is integrated into the interpretability evaluation dimension. This organic combination of multi-dimensional feature parameters not only significantly improves the granularity of alarm classification, but more importantly forms a closed-loop decision-making chain from problem diagnosis to solution, enabling the system to adaptively adjust processing priorities based on dynamic factors such as code base characteristics and project stages.

[0029] S14: Determine a target processing strategy corresponding to the classification result of the alarm information according to the classification result and the strategy mapping relationship, and process the alarm information according to the target processing strategy.

[0030] In this step, according to the obtained alarm information classification results and the pre-set strategy mapping relationship, the target processing strategy to be adopted for each type of alarm information is automatically determined, and the alarm information is processed accordingly according to the strategy. Specifically, in the above steps, the alarm information is divided into different categories (such as priority categories, etc.), and each category of alarms has different characteristics or different urgency. According to each classification result and strategy mapping relationship, each category of alarms is matched with the corresponding processing strategy. When the alarm information is classified into different priorities, the code problems corresponding to the characterization alarm information have different urgency. At this time, these processing strategies may include but are not limited to immediate processing, processing in the next development stage, and processing or ignoring in the final stage of the target project. When the alarm information is classified according to different characteristics, these strategies may include automatic repair (such as automatically correcting certain errors in the code), generating prompt information (providing specific repair suggestions to developers), ignoring low-priority problems or further analysis (such as marking certain complex warnings for manual verification). The strategy mapping relationship can be a pre-defined rule based on the severity, type, location or other characteristics of the alarm, or it can be adaptively adjusted based on machine learning or artificial intelligence algorithms. In this step, the alarm information will be accurately processed according to the set strategy, which greatly reduces the time and effort of developers to manually handle alarms, thereby improving the efficiency and accuracy of the entire static scan.

[0031] In summary, since the present application introduces multi-dimensional alarm information classification and automatic mapping of target processing strategies, the automation level of static scanning technology is improved; specifically, by extracting and classifying multi-dimensional feature parameters of alarm information, corresponding processing strategies can be automatically assigned according to different alarm information, avoiding the tedious process of developers manually screening and processing large amounts of alarm information; secondly, the automated classification and strategy mapping relationship can reduce false alarms and missed alarms, allowing developers to pay more attention to alarm information more efficiently, improving development efficiency and ensuring the code quality in the target project, and can solve the technical problems of excessive number of alarms, unclear information and cumbersome processing procedures in related static scanning technologies, and achieve the technical effect of reducing manual intervention and improving the efficiency of alarm information processing.

[0032] In the application scenarios of static scanning technology, the core goal of generating a multi-dimensional warning information set is to integrate warning information from different sources and different granularities to achieve a global analysis of code quality issues.

[0033] In an exemplary embodiment, a multi-dimensional set of alarm information can be obtained based on the API (Application Programming Interface) integration mode of the standardized interface. Many static scanning tools provide RESTful API interfaces that allow users to obtain scan results through network requests. By calling these APIs, the scan results can be exported in structured formats such as JSON (JavaScript Object Notation) or XML (eXtensible Markup Language). For example, SonarQube provides detailed API documentation, and alarm information and rule information can be obtained by calling the api / issues / search interface. The data returned by these API interfaces can be directly parsed and stored in the database, thereby realizing the automated collection and processing of alarm information.

[0034] In an exemplary embodiment, for static scanning tools that lack API support, file parsing (such as parsing the report file it generates) can be used to extract multi-dimensional alarm information (the report file usually contains a detailed description of the alarm, the alarm location, the alarm type, and other information). A parser written in a preset programming language reads the report file and extracts the required data. The parser will parse the report file according to the format (such as HTML (HyperText Markup Language), XML or JSON), extract key information and store it in the database, thereby realizing automatic processing of alarm information. If the parsed alarm information is different from the alarm information dimension obtained by the API interface, the contextual dimension information can be supplemented to ensure alignment with the dimension of the API source data.

[0035] In an exemplary embodiment, in order to integrate static scanning tools more efficiently, plug-in development can be adopted. These plug-ins can be directly embedded in the development environment and automatically collect warning information after the code scanning is completed. The development of plug-ins can use the plug-in development framework and API provided by each development environment to achieve seamless connection with static scanning tools. In this way, warning information can be directly displayed in the development environment, which is convenient for developers to find and fix problems in time and improve development efficiency.

[0036] In an exemplary embodiment, the code of the target project is scanned using a static scanning tool. Therefore, it also includes: initializing the operation of the static scanning tool, specifically configuring the static scanning tool to ensure the efficiency of the scanning process and the accuracy of the results. The static scanning tool needs to be customized according to the specific needs of the project to ensure that its scanning results can accurately reflect the problems in the code. Specifically, the configuration process includes setting parameters such as scanning frequency, scanning range and scanning rules. The scanning frequency determines the time interval for the tool to perform scanning. For example, it can be set to scan each time the code is submitted, daily scheduled scanning or manually trigger scanning on demand. A reasonable scanning frequency can ensure that new problems in the code are discovered in a timely manner while avoiding the waste of resources caused by excessive scanning. The scanning scope defines which code parts need to be scanned. Usually, key modules or specific areas can be selectively scanned according to the modular structure of the project to avoid unnecessary scanning of irrelevant code, thereby improving scanning efficiency. Scanning rules are the basis for the static scanning tool to check the code based on its built-in rule library or user-defined rules, and can analyze specific types of errors (such as syntax errors, security vulnerabilities, code specification issues, etc.). By configuring these rules, the tool can accurately identify code problems that meet the project quality standards. These initialization configurations are completed through the tool's configuration file or command line parameters. The configuration file is usually a text file containing scanning parameters, while the command line parameters can be directly specified when starting the scanning tool. Through these configurations, the static scanning tool can run flexibly according to the actual situation of the project, generate accurate alarm information, and provide a reliable foundation for subsequent data processing.

[0037] In an exemplary embodiment, the initialization step also includes setting a data storage scheme. Setting a data storage scheme is the basis for ensuring effective management and subsequent processing of alarm data. According to project requirements and technology stacks, a relational database (such as MySQL, PostgreSQL) or a NoSQL database (such as MongoDB, Redis) can be selected to store alarm information. Relational databases can efficiently store and query data with a clear structure through structured table and field design, which is suitable for scenarios that require complex query and transaction support; while NoSQL databases show higher flexibility and scalability when processing large-scale, semi-structured or dynamically changing data. When designing a data storage structure, a reasonable table structure can be created, such as designing an alerts table, which includes fields such as alarm ID (Identity document), alarm type, alarm location, alarm description, repair suggestions, severity, etc., to fully cover all dimensions of alarm information. This structured storage method not only facilitates the rapid retrieval and analysis of alarm data, but also provides a solid foundation for subsequent data processing, classification and optimization, ensuring that alarm information can efficiently support development and management processes.

[0038] In an exemplary embodiment, data cleaning and standardization are also included. The purpose of data cleaning is to remove invalid data, process null values, and eliminate redundant information before storing the alarm information in the database. Invalid data may include erroneous alarm records or information irrelevant to the current project, and the existence of these data will interfere with subsequent analysis and processing. Null values ​​need to be filled or deleted according to the specific situation to ensure the integrity of the data. Redundant data may be generated due to repeated scanning or errors in the tool itself, and data storage needs to be optimized through deduplication operations. Standardization processing is to convert alarm information from different static scanning tools into a unified format. Since different static scanning tools may use different data structures and terms to describe alarm information, this difference will increase the complexity of data processing. Through standardization processing, these heterogeneous data can be unified into a common framework to ensure the consistency and accuracy of subsequent processing. For example, key information such as alarm type, location, description, etc. is mapped to a unified field, so that the alarm information generated by different tools can be effectively compared, classified and analyzed in the same system. This process not only improves the availability of data, but also provides a solid foundation for subsequent automated processing and intelligent analysis, thereby improving the efficiency and reliability of the entire alarm management system.

[0039] Among them, in the transmission process of alarm information, it is crucial to ensure the security, efficiency and reliability of data. In order to achieve these goals, a variety of technical means can be used. First, using the HTTPS (Hyper text Transfer Protocol Secure) protocol to encrypt data transmission can effectively prevent data from being stolen or tampered with during transmission, thereby ensuring data security. Secondly, by batch transmission, multiple alarm information can be packaged and sent at one time, which can reduce the number of network requests, significantly improve transmission efficiency, and reduce network latency and resource consumption. In addition, in order to ensure the reliability of data transmission, a message queue can be introduced. The message queue can temporarily store alarm information to ensure that even if a network failure or other abnormal situation occurs during transmission, the data will not be lost and can continue to be transmitted after the network is restored. In some scenarios with high requirements for data consistency, the transaction management mechanism of the database can also be used to ensure that the storage and update operations of the alarm information are either all successful or all failed, thereby ensuring the integrity and consistency of the data. This comprehensive data transmission strategy can effectively cope with various complex scenarios and ensure the reliability and accuracy of alarm information during generation, transmission and storage.

[0040] In an exemplary embodiment, a coupling analysis is performed on the alarm type, alarm location, alarm description and repair suggestion to obtain a classification result of the alarm information, including: performing a coupling analysis on the alarm type, alarm location, alarm description and repair suggestion to calculate the first priority of the alarm information; classifying the alarm information according to the first priority to obtain a classification result.

[0041] The first priority of each alarm is calculated based on the multi-dimensional characteristic parameters of the alarm information (such as alarm severity, alarm location, alarm type, etc.). The calculation of this priority takes into account multiple factors. For example, serious security vulnerabilities or errors that may cause system crashes will be given a higher priority, while minor coding standard issues or warnings that do not affect the function may be given a lower priority. The priority is calculated based on the impact range of the alarm, the complexity of the repair, and its potential impact on the project schedule. Then, based on the calculated first priority, the alarm information is divided into different categories, such as high priority, medium priority, and low priority. This classification can help developers focus on the most urgent and serious issues, while lower priority alarms can be deferred or automatically ignored.

[0042] This classification method in this embodiment can efficiently guide developers to deal with the most critical issues by quantifying the priority of alarm information, avoiding the interference of a large number of low-priority alarms, and ensuring the maximization of development efficiency and project quality. At the same time, the priority classification is also helpful for the subsequent alarm processing strategy formulation, so that each alarm can get the most appropriate response.

[0043] In an exemplary embodiment, a coupling analysis is performed on the alarm type, the alarm location, the alarm description and the repair suggestion to obtain a classification result of the alarm information, including: calculating a parameter score of a feature parameter of at least one dimension in the multidimensional feature parameters, and calculating a first score of the alarm information according to a weight coefficient and a parameter score corresponding to the feature parameter of at least one dimension; after the coupling analysis is performed on the alarm type, the alarm location, the alarm description and the repair suggestion to obtain a classification result of the alarm information, it also includes: determining the importance, and / or the scope of influence, and / or the repair cost of the alarm information in the target project, calculating a total score of the alarm information according to the importance, and / or the scope of influence, and / or the repair cost, and the first score, and classifying the alarm information according to the total score to obtain a classification result.

[0044] The design idea of ​​this embodiment is to build an alarm classification system that combines a dynamic weighted scoring mechanism with project context awareness. Specifically, first, this embodiment breaks through the traditional classification model based on fixed rules or a single dimension (for example, there are technical solutions in related technologies that only prioritize based on the position of code lines) through the nonlinear superposition of parameter scores (such as the semantic complexity score of the alarm description based on natural language processing) and weight coefficients (such as the weight of the impact of the alarm type on system stability). When the alarm position weight coefficient is conditionally associated with the repair suggestion feasibility score, the discrimination of the first score can be improved. Second, this embodiment introduces three factors: importance, scope of impact, and repair cost, and deeply binds static code defects with dynamic project characteristics (such as the remaining time of the iteration cycle and the business value of the module). For example, for the same alarm, if it is located in a high-concurrency module, the importance weight can be increased by the preset weight; if it is located in an impacting downstream order system, its corresponding impact range coefficient can be multiplied by a preset multiple (the preset multiple is greater than 1); if its repair requires reconstruction of the core interface, the corresponding repair cost can be triggered, and the total score will cross the preset threshold and enter the emergency processing queue. However, the current related technologies include solutions that only rely on code severity level judgment, and their considerations are not comprehensive enough.

[0045] In an exemplary embodiment, a coupling analysis is performed on the alarm type, alarm location, alarm description and repair suggestion to obtain a classification result of the alarm information, including: calculating a parameter score of a feature parameter of at least one dimension in the multidimensional feature parameters; calculating a first score of the alarm information based on a weight coefficient and a parameter score corresponding to the feature parameter of at least one dimension; determining a first priority of the alarm information based on the first score, and the classification result includes the first priority.

[0046] In this embodiment, the calculation of the first priority of the alarm information is achieved through the weighted comprehensive scoring of multi-dimensional feature parameters. Specifically, the corresponding feature parameters can be extracted from the four dimensions of alarm type, alarm location, alarm description and repair suggestion, and the corresponding parameter scores are type score T(i), location score L(i), description score D(i) and repair suggestion score R(i).

[0047] Among them, the type score T(i) directly reflects the severity of the alarm information according to the potential risk level of the alarm information (such as security vulnerability score 1.0, code quality score 0.8, coding standard 0.5); the location score L(i) quantifies its importance based on the location characteristics of the code module where the alarm information is located (such as the core module, the call frequency of the path where it is located, etc.). For example, the alarm location score on the core code module or the critical path is higher, while the location score on the auxiliary module or the backup path is lower; the description score D(i) uses natural language processing technology to analyze the completeness and clarity of the alarm description, which can be divided into several levels, such as high (1.0), medium (0.7), and low (0.3) to ensure operability; the repair suggestion score R(i) is based on the feasibility of the repair steps and the level of detail of the code examples (high feasibility 1.0, medium 0.7, low 0.3) to reduce the repair cost of developers.

[0048] Then, the weight coefficients corresponding to the type score T(i), location score L(i), description score D(i) and repair suggestion score R(i) are calculated. )Perform linear weighted summation on the above parameters to generate a comprehensive first priority score P(i). The specific calculation formula is: , where i represents the ith alarm information, P(i) represents the first score of the ith alarm information, and T(i) represents the type score of the ith alarm information ( is the corresponding type weight coefficient), L(i) represents the location score of the i-th alarm information ( is the corresponding position weight coefficient), D(i) represents the description score of the i-th alarm information ( is the corresponding description weight coefficient), R(i) represents the repair suggestion score of the i-th alarm information ( is the corresponding repair suggestion weight coefficient).

[0049] Finally, the warning information can be divided into three priorities according to the first score: high (P≥0.8), medium (0.5≤P<0.8), and low (P<0.5). Among them, high-priority warning information usually involves security vulnerabilities or core functional defects and needs to be processed immediately; medium-priority warning information is mostly code quality optimization items, which can be included in the iteration plan, such as being processed in the next stage; low-priority warning information is mostly regulatory issues or potential false alarms, which can be delayed or ignored.

[0050] like Figure 2As shown, the implementation process of a specific embodiment includes: S21: statically scanning the code in the target project to generate a multi-dimensional alarm information set; S22: determining the multi-dimensional feature parameters of the alarm information in the alarm information set; S23: calculating the first score of the alarm information according to the multi-dimensional feature parameters; S24: determining the first priority of the alarm information according to the first score; S25: classifying the alarm information according to the first priority to obtain a classification result; S26: determining the target processing strategy corresponding to the classification result of the alarm information according to the classification result and the strategy mapping relationship, and processing the alarm information according to the target processing strategy.

[0051] This embodiment achieves refined management of alarm processing through quantification and dynamic weight mechanism, taking into account both efficiency and rationality of resource allocation.

[0052] In an exemplary embodiment, the feature parameters include an alarm location, and the parameter score is a location score; calculating the parameter score of the feature parameters of at least one dimension in the multidimensional feature parameters includes: obtaining the code line number corresponding to the alarm information, and / or the complexity of the target code module, and / or the weight of the code execution path; the alarm location includes the code line number corresponding to the alarm information, and / or the complexity of the target code module, and / or the weight of the code execution path; the weight of the code execution path is determined according to the importance and calling frequency of the target code module in the calling path of the target project; the target project includes multiple code modules, and the target code module is one of the multiple code modules; according to the code line number, and / or the complexity of the target code module, and / or the weight of the code execution path, calculate the location score corresponding to the alarm location in the multidimensional feature parameters.

[0053] In this embodiment, the characteristic parameters of the alarm position are mainly determined by analyzing the code line number corresponding to the alarm information, the complexity of the target code module, and the weight of the code execution path. The alarm position reflects the importance and frequency of the alarm in the entire code base, so its score helps to evaluate the potential impact of the alarm on the project.

[0054] Specifically, first you need to get the code line number corresponding to the alarm information, which is the basic information for locating the location where the alarm occurs. Secondly, the complexity of the target code module is also an important factor affecting the location score. Modules with higher complexity usually have more critical functions and a greater risk of alarms, so they have higher scores. Furthermore, the weight of the code execution path will also affect the location score. The weight of the code execution path is determined by calculating the call frequency of the target code module in the entire project and its importance in the call path. The higher the importance and frequency of the path, the more critical the path is in the realization of the function during the program operation, so the alarm on this path should be given a higher priority score.

[0055] In an exemplary embodiment, the calculation formula for the location score L(i) can be: L(i)=1 / (number of code lines + complexity of the target code module + weight of the code execution path), that is, the location score is obtained by weighting the number of code lines where the alarm is located, the complexity of the target code module, and the weight of the code execution path.

[0056] It should be understood that the weight setting of the code execution path can be adjusted according to the actual situation in order to more accurately reflect the importance and risk of different modules and paths in the project. If the alarm information is located in the core code module or critical path of the target project, the location score will be higher, which means that the alarm has a greater impact on the target project and needs to be processed first; on the contrary, the alarm located in the auxiliary code module or backup path has a lower location score, which means that it has a smaller impact on the target project and can be delayed or ignored. Through this series of calculations, the importance of the alarm location can be effectively determined, providing an important basis for subsequent priority classification.

[0057] In an exemplary embodiment, the process of determining the weight coefficient corresponding to the characteristic parameter includes: setting the initial weight coefficient according to the type of the characteristic parameter; adjusting the initial weight coefficient according to a weight adjustment model to obtain an adjusted weight coefficient; the weight adjustment model is a model obtained by learning and training historical alarm information.

[0058] In this embodiment, the process of determining the weight coefficients corresponding to the feature parameters is a dynamic optimization mechanism that aims to improve the accuracy and efficiency of alarm information processing by combining initial settings and historical data learning. Specifically, the optimization and adjustment of the weight coefficients are carried out through a two-step process to ensure the accuracy of classification and the rationality of priority scoring. First, the initialization step of the weight coefficients is to set the initial weights according to the specific needs of the project and the common types of alarm information (such as alarm type, location, description, etc.). For example, security vulnerabilities are usually more serious than other types of alarms, so their corresponding weight coefficients are It can be set to 0.5; code quality issues have a greater impact on the stability and performance of the project, so the weight It can be set to 0.3; the coding standard problem is relatively minor, and the weight can be set The feasibility and clarity of the repair suggestion have little impact on the alarm priority, so the weight can be Set to 0.1. Through this initial setting, a preliminary priority influence can be assigned to each alarm type.

[0059] Next, in order to further optimize the weight coefficient, a weight adjustment model is introduced. The model analyzes the actual performance of each feature parameter in the past alarm data and its impact on the alarm processing results by learning and training historical alarm information. Through machine learning algorithms (such as linear regression, decision tree or other suitable algorithms), the model can identify which feature parameters are more critical to the determination of alarm priority in actual scenarios, and adjust the initial weight coefficient accordingly. Specifically, a linear regression model can be used to establish a weight adjustment model, in which the priority score of the alarm is used as the target variable, and the scores of each dimension of the alarm (such as type score, location score, description score and repair suggestion score, etc.) are trained as feature variables. Through steps such as data preprocessing, feature selection, model training and verification, it is possible to identify which feature parameters have a greater impact on the alarm priority, so as to dynamically adjust the weight coefficient to make the classification more accurate.

[0060] Finally, the weight coefficients optimized by the weight adjustment model can more accurately reflect the importance of each characteristic parameter in actual alarm processing, thus providing a more reliable basis for subsequent alarm classification and priority assessment. This weight determination method that combines initial settings with data-driven adjustments not only improves the flexibility and adaptability of alarm processing, but can also be continuously optimized as historical data accumulates, ensuring that the alarm information processing strategy always meets actual needs and improves development efficiency and code quality.

[0061] In an exemplary embodiment, after adjusting the initial weight coefficient according to the weight adjustment model, it also includes: determining the number of false alarms of the alarm information corresponding to the characteristic parameter; reducing the adjusted weight coefficient corresponding to the characteristic parameter by a preset change amount according to the number of false alarms to obtain a final weight coefficient; the preset change amount is positively correlated with the number of false alarms.

[0062] In this embodiment, in order to further optimize the weight coefficient of the characteristic parameter, a dynamic adjustment mechanism based on the number of false alarms is proposed. After the weight adjustment model optimizes the initial weight coefficient, the number of false alarms of the alarm information corresponding to the characteristic parameter is further analyzed. The number of false alarms refers to the frequency at which the characteristic parameter is incorrectly marked as an alarm in the historical alarm data. By counting the number of false alarms, it is possible to evaluate whether the characteristic parameter is prone to misjudgment in practical applications.

[0063] Based on the number of false alarms, the adjusted weight coefficient corresponding to the feature parameter is further reduced by a preset change. The preset change is a value that is positively correlated with the number of false alarms, that is, the more false alarms there are, the larger the preset change. This means that if a feature parameter has a high number of false alarms, it may not be accurate enough or has a high degree of uncertainty in alarm judgment. Therefore, by reducing its weight coefficient, the influence of the feature parameter in the alarm priority assessment can be reduced, thereby avoiding waste of resources or misleading developers due to false alarms.

[0064] This weight adjustment mechanism based on the number of false alarms further enhances the adaptability and accuracy of the alarm processing system. It not only takes into account the learning results of historical data, but also pays special attention to the impact of false alarms on the efficiency of alarm processing. By dynamically adjusting the weight coefficient, the system can more accurately identify and process truly important alarm information, while reducing the interference of false alarms on the development process, ensuring that the alarm processing strategy always meets actual needs and improves development efficiency and code quality.

[0065] In an exemplary embodiment, after determining the multidimensional characteristic parameters of the alarm information in the alarm information set, it also includes: calculating the similarity between multiple alarm information based on the multidimensional characteristic parameters of the alarm information; judging whether there is alarm information with a similarity greater than a preset threshold; merging the alarm information with a similarity greater than the preset threshold, and updating the number of alarm occurrences; the number of alarm occurrences is the number of alarm information with a similarity greater than the preset threshold.

[0066] In this embodiment, in order to reduce the repetition rate of alarms and improve the quality of alarm information, an alarm merging mechanism based on similarity calculation is proposed. After determining the multidimensional feature parameters of the alarm information in the alarm information set, the similarity between multiple alarm information is further calculated. This process is achieved by analyzing the multidimensional feature parameters of the alarm information (such as alarm type, location, description, repair suggestion, etc.), thereby quantifying the similarity between different alarms.

[0067] Specifically, a preset threshold is set to determine whether the similarity between alarms is high enough to identify them as duplicate or similar alarms. If the similarity between two or more alarms exceeds this preset threshold, these alarm messages are considered duplicate or highly similar alarm messages and are merged into a single alarm message. The merged alarm message will have its occurrence count updated, i.e., the occurrence count of the merged alarm is equal to the sum of the number of all similar alarms.

[0068] The core of this similarity-based alarm merging mechanism is to reduce the duplication of alarms and avoid developers wasting time and energy on dealing with a large number of duplicate alarms. By merging similar alarms, not only can the number of alarms be significantly reduced, but the quality of alarm information can also be improved, allowing developers to focus on dealing with truly unique alarm problems more efficiently. In addition, the updated alarm occurrence count provides developers with intuitive information about the frequency of alarm repetition, which helps to further evaluate the severity and priority of the alarm, thereby optimizing the alarm handling strategy and improving development efficiency and code quality.

[0069] In an exemplary embodiment, the similarity between multiple alarm information is calculated based on the multi-dimensional feature parameters of the alarm information, including: calculating the hash value of the alarm information based on the multi-dimensional feature parameters of the alarm information; judging whether there is alarm information with a similarity greater than a preset threshold, including: judging whether there is alarm information with the same hash value; if there is alarm information with the same hash value, determining the alarm information with the same hash value as the alarm information with a similarity greater than the preset threshold; merging the alarm information with a similarity greater than the preset threshold, and updating the alarm occurrence count, including: merging the alarm information with the same hash value, and updating the alarm occurrence count; the alarm occurrence count is the number of alarm information with the same hash value.

[0070] In this embodiment, in order to efficiently identify and merge similar alarm information, a similarity calculation and alarm merging mechanism based on hash values ​​is proposed. Specifically, before the alarm information is stored in the database, a unique hash value is generated for each alarm information based on the multi-dimensional feature parameters of the alarm information (such as alarm type, alarm location, alarm description, and repair suggestions). The hash value generation mechanism ensures that the same alarm information will generate the same hash value, thereby providing an efficient basis for subsequent repeatability detection.

[0071] In a specific embodiment, the implementation process may include: when storing new alarm information, checking whether the same hash value exists in the database. If the hash values ​​are found to be the same, further comparing the new alarm information with the stored alarm information to confirm whether they are duplicate alarms. For alarms confirmed to be duplicates, they are merged into the existing alarm information. The merging process includes updating the number of occurrences of the alarm, recording the location of the alarm, and other information. In this way, the amount of alarm information in the database can be significantly reduced, and the accumulation of duplicate alarm information can be avoided, thereby improving the efficiency and quality of alarm management.

[0072] like Figure 3As shown, a specific implementation process includes: S31: configuring a static scanning tool, setting the scanning frequency, scanning range and scanning rules; S32: statically scanning the code in the target project to generate a multi-dimensional alarm information set; S33: calculating the hash value of the alarm information based on the multi-dimensional feature parameters of the alarm information; S34: judging whether there is alarm information with the same hash value; S35: if so, merging these alarm information and updating the number of alarm occurrences; S36: if not, determining the multi-dimensional feature parameters of the alarm information in the alarm information set, classifying the alarm information according to the multi-dimensional feature parameters, and obtaining the classification result; S37: determining the target processing strategy corresponding to the classification result of the alarm information according to the classification result and the strategy mapping relationship, and processing the alarm information according to the target processing strategy.

[0073] The core of this hash-based similarity calculation and alarm merging mechanism is to use the efficiency and uniqueness of the hash algorithm to quickly identify duplicate alarms, while avoiding complex item-by-item comparison of alarm information. It not only improves the efficiency of alarm management, but also ensures the simplicity and accuracy of alarm information, allowing developers to handle alarms more efficiently, reduce interference caused by duplicate alarms, and further improve development efficiency and code quality.

[0074] In an exemplary embodiment, after calculating the first score of the alarm information according to the weight coefficient and parameter score corresponding to the characteristic parameters of at least one dimension, it further includes: determining the importance, and / or the scope of impact, and / or the repair cost of the alarm information; calculating the total score of the alarm information according to the importance, and / or the scope of impact, and / or the repair cost, and the first score; determining the second priority of the alarm information according to the total score; and classifying the alarm information according to the second priority to obtain a classification result.

[0075] In this embodiment, in order to more accurately determine the processing priority of the alarm information, a priority calculation method based on multi-dimensional comprehensive evaluation is proposed. After calculating the first score of the alarm information in the above embodiment, the importance, impact range and repair cost of the alarm information in the target project can be further analyzed.

[0076] Specifically, the importance of the alarm information in the target project reflects the impact of the alarm information on the core functions of the target project; the impact scope quantifies the number of code modules and lines of code that the alarm may affect; and the repair cost evaluates the time and resource investment required to repair the alarm. These factors are combined with the first score to calculate the total score of the alarm information.

[0077] The calculation formula of the total score can be designed according to actual needs. For example, different weights are assigned to the importance, impact scope and repair cost, and a weighted sum is calculated. For example, the calculation formula is: , where S(i) is the total score of the ith alarm information, I(i) is the importance score of the ith alarm information, the first score (described in the following embodiment) is required to calculate I(i), F(i) is the score corresponding to the impact range of the ith alarm information, and C(i) is the score corresponding to the repair cost of the ith alarm information. is the corresponding weight coefficient. In this way, the total score can more comprehensively reflect the actual processing priority of the alarm. Finally, the second priority of the alarm information is determined according to the total score, and the alarm information is classified based on this.

[0078] For example, according to the total score S(i), the alarm is reclassified into high priority, medium priority and low priority. The specific classification criteria are as follows: alarms with a total score S(i) ≥ 0.8 are classified as high priority alarms; alarms with a total score of 0.5 ≤ S(i) < 0.8 are classified as medium priority alarms; alarms with a total score S(i) < 0.5 are classified as low priority alarms.

[0079] like Figure 4 As shown, the process of a specific embodiment includes: S41: statically scanning the code in the target project to generate a multi-dimensional alarm information set; S42: determining the multi-dimensional feature parameters of the alarm information in the alarm information set; S43: calculating the first score of the alarm information based on the multi-dimensional feature parameters; S44: determining the importance, scope of impact and repair cost of the alarm information; S45: calculating the total score of the alarm information based on the importance, scope of impact and repair cost and the first score; S46: determining the second priority of the alarm information based on the total score; S47: classifying the alarm information according to the second priority to obtain a final classification result; S48: determining the target processing strategy corresponding to the classification result of the alarm information based on the final classification result and the strategy mapping relationship, and processing the alarm information according to the target processing strategy.

[0080] This priority calculation method based on multi-dimensional comprehensive evaluation not only takes into account the characteristics of the alarm itself, but also takes into account the impact of the alarm on the overall project and the repair cost, thereby providing developers with more accurate alarm handling suggestions, ensuring that key alarms are given priority, while optimizing resource allocation and improving development efficiency and code quality.

[0081] It should be understood that after calculating the first priority, the second priority is further calculated in order to more comprehensively evaluate the importance of the alarm information, so as to more accurately allocate processing resources. The first priority is mainly scored based on the multi-dimensional characteristic parameters of the alarm information, reflecting the severity and urgency of the alarm information itself. However, the actual processing priority of the alarm information depends not only on its own characteristics, but also on the impact of the alarm information on the target project as a whole (such as importance, scope of impact) and the cost of repair. Therefore, by introducing factors such as importance, scope of impact and repair cost, calculating the second priority can more accurately reflect the processing priority of the alarm information in actual development, avoid misjudgment caused by single-dimensional evaluation, thereby optimizing the alarm processing strategy and improving development efficiency and code quality.

[0082] It is also necessary to understand that, in some embodiments, the reason for calculating only the first priority without further calculating the second priority is that the first priority can provide sufficient information to effectively classify and process the alarm based on the core features of the alarm information (such as alarm type, alarm location, alarm description, etc.). The calculation of the first priority focuses on quickly evaluating the severity and urgency of the alarm, and can quickly distinguish high, medium, and low priority alarms through the comprehensive scoring of multi-dimensional feature parameters. This preliminary classification is sufficient to meet the needs of developers for alarm information processing in many scenarios, especially when resources are limited or the processing efficiency is high, or it is not related to the target project, it can help developers quickly locate and handle key issues. In some application scenarios, if the alarm processing strategy is relatively simple, or the characteristic parameters of the alarm already clearly reflect its priority, there is no need to further calculate the second priority, reducing computing resources.

[0083] In an exemplary embodiment, determining the importance of alarm information in a target project includes: determining a target code module corresponding to the alarm information in the target project, the target project including multiple code modules, and the target code module being a code module in the target project; determining a dependency score of the target code module according to the number of times the target code module is called by other code modules in the target project; the other code modules are code modules other than the target code module in the target project; determining a call path score of the target code module according to the execution frequency of the target code module in the call path of the target project; determining an importance score of the target code module according to the importance of the target code module in the target project; and calculating an importance score of the alarm information according to the dependency score, the call path score, the importance score, and the first score.

[0084] In this embodiment, the importance of the alarm information in the target project is determined by comprehensively evaluating the criticality of the target code module corresponding to the alarm in the target project. Specifically, the target code module corresponding to the alarm information is clearly identified, and the target code module is one of the many code modules in the target project. By counting the number of times the target code module is called by other code modules, its dependency score is calculated. This score reflects the degree of coupling of the target code module in the project. The more times it is called, the stronger the correlation between the target code module and other modules, and the higher its dependency score.

[0085] Analyze the execution frequency of the target code module in the call path of the target project to determine the call path score. The higher the execution frequency, the more frequently the target code module is called during the operation of the target project, and the higher its activity and importance in the operation of the target project, so the call path score also increases accordingly.

[0086] Assess the importance of the target code module in the target project to which it belongs, and determine the importance score accordingly. This score reflects the core position of the target code module in its target project. For example, the importance score of the core function module is usually higher than that of the auxiliary function module. In this embodiment, the importance of the code module can be determined in two ways: predefined and automatic identification. The predefined method allows the user to manually specify the importance of each code module in the policy settings according to project requirements. This method is suitable for the early stages of the project or scenarios where there is a clear plan for the importance of the module. Automatic identification determines the importance of the code module by analyzing dynamic information such as code logic, contextual relationships, and function call frequency in the target project.

[0087] Finally, the dependency score, call path score and importance score are combined with the first score of the alarm information, and the importance score of the alarm information is calculated by a specific first formula or weighted summation. In an exemplary embodiment, the first formula can be: I(i)=P(i)·[(dependency score+call path score+importance score) / 3]. This score comprehensively reflects the criticality of the target code module associated with the alarm information in the target project, and provides a more comprehensive basis for the subsequent determination of the priority of the alarm.

[0088] This multi-dimensional evaluation method can more accurately identify alarms that have a greater impact on the project, thereby optimizing the alarm handling strategy, ensuring that key alarms are given priority, and improving the overall quality and development efficiency of the project.

[0089] In an exemplary embodiment, determining the impact scope of the alarm information in the target project includes: determining a target code module corresponding to the alarm information in the target project, the target project includes multiple code modules, and the target code module is a code module in the target project; determining the number of code modules and the number of code lines affected by the target code module in the target project; calculating the impact scope score of the alarm information according to the number of code modules, the number of code lines and the total number of code lines of the target project; wherein the ratio of the number of affected code modules and the number of code lines to the total number of code lines are respectively positively correlated with the impact scope score of the alarm information.

[0090] In this embodiment, determining the impact scope of the alarm information in the target project is achieved by quantifying the impact of the target code module corresponding to the alarm information on other code modules and the number of code lines in the target project. Specifically, first, the target code module associated with the alarm information is clarified, and the target code module is one of the code modules in the target project; the number of other code modules affected by the target code module in the target project, as well as the number of code lines affected, are analyzed. By counting the number of code modules and code lines affected, and combining the total number of code lines of the target project, the impact scope of the alarm information is calculated.

[0091] In an exemplary embodiment, the second formula of the impact range score may be designed as: F(i)=log(the number of affected code modules+1)+the number of affected code lines / the total number of code lines.

[0092] This quantitative method can accurately assess the impact of alarms on projects, providing an important basis for subsequently determining alarm priorities, thereby helping developers more efficiently identify and handle alarm information that has a greater impact on projects.

[0093] In an exemplary embodiment, determining the repair cost of the alarm information in the target project includes: determining the number of repair code lines, repair complexity and repair time coefficient corresponding to the alarm information in the target project, the repair time coefficient representing the time required to repair the code corresponding to the alarm information; calculating the repair cost score of the alarm information according to the number of repair code lines, repair complexity and repair time coefficient; the number of repair code lines, repair complexity and repair time coefficient are respectively positively correlated with the repair cost score.

[0094] In this embodiment, the repair cost of the alarm information is determined by comprehensively evaluating the scope of code modification required to repair the alarm, the complexity of the repair operation, and the time required for the repair. Specifically, the number of repair code lines corresponding to the alarm information is determined, that is, the number of code lines that need to be modified to repair the alarm; the repair complexity is evaluated, and the complexity reflects the technical difficulty and the complexity of the operation steps required to repair the alarm; the repair time coefficient is determined, and the repair time coefficient represents the actual time required to repair the code corresponding to the alarm information. The number of repair code lines, the repair complexity, and the repair time coefficient are all positively correlated with the repair cost, that is, the more repair code lines, the higher the repair complexity, and the larger the repair time coefficient, the higher the repair cost. In an exemplary embodiment, the third formula for the repair cost score can be: C(i) = number of repair code lines + repair complexity · repair time coefficient.

[0095] By combining these three factors, the repair cost of the alarm information can be calculated, thus providing a more comprehensive reference for the subsequent alarm priority assessment. This comprehensive evaluation method of repair cost can help developers more accurately identify alarms that are difficult and costly to repair, so as to reasonably arrange repair resources, optimize alarm processing strategies, and improve development efficiency and code quality.

[0096] like Figure 5 , a process for calculating the total score includes: S51: determining the target code module corresponding to the alarm information; S52: calculating the dependency score, the call path score, and the importance score; S53: calculating the importance score of the alarm information based on the dependency score, the call path score, the importance score, and the first score; S54: determining the number of code modules and the number of code lines affected by the target code module in the target project; S55: calculating the impact range score of the alarm information based on the number of code modules, the number of code lines, and the total number of code lines of the target project; S56: determining the number of repair code lines, the repair complexity, and the repair time coefficient corresponding to the alarm information; S57: calculating the repair cost score of the alarm information based on the number of repair code lines, the repair complexity, and the repair time coefficient; S58: calculating the total score based on the importance score, the impact range score, and the repair cost score.

[0097] Furthermore, it can also include: false alarm detection and elimination. Specifically, it can be to automatically identify and filter out false alarms generated in static scanning through machine learning and natural language processing technology. The specific steps include: collecting historical alarm information, including alarm type, alarm location, alarm description, repair suggestions, and feedback from developers on whether the alarm information is a false alarm; these historical alarm information are used as the training basis, and key features such as keywords, phrases, grammatical structures, etc. are extracted from the alarm description, and the alarm location, alarm type and repair suggestions are combined as feature input; these features are trained using classification algorithms (such as random forests, support vector machines or deep learning models) to build a detection model that can distinguish between false alarms and non-false alarms; the training data contains historical alarm information of marked false alarms and non-false alarms to ensure that the model learns accurate classification standards; the trained detection model is applied to newly generated alarm information to automatically identify and mark false alarms. Alarm information marked as false alarms can be directly removed from the alarm list, thereby reducing the workload of developers in handling invalid alarms and improving the efficiency and accuracy of alarm processing.

[0098] Furthermore, it can also include: optimizing alarm information to improve the readability and practicality of alarms, so as to help developers understand and handle alarms more efficiently. For example: using natural language generation technology, according to characteristic parameters such as alarm type and alarm location, a detailed alarm description is automatically generated. These alarm descriptions not only cover the specific cause of the problem, but also explain its possible impact range and repair suggestions, so that developers can quickly grasp the core content of the alarm. For example: for some complex alarm information, sample codes are provided. These sample codes can be typical problem examples extracted from historical alarm information, or simulation codes automatically generated by code generation technology, to help developers understand the problem more intuitively. For example: repair suggestions will be optimized according to the repair cost and impact range of the alarm. For example, for those alarms whose impact range score is greater than the first preset score but whose repair cost score is less than the second preset score, immediate repair is recommended first; and for alarm information whose impact range is less than the third preset score but whose repair cost is greater than the fourth preset score, alternative repair solutions will be provided or suggestions will be made to deal with it in the subsequent development stage. This optimization mechanism can ensure that the alarm information is not only accurate, but also highly operable, thereby effectively improving development efficiency and code quality. For example, detailed repair suggestions are automatically generated based on natural language generation technology; the specific steps include generating suggestions including the cause of the problem, repair steps and sample code by analyzing the alarm type, alarm location and cause. For another example, a rule engine is set, which contains multiple repair rules, and each rule provides a corresponding repair solution for a specific type of alarm. For example, for a security vulnerability alarm, the rule engine can generate multiple repair suggestions based on the vulnerability type. The rule engine quickly generates targeted repair suggestions by matching alarm features with predefined rules to ensure the accuracy and consistency of the repair solution. The automatic repair module can also be set to be a tool integrated into the development environment, which can automatically modify the code according to the generated repair suggestions. The module can be embedded in a common development environment to achieve seamless repair. The automatic repair module directly modifies the code by parsing the code snippets in the repair suggestion, thereby reducing the workload of developers to manually repair the code. Among them, the code modification strategy is: the automatic repair module supports multiple code modification strategies to adapt to different types of alarms and repair requirements. For simple warnings (such as unclosed file handles or unused variables), repair code can be directly generated and applied to the project; for complex warnings (such as security vulnerabilities or code quality issues), repair suggestions are generated and developers are prompted to manually confirm and modify them; in addition, for some warnings, multiple repair plans can be provided, allowing developers to choose the most appropriate plan based on the specific situation; this flexible strategy design ensures that the automatic repair module can not only efficiently handle simple problems, but also provide reliable solutions for complex problems.

[0099] Verification of repair results: After automatically repairing the code, verifying the correctness of the repair results is a key step to ensure code quality and security; the verification process includes running code module tests to ensure that the repaired code still meets functional and performance requirements, submitting the repaired code for automated review to ensure code quality, and manually reviewing complex or high-priority alarms. Through these verification methods, it can be ensured that the automatic repair does not introduce new problems, while ensuring the accuracy and reliability of the repair.

[0100] Storage of processing results for each alarm information: The purpose is to record the processing time and processing personnel of each alarm. By storing the processing results in the database, the team can track the processing progress of the alarm and discover and solve problems in a timely manner. The stored information includes the generation time, processing time, processing results and processing personnel of the alarm, which provide a basis for subsequent analysis and optimization.

[0101] Visualization of processing results: This is achieved by displaying information such as processing time, processing personnel, and repair code segments in the alarm management interface. This visual display method enables developers to intuitively understand the processing of alarms, which facilitates quick problem location and evaluation of repair effects. The visualization interface can also provide statistical information on alarm processing to help the team better manage the alarm processing process. Auditing of alarm processing: This is achieved by recording detailed audit logs, which include information such as the generation time, processing time, processing results, and processing personnel of the alarm. The audit log not only provides the team with a detailed record of alarm processing, but can also be used to review and analyze the alarm processing process, thereby optimizing the alarm management strategy. Through the audit log, the team can identify problems in alarm processing, improve the processing process, and improve overall development efficiency.

[0102] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method.

[0103] like Figure 6 An embodiment of the present application further provides an electronic device, including a memory 61 and a processor 62, wherein the memory 61 stores a computer program, and the processor 62 is configured to run the computer program to execute the steps in any of the above-mentioned alarm information processing method embodiments.

[0104] For the description of the features in the embodiment corresponding to the electronic device, reference can be made to the relevant description of the embodiment corresponding to the method for processing alarm information, which will not be described in detail here.

[0105] like Figure 7An embodiment of the present application further provides a computer-readable storage medium 71, in which a computer program 72 is stored, wherein the computer program 72 is configured to execute the steps of any of the above-mentioned alarm information processing method embodiments when running.

[0106] In an exemplary embodiment, the computer-readable storage medium 71 may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.

[0107] The description of the features in the embodiment corresponding to the computer-readable storage medium 71 can refer to the relevant description of the embodiment corresponding to the method for processing alarm information, which will not be repeated here.

[0108] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any of the above-mentioned alarm information processing method embodiments are implemented.

[0109] An embodiment of the present application also provides another computer program product, including a non-volatile computer-readable storage medium, the non-volatile computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the steps in any of the above-mentioned alarm information processing method embodiments are implemented.

[0110] For the description of the features in the embodiments corresponding to the computer program product, reference can be made to the relevant description of the embodiments corresponding to the method for processing alarm information, which will not be described in detail here.

[0111] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for at least one specific application, but such implementation should not be considered to be beyond the scope of this application.

[0112] The above is a detailed introduction to the alarm information processing method, device, medium and program product provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of ​​the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.

Claims

1. A method for processing alarm information, characterized in that: include: Perform static scanning on the code in the target project to generate a multi-dimensional set of warning information; Determining multidimensional characteristic parameters of the warning information in the warning information set; The multi-dimensional feature parameters include a combination of alarm type, alarm location, alarm description, and repair suggestion; Performing coupling analysis on the alarm type, the alarm location, the alarm description and the repair suggestion to obtain a classification result of the alarm information; A target processing strategy corresponding to the classification result of the alarm information is determined according to the classification result and the strategy mapping relationship, and the alarm information is processed according to the target processing strategy.

2. The method for processing alarm information according to claim 1, characterized in that: The alarm type, the alarm location, the alarm description and the repair suggestion are coupled and analyzed, including: Calculating a parameter score of a feature parameter of at least one dimension of the multi-dimensional feature parameters, and calculating a first score of the warning information according to a weight coefficient corresponding to the feature parameter of at least one dimension and the parameter score; After coupling and analyzing the alarm type, the alarm location, the alarm description, and the repair suggestion, the method further includes: Determine the importance, and / or the scope of impact, and / or the repair cost of the alarm information in the target project, calculate the total score of the alarm information according to the importance, and / or the scope of impact, and / or the repair cost, and the first score, classify the alarm information according to the total score, and obtain a classification result.

3. The method for processing alarm information according to claim 2, characterized in that: Determining the importance of the warning information in the target project includes: Determine a target code module corresponding to the warning information in the target project, the target project includes multiple code modules, and the target code module is a code module in the target project; Determining a dependency score of the target code module according to the number of times the target code module is called by other code modules in the target project; the other code modules are code modules in the target project other than the target code module; Determining a call path score of the target code module according to an execution frequency of the target code module in the call path of the target project; Determine the importance score of the target code module according to the importance of the target code module in the target project; An importance score of the warning information in the target project is calculated according to the dependency score, the call path score, the importance score and the first score.

4. The method for processing alarm information according to claim 3, characterized in that: Calculating the importance score of the warning information in the target project according to the dependency score, the call path score, the importance score, and the first score includes: Calculate the importance score of the alarm information using a first formula according to the dependency score, the call path score, the importance score and the first score; The first formula is: I(i)=P(i)·[(dependency score+call path score+importance score) / 3]; i represents the i-th alarm information, I(i) is the importance score of the i-th alarm information, and P(i) is the first score of the i-th alarm information.

5. The method for processing alarm information according to claim 2, characterized in that: Determining the impact scope of the alarm information in the target project includes: Determine a target code module corresponding to the warning information in the target project, the target project includes multiple code modules, and the target code module is a code module in the target project; Determine the number of code modules and the number of code lines affected by the target code module in the target project; Calculate the impact range score of the warning information in the target project according to the number of code modules, the number of code lines and the total number of code lines of the target project; Among them, the number of affected code modules and the ratio of the number of affected code lines to the total number of code lines are positively correlated with the impact range score of the warning information.

6. The method for processing alarm information according to claim 5, characterized in that: Calculating the impact range score of the warning information in the target project according to the number of code modules, the number of code lines, and the total number of code lines of the target project includes: Calculate the impact range score of the warning information in the target project using a second formula according to the number of code modules, the number of code lines, and the total number of code lines of the target project; The second formula is: F(i)=log(number of affected code modules+1)+number of affected code lines / total number of code lines; i represents the i-th alarm information, and F(i) is the impact range score of the i-th alarm information.

7. The method for processing alarm information according to claim 2, characterized in that: Determining the repair cost of the alarm information in the target project includes: Determine the number of repair code lines, repair complexity and repair time coefficient corresponding to the warning information in the target project, where the repair time coefficient represents the time required to repair the code corresponding to the warning information; Calculate the repair cost score of the warning information in the target project according to the number of repair code lines, the repair complexity and the repair time coefficient; The number of repair code lines, the repair complexity, and the repair time coefficient are respectively positively correlated with the repair cost score.

8. The method for processing alarm information according to claim 7, characterized in that: Calculating the repair cost score of the warning information in the target project according to the number of repair code lines, the repair complexity and the repair time coefficient, including: Calculate the repair cost score of the warning information in the target project using a third formula according to the number of repair code lines, the repair complexity and the repair time coefficient; The third formula is: C(i)=number of repair code lines+repair complexity·repair time coefficient, wherein i represents the i-th alarm information, and C(i) is the repair cost score of the i-th alarm information.

9. The method for processing alarm information according to claim 2, characterized in that: The characteristic parameter includes an alarm location, and the parameter score is a location score; calculating the parameter score of the characteristic parameter of at least one dimension in the multi-dimensional characteristic parameter includes: Obtaining the code line number corresponding to the warning information, and / or the complexity of the target code module, and / or the weight of the code execution path; the warning location includes the code line number corresponding to the warning information, and / or the complexity of the target code module, and / or the weight of the code execution path; the weight of the code execution path is determined according to the importance and calling frequency of the target code module in the calling path of the target project; the target project includes multiple code modules, and the target code module is one of the multiple code modules; A position score corresponding to the alarm position in the multidimensional feature parameter is calculated according to the code line number, and / or the complexity of the target code module, and / or the weight of the code execution path.

10. The method for processing alarm information according to claim 9, characterized in that: Calculating a position score corresponding to the alarm position in the multidimensional feature parameter according to the code line number, and / or the complexity of the target code module, and / or the weight of the code execution path, including: Calculate the position score corresponding to the alarm position in the multidimensional feature parameter using a fourth formula according to the code line number, the complexity of the target code module, and the weight of the code execution path; The fourth formula is: L(i)=1 / (code line number+complexity of target code module+weight of code execution path), where i represents the i-th warning information, and L(i) is the location score of the i-th warning information.

11. The method for processing alarm information according to any one of claims 1 to 10, characterized in that: After determining the multidimensional characteristic parameters of the warning information in the warning information set, the method further includes: Calculating similarities between a plurality of the warning information according to the multidimensional feature parameters of the warning information; Determine whether there is alarm information with a similarity greater than a preset threshold; The alarm information with similarity greater than the preset threshold is merged, and the alarm occurrence count is updated; the alarm occurrence count is the number of alarm information with similarity greater than the preset threshold.

12. The method for processing alarm information according to claim 11, characterized in that: Calculating similarities between a plurality of the warning information according to the multi-dimensional feature parameters of the warning information includes: Calculating a hash value of the warning information according to the multi-dimensional characteristic parameters of the warning information; Determine whether there is alarm information with a similarity greater than a preset threshold, including: Determine whether there is any alarm information with the same hash value; If there are alarm messages with the same hash value, determine that the alarm messages with the same hash value are the alarm messages with the similarity greater than a preset threshold; The alarm information with similarity greater than the preset threshold is merged, and the alarm occurrence count is updated, including: The alarm information with the same Hash value is merged, and the alarm occurrence count is updated; the alarm occurrence count is the number of alarm information with the same Hash value.

13. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the method for processing alarm information as described in any one of claims 1 to 12 when executing the computer program.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the method for processing alarm information according to any one of claims 1 to 12.

15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method for processing alarm information according to any one of claims 1 to 12 are implemented.

Citation Information

Patent Citations

  • Code detection method and device

    CN105320591A

  • Application safety management method and device, electronic equipment and storage medium

    CN110928782A

  • Software security defect prediction method and device and computer readable medium

    CN117730313A

  • Alarm information classification method and device and electronic equipment

    CN118885925A

  • Alarm information processing method and device, computer equipment and computer storage medium

    CN119440969A

Cited By

  • Power grid alarm information intelligent classification system based on deep learning

    CN120508657A

  • Source code security defect prediction method and system based on machine learning

    CN121744341A