Error stack aggregation method and device
By using key functions and related function regularization groups from the error feature library for precise matching in the error stack aggregation method, the problems of inaccurate location and aggregation in traditional methods are solved, and more efficient error stack aggregation is achieved.
Patent Information
- Application Number
- CN202510954835.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-10
- Publication Date
- 2025-11-07
AI Technical Summary
Existing error stack aggregation methods suffer from low location accuracy and low aggregation accuracy during program execution, especially since traditional regular expression matching methods cannot accurately identify different error types and similar errors.
By establishing an error feature library and storing multiple error features, each feature includes a key function regular expression group and a related function regular expression group stored in association. By using pre-compiled regular expressions to match the error stack, the key functions and related functions on the error propagation chain can be accurately located, thus achieving precise error classification.
It improves the accuracy of error location and the aggregation accuracy of error stacks, reduces duplicate error alerts, and increases the aggregation processing speed.
Smart Images

Figure CN120909868A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer software processing, and in particular to an error stack aggregation method and device. BACKGROUND
[0002] With the expansion of system scale, many error logs will be generated daily. Among them, the same type of error may occur frequently, and if each error is processed and displayed separately, a large amount of repetitive information will be generated, which will interfere with the developer's judgment of the real problem. By aggregating error stacks, repetitive errors can be combined to enable developers to focus more on different types of problems.
[0003] The error stack aggregation method on the market uses a traditional regular matching method to match some key information (strings or numbers) in the error stack. According to the key information, the error is located and classified in the error stack. However, in actual application, it is found that in the function chain of program running, multiple function nodes may have the same key information, resulting in error positioning or identifying different errors as the same type of error. Conversely, different key information may all be the cause of the same error, and in positioning and identification, different key information may not be identified as similar errors. Therefore, using the traditional regular matching method to locate and aggregate errors in the error stack has the problems of low matching accuracy and low error stack aggregation accuracy. SUMMARY
[0004] Embodiments of the present application disclose an error stack aggregation method, device, electronic equipment, system and storage medium, which are used to improve error positioning accuracy and improve error stack aggregation accuracy.
[0005] In a first aspect, embodiments of the present application disclose an error stack aggregation method, which can include:
[0006] When receiving error information of program running errors, obtaining corresponding error stacks from log data;
[0007] determining whether a target error feature in an error feature library and the error stack are regular matched, the error feature library including a plurality of error features, each error feature including an associated key function regular group and an associated function regular group, the key function regular group indicating a key function on an error propagation chain, and the associated function regular group indicating a plurality of associated functions on the error propagation chain associated with the key function;
[0008] If matched, the error stack is classified as an error type corresponding to the target error feature.
[0009] In a second aspect, embodiments of the present application disclose an error stack aggregation device, which can include:
[0010] an acquisition module, configured to acquire a corresponding error stack from log data when receiving error information of a program running error;
[0011] a matching module, configured to determine whether a target error feature in an error feature library and the error stack are regular matched, the error feature library comprising a plurality of error features, each of the error features comprising an associated storage key function regular group and an associated function regular group, the key function regular group indicating a key function on an error propagation chain, and the associated function regular group indicating a plurality of associated functions on the error propagation chain and associated with the key function;
[0012] a classification module, configured to classify the error stack as an error type corresponding to the target error feature when a matching result of the matching module is matching.
[0013] In a third aspect, an electronic device is disclosed, which can include:
[0014] a memory storing executable program code;
[0015] a processor coupled with the memory;
[0016] the processor invokes the executable program code stored in the memory to execute the error stack aggregation method disclosed in the first aspect.
[0017] In a fourth aspect, an error stack aggregation system is disclosed, which can include:
[0018] the electronic device as disclosed in the third aspect;
[0019] a server;
[0020] The server is configured to receive the error stack sent by the electronic device, analyze the error stack to obtain a target stack fingerprint, and return the target stack fingerprint to the electronic device.
[0021] In a fifth aspect, a computer readable storage medium storing a computer program is disclosed, wherein the computer program causes a computer to execute the error stack aggregation method disclosed in the first aspect.
[0022] Compared with the prior art, the embodiments of the present application have the following beneficial effects:
[0023] In this embodiment, upon receiving an error message indicating a program execution error, the corresponding error stack is retrieved from the log data. It is then determined whether the target error feature in the error feature library matches the error stack. This error feature library includes multiple error features, each including a key function regular expression group and a related function regular expression group. The key function regular expression group indicates the key function on the error propagation chain, while the related function regular expression group indicates multiple related functions associated with the key function on the error propagation chain. If a match is found, the error stack is classified into the error type corresponding to the target error feature. By implementing this embodiment, an error feature library is pre-established and stores error features. When aggregating error stacks, the error features are matched against the error stack. Since the key function regular expression group indicates the key function on the error propagation chain, and the related function regular expression group indicates multiple related functions associated with the key function on the error propagation chain, using error features for regular expression matching in the error stack allows for accurate location matching based on the key function and related functions on the error propagation chain. This improves the accuracy of location matching and the aggregation accuracy of error stacks. Furthermore, since the error stack is matched with the error characteristics as soon as the error message is received, it is beneficial to improve the aggregation processing speed and realize the dynamic aggregation of error stacks. Attached Figure Description
[0024] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0025] Figure 1 This is a flowchart illustrating the error stack aggregation method disclosed in Embodiment 1 of this application;
[0026] Figure 2 This is a flowchart illustrating the error stack aggregation method disclosed in Embodiment 2 of this application;
[0027] Figure 3 This is a schematic diagram of the error stack aggregation device disclosed in an embodiment of this application;
[0028] Figure 4 This is a schematic diagram of the error stack aggregation device disclosed in Embodiment 2 of this application;
[0029] Figure 5 This is a schematic diagram of the structure of the electronic device disclosed in the embodiments of this application;
[0030] Figure 6 This is a schematic diagram of the error stack aggregation system disclosed in an embodiment of this application. Detailed Implementation
[0031] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0032] It should be noted that the terms "first," "second," "third," and "fourth," etc., used in the specification and claims of this application are used to distinguish different objects, not to describe a specific order. The terms "comprising" and "having," and any variations thereof, in the embodiments of this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to these processes, methods, products, or devices.
[0033] Traditional regular expressions, a fundamental regular expression technique widely used in computer programming and text processing, are tools for matching string patterns. They describe the characteristics of a string through specific combinations of characters and rules. Currently, when using traditional regular expressions to match error stacks, they only locate and match errors based on some key information within the stack. This can easily lead to different errors being identified as the same type, or similar errors as different types, resulting in low error location accuracy and affecting the accuracy of error stack aggregation.
[0034] Pre-compiled regular expressions are a technique to optimize the efficiency of regular expression usage. They are compiled once at the beginning of the program to generate a reusable regular expression object, which is then used for matching operations. This avoids the overhead of repeated compilation and improves the program's execution efficiency.
[0035] The error stack, also known as the call stack, is a data structure used during program execution to store information about function calls and execution status. It is used for error location; when a program encounters an error (such as a crash or an exception), the error stack can show which step of the program execution encountered the problem, displaying the sequence of all functions called from the program entry point to the point where the error occurred.
[0036] Stack Fingerprint is a technology for uniquely identifying program errors or specific execution states by hashing or other forms of encoding key functions and associated functions, etc., to generate a fixed-length string or number, i.e., a stack fingerprint. Key functions or associated functions include functions, file names, line numbers, call relationships, etc.
[0037] Key functions refer to functions that play a key role in the generation of errors in the call stack where the error occurs. These functions are usually the direct location of the error or representative functions in the call chain, and their information can help distinguish different types of errors.
[0038] Associated functions refer to functions closely related to the generation and propagation of errors. They play an important role in generating stack fingerprints and analyzing error causes, including but not limited to functions that directly cause errors and a series of functions on the error propagation chain.
[0039] Based on the above introduction, the embodiments of the present application disclose an error stack aggregation method, device, electronic equipment, system and storage medium, which is beneficial to improve the accuracy of positioning matching and improve the accuracy of error stack aggregation. The technical solutions of the present application will be described in detail below through specific embodiments.
[0040] Please refer to Figure 1 , Figure 1 for a flowchart of the error stack aggregation method disclosed by Embodiment One of the present application. As shown in Figure 1 , the error stack aggregation method can include:
[0041] 101. When receiving error information of program running errors, obtain the corresponding error stack from log data.
[0042] The execution subject of the embodiments of the present application is an error stack aggregation device or an electronic equipment.
[0043] Among them, the program is generating log data at all times during the running process. When the program runs an error, it will report an error and generate an error stack to display all function sequences called from the program entry to the error occurrence point. For the error stack aggregation device or electronic equipment, when receiving error information of program running errors, the corresponding error stack is obtained from log data in real time.
[0044] 102. determining whether the target error feature in the error feature library and the error stack are regular matched, wherein the error feature library comprises a plurality of error features, each error feature comprises an associated stored key function regular group and an associated function regular group, the key function regular group indicates a key function on the error propagation chain, and the associated function regular group indicates a plurality of associated functions associated with the key function on the error propagation chain; if matched, step 103 is executed, otherwise, the process ends.
[0045] In the embodiment of the application, a preset error feature library is used to store a plurality of error features, each error feature comprises an associated stored key function regular group and an associated function regular group, the key function regular group indicates a key function on the error propagation chain, and the associated function regular group indicates a plurality of associated functions associated with the key function on the error propagation chain. That is, the error feature of the embodiment of the application is obtained by pre-encoding the key function and the plurality of associated functions on the error propagation chain. It can also be understood that: one error feature comprises two regular groups, which are a key function regular group and an associated function regular group, and one regular group is defined by a round bracket ( ), which processes the regular expression in the round bracket as a whole.
[0046] It should be noted that the stack fingerprint comprises a key function and a plurality of associated functions on the error propagation chain, and the error feature in the embodiment of the application is obtained by pre-encoding the stack fingerprint, and the key function and the associated function comprise a function, a file name, a line number and a call relationship, etc. Therefore, in the embodiment of the application, when the error feature is regular matched with the error stack, each regular group is sequentially regular matched, and when each regular group is matched, the regular group is completely matched as a whole, that is, only when the content of the regular group is completely matched in sequence, it is considered that the regular group is matched, and then all the regular groups are sequentially matched to determine whether the error feature and the error stack are matched. It can be seen that the matching method of the embodiment of the application is accurate matching, which can accurately locate the error.
[0047] 103. classifying the error stack into an error type corresponding to the target error feature.
[0048] Optionally, the error type includes but is not limited to a null pointer exception, an array out-of-bound exception and the like. The error type corresponding to the target error feature is set when the error feature is pre-stored, and can be stored in the error feature library in association with the error feature.
[0049] After step 102, the error feature library can be used to quickly locate the error in the error stack when receiving the error information, and then the error stack is classified into an error type in step 103, so as to improve the error locating accuracy and the error stack aggregation accuracy.
[0050] Optionally, the step 103 can include: performing a plus 1 operation on the aggregated count of the error type corresponding to the target error feature; in this embodiment, when classifying errors, a counter is assigned to each error type, and the counter of the error type is incremented by 1 when the error stack matching the error type is matched, so as to realize error classification and statistics.
[0051] Further, in the above embodiment, the error stack is classified, and only one warning is given for the same error type, so as to avoid repeated warnings for the same error type and bring a lot of work and interference to the corresponding staff. Meanwhile, according to the counted value, the frequency of the error type can be understood.
[0052] In the embodiment of the present application, when receiving error information of program running error, the corresponding error stack is acquired from log data, it is judged whether the target error feature in the error feature library matches the error stack, the error feature library includes a plurality of error features, each error feature includes an associated storage key function regular group and an associated function regular group, the key function regular group indicates a key function on an error propagation chain, and the associated function regular group indicates a plurality of associated functions associated with the key function on the error propagation chain, and if matching, the error stack is classified as an error type corresponding to the target error feature; by implementing the embodiment of the present application, the error feature library is established in advance, the error features are stored in the error feature library, when the error stack is aggregated, the error features are matched with the error stack, and since the key function regular group of the error feature indicates the key function on the error propagation chain and the associated function regular group indicates the plurality of associated functions associated with the key function on the error propagation chain, when the error features are used for regular matching positioning in the error stack, the key function and the associated function on the error propagation chain can be accurately relied on for positioning matching, which is beneficial to improve the positioning matching accuracy and improve the aggregation accuracy of the error stack. Further, since the error features are used for matching processing of the error stack in real time as soon as the error information is received, it is beneficial to improve the aggregation processing speed and realize dynamic aggregation of the error stack.
[0053] Please refer to Figure 2 , Figure 2 for a flowchart of the error stack aggregation method disclosed in the second embodiment of the present application; as shown in Figure 2 , the error stack aggregation method can include:
[0054] 201、In the embodiment of the present application, when receiving error information of program running error, the corresponding error stack is acquired from log data.
[0055] The execution subject of the embodiment of the present application is an error stack aggregation device or an electronic device.
[0056] The program generates log data at any time during running, and an error is reported when an error occurs during program running, and an error stack is generated to display all function sequences called from program entry to error occurrence point. For the error stack aggregation device or the electronic device, the corresponding error stack is obtained from the log data in real time after receiving the error report information of the program running error.
[0057] 202. Determine whether the target key function regular set of the target error feature is matched in the error stack; if matched, execute step 203; otherwise, execute step 208.
[0058] The target error feature includes the target key function regular set and the target associated function regular set. In the embodiment of the present application, the target key function regular set is matched first.
[0059] Optionally, determining whether the target key function regular set of the target error feature is matched in the error stack can include:
[0060] Obtain a key function regular set list in the error feature library, the key function regular set list being used to save key function regular sets corresponding to a plurality of error features respectively;
[0061] Each key function regular set in the key function regular set list is used to perform regular matching in the error stack in turn;
[0062] When a certain key function regular set is matched in the error stack, the error feature corresponding to the certain key function regular set is taken as the target error feature, and the target key function regular set of the target error feature is determined.
[0063] In the above embodiment, all key function regular sets are stored in the error feature library through the key function regular set list. After receiving the error report information, the error stack is obtained, the key function regular set list is obtained, each key function regular set is matched with the error stack in turn, and when a certain key function regular set is matched with the error stack, the certain key function regular set is taken as the target key function regular set, and the corresponding error feature is the target error feature.
[0064] 203. Determine whether the target associated function regular set of the target error feature is matched in the error stack; if matched, execute step 204; otherwise, execute step 205.
[0065] After the target key function regular set is matched, the target associated function regular set is matched in the error stack according to the calling relationship of the key function indicated by the target key function regular set and a plurality of associated functions indicated by the target associated function regular set.
[0066] Optionally, after matching the target key function regular set in the error stack, the ID number of the matched key function in the error stack can be returned to locate the key function in the error stack.
[0067] 204、Categorize the error stack into an error type corresponding to the target error feature.
[0068] If the target error feature matches the error stack, the error stack is categorized into an error type corresponding to the target error feature, the error stack can be processed in real time, and the error stack aggregation speed is improved.
[0069] 205、Send the error stack to the server to enable the server to analyze the error stack to obtain a first stack fingerprint, the first stack fingerprint including a corrected key function and a plurality of corrected associated functions on the error propagation chain.
[0070] In step 205, after matching the target key function in the error stack, the matching of the associated function regular set is continued, but fails to match the associated function regular set, and then the error stack is sent to the server. Correspondingly, in the server, after the server receives the error stack, the error stack is analyzed by using a pre-trained artificial intelligence (AI) model to obtain a first stack fingerprint to locate the corrected key function and a plurality of corrected associated functions (which can be three or more) in the error propagation chain. It can be understood that the corrected key function in the first stack fingerprint is the same as the target key function, and at least one of the plurality of corrected associated functions is different from the target associated function, i.e., for the same error type, the key function is the same, but the associated function is different.
[0071] In step 205, when the associated function does not match, the server can analyze the error stack in real time to obtain the associated function, quickly locate similar errors (i.e., the same error type caused by different associated functions), and quickly identify variants of similar errors.
[0072] 206、Receive the first stack fingerprint returned by the server;
[0073] After step 206 is executed, step 204 is executed.
[0074] 207、Update the target associated function regular set according to the plurality of corrected associated functions.
[0075] Optionally, updating the target associated function regular set according to the plurality of corrected associated functions includes:
[0076] Pre-encoding the plurality of corrected associated functions to obtain a regular set of associated functions for correction;
[0077] According to the regular set of associated functions for correction, the target regular set of associated functions is updated.
[0078] In the embodiments of the present application, the plurality of correction associated functions are processed by using the precoding mode to obtain the regular set of associated functions for correction, and when the error stack is aggregated and classified later, the error features can be directly used without encoding, so that the processing speed is improved.
[0079] Further, according to the regular set of associated functions for correction, the target regular set of associated functions is updated, including replacing the target regular set of associated functions with the regular set of associated functions for correction; in this embodiment, the target regular set of associated functions in the target error feature is directly replaced with the regular set of associated functions for correction, so that the same error caused by different reasons can be identified in real time.
[0080] Alternatively, according to the regular set of associated functions for correction, the target regular set of associated functions is updated, including saving the regular set of associated functions for correction as another group of target regular sets of associated functions of the target error feature, that is, two error propagation chains cause the same type of error. Further, when the error stack is matched, after the target key function is matched, the two groups of target regular sets of associated functions are matched respectively, and when the error stack is matched to one of the groups of target regular sets of associated functions, the matching is successful.
[0081] In steps 205-207, the same error type caused by different associated functions can be quickly analyzed by the AI model of the server to determine whether it is a similar error (the same error type), and the same error type of error can be quickly aggregated.
[0082] 208, the error stack is sent to the server, so that the server analyzes the error stack to obtain a second stack fingerprint, and the second stack fingerprint includes a new key function and a plurality of associated functions.
[0083] In step 208, if the target key function regular set cannot be matched in the error stack, that is, the key function cannot be located in the error stack to match the target key function regular set, the error stack is sent to the server. Correspondingly, in the server, the server can quickly locate the key function and the plurality of associated functions on the error propagation chain in the error stack by using the AI model, as the new key function and the plurality of associated functions, to obtain the second stack fingerprint.
[0084] In step 208, for a new error type, the AI model of the server can analyze and obtain the error propagation chain to determine the key function and the associated function in real time, so that the processing efficiency of the error stack aggregation is improved.
[0085] Among them, the key functions and multiple related functions in the error propagation chain reflect the order of function calls.
[0086] 209. Receive the second stack fingerprint returned by the server.
[0087] 210. Based on the second stack fingerprint, obtain new error characteristics and save them to the error characteristic library.
[0088] Optionally, based on the second stack fingerprint, new error characteristics are obtained and saved to the error characteristic library, including:
[0089] The new key functions and multiple associated functions included in the second stack fingerprint are pre-encoded to obtain new key function regularity groups and associated function regularity groups, so as to obtain new error features and save them to the error feature library.
[0090] In the above implementation, the second stack fingerprint is pre-encoded to obtain new error features and saved to the error feature library, which facilitates the subsequent improvement of the aggregation speed of error stacks through the error feature library.
[0091] 211. Based on the second stack fingerprint, determine the error type corresponding to the new error feature and save it accordingly.
[0092] It is understood that the key functions and associated functions in the second stack fingerprint can determine the error type. Therefore, in this embodiment, the error type is obtained based on the second stack fingerprint and then associated with and saved as error features. Optionally, in this embodiment, the error type and error features can be associated and saved in an error feature library for easy and quick retrieval.
[0093] 212. Classify the error stack into the error type corresponding to the new error characteristics.
[0094] Through steps 208-211, new error characteristics are identified and corresponding error types are obtained. Then, the error stack is classified into the error type corresponding to the new error characteristics.
[0095] Optionally, step 212 includes: incrementing the aggregate count of the error type corresponding to the new error feature by 1, so that the aggregate count value of the error type is incremented by 1.
[0096] By implementing the above embodiments, error stacks can be quickly matched using an error signature database, which not only improves the matching accuracy but also increases the speed of error stack aggregation. For similar errors and new error types, the server can perform real-time error location and analysis of error stacks, thereby improving the efficiency of error stack processing.
[0097] In some embodiments, the implementation of the embodiments of the present application can be realized through an open source big data architecture and a distributed processing engine, such as Flink (i.e., Apache Flink), wherein the matching of the error stack with the error features can be regarded as an aggregation matching, and for similar errors and new error types, the analysis can be completed through a server AI model, and the analysis result of the server can be preprocessed to obtain error features, which are saved to an error feature library. Correspondingly, the error feature library in the embodiments of the present application can be a regular engine database.
[0098] Please refer to Figure 3 , Figure 3 the structural schematic diagram of the error stack aggregation device disclosed in the embodiments of the present application; as shown in Figure 3 , the error stack aggregation device can include:
[0099] The acquisition module 301 is configured to acquire a corresponding error stack from log data when receiving error report information of program running errors.
[0100] The matching module 302 is configured to judge whether a target error feature in an error feature library and the error stack are regular matching, the error feature library includes a plurality of error features, each of the error features includes an associated storage key function regular group and an associated function regular group, the key function regular group indicates a key function on an error propagation chain, and the associated function regular group indicates a plurality of associated functions on the error propagation chain associated with the key function.
[0101] The classification module 303 is configured to classify the error stack as an error type corresponding to the target error feature when the matching result of the matching module 302 is matching.
[0102] In the implementation of the above device, the acquisition module 301 acquires the error stack from the log data when receiving the error report information of the program running error, the matching module 302 judges whether the target error feature in the error feature library matches the error stack, the error feature library includes a plurality of error features, each error feature includes an associated storage key function regular group and an associated function regular group, the key function regular group indicates a key function on an error propagation chain, and the associated function regular group indicates a plurality of associated functions associated with the key function on the error propagation chain, and if the matching is successful, the classification module 303 classifies the error stack as an error type corresponding to the target error feature. Through the implementation of the embodiment of the application, the error feature library is established in advance, the error features are stored in the error feature library, when the error stack is aggregated, the error features are matched with the error stack, and since the key function regular group of the error feature indicates the key function on the error propagation chain and the associated function regular group indicates the plurality of associated functions associated with the key function on the error propagation chain, the error features can be accurately positioned and matched by relying on the key function and the associated function on the error propagation chain when the error features are regularly matched and positioned in the error stack, which is beneficial to improving the positioning and matching accuracy and improving the aggregation accuracy of the error stack. Further, since the error features are used to match and process the error stack in real time as soon as the error report information is received, it is beneficial to improve the aggregation processing speed and realize the dynamic aggregation of the error stack.
[0103] Optionally, the classification module 303 is configured to classify the error stack as an error type corresponding to the target error feature in the following manner: performing a plus 1 operation on the aggregate count of the error type corresponding to the target error feature.
[0104] In some optional embodiments, the matching module 302 is configured to judge whether the target error feature in the error feature library matches the error stack in the following manner:
[0105] judging whether the target key function regular group of the target error feature is regularly matched in the error stack;
[0106] if the matching is successful, judging whether the target associated function regular group of the target error feature is regularly matched in the error stack;
[0107] if the target associated function regular group is regularly matched in the error stack, it is determined that the target error feature matches the error stack.
[0108] In the above embodiment, the target error feature includes a target key function regular group and a target associated function regular group, the target key function regular group is matched first, and after the target key function regular group is matched, the target associated function regular group is matched in the error stack according to the calling relationship of the key function indicated by the target key function regular group and the plurality of associated functions indicated by the target associated function regular group.
[0109] In some optional embodiments, the matching module 302 is configured to determine whether the target key function regular group of the target error feature is matched in the error stack in the following manner:
[0110] The matching module 302 is configured to obtain a key function regular group list in the error feature library, the key function regular group list being used to save the key function regular groups corresponding to the plurality of error features respectively.
[0111] The matching module 302 is configured to sequentially use each key function regular group in the key function regular group list to perform regular matching in the error stack.
[0112] The matching module 302 is configured to, when a certain key function regular group is matched in the error stack, take the error feature corresponding to the certain key function regular group as the target error feature, and determine the target key function regular group of the target error feature.
[0113] In the above embodiment, all the key function regular groups are stored in the error feature library through the key function regular group list, after receiving the error report information, the error stack is obtained, the key function regular group list is obtained, each key function regular group is sequentially matched with the error stack, and when a certain key function regular group is matched with the error stack, the certain key function regular group is taken as the target key function regular group, and the corresponding error feature is the target error feature.
[0114] Please refer to Figure 4 , Figure 4 The error stack aggregation device disclosed in Embodiment Two of the present application is shown in the structure diagram of the error stack aggregation device. Figure 4 The error stack aggregation device shown in Figure 3 The error stack aggregation device shown in Figure 4 The error stack aggregation device shown in
[0115] The communication module 401 is configured to, when the matching module 302 fails to regularly match the target associated function regular set in the error stack, send the error stack to a server, so that the server analyzes the error stack to obtain a first stack fingerprint, and receive the first stack fingerprint returned by the server.
[0116] The updating module 402 is configured to update the target associated function regular set according to the plurality of modified associated functions.
[0117] Optionally, the communication module 401 is configured to, after receiving the first stack fingerprint returned by the server, classify the error stack into an error type corresponding to the target error feature. Figure 4
[0118] Further optionally, the updating module 402 is configured to update the target associated function regular set according to the plurality of modified associated functions in the following manner:
[0119] precode the plurality of modified associated functions to obtain a modified associated function regular set;
[0120] update the target associated function regular set according to the modified associated function regular set.
[0121] In some optional embodiments, the communication module 401 is further configured to, if the matching module 302 fails to regularly match the target key function regular set in the error stack, send the error stack to the server, so that the server analyzes the error stack to obtain a second stack fingerprint, and receive the second stack fingerprint returned by the server.
[0122] Further, the updating module 402 is further configured to, according to the second stack fingerprint, obtain a new error feature and save the new error feature into the error feature library, and determine an error type corresponding to the new error feature according to the second stack fingerprint and save the error type in association.
[0123] The classification module 303 is further configured to, after the communication module 401 receives the second stack fingerprint returned by the server, classify the error stack into an error type corresponding to the new error feature.
[0124] Further optionally, the updating module 402 is configured to, according to the second stack fingerprint, obtain a new error feature and save the new error feature into the error feature library in the following manner:
[0125] Pre-encode the new key function and the plurality of associated functions included in the second stack fingerprint to obtain a new key function regular set and an associated function regular set, so as to obtain the new error feature and save to the error feature library.
[0126] Referring to Figure 5 , Figure 5 A structural schematic diagram of an electronic device disclosed in an embodiment of the present application is shown in the figure. Figure 5 The electronic device 500 shown in the figure can include:
[0127] A memory 501 storing executable program codes;
[0128] A processor 502 coupled with the memory 501;
[0129] The processor 502 invokes the executable program codes stored in the memory 501 to execute Figure 1 and Figure 2 part of the steps of any one of the methods disclosed.
[0130] Referring to Figure 6 , Figure 6 A structural schematic diagram of an error stack aggregation system disclosed in an embodiment of the present application is shown in the figure. Figure 6 The error stack aggregation system can include:
[0131] The electronic device 500;
[0132] The server 600;
[0133] The electronic device 500 and the server 600 can implement the corresponding steps in the above method embodiments, and more can refer to the above description.
[0134] The present application also discloses a computer readable storage medium storing a computer program, wherein the computer program causes a computer to execute Figure 1 and Figure 2 any one of the methods disclosed.
[0135] The present application also discloses a computer program product, when the computer program product runs on a computer, causes the computer to execute Figure 1 and Figure 2 part or all of the steps of any one of the methods disclosed.
[0136] The present application also discloses an application publishing platform, the application publishing platform is used for publishing a computer program product, wherein when the computer program product runs on a computer, causes the computer to execute Figure 1 and Figure 2 part or all of the steps of any one of the methods disclosed.
[0137] Those skilled in the art can understand that all or part of the steps in the above-mentioned embodiments can be completed by instructing the relevant hardware by means of a program, and the program can be stored in a computer readable storage medium, including Read-Only Memory (ROM), Random Access Memory (RAM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), One-time Programmable Read-Only Memory (OTPROM), Electrically-Erasable Programmable Read-Only Memory (EEPROM), Compact Disc Read-Only Memory (CD-ROM) or other optical disk memories, magnetic disk memories, magnetic tape memories, or any other medium readable by a computer and capable of being used to set or store data.
[0138] The error stack aggregation method, device, electronic equipment, system and storage medium disclosed in the embodiments of the present application are described in detail above, and the principles and implementation modes of the present application are described by applying specific examples. The above embodiment is only used to help understand the method and core idea of the present application; at the same time, for those skilled in the art, according to the idea of the present application, the specific implementation mode and application range will be changed, and the above description should not be understood as a limitation of the present application.
Claims
1. A method of error stack aggregation, the method comprising: The method comprises: obtaining a corresponding error stack from log data when receiving error information of a program running error; determining whether a target error feature in an error feature library and the error stack are regular matched, the error feature library comprising a plurality of error features, each of the error features comprising an associated storage key function regular group and an associated function regular group, the key function regular group indicating a key function on an error propagation chain, and the associated function regular group indicating a plurality of associated functions associated with the key function on the error propagation chain; if matched, classifying the error stack as an error type corresponding to the target error feature.
2. The method of claim 1, wherein, The determining whether the target error feature in the error feature library and the error stack are regular matched comprises: determining whether a target key function regular group of the target error feature is regular matched in the error stack; if matched, determining whether a target associated function regular group of the target error feature is regular matched in the error stack; if the target associated function regular group is regular matched in the error stack, determining that the target error feature and the error stack are regular matched.
3. The method of claim 2, wherein, The determining whether the target key function regular group of the target error feature is regular matched in the error stack comprises: obtaining a key function regular group list in the error feature library, the key function regular group list being used to save key function regular groups corresponding to the plurality of error features respectively; regular matching in the error stack by using each of the key function regular groups in the key function regular group list in turn; when a certain key function regular group is regular matched in the error stack, taking an error feature corresponding to the certain key function regular group as the target error feature, and determining that the target key function regular group of the target error feature is regular matched.
4. The method of claim 2, wherein, The method further comprises: if the target associated function regular group fails to be regular matched in the error stack, sending the error stack to a server, so that the server analyzes the error stack to obtain a first stack fingerprint, the first stack fingerprint comprising a revised key function and a plurality of revised associated functions on an error propagation chain; receiving the first stack fingerprint returned by the server; updating the target associated function regular group according to the plurality of revised associated functions.
5. The method of claim 4, wherein, After the receiving the first stack fingerprint returned by the server, the method further comprises: classifying the error stack as an error type corresponding to the target error feature.
6. The method according to claim 4 or 5, characterized in that, The updating the target associated function regular group according to the plurality of revised associated functions comprises: pre-encoding the plurality of revised associated functions to obtain a revised associated function regular group; updating the target associated function regular group according to the revised associated function regular group.
7. The method of claim 2, wherein, The method further comprises: If there is no regular match between the target key function regular group and the error stack, the error stack is sent to a server for analysis to obtain a second stack fingerprint, the second stack fingerprint including a new key function and a plurality of associated functions; The second stack fingerprint returned by the server is received; According to the second stack fingerprint, a new error feature is obtained and saved in the error feature library; According to the second stack fingerprint, the error type corresponding to the new error feature is determined and saved in association.
8. The method of claim 7, wherein, After receiving the second stack fingerprint returned by the server, the method further includes: The error stack is classified into the error type corresponding to the new error feature.
9. The method according to claim 7 or 8, characterized in that, According to the second stack fingerprint, the new error feature is obtained and saved in the error feature library, including: The new key function and the plurality of associated functions included in the second stack fingerprint are pre-encoded to obtain a new key function regular group and an associated function regular group, so as to obtain the new error feature and save it in the error feature library.
10. An error stack aggregation apparatus characterized by comprising: It includes: An acquisition module is configured to acquire a corresponding error stack from log data when receiving error information of program running error; A matching module is configured to judge whether a target error feature in an error feature library and the error stack are regular matched, the error feature library including a plurality of error features, each error feature including an associated stored key function regular group and an associated function regular group, the key function regular group indicating a key function on an error propagation chain, and the associated function regular group indicating a plurality of associated functions associated with the key function on the error propagation chain; A classification module is configured to classify the error stack into an error type corresponding to the target error feature when the matching result of the matching module is matching.