Abnormal information processing method and device, electronic equipment and storage medium
Patent Information
- Application Number
- CN202611325189.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-28
- Publication Date
- 2026-10-27
AI Technical Summary
[0004]本发明提供了一种异常信息处理方法、装置、电子设备及存储介质,以解决相关技术无法应对新的异常模式,灵活性较差的问题
通过构建包含历史异常信息及其问题类别与解决方案的异常知识数据库,实现了历史异常处理经验的复用。通过提取失败测试用例的当前异常信息,对异常知识数据库进行检索,确定多个候选历史异常信息及其对应的候选问题类别的置信度评分,提升根因判定的准确性。将当前异常信息、多个候选历史异常信息和候选问题类别的置信度评分进行融合,生成上下文提示词,为大语言模型提供推理依据,结合历史异常处理经验生成贴合当前故障场景的目标解决方案,从而适应新的异常模式,灵活性强,能够大幅提升异常排查的处理效率。
Smart Images

Figure CN122985494A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of automated testing technology, specifically to methods, devices, electronic devices, and storage media for processing abnormal information. Background Technology
[0002] In today's world of increasingly complex software systems and the mainstream adoption of automated software testing, logs generated during test execution have become a core basis for testers to analyze problems. Test case execution logs contain crucial data such as program execution paths, system states, error messages, and performance metrics, making them an indispensable asset in a qualified software testing process.
[0003] Most anomaly detection tools employ alerting mechanisms based on fixed rules and keyword matching. This method can only handle some known anomaly patterns, but it lacks flexibility, cannot cope with unknown new anomaly patterns, and has high maintenance costs. Summary of the Invention
[0004] This invention provides an anomaly information processing method, apparatus, electronic device, and storage medium to solve the problem that related technologies cannot cope with new anomaly patterns and have poor flexibility.
[0005] In a first aspect, the present invention provides an anomaly information processing method, the method comprising: Construct an anomaly knowledge database; the anomaly knowledge database includes various historical anomaly information and the corresponding problem categories and solutions for each historical anomaly information; When a real-time test case fails to execute, the current exception information of the failed test case is obtained. Based on the current exception information, the exception knowledge database is searched to identify multiple candidate historical exception information and to determine the confidence score of the candidate problem category corresponding to each candidate historical exception information. Based on the current anomaly information, multiple candidate historical anomaly information, and the confidence score of candidate question categories, contextual prompt words are generated; The contextual prompts are input into a pre-trained large language model to obtain the target solution corresponding to the failed test case, and exception handling is performed based on the target solution.
[0006] This invention enables the reuse of historical anomaly handling experience by constructing an anomaly knowledge database containing historical anomaly information, its problem categories, and solutions. By extracting current anomaly information from failed test cases and retrieving it from the anomaly knowledge database, the confidence scores of multiple candidate historical anomalies and their corresponding candidate problem categories are determined, improving the accuracy of root cause identification. The current anomaly information, multiple candidate historical anomalies, and the confidence scores of the candidate problem categories are fused to generate contextual prompts, providing reasoning basis for a large language model. Combined with historical anomaly handling experience, a target solution tailored to the current fault scenario is generated, thus adapting to new anomaly patterns. This highly flexible approach significantly improves the efficiency of anomaly troubleshooting.
[0007] In some optional implementations, the anomaly knowledge database includes a historical anomaly information vector library; constructing the anomaly knowledge database includes: The historical anomaly information is divided into several text segments, and the semantic density of each text segment is determined. Based on text semantic density, several text segments are divided into a first information region and a second information region to obtain several parent blocks; among them, the text semantic density of the first information region is higher than that of the second information region. Each parent block is segmented based on a preset boundary character set to obtain several child blocks corresponding to each parent block. Each child block is then vectorized to obtain an anomaly vector. A historical anomaly information vector library is constructed based on the anomaly vector of each sub-block and the parent block association information corresponding to each sub-block.
[0008] This invention divides several text segments into a high-density first information region and a low-density second information region based on the semantic density of the text, resulting in several parent blocks. Then, each parent block is further segmented using a preset boundary character set to obtain anomaly vectors. The association between child blocks and parent blocks is established, constructing a hierarchical historical anomaly information vector database. This allows for the accurate extraction of key features while preserving the complete context, improving the semantic representation quality of the anomaly vectors and providing a data foundation for subsequent large-scale language model retrieval.
[0009] In some optional implementations, based on text semantic density, several text segments are divided into a first information region and a second information region to obtain several parent blocks, including: Text segments whose semantic density reaches the preset semantic density are divided into the first information area, and text segments whose semantic density does not reach the preset semantic density are divided into the second information area. The text segment corresponding to the first information area is split, and / or multiple text segments corresponding to the second information area are merged to obtain several parent blocks.
[0010] This invention categorizes text segments based on their semantic density, splits the information-dense first information region to fully extract key features, and merges the information-sparse second information region to maintain contextual integrity. This avoids noise redundancy caused by fixed segmentation, generates logically coherent and feature-rich parent blocks, and ensures the quality of vector representation of abnormal log text.
[0011] In some optional implementations, an anomaly knowledge database is searched based on the current anomaly information to identify multiple candidate historical anomaly information, including: The current anomaly information is vectorized to obtain the query vector; Based on the query vector, the historical anomaly information vector database is retrieved to identify multiple similar sub-blocks that match the anomaly vector with the query vector; Based on the parent block association information corresponding to multiple similar sub-blocks, multiple candidate historical anomaly information is obtained.
[0012] This invention first performs precise retrieval of sub-blocks, and then maps the obtained similar sub-blocks to associated parent blocks. This not only captures local similarity features through sub-blocks to improve retrieval accuracy, but also obtains complete semantic context by associating with parent blocks, avoiding the semantic fragmentation problem caused by fine-grained matching, improving the recall quality of candidate historical anomaly information, and providing a data foundation for subsequent confidence scoring.
[0013] In some optional implementations, a confidence score for the candidate problem category corresponding to each candidate historical anomaly information is determined, including: Determine the similarity score between each candidate historical anomaly and the current anomaly, and determine the frequency of each candidate question category among all candidate question categories; The confidence score for each candidate question category is calculated by weighting and summing the similarity score, category frequency, and preset category score for each candidate question category.
[0014] This invention scores the confidence level of each candidate question category by weighted summation of similarity score, category frequency, and preset category score, avoiding the defect of single vector matching being affected by noise. By combining local semantic features, global statistical regularities, and expert prior knowledge, it improves the accuracy and robustness of root cause category determination, providing a reliable basis for the subsequent output of target solutions by large language models.
[0015] In some optional implementations, contextual cue words are generated based on the current anomaly information, multiple candidate historical anomaly information, and confidence scores of candidate problem categories, including: Based on the candidate question category with the highest confidence score, determine the target question category of the current anomaly information; Based on the current anomaly information, the target solution corresponding to the target problem category, and the historical processing results of multiple candidate historical anomaly information, contextual prompt words are generated.
[0016] This invention determines the target problem category by identifying the candidate problem category with the highest confidence score. It then uses the current anomaly information, the target solution corresponding to the target problem category, and the historical processing results of multiple candidate historical anomaly information to generate a complete and well-formatted contextual prompt word. This facilitates the invocation of a large language model and provides sufficient reasoning basis for the large language model.
[0017] In some optional implementations, the anomaly knowledge database further includes an anomaly mapping table; constructing the anomaly knowledge database also includes: Extracting anomalous features from historical anomaly information; An anomaly mapping table is constructed based on the problem categories and solutions corresponding to the anomaly characteristics.
[0018] This invention extracts abnormal features and constructs an anomaly mapping table between problem categories and solutions, transforming expert experience into a structured mapping table. This facilitates the shortening of the matching time for the problem category corresponding to the current abnormal information, improves retrieval efficiency, and provides a standard solution template for large language model inference, thus ensuring the accuracy and reliability of the final output target solution.
[0019] In some alternative implementations, the method further includes: Retrieve historical exception log files; By using preset regular expressions corresponding to different exception types, information is extracted from historical exception log files to obtain historical exception information.
[0020] This invention extracts historical anomaly log files of different anomaly types using preset regular expressions, filters out redundant noise in massive logs, obtains historical anomaly information, and provides reliable source data for the subsequent construction of an anomaly knowledge database, thereby improving the accuracy and robustness of anomaly diagnosis.
[0021] In some alternative implementations, the method further includes: Input the contextual prompts into a pre-trained large language model to obtain the fault reasons corresponding to the failed test cases; Analyze the test case information of all failed test cases and the cause of failure for each failed test case, and generate a test report.
[0022] This invention leverages the deep semantic reasoning capabilities of a large language model to analyze the causes of failures. Subsequently, it performs a comprehensive analysis of the causes of failures in all failed test cases, generating a structured test report. This significantly improves the efficiency of test result analysis and provides accurate data support for subsequent product quality assessment.
[0023] In a second aspect, the present invention provides an anomaly information processing apparatus, the apparatus comprising: The first processing module is used to build an anomaly knowledge database; the anomaly knowledge database includes various historical anomaly information and the corresponding problem categories and solutions for each type of historical anomaly information; The second processing module is used to obtain the current exception information of the failed test case when the real-time test case fails to execute, search the exception knowledge database based on the current exception information, determine multiple candidate historical exception information, and determine the confidence score of the candidate problem category corresponding to each candidate historical exception information. The third processing module is used to generate contextual prompts based on the confidence scores of the current anomaly information, multiple candidate historical anomaly information, and candidate problem categories. The fourth processing module is used to input contextual prompts into a pre-trained large language model to obtain the target solution corresponding to the failed test case, and to perform exception handling based on the target solution.
[0024] Thirdly, the present invention provides an electronic device, comprising: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the computer instructions to perform the abnormal information processing method of the first aspect or any corresponding embodiment described above.
[0025] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to execute the exception information processing method of the first aspect or any corresponding embodiment thereof.
[0026] The beneficial effects of this invention are as follows: By constructing an anomaly knowledge database containing historical anomaly information, its problem categories, and solutions, the reuse of historical anomaly handling experience is achieved. By extracting current anomaly information from failed test cases and retrieving it from the anomaly knowledge database, multiple candidate historical anomaly information and their corresponding candidate problem categories' confidence scores are determined, improving the accuracy of root cause identification. The current anomaly information, multiple candidate historical anomaly information, and the confidence scores of candidate problem categories are fused to generate contextual cue words, providing reasoning basis for the large language model. Combined with historical anomaly handling experience, target solutions tailored to the current failure scenario are generated, thus adapting to new anomaly patterns. This highly flexible approach significantly improves the efficiency of anomaly troubleshooting. Attached Figure Description
[0027] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0028] Figure 1 This is a hierarchical diagram of a diagnostic service system according to an embodiment of the present invention; Figure 2 This is a schematic flowchart of the first type of abnormal information processing method according to an embodiment of the present invention; Figure 3 This is a schematic diagram of a second type of abnormal information processing method according to an embodiment of the present invention; Figure 4 This is a flowchart illustrating the abnormal information extraction method according to an embodiment of the present invention; Figure 5 This is a structural block diagram of an anomaly information processing device according to an embodiment of the present invention; Figure 6 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0029] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0030] It is understood that before using the technical solutions disclosed in the various embodiments of the present invention, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in the present invention and their authorization should be obtained in accordance with relevant laws and regulations through appropriate means.
[0031] The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.
[0032] In today's world of increasingly complex software systems and the mainstream adoption of automated software testing, logs generated during test execution have become a core basis for testers to analyze problems. Test case execution logs contain crucial data such as program execution paths, system states, error messages, and performance metrics, making them an indispensable asset in a qualified software testing process.
[0033] However, the methods for troubleshooting related anomaly log issues face a series of serious challenges, which restrict the improvement of the efficiency and accuracy of problem analysis: (1) Information overload and noise interference: Modern large-scale systems can generate massive log entries per second. Filtering and linking relevant clues from massive amounts of data is time-consuming and laborious, and it is easy to miss key information.
[0034] (2) Inconsistent log format and lack of context: The generated log format is not consistent under different test software and test frameworks, and the necessary execution context is lacking, which increases the difficulty of understanding and parsing.
[0035] (3) Limitations of related rules and keyword matching: Related investigation tools generally adopt alarm mechanisms based on fixed rules and keyword matching. Although this method can handle some known patterns, it is not flexible enough to cope with unknown new abnormal patterns and has high maintenance costs.
[0036] (4) Low level of automation in root cause analysis: Most current log monitoring systems stop at the collection, storage, retrieval and visualization of logs. When an alarm is triggered, manual intervention is still required for in-depth analysis, logical reasoning and root cause localization. The analysis process from the discovery of anomalies to the location of the root cause still heavily relies on manual reasoning and has failed to form an effective closed-loop automation.
[0037] To address the aforementioned problems, this invention provides an anomaly information processing method. By constructing an anomaly knowledge database containing historical anomaly information, its problem categories, and solutions, the method enables the reuse of historical anomaly handling experience. By extracting current anomaly information from failed test cases and retrieving the anomaly knowledge database, the method determines multiple candidate historical anomaly information and their corresponding candidate problem categories with confidence scores, improving the accuracy of root cause identification. The method integrates current anomaly information, multiple candidate historical anomaly information, and the confidence scores of candidate problem categories to generate contextual prompts, providing reasoning basis for a large language model. Combined with historical anomaly handling experience, the method generates target solutions tailored to the current fault scenario, thus adapting to new anomaly patterns. This highly flexible approach significantly improves the efficiency of anomaly troubleshooting.
[0038] The exception information processing method in this embodiment aims to automatically analyze the execution exceptions thrown by the test framework (such as ECU-TEST, Pytest, etc.) during execution, and provide fault cause analysis and target solutions. This method can be executed by an agent program integrated in the test framework or by a standalone diagnostic service system.
[0039] According to embodiments of the present invention, a diagnostic service system is provided, such as... Figure 1 As shown, the diagnostic service system comprises an application layer, an intelligence layer, a data processing layer, and a data acquisition layer. The data acquisition layer includes keyword extraction strategies and a two-layer block-based strategy for constructing an anomaly knowledge database. The data processing layer includes similarity retrieval algorithms and confidence scoring algorithms for searching the anomaly knowledge database, identifying multiple candidate historical anomalies, and determining the confidence score for each candidate historical anomaly's corresponding candidate problem category. The intelligence layer deploys a large language model for fault cause analysis and generating target solutions. The application layer primarily provides system API call interfaces.
[0040] Specifically, the aforementioned diagnostic service system runs on one or more servers, and its hardware includes at least a processor, memory, and storage. The software environment includes: an operating system (such as Linux or Windows), a diagnostic program corresponding to the anomaly information processing method of this embodiment (which can be implemented using languages such as Python and Java), a local vector database (such as Milvus), and an embedded or remotely invoked large language model service interface. In this embodiment, the large language model can adopt the open-source benchmark log analysis model LLaMA, which can understand logs and identify anomalies with very little or no additional training data. In log parsing tasks, its accuracy and recall can reach 0.95 and 0.94, respectively.
[0041] According to an embodiment of the present invention, an embodiment of an abnormal information processing method is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0042] This embodiment provides an anomaly information processing method, which can be used for, for example Figure 1 The diagnostic service system shown Figure 2 This is a flowchart of an exception information processing method according to an embodiment of the present invention, such as... Figure 2 As shown, the process includes the following steps: Step S201: Construct an anomaly knowledge database; wherein, the anomaly knowledge database includes various historical anomaly information and the problem category and solution corresponding to each historical anomaly information.
[0043] Specifically, the system first acquires multiple historical anomaly log files generated during historical testing, and then cleans and extracts features from the contents of each log file. Based on the past troubleshooting experience of senior testers or experts, a corresponding problem category (e.g., network problem, environmental problem, code defect) and standard solution are configured for each type of historical anomaly information. Finally, the system establishes an associated storage of historical anomaly information, its corresponding problem category, and solutions, constructing an anomaly knowledge database.
[0044] Step S202: When a real-time test case fails to execute, obtain the current exception information of the failed test case, search the exception knowledge database based on the current exception information, determine multiple candidate historical exception information, and determine the confidence score of the candidate problem category corresponding to each candidate historical exception information.
[0045] Specifically, when a test case executed in real time fails, the system automatically collects and extracts the current exception information corresponding to the failed test case. Based on this current exception information, the system performs semantic or feature matching retrieval in the built exception knowledge database to filter out multiple candidate historical exception information that are similar in features to the current exception information.
[0046] Furthermore, by comprehensively considering the similarity between the current abnormal information and each candidate historical abnormal information, as well as the frequency of occurrence of each candidate question category in the search results, the confidence score corresponding to each candidate question category is calculated.
[0047] Step S203: Generate contextual prompts based on the current anomaly information, multiple candidate historical anomaly information, and the confidence scores of candidate problem categories.
[0048] Specifically, the extracted current anomaly information, the retrieved multiple candidate historical anomaly information, and the confidence scores calculated for each candidate problem category are integrated and filled into a preset prompt word framework to generate a contextual prompt word that includes a description of the current fault, reference to similar historical cases, and root cause probability assessment, providing sufficient reasoning basis for subsequent large language models.
[0049] Step S204: Input the context prompts into the pre-trained large language model to obtain the target solution corresponding to the failed test case, and perform exception handling based on the target solution.
[0050] Specifically, the generated contextual prompts are input into a pre-trained Large Language Model (LLM). Leveraging the powerful semantic understanding and logical reasoning capabilities of the LLM, a target solution adapted to the current failed test case is automatically generated based on the fault description, historical cases, and scoring results in the context. Subsequently, anomaly handling operations are performed based on this target solution, such as pushing or displaying the solution to test operations personnel for reference, or triggering a preset automated response process to handle the anomaly.
[0051] It should be noted that a large language model can be a model of Natural Language Processing (NLP), Machine Learning (ML), etc., which together possess powerful semantic understanding, knowledge association, logical reasoning, and content generation capabilities.
[0052] The anomaly information processing method provided in this embodiment achieves the reuse of historical anomaly handling experience by constructing an anomaly knowledge database containing historical anomaly information, its problem categories, and solutions. By extracting current anomaly information from failed test cases and retrieving the anomaly knowledge database, the confidence scores of multiple candidate historical anomalies and their corresponding candidate problem categories are determined, improving the accuracy of root cause determination. The current anomaly information, multiple candidate historical anomalies, and the confidence scores of the candidate problem categories are fused to generate contextual prompts, providing reasoning basis for the large language model. Combined with historical anomaly handling experience, a target solution tailored to the current fault scenario is generated, thus adapting to new anomaly patterns. This highly flexible approach significantly improves the efficiency of anomaly troubleshooting.
[0053] This embodiment provides an anomaly information processing method, which can be used for, for example Figure 1 The diagnostic service system shown Figure 3 This is a flowchart of an exception information processing method according to an embodiment of the present invention, such as... Figure 3 As shown, the process includes the following steps: Step S301: Construct an anomaly knowledge database; wherein, the anomaly knowledge database includes various historical anomaly information and the problem category and solution corresponding to each historical anomaly information.
[0054] In some optional implementations, historical anomaly log files are obtained. Preset regular expressions corresponding to different anomaly types are used to extract information from the historical anomaly log files to obtain historical anomaly information.
[0055] Specifically, the historical anomaly log files are cleaned and historical anomaly information is extracted to systematically extract clean and structured historical anomaly information text from the massive and messy historical anomaly log files, which can then be used as source data for the subsequent anomaly knowledge database.
[0056] Take, for example, the historical exception log file of Java Errors thrown in a real test scenario: [2026-02-13T02:32:26.129Z] java.lang.Error: Failed to execute test case: hudson.AbortException: script returned exit code 9009; ; [2026-02-13T02:32:26.129Z] at java.base / java.lang.Thread.run(Thread.java:829); [2026-02-13T02:32:26.157Z] [Pipeline] / / catchError; [2026-02-13T02:32:26.181Z] [Pipeline]catchError; The key historical exception information in the aforementioned historical exception log file is "java.lang.Error……script returned exit code 9009", and its historical exception information has a specific format.
[0057] Therefore, as Figure 4 As shown, this embodiment defines one or more high-precision preset regular expressions to capture historical exception information for these different exception types. Taking the exception type "Error" as an example, the following preset regular expression can be defined to capture historical exception information: (^[A-Za-z][A-Za-z0-9] \.) [A-Za-z][A-Za-z0-9] Error: ?(?=(\s+at\s+). :\d+\))?(?=\n|$)); Among them, (^[A-Za-z][A-Za-z0-9] \.) Used to match a string of dot-separated identifier prefixes, with [A-Za-z][A-Za-z0-9] in the middle. The first line matches the class name where the exception occurred, followed by Error, which is the keyword for the exception type, and finally... ?(?=(\s+at\s+). `:\d+\))?(?=\n|$))` is used to match the details of the exception and the location where it was thrown. This default regular expression is designed to match the complete exception description from the beginning of the Error until the beginning of the stack trace (or the end of the line).
[0058] For example, if the exception type is Exception, a corresponding preset regular expression can also be defined to obtain the relevant historical exception information: (^[A-Za-z][A-Za-z0-9] \.) [A-Za-z][A-Za-z0-9] Exception: ?(?=(\s+at\s+). :\d+\))?(?=\n|$)).
[0059] In this embodiment, several similar preset regular expressions can be defined for different exception types (such as subclasses of Error, subclasses of Exception, Throwable, Failure, Failed, etc.) to verify and extract historical exception log files. Specifically, the system iterates through all historical exception log files, applying the defined preset regular expressions to match each line or segment of text. All successfully matched text segments are extracted and a fixed length of log information is saved simultaneously. This log information includes environmental information at the time of the exception (such as timestamps, test case IDs, etc.), thus forming blocks of historical exception information data. Non-matching regular logs (such as "INFO level information") are filtered out.
[0060] This invention extracts historical anomaly log files of different anomaly types using preset regular expressions, filters out redundant noise in massive logs, obtains historical anomaly information, and provides reliable source data for the subsequent construction of an anomaly knowledge database, thereby improving the accuracy and robustness of anomaly diagnosis.
[0061] Specifically, step S301 includes: Step S3011: Extract abnormal features from historical abnormal information; construct an abnormal mapping table based on the problem categories and solutions corresponding to the abnormal features.
[0062] Specifically, the historical anomaly information extracted in the previous step is combined with human experience to construct a searchable local anomaly knowledge database. This database contains two core components: an anomaly mapping table and a historical anomaly information vector library. The anomaly mapping table records the mapping relationships between historical anomaly information, problem categories, and solutions. The anomaly mapping table can be manually built and maintained by framework developers, senior testers, or operations engineers based on historical troubleshooting experience.
[0063] In this embodiment, each record in the exception mapping table contains three fields: exception characteristics, problem category, and solution. The exception characteristics are key words or hash values extracted from historical exception information (e.g., NullPointerException, ConnectionTimeout, StatusCode: 500, etc.). The problem category is the most likely fundamental problem category corresponding to the exception characteristics. For example, for historical exception information containing the NullPointerException characteristic, its possible problem category can be initially determined to be "null pointer reference," while for historical exception information containing the ConnectionTimeout characteristic, it indicates a connection timeout, and the possible problem category is "network connection timeout." The solution is the suggested handling steps for the corresponding problem category (e.g., checking if the object has been initialized, checking network configuration and firewall, and checking server logs to locate the specific error).
[0064] In some embodiments, the abnormal characteristics, their corresponding problem categories, and solutions are shown in Table 1 below.
[0065] Table 1. Anomaly Mapping Table
[0066] This invention extracts abnormal features and constructs an anomaly mapping table between problem categories and solutions, transforming expert experience into a structured mapping table. This facilitates the shortening of the matching time for the problem category corresponding to the current abnormal information, improves retrieval efficiency, and provides a standard solution template for large language model inference, thus ensuring the accuracy and reliability of the final output target solution.
[0067] Step S3012: Divide the historical anomaly information into several text segments and determine the semantic density of each text segment.
[0068] Specifically, for an unprocessed historical anomaly information (such as input text), the historical anomaly information is first initially divided into several text segments according to fixed paragraphs or fixed window values, and the text semantic density of each text segment is calculated.
[0069] In some embodiments, the semantic density of text is calculated using the method of calculating the information entropy of a text segment:
[0070] Where D represents information entropy. Let represent the frequency of the i-th word in the text segment, and M represent the number of words in the text segment. The text semantic density is obtained by normalizing the calculated information entropy.
[0071] Step S3013: Based on the text semantic density, several text segments are divided into a first information area and a second information area to obtain several parent blocks; wherein, the text semantic density of the first information area is higher than that of the second information area.
[0072] In some optional implementations, step S3013 above includes: Step a1: Divide the text segments whose semantic density reaches the preset semantic density into the first information area, and divide the text segments whose semantic density does not reach the preset semantic density into the second information area.
[0073] Specifically, based on the semantic density of the text, the text segment is divided into a high-density first information region and a low-density second information region. The preset semantic density used for the division can be the expected semantic density of the text or a set threshold. If the semantic density of the text reaches the preset semantic density, the corresponding text segment is divided into the first information region; otherwise, the corresponding text segment is divided into the second information region.
[0074] Step a2: Split the text segment corresponding to the first information area, and / or merge multiple text segments corresponding to the second information area to obtain several parent blocks.
[0075] Specifically, for the low-density second information region, multiple text segments can be merged into a single large parent block. During merging, a sliding window stability test is used. For the multiple text segments corresponding to the second information region, starting from the initial window position, the window slides backward. Each slide calculates the variance of the semantic density of the multiple text segments within the window. If the variance exceeds a set threshold, it indicates instability, and the multiple text segments within the window (excluding the last one) can be merged into a single parent block. The window then moves to the current text segment and continues execution. For the high-density first information region, a smaller window is needed to further segment its corresponding text segments. Through these steps, preliminary segmentation of the text segments is achieved, resulting in several parent blocks.
[0076] This invention categorizes text segments based on their semantic density, splits the information-dense first information region to fully extract key features, and merges the information-sparse second information region to maintain contextual integrity. This avoids noise redundancy caused by fixed segmentation, generates logically coherent and feature-rich parent blocks, and ensures the quality of vector representation of abnormal log text.
[0077] Step S3014: Segment each parent block based on a preset boundary character set to obtain several child blocks corresponding to each parent block, and vectorize each child block to obtain an anomaly vector.
[0078] Specifically, after obtaining the initially segmented parent block, the boundary block method is used to divide the parent block into smaller sub-blocks, ensuring that words or sentences are not cut off during the segmentation process. Then, a text embedding model, such as the lightweight BERT model sentence-transformers / all-MiniLM-L6-v2, which is lightweight, efficient, and has balanced performance, is used to convert each sub-block into a high-dimensional (e.g., 384-dimensional vector) anomaly vector, ultimately obtaining the segmented sub-block vector group.
[0079] In some embodiments, to avoid word or sentence segmentation, a boundary segmentation method is adopted, using a preset boundary character set to divide the parent block. The preset boundary character set can include: "\n\n" (paragraph boundary), "。\n" (Chinese sentence + line break), ".\n" (English sentence + line break), "。" (Chinese period), "." (English period), ";" (semicolon), "," (comma), and other boundary characters.
[0080] Step S3015: Construct a historical anomaly information vector library based on the anomaly vector of each sub-block and the parent block association information corresponding to each sub-block.
[0081] Specifically, the parent block association information can include the parent block to which the child block belongs, the associated problem category, and the solution. The anomaly vector of each child block, along with its associated parent block, problem category, and standard solution, are stored to construct a historical anomaly information vector library.
[0082] In this embodiment of the invention, when extracting the anomaly vector of historical anomaly information, a suitable segmentation method is needed to ensure that the segmented data blocks contain sufficient context without exceeding the processing limitations of large language models. From an information theory perspective, an ideal segmentation method should maximize internal mutual information and minimize external mutual information. Therefore, this embodiment adopts a two-layer segmentation strategy, dividing the historical anomaly information into multiple parent blocks, and then further segmenting each parent block to generate multiple child blocks, forming a three-layer tree structure.
[0083] Specifically, for larger parent blocks, they need to reflect an overall theme, such as paragraphs with a consistent theme in an article, possessing the same semantics. This embodiment uses text semantic density to assist in the segmentation of parent blocks. For texts with concise meanings and low text semantic density, they can be segmented into large blocks. However, for complex texts with high text semantic density, they need to be segmented into more detailed smaller blocks.
[0084] This invention divides several text segments into a high-density first information region and a low-density second information region based on the semantic density of the text, resulting in several parent blocks. Then, each parent block is further segmented using a preset boundary character set to obtain anomaly vectors. The association between child blocks and parent blocks is established, constructing a hierarchical historical anomaly information vector database. This allows for the accurate extraction of key features while preserving the complete context, improving the semantic representation quality of the anomaly vectors and providing a data foundation for subsequent large-scale language model retrieval.
[0085] Step S302: When a real-time test case fails to execute, obtain the current exception information of the failed test case, search the exception knowledge database based on the current exception information, determine multiple candidate historical exception information, and determine the confidence score of the candidate problem category corresponding to each candidate historical exception information.
[0086] Specifically, step S302 includes: Step S3021: When a real-time test case fails to execute, obtain the current exception information of the failed test case.
[0087] Specifically, when a new failed test case occurs during real-time testing, the system will enter the diagnostic process. First, it will extract the current exception information from the exception log file of the failed test case.
[0088] Step S3022: Vectorize the current anomaly information to obtain the query vector.
[0089] Specifically, the extracted current anomaly information is converted into query vectors using the same text embedding model, sentence-transformers / all-MiniLM-L6-v2, as used when building the historical anomaly information vector library.
[0090] Step S3023: Based on the query vector, search the historical anomaly information vector database to determine multiple similar sub-blocks that match the anomaly vector with the query vector.
[0091] Specifically, a similarity search is performed in the historical anomaly information vector database. First, a similarity search needs to be performed in the sub-block vector space. Cosine similarity can be used to calculate the cosine similarity between the anomaly vector and the query vector, and then sort them to obtain N (e.g., 5, which can be adjusted according to the retrieval accuracy requirements) similar sub-blocks that match the query vector.
[0092] Step S3024: Based on the parent block association information corresponding to multiple similar sub-blocks, multiple candidate historical anomaly information is obtained.
[0093] Specifically, the retrieval results of similar sub-blocks are mapped to their corresponding parent blocks, deduplicated, and sorted. The system then identifies M (e.g., 5, adjustable based on retrieval precision) parent block data pieces that are most similar to the query vector, recording them as multiple candidate historical anomaly messages. Each returned candidate historical anomaly message carries its associated problem category and solution. The system also merges and statistically analyzes these returned candidate problem categories.
[0094] This invention first performs precise retrieval of sub-blocks, and then maps the obtained similar sub-blocks to associated parent blocks. This not only captures local similarity features through sub-blocks to improve retrieval accuracy, but also obtains complete semantic context by associating with parent blocks, avoiding the semantic fragmentation problem caused by fine-grained matching, improving the recall quality of candidate historical anomaly information, and providing a data foundation for subsequent confidence scoring.
[0095] Step S3025: Determine the similarity score between each candidate historical anomaly information and the current anomaly information, and determine the frequency of each candidate question category among all candidate question categories.
[0096] Specifically, the similarity score (comparability) is calculated using the vector similarity between candidate historical anomaly information and current anomaly information, and the calculation formula is as follows:
[0097] in, This represents a candidate historical anomaly information vector. This represents the current anomaly information vector. This represents the value of the i-th dimension of the candidate historical anomaly information vector. This represents the value of the current anomaly information vector in the i-th dimension, where n is the vector dimension.
[0098] Specifically, category frequency The frequency of the same candidate question category appearing in the returned results is used for calculation, as follows:
[0099] in, The number of times candidate question category C appears in the returned results. This represents the total number of all candidate question categories in the returned results.
[0100] Step S3026: Calculate the confidence score for each candidate question category by weighted summation of the similarity score, category frequency, and preset category score corresponding to each candidate question category.
[0101] Specifically, a confidence score is calculated for each candidate question category. This confidence score is based on a combination of factors: similarity score, category frequency, and predefined category scores. Ultimately, each candidate question category receives a comprehensive confidence score. :
[0102] in, The weights corresponding to the similarity scores. The weight corresponding to the category frequency. Rate the preset categories Corresponding weights. Preset category scores. This is a fixed score generated by external expert review.
[0103] In some embodiments, when multiple candidate question categories are retrieved, the system first groups and merges the retrieval results according to the candidate question categories. For multiple candidate historical anomaly information contained under the same candidate question category, the system selects the maximum value of all similarity scores under that candidate question category as the aggregated similarity score of that candidate question category. Subsequently, the aggregated similarity score, category frequency, and preset category score are linearly combined to obtain the final confidence score of the candidate question category. The system is configured to save the top K candidate question categories with the highest confidence scores and their corresponding solutions.
[0104] This invention scores the confidence level of each candidate question category by weighted summation of similarity score, category frequency, and preset category score, avoiding the defect of single vector matching being affected by noise. By combining local semantic features, global statistical regularities, and expert prior knowledge, it improves the accuracy and robustness of root cause category determination, providing a reliable basis for the subsequent output of target solutions by large language models.
[0105] Step S303: Generate contextual prompts based on the current anomaly information, multiple candidate historical anomaly information, and the confidence scores of candidate problem categories.
[0106] Specifically, the target problem category for the current anomaly is determined based on the candidate problem category with the highest confidence score. Then, contextual prompts are generated based on the current anomaly, the target solution corresponding to the target problem category, and the historical processing results of multiple candidate historical anomalies.
[0107] In some embodiments, the candidate problem category with the highest confidence score is selected as the target problem category. Based on this target anomaly category, the corresponding solution text is obtained from the anomaly mapping table as the core solution template.
[0108] For example, the following information can be assembled into a structured text block, namely contextual cue words: System role setting: "You are a senior software testing and diagnostic expert"; Current fault description: Current exception information extracted from failed test cases; Historical reference information: Several candidate historical anomalies most similar to the current anomaly information and their historical processing results; Core solution framework: Solutions obtained from the anomaly mapping table that correspond to the target problem category; The task instruction is: "Based on the above information, first analyze the possible root causes of this exception. Then, please provide specific, actionable steps and suggestions for resolution. Format requirements: First '## Cause Analysis', then '## Resolution Steps'."
[0109] This embodiment determines the target problem category by selecting the candidate problem category with the highest confidence score, and generates a complete and well-formatted contextual prompt word by using the current anomaly information, the target solution corresponding to the target problem category, and the historical processing results of multiple candidate historical anomaly information. This facilitates the invocation of the large language model and provides sufficient reasoning basis for the large language model.
[0110] Step S304: Input the context prompts into the pre-trained large language model to obtain the target solution corresponding to the failed test case, and perform exception handling based on the target solution.
[0111] Specifically, the formatted and encapsulated contextual cue text is passed to the pre-trained large language model via API calls. Leveraging its powerful natural language understanding and generation capabilities, the large language model combines the received contextual cue text with historical cases, solution templates, and current fault details to generate a structured fault cause and customized target solution tailored to the specific scenario.
[0112] For example, the output of a large language model is shown below, which will be presented to testers or automated operations and maintenance platforms: ##Cause Analysis: Based on the provided error message "DatabaseConnectionFailure: Could not connect to primary database at 10.0.0.1:3306", and considering similar historical cases, this error is highly likely (92% confidence) to be caused by one of the following reasons: 1. Database service is not started.
[0113] 2. The network firewall rules are blocking access to port 3306.
[0114] 3. The IP address or port number in the connection string is configured incorrectly.
[0115] ##Solution Steps: 1. Verify database status Log in to host 10.0.0.1 and execute the command `systemctl status mysql` to check if the database service is running.
[0116] 2. Check network connectivity Run `telnet 10.0.0.1 3306` or `nc-zv 10.0.0.1 3306` from the test execution host.
[0117] 3. Review configuration Check the database connection string in the test code or configuration file to confirm that the host, port, username, and password are correct.
[0118] 4. View database logs If the above steps fail to locate the problem, check the database server's error log for more detailed information.
[0119] In some optional implementations, contextual prompts are input into a pre-trained large language model to obtain the failure reasons corresponding to the failed test cases. The test case information and failure reasons for each failed test case are analyzed to generate a test report.
[0120] Specifically, based on the target problem category with the highest confidence score, the system calls the API interface provided by the automated testing platform. The system constructs an API request, sending the test case ID and diagnostic conclusions (including the cause of failure and the target solution) of the currently failed test case as parameters to the automated testing platform. Upon receiving the API request, the automated testing platform automatically adds a failure cause marker to the corresponding test case execution record. This enables subsequent test reports to be aggregated and analyzed according to failure causes; for example, quickly determining how many failures in this round of testing are product defects, how many are environmental issues, etc., generating a test report and greatly improving the efficiency of test result analysis.
[0121] This invention leverages the deep semantic reasoning capabilities of a large language model to analyze the causes of failures. Subsequently, it performs a comprehensive analysis of the causes of failures in all failed test cases, generating a structured test report. This significantly improves the efficiency of test result analysis and provides accurate data support for subsequent product quality assessment.
[0122] The anomaly information processing method provided in this embodiment combines a local anomaly knowledge database constructed from historical experience, Retrieval-Augmented Generation (RAG), and the reasoning generation capabilities of a large language model to achieve a complete closed loop for test anomalies, from automated diagnosis and solution generation to subsequent processing. This not only lowers the threshold for investigation and improves efficiency, but also enriches test data assets through automated tagging, providing data support for continuous optimization of the test process.
[0123] This embodiment also provides an anomaly information processing device for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0124] This embodiment provides an anomaly information processing device, such as... Figure 5 As shown, it includes: The first processing module 501 is used to construct an anomaly knowledge database; wherein, the anomaly knowledge database includes various historical anomaly information and the problem category and solution corresponding to each historical anomaly information; The second processing module 502 is used to obtain the current exception information of the failed test case when the real-time test case fails to execute, search the exception knowledge database based on the current exception information, determine multiple candidate historical exception information, and determine the confidence score of the candidate problem category corresponding to each candidate historical exception information. The third processing module 503 is used to generate contextual prompts based on the confidence scores of the current anomaly information, multiple candidate historical anomaly information and candidate problem categories. The fourth processing module 504 is used to input context prompts into a pre-trained large language model to obtain the target solution corresponding to the failed test case, and to perform exception handling based on the target solution.
[0125] In some optional implementations, the first processing module 501 is further configured to: Retrieve historical exception log files; By using preset regular expressions corresponding to different exception types, information is extracted from historical exception log files to obtain historical exception information.
[0126] In some optional implementations, the anomaly knowledge database includes a historical anomaly information vector library; the first processing module 501 is further configured to: The historical anomaly information is divided into several text segments, and the semantic density of each text segment is determined. Based on text semantic density, several text segments are divided into a first information region and a second information region to obtain several parent blocks; among them, the text semantic density of the first information region is higher than that of the second information region. Each parent block is segmented based on a preset boundary character set to obtain several child blocks corresponding to each parent block. Each child block is then vectorized to obtain an anomaly vector. A historical anomaly information vector library is constructed based on the anomaly vector of each sub-block and the parent block association information corresponding to each sub-block.
[0127] In some optional implementations, the anomaly knowledge database further includes an anomaly mapping table; the first processing module 501 is also used for: Extracting anomalous features from historical anomaly information; An anomaly mapping table is constructed based on the problem categories and solutions corresponding to the anomaly characteristics.
[0128] In some optional implementations, the first processing module 501 is further configured to: Text segments whose semantic density reaches the preset semantic density are divided into the first information area, and text segments whose semantic density does not reach the preset semantic density are divided into the second information area. The text segment corresponding to the first information area is split, and / or multiple text segments corresponding to the second information area are merged to obtain several parent blocks.
[0129] In some optional implementations, the second processing module 502 is further configured to: The current anomaly information is vectorized to obtain the query vector; Based on the query vector, the historical anomaly information vector database is retrieved to identify multiple similar sub-blocks that match the anomaly vector with the query vector; Based on the parent block association information corresponding to multiple similar sub-blocks, multiple candidate historical anomaly information is obtained.
[0130] In some optional implementations, the second processing module 502 is further configured to: Determine the similarity score between each candidate historical anomaly and the current anomaly, and determine the frequency of each candidate question category among all candidate question categories; The confidence score for each candidate question category is calculated by weighting and summing the similarity score, category frequency, and preset category score for each candidate question category.
[0131] In some optional implementations, the third processing module 503 is further configured to: Based on the candidate question category with the highest confidence score, determine the target question category of the current anomaly information; Based on the current anomaly information, the target solution corresponding to the target problem category, and the historical processing results of multiple candidate historical anomaly information, contextual prompt words are generated.
[0132] In some optional implementations, the fourth processing module 504 is further configured to: Input the contextual prompts into a pre-trained large language model to obtain the fault reasons corresponding to the failed test cases; Analyze the test case information of all failed test cases and the cause of failure for each failed test case, and generate a test report.
[0133] The exception information processing apparatus provided in this embodiment of the invention can execute the exception information processing method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the method execution. Further functional descriptions of the various modules and units described above are the same as in the corresponding embodiments described above, and will not be repeated here.
[0134] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention.
[0135] The following is a detailed reference. Figure 6This diagram illustrates a suitable structural design for implementing an electronic device according to embodiments of the present invention. The electronic device may include a processor (e.g., a central processing unit, graphics processor, etc.) 601, which can perform various appropriate actions and processes based on a program stored in read-only memory (ROM) 602 or a program loaded from memory 608 into random access memory (RAM) 603. RAM 603 also stores various programs and data required for the operation of the electronic device. The processor 601, ROM 602, and RAM 603 are interconnected via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0136] Typically, the following devices can be connected to I / O interface 605: input devices 606 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 607 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; memory devices 608 including, for example, magnetic tapes, hard disks, etc.; and communication devices 609. Communication device 609 allows electronic devices to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 6 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown, and more or fewer devices may be implemented or have instead.
[0137] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 609, or installed from a memory 608, or installed from a ROM 602. When the computer program is executed by the processor 601, it performs the functions defined in the exception information handling method of the embodiments of the present invention.
[0138] Figure 6 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments of the present invention.
[0139] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code. When the software or computer code is accessed and executed by the computer, processor, or hardware, the exception information processing method shown in the above embodiments is implemented.
[0140] A portion of this invention can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to the invention through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.
[0141] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and all such modifications and variations fall within the scope defined by the appended claims.
Claims
1. An abnormal information processing method, characterized in that, The method includes: Construct an anomaly knowledge database; wherein, the anomaly knowledge database includes various historical anomaly information and the corresponding problem category and solution for each historical anomaly information; When a real-time test case fails to execute, the current exception information of the failed test case is obtained, and the exception knowledge database is searched based on the current exception information to determine multiple candidate historical exception information, and the confidence score of the candidate problem category corresponding to each candidate historical exception information is determined. Based on the current anomaly information, the multiple candidate historical anomaly information, and the confidence score of the candidate problem category, contextual prompt words are generated; The contextual prompts are input into a pre-trained large language model to obtain the target solution corresponding to the failed test case, and exception handling is performed based on the target solution.
2. The abnormal information processing method according to claim 1, characterized in that, The anomaly knowledge database includes a historical anomaly information vector library; the construction of the anomaly knowledge database includes: The historical anomaly information is divided into several text segments, and the semantic density of each text segment is determined. Based on the text semantic density, several text segments are divided into a first information region and a second information region to obtain several parent blocks; wherein, the text semantic density of the first information region is higher than that of the second information region; Each parent block is segmented based on a preset boundary character set to obtain several child blocks corresponding to each parent block. Each child block is then vectorized to obtain an anomaly vector. A historical anomaly information vector library is constructed based on the anomaly vector of each sub-block and the parent block association information corresponding to each sub-block.
3. The abnormal information processing method according to claim 2, characterized in that, Based on the text semantic density, several text segments are divided into a first information region and a second information region to obtain several parent blocks, including: Text segments whose semantic density reaches the preset semantic density are divided into the first information area, and text segments whose semantic density does not reach the preset semantic density are divided into the second information area. The text segment corresponding to the first information area is split, and / or multiple text segments corresponding to the second information area are merged to obtain several parent blocks.
4. The abnormal information processing method according to claim 2, characterized in that, The step of searching the anomaly knowledge database based on the current anomaly information to determine multiple candidate historical anomaly information includes: The current anomaly information is vectorized to obtain a query vector; Based on the query vector, the historical anomaly information vector database is searched to determine multiple similar sub-blocks that match the anomaly vector with the query vector; Based on the parent block association information corresponding to the multiple similar sub-blocks, multiple candidate historical anomaly information is obtained.
5. The abnormal information processing method according to claim 1, characterized in that, The confidence score for determining the candidate problem category corresponding to each candidate historical anomaly information includes: Determine the similarity score between each candidate historical anomaly and the current anomaly, and determine the frequency of each candidate question category among all candidate question categories; The confidence score for each candidate question category is calculated by weighting and summing the similarity score, category frequency, and preset category score for each candidate question category.
6. The abnormal information processing method according to claim 1, characterized in that, The generation of contextual prompts based on the current anomaly information, the multiple candidate historical anomaly information, and the confidence score of the candidate question category includes: Based on the candidate question category with the highest confidence score, determine the target question category of the current anomaly information; Based on the current anomaly information, the target solution corresponding to the target problem category, and the historical processing results of the multiple candidate historical anomaly information, a contextual prompt word is generated.
7. The abnormal information processing method according to claim 2, characterized in that, The anomaly knowledge database also includes an anomaly mapping table; the construction of the anomaly knowledge database also includes: Extracting anomalous features from historical anomaly information; An anomaly mapping table is constructed based on the problem categories and solutions corresponding to the aforementioned anomaly characteristics.
8. The abnormal information processing method according to any one of claims 1-7, characterized in that, The method further includes: Retrieve historical exception log files; By using preset regular expressions corresponding to different anomaly types, information is extracted from the historical anomaly log file to obtain historical anomaly information.
9. The abnormal information processing method according to any one of claims 1-7, characterized in that, The method further includes: The contextual prompts are input into a pre-trained large language model to obtain the fault reasons corresponding to the failed test cases. Analyze the test case information of all failed test cases and the cause of failure for each failed test case, and generate a test report.
10. An anomaly information processing device, characterized in that, The device includes: The first processing module is used to construct an anomaly knowledge database; wherein, the anomaly knowledge database includes various historical anomaly information and the problem category and solution corresponding to each historical anomaly information; The second processing module is used to obtain the current exception information of the failed test case when the real-time test case fails to execute, search the exception knowledge database based on the current exception information, determine multiple candidate historical exception information, and determine the confidence score of the candidate problem category corresponding to each candidate historical exception information. The third processing module is used to generate contextual prompt words based on the current anomaly information, the multiple candidate historical anomaly information and the confidence score of the candidate problem category; The fourth processing module is used to input the context prompts into a pre-trained large language model to obtain the target solution corresponding to the failed test case, and to perform exception handling based on the target solution.
11. An electronic device, characterized in that, include: A memory and a processor are communicatively connected, the memory stores computer instructions, and the processor executes the abnormal information processing method according to any one of claims 1 to 9 by executing the computer instructions.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to execute the abnormal information processing method according to any one of claims 1 to 9.