Program error information processing method, program product, equipment and medium
By extracting key information from the program log file and building a knowledge graph, combining language model and large model matching solutions, the problem of traditional manual processing is solved, and efficient and automated processing of program error information is achieved.
Patent Information
- Application Number
- CN202510438874.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-09
- Publication Date
- 2025-08-01
AI Technical Summary
Traditional error information positioning and solutions rely on manual troubleshooting, are inefficient and difficult to cover all possible error situations, resulting in insufficient automation.
By locate error information and context content from the log files generated when the program is run, build a knowledge graph, extract key information, and use language models and large-model matching solutions to achieve automated processing.
It improves the degree of automation of error information processing, quickly correlates the causes of errors and provides accurate solutions, reduces human intervention, and improves processing efficiency and accuracy.
Smart Images

Figure CN120407376A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and more particularly, to a method for processing program error information, a program product, a device, and a medium. Background Art
[0002] Currently, with the rapid development of information technology, various software programs play an increasingly important role in daily life and work. However, due to the complexity and diversity of software programs, error messages frequently occur, causing great trouble to users. Traditional methods for locating and solving error messages usually rely on manual troubleshooting and experience summary, with low efficiency and difficulty in covering all possible error situations. Therefore, improving the automation degree of processing error messages has become an urgent technical problem in this field. Summary of the Invention
[0003] The purpose of the embodiments of this application is to provide a method for processing program error information, a program product, a device, and a medium, so as to achieve the technical effect of improving the automation degree of processing error messages.
[0004] The first aspect of the embodiments of this application provides a method for processing program error information, and the method includes:
[0005] Locate error information and context content from the log file generated during program operation, and extract key information of the error information from the context content; wherein, the error information indicates that an error occurs during program operation; the key information includes one or more of error type, error frequency, and error occurrence environment;
[0006] Construct a knowledge graph including the key information; the knowledge graph is used to indicate the cause of the error information;
[0007] Extract a first semantic feature from the knowledge graph, and extract a second semantic feature from each solution in a preset solution library;
[0008] Based on the similarity between the first semantic feature and each second semantic feature, match a first solution for solving the error information from multiple solutions.
[0009] In the above implementation process, by comprehensively collecting the log files generated during program operation, locating error information and context content from the log files, extracting key information from the context content, and using the key information to construct a knowledge graph for each error information in real time, the cause leading to the error can be quickly associated. Subsequently, the key information and the cause of the error are used to match the first solution in real time, which can quickly provide an effective solution for the user, making the error information no longer rely on manual processing and improving the automation degree of error information processing.
[0010] Further, extracting the key information of the error information from the context content includes:
[0011] Inputting the context content into a pre-trained language model to enable the language model to perform word segmentation on the context content, perform word embedding processing on each word segment, and input the obtained word vectors of each word into a multi-layer Transformer layer to obtain the key information output by the last Transformer layer.
[0012] In the above implementation process, using the language model to extract key information based on the semantic information of the context content takes advantage of the powerful information extraction ability of the large AI model to comprehensively mine the key information in the error information, providing richer data support for subsequent analysis and solution.
[0013] Further, the knowledge graph includes multiple layers of entities, and the multiple layers of entities include a first layer of entities and a second layer of entities; wherein, the first layer of entities is used to indicate the direct cause of the error information, and the second layer of entities is used to indicate the root cause of the error information.
[0014] In the above implementation process, by hierarchically organizing the error information, the deeper-level factors causing the error information can be effectively and quickly associated. Recording the direct cause and the root cause of the error information in the knowledge graph enables a more accurate solution to be matched from the deeper cause dimension during subsequent solution matching, improving the matching accuracy.
[0015] Further, the knowledge graph is also used to indicate the solution strategy for the error information; the first solution matches the solution strategy.
[0016] In the above implementation process, by adding the solution strategy of the error information when constructing the knowledge graph of the error information, it is beneficial to improve the matching accuracy of the first solution and the solution effect of the error information.
[0017] Further, matching a first solution for solving the error message from multiple solutions based on the similarity between the first semantic feature and each second semantic feature includes:
[0018] When it is determined that the similarity between the first semantic feature and the target second semantic feature is higher than a preset similarity threshold, determine the solution corresponding to the target second semantic feature as the first solution.
[0019] In the above implementation process, by setting the similarity threshold and determining the first solution when the similarity is higher than the similarity threshold, the credibility and accuracy of the first solution can be improved.
[0020] Further, the method further includes:
[0021] When it is determined that the similarity between the first semantic feature and each second semantic feature is less than the similarity threshold, input the error message and the knowledge graph into a trained solution large model to obtain an output second solution.
[0022] In the above implementation process, the intelligent analysis ability of the large model is utilized to provide a second solution for the error message, ensuring that an effective solution can be provided for the error message in different situations.
[0023] Further, the method further includes:
[0024] Obtain a verification result for the second solution;
[0025] If the verification result indicates that the error message has been resolved, add the second solution to the solution library.
[0026] In the above implementation process, continuously incorporating the actually verified effective solutions into the solution library realizes the continuous optimization and improvement of the solution library, enabling it to better handle various error situations and enhancing the adaptability and problem-solving ability of the system.
[0027] A second aspect of the embodiments of the present application provides a computer program product, the computer program product includes a computer program, and when the computer program is executed by a processor, it implements the method according to any one of the first aspect.
[0028] A third aspect of the embodiments of the present application provides an electronic device, the electronic device includes:
[0029] A processor;
[0030] A memory for storing instructions executable by the processor;
[0031] Wherein, when the processor invokes the executable instructions, the operations of any of the methods in the first aspect are implemented.
[0032] A fourth aspect of the embodiments of the present application provides a computer-readable storage medium, on which computer instructions are stored. When the computer instructions are executed by a processor, the steps of any of the methods in the first aspect are implemented. Description of the Drawings
[0033] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required to be used in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.
[0034] Figure 1 It is a schematic flowchart of a method for processing program error information provided by an embodiment of the present application;
[0035] Figure 2 It is a schematic flowchart of another method for processing program error information provided by an embodiment of the present application;
[0036] Figure 3 It is a hardware structure diagram of an electronic device provided by an embodiment of the present application. Detailed Embodiments
[0037] The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
[0038] It should be noted that similar reference numerals and letters denote similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of the present application, the terms "first", "second", etc. are only used for differential description and cannot be understood as indicating or implying relative importance.
[0039] In order to improve the automation degree of processing error information, the present application provides a method for processing program error information, including steps 110-step 140 as Figure 1 shown.
[0040] Step 110: Locate the error information and context content from the log file generated during program operation, and extract the key information of the error information from the context content; wherein, the error information indicates that an error occurs during program operation; the key information includes one or more of error type, error frequency, and error occurrence environment.
[0041] Exemplarily, the program refers to a software program installed and running in an electronic device. The electronic device includes, but is not limited to, network intermediate devices, servers, user terminals, etc. Among them, the user terminal may include mobile devices, tablet computers, laptop computers, or built-in devices in motor vehicles, etc., or any combination thereof.
[0042] Log files are generated when the program runs. These log files cover various data information such as the system running status, errors, etc. Taking a website server as an example, the log files generated when the software program of the website server runs include, but are not limited to, access logs and application logs, etc. Among them, the occurrence of error information in the log file represents an error occurred during the program running.
[0043] After obtaining the log file generated when the program runs, the log file can be parsed, the error information can be located in the log file, and the position of the error information in the log file can be marked. Among them, log files in different formats record error information at different positions in the file. Therefore, as an example, the error information can be located based on the log file format. As another example, the log file can be parsed based on parsing rules such as keywords, so as to accurately locate the error information. For example, if there is an "ERROR" keyword in the log file, it is determined that the content corresponding to the keyword is the error information.
[0044] Subsequently, the context content including the error information is further located in the log file. The context content is used to analyze the cause of the error information. For example, if an error information appears in a database query function, then the context content of the error information will include the SQL statement passed to the query function, the variable values in the query conditions, the database connection parameters, etc. These context contents help to analyze whether the error occurred due to parameter errors when the function was called.
[0045] Optionally, after obtaining the error information, or after obtaining the error information and the context content, the error information, or the error information and the context content can be cleaned and standardized to remove noise information such as special characters, irrelevant log format descriptions, etc. For example, the time information recorded in different formats can be unified into a standard time format to ensure the consistency and accuracy of the data.
[0046] Subsequently, the key information of the error message can be extracted from the context content including the error message. The key information includes, but is not limited to, error type, error frequency, error occurrence environment, etc. The error type includes, for example, but is not limited to, data type mismatch, memory overflow, etc.; the error frequency is, for example, occasional or frequent; the error occurrence environment refers to environmental information such as the operating system and hardware configuration when the error occurs. For example, if the words related to "memory" frequently appear in the context content and are accompanied by expressions such as "exceed", "out of", etc., then it can be determined that the error type is "memory overflow".
[0047] Step 120: Construct a knowledge graph including the key information; the knowledge graph is used to indicate the cause of the error message.
[0048] Exemplarily, the knowledge graph includes multiple entities and line segments connecting the multiple entities, and the line segments are used to represent the relationship between the two connected entities. As an example, the error message can be located at the center or top layer of the knowledge graph, and different error manifestations, triggering factors, resulting consequences, etc. are derived from the error message as the core and expanded outwards layer by layer in sequence. The key information can be represented in the form of entities in the knowledge graph based on the relationship with the error message. In addition, the knowledge graph also records the cause of the error message. As an example, if the cause of the error message is included in the key information, the knowledge graph can be directly constructed based on the key information. As another example, if the key information or the context content does not include the cause of the error message, the cause of the error message can be retrieved from the pre-constructed knowledge base, and the knowledge graph can be constructed based on the key information and the retrieval result.
[0049] Step 130: Extract the first semantic feature from the knowledge graph, and extract the second semantic feature from each solution in the preset solution library.
[0050] Exemplarily, a solution library can be established in advance, and the library includes multiple solutions for solving program errors. When performing step 130, the second semantic features can be separately extracted for each solution in the solution library, and the second semantic feature of each solution carries the semantic information of the corresponding solution. Specifically, each solution carries description information, and the description information includes the error type, occurrence environment, error cause, and solution steps applicable to the solution. Therefore, the second semantic feature carries the semantic information of the description information. For example, the description information of each solution can be vectorized, and using natural language processing techniques, such as word embedding methods, each word in the solution is mapped to a vector of a fixed length. For example, the sentence "Modify the port number of the connection string in the database configuration file" in the solution is converted into a second sequence composed of multiple vectors, and the second semantic feature includes the second sequence.
[0051] At the same time, the first semantic feature can also be extracted from the knowledge graph of the error information, and the first semantic feature of each knowledge graph carries the semantic information of the knowledge graph. Specifically, the error type, error frequency, error occurrence environment, and error cause of the error information are recorded in the knowledge graph, and the first semantic feature carries the semantic information of the information carried by the knowledge graph. For example, the error information "The database connection cannot be established, possibly due to an incorrect port number" recorded in the knowledge graph can be converted into a first sequence composed of multiple vectors, and the first semantic feature includes the first sequence.
[0052] Step 140: Based on the similarity between the first semantic feature and each of the second semantic features, match the first solution for solving the error information from multiple solutions.
[0053] Exemplarily, the similarity between the first semantic feature and each second semantic feature can be calculated separately. For example, algorithms such as cosine similarity and Euclidean distance can be used to calculate the similarity. Taking cosine similarity as an example, the similarity between two semantic features is measured by calculating the cosine value of the angle between the two semantic features. The closer the cosine value is to 1, the more similar the two semantic features are, that is, the higher the matching degree between the corresponding solution and the error information. Then, the solution with the highest similarity or a similarity greater than a preset similarity threshold can be selected as the first solution for solving the error information.
[0054] It can be seen that a method for processing program error information provided by this application can quickly associate with the cause of the error by comprehensively collecting the log files generated during program operation, locating error information and context content from the log files, extracting key information from the context content, and using the key information to construct a knowledge graph for each error information in real time. Subsequently, the key information and the cause of the error are used to match the first solution in real time, which can quickly provide an effective solution for users, making the error information no longer rely on manual processing and improving the automation degree of error information processing.
[0055] The following will introduce steps 110 - 140 in detail.
[0056] According to some embodiments of this application, the process of extracting key information in step 110 may include: inputting the context content into a pre-trained language model, so that the language model performs word segmentation processing on the context content, performs word embedding processing on each word segment, and inputs each obtained word vector into a multi-layer Transformer layer to obtain the key information output by the last Transformer layer.
[0057] Exemplarily, the language model may include, but is not limited to, the BERT (Bidirectional Encoder Representations from Transformers) model. After the context content is input into the pre-trained BERT model, the BERT model first performs word segmentation processing on the context content. For example, the WordPiece word segmentation algorithm can be used to split the input context content T into a series of word segments t1, t2,... t n . Subsequently, the BERT model can perform word embedding processing on each obtained word segment, so that each word segment is transformed into a word vector representation. For example, the BERT model can maintain a word piece embedding matrix where V represents the size of the vocabulary, and d is the dimension of the word vector. For each word segment t i , its corresponding index is k i , then its word vector e ti = E[k i , 1 ≤ i ≤ n. In this way, the word embedding processing of the word segments is completed using the word piece embedding matrix, and the word vector of each word segment is obtained.
[0058] The BERT model includes multiple Transformer layers. For example, in the BERT-base model, the number of Transformer layers is 12. Each obtained word vector e tiOutput multiple Transformer layers in sequence. After being processed by multiple Transformer layers, the key information output by the last Transformer layer can be obtained. The key information includes the semantic information of the entire context content and can capture the complex relationships between various words.
[0059] It can be seen that in this embodiment, the language model is used to extract key information based on the semantic information of the context content, leveraging the powerful information extraction ability of the large AI model to comprehensively mine the key information in the error information, providing richer data support for subsequent analysis and solution.
[0060] Based on any of the above embodiments, the constructed knowledge graph includes multiple layers of entities. Among them, the multiple layers of entities include the first-layer entities and the second-layer entities. The first-layer entities are used to indicate the direct causes of the error information, and the second-layer entities are used to indicate the root causes of the error information.
[0061] Exemplarily, the error information can be the central entity of the knowledge graph. The first-layer entities are connected to the central entity and are used to indicate the direct causes of the error information; the second-layer entities are connected to the first-layer entities and are used to indicate the root causes of the error information. For example, if the error information is "system crash", then the first-layer entities can record the direct causes leading to the system crash, such as "memory overflow", "disk failure", or "software conflict", etc. The second-layer entities are connected to the first-layer entities and record the root causes leading to the system crash. For example, if the direct cause of "system crash" is "memory overflow", then the memory overflow may be caused by "memory leak" or "improper memory allocation". Therefore, "memory leak" or "improper memory allocation" is the root cause of "system crash" and is recorded in the second-layer entities.
[0062] In this way, by hierarchically organizing the error information, the deeper-level factors causing the error information can be effectively and quickly associated. Recording the direct causes and root causes of the error information in the knowledge graph enables more accurate matching of appropriate solutions from the deeper cause dimension during subsequent solution matching, improving the matching accuracy.
[0063] In addition, based on any of the above embodiments, the knowledge graph can also be used to indicate the solution strategies for the error information. At this time, the first solution obtained by matching in step 140 matches the solution strategy.
[0064] Exemplarily, when constructing a knowledge graph, if the solution strategies for error information are also recorded in the pre-constructed knowledge base, then the solution strategies can be recorded as one of the entities in the knowledge graph. In this way, the first semantic features extracted from the knowledge graph also carry the semantic information of the solution strategies. Therefore, when matching solution strategies, the first solution that matches the solution strategy of the error information can be matched from the solution library.
[0065] It can be seen that in this embodiment, by adding the solution strategies for error information when constructing the knowledge graph of error information, it is beneficial to improve the matching accuracy of the first solution and the solution effect of error information.
[0066] In some embodiments, regarding step 140 of matching the first solution based on the similarity between the first semantic feature and each second semantic feature, it specifically includes step 141.
[0067] Step 141: When it is determined that the similarity between the first semantic feature and the target second semantic feature is higher than a preset similarity threshold, determine the solution corresponding to the target second semantic feature as the first solution.
[0068] Exemplarily, each solution in the solution library corresponds to a second semantic feature. Among the multiple second semantic features, if there is a target second semantic feature whose similarity with the first semantic feature is higher than the preset similarity threshold, then the solution corresponding to the target second semantic feature is the first solution for solving the error information.
[0069] It can be seen that by setting the similarity threshold and determining the first solution when the similarity is higher than the similarity threshold, the credibility and accuracy of the first solution can be improved.
[0070] In some embodiments, the method further includes step 142: When it is determined that the similarity between the first semantic feature and each second semantic feature is less than the similarity threshold, input the error information and the knowledge graph into the trained solution large model to obtain the output second solution.
[0071] Exemplarily, if the similarity between the first semantic feature and each second semantic feature is less than the similarity threshold, it indicates that there is no solution in the solution library that precisely matches the error information, or that the existing solutions fail to effectively solve the error information. Therefore, the error information and the knowledge graph can be input into the trained solution large model. The solution large model can be a question-answering large model for generating answers to the input questions. For example, based on the error information, the knowledge graph, and a preset prompt word template, a prompt word can be generated, and the prompt word carries the error information and the knowledge graph. Subsequently, the prompt word is input into the solution large model so that the solution large model generates a second solution to the error information based on the knowledge graph.
[0072] It can be seen that this embodiment utilizes the intelligent analysis ability of the large model to provide a second solution to the error information, ensuring that an effective solution can be provided for the error information in different situations.
[0073] In addition, in some embodiments, after performing step 142, steps 1431 - 1432 can also be performed.
[0074] Step 1431: Obtain the verification result of the second solution.
[0075] Exemplarily, after obtaining the second solution, the error information, the knowledge graph, and the second solution can be output to the operation and maintenance personnel, and the operation and maintenance personnel can verify whether the second solution can effectively solve the error information based on the knowledge graph to obtain the verification result.
[0076] Step 1432: If the verification result indicates that the error information has been resolved, add the second solution to the solution library.
[0077] Exemplarily, if the verification result indicates that the error information has been resolved, it means that the second solution generated by the solution large model can effectively solve the error information, and at this time, the gap in the solution library for this error information is filled. Therefore, the second solution can be added to the solution library. Specifically, based on one or more of the error type, error occurrence environment, error frequency, and error information occurrence reason recorded in the knowledge graph of the error information, description information of the second solution can be generated, and then the second solution carrying the description information is added to the solution library.
[0078] Optionally, after adding the second solution to the solution library, an automatic verification mechanism can be introduced, such as simulating and verifying the effectiveness of the second solution through a test environment to improve the accuracy of solution warehousing.
[0079] It can be seen that in this embodiment, the actually verified and effective solutions are continuously incorporated into the solution library, realizing the continuous optimization and improvement of the solution library, enabling it to better handle various error situations and enhancing the adaptability of the system and the ability to solve problems.
[0080] In addition, this application also provides a method for processing program error information as shown in Figure 2 . First, collect the log files generated during program operation (step 201), and use parsing rules to parse the log files to locate error information and context content from the log files (step 202). Among them, the parsing rules can be based on the format of the log files, keywords, etc. Subsequently, perform cleaning and standardization processing on the context content (step 203). Then, by inputting the context content including error information into the pre-trained BERT model, obtain the key information extracted by the BERT model from the context content, including error type, error frequency, and error occurrence environment (step 204). Subsequently, construct a knowledge graph including the key information with the error information as the central entity (step 205). The first-layer entities in the knowledge graph are connected to the central entity and are used to record the direct causes of the error information. The second-layer entities are connected to the first-layer entities and are used to record the root causes of the error information. In addition, the knowledge graph can also record one or more of the error manifestations, triggering factors, resulting consequences, and solution strategies of the error information.
[0081] Subsequently, extract the first semantic feature from the knowledge graph of error messages, and extract the second semantic feature from each solution in the solution library to obtain the second semantic feature of each solution (step 206). Calculate the similarity between the first semantic feature and each second semantic feature respectively (step 207), such as cosine similarity or Euclidean distance, etc. And determine whether the first solution can be matched from the solution library based on the similarity (step 208). Specifically, if the similarity between the first semantic feature and the target second semantic feature among multiple second semantic features is higher than the preset similarity threshold, it is determined that the first solution can be matched. At this time, the error message and the first solution can be output to the operation and maintenance personnel (step 210); if the similarity between the first semantic feature and each second semantic feature is less than the similarity threshold, it is determined that the first solution is not matched. At this time, the error message and the knowledge graph can be input into the trained solution large model to obtain the output second solution (step 209). Subsequently, the error message and the second solution are output to the operation and maintenance personnel (step 210). Obtain the verification result of the operation and maintenance personnel for the first solution or the second solution (step 211). If the verification result indicates that the first solution is invalid and fails to solve the corresponding error message, modify the description information corresponding to the first solution, such as the error type, occurrence environment, and error cause that the first solution is applicable to solve, etc. If the verification result indicates that the second solution is effective and the corresponding error message has been solved, add the second solution to the solution library (step 212).
[0082] It can be seen that through the detailed analysis of the log files generated during the program operation process and the full utilization of the context content of the error messages in this application, the location where the error occurs can be more accurately located, and the cause of the error can be deeply explored. In addition, by constructing a knowledge graph, the deeper factors causing the error message can be quickly and effectively associated, and the cause of the error message can be used to achieve a more accurate matching of the solution, so as to quickly provide an effective solution for users. And with the powerful information extraction ability of the AI large model, the key features in the error message are comprehensively mined, providing richer data support for subsequent analysis and solution. Finally, by continuously incorporating the actually verified effective solutions into the solution library, the continuous optimization and improvement of the solution library are realized, enabling it to better handle various error situations and improve the adaptability and problem-solving ability of the system.
[0083] Based on the method described in any of the above embodiments, the present application further provides a computer program product, which includes one or more computer programs or instructions. The computer programs or instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. When the computer program is executed by a processor, the method described in any of the above embodiments is implemented.
[0084] Based on a method for processing program error information described in any of the above embodiments, the present application further provides Figure 3 a schematic structural diagram of an electronic device as shown in Figure 3 , at the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory. Of course, it may also include other hardware required for other services. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to implement a method for processing program error information described in any of the above embodiments.
[0085] The present application further provides a computer storage medium storing a computer program, which can be used to execute a method for processing program error information described in any of the above embodiments when the computer program is executed by a processor.
[0086] In several embodiments provided by the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architectures, functions, and operations of devices, methods, and computer program products according to multiple embodiments of the present application. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code, and the module, program segment, or part of code includes one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the accompanying drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, as well as the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.
[0087] In addition, the functional modules in each embodiment of the present application can be integrated together to form an independent part, or each module can exist separately, or two or more modules can be integrated to form an independent part.
[0088] When the above-mentioned functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of this application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs.
[0089] The above are only the embodiments of this application and are not used to limit the protection scope of this application. For those skilled in the art, this application can have various changes and modifications. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of this application shall be included in the protection scope of this application. It should be noted that similar reference numerals and letters represent similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings.
[0090] The above is only the specific implementation manner of this application, but the protection scope of this application is not limited thereto. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed by this application, and all should be covered by the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.
[0091] It should be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitations, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article or device including the said element.
Claims
1. A method for processing program error messages, characterized in that The method includes: Locate error information and context content from the log file generated during program runtime, and extract key information of the error information from the context content; wherein, the error information indicates that an error occurs during program runtime; the key information includes one or more of error type, error frequency, and error occurrence environment; Construct a knowledge graph including the key information; the knowledge graph is used to indicate the cause of the error information; Extract a first semantic feature from the knowledge graph, and extract a second semantic feature from each solution in a preset solution library; Based on the similarity between the first semantic feature and each second semantic feature, match a first solution for solving the error information from multiple solutions.
2. The method according to claim 1, characterized in that, The extracting the key information of the error information from the context content includes: Input the context content into a trained language model, so that the language model performs word segmentation on the context content, performs word embedding processing on each word segment, and inputs each obtained word vector into a multi-layer Transformer layer to obtain the key information output by the last Transformer layer.
3. The method according to claim 1, characterized in that, The knowledge graph includes multiple layers of entities, and the multiple layers of entities include a first layer of entities and a second layer of entities; wherein, the first layer of entities is used to indicate the direct cause of the error information, and the second layer of entities is used to indicate the root cause of the error information.
4. The method according to claim 1 or 3, characterized in that The knowledge graph is also used to indicate the solution strategy for the error information; the first solution matches the solution strategy.
5. The method according to claim 1, characterized in that The matching a first solution for solving the error information from multiple solutions based on the similarity between the first semantic feature and each second semantic feature includes: When it is determined that the similarity between the first semantic feature and a target second semantic feature is higher than a preset similarity threshold, determine the solution corresponding to the target second semantic feature as the first solution.
6. The method according to claim 5, wherein The method further includes: When it is determined that the similarity between the first semantic feature and each second semantic feature is less than the similarity threshold, input the error information and the knowledge graph into a trained solution large model to obtain an output second solution.
7. The method according to claim 6, wherein The method further includes: Obtain the verification result of the second solution; If the verification result indicates that the error information has been resolved, add the second solution to the solution library.
8. A computer program product, characterized in that, The computer program product includes a computer program, and when the computer program is executed by a processor, it implements the method described in any one of claims 1-7.
9. An electronic device, characterized in that, The electronic device includes: A processor; A memory for storing processor-executable instructions; Wherein, when the processor calls the executable instructions, it implements the operations of the method described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, Computer instructions are stored thereon, and when the computer instructions are executed by a processor, they implement the steps of the method described in any one of claims 1-7.
Citation Information
Patent Citations
Question answering method and device based on knowledge graph
CN113282729A
Production line fault analysis method and device based on knowledge graph and storage medium
CN115658930A
Fault analysis method, device, equipment and system for cloud computing instance and medium
CN116166463A
Fault processing system and method, electronic equipment and storage medium
CN119759635A
System
JP2025051449A