Searching fault identification method, device and equipment and readable storage medium

By analyzing the bytecode files and program behavior characteristics of the application subject and identifying missing definition information, the problem of methods in software development finding faults is solved to ensure the stable operation of the application.

CN119576633APending Publication Date: 2025-03-07GUANGZHOU PINWEI SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411741703.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

During the software development process, applications are prone to problems such as method definition information being lost or method upgrade being missed, resulting in method search failure NoSuchMethodFoundError, which in turn affects the operational stability of the application.

Method used

By obtaining all bytecode files of the application body, determine the program behavior characteristics related to each bytecode file, and analyze whether there is corresponding definition information for each program behavior characteristic. If there is missing definition information, it is judged that the application body has a search failure NoSuchMethodFoundError.

Benefits of technology

This method can promptly identify whether there is a method to find faults in the application, ensure the operation stability of the application body, and promptly handle potential errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119576633A_ABST
    Figure CN119576633A_ABST
Patent Text Reader

Abstract

The invention discloses a search fault identification method, device and equipment and a readable storage medium. The method comprises the following steps: obtaining all byte code files of an application main body; determining program behavior characteristics related to each byte code file; analyzing whether corresponding definition information exists in each program behavior feature or not; if the corresponding definition information does not exist in any program behavior characteristic, it is determined that the application main body has NoSuchMedia FoundError, and if the corresponding definition information does not exist in any program behavior characteristic, the application main body has NoSuchMedia FoundError; if all the program behavior characteristics have the corresponding definition information, determining that the application main body does not have a search fault; it can be seen that whether each program behavior feature can be searched or not can be determined by recognizing whether each program behavior feature has the matched definition information or not, whether NoSuchMethod FoundError exists or not in the program of the application main body or not is determined, and the running stability of the application main body is guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of testing technology, and more specifically, to a method, device, equipment and readable storage medium for finding and identifying faults. Background Art

[0002] In today's software development field, the scale and complexity of application software are growing. With the continuous advancement of technology, software projects often involve the integration of multiple modules, frameworks, and libraries. Developers need to deal with a large amount of code and complex dependencies. The development task is arduous and the data is complicated, which makes the application prone to errors such as method definition information loss and partial method upgrade omission. The above errors may cause problems with method calls in the original code. That is, when the application is running, a method search failure NoSuchMethodFoundError may occur. If the method search failure cannot be handled in time, it may cause the application to crash or the application function to be abnormal, affecting the running stability of the application.

[0003] The key to timely solving the method search fault NoSuchMethodFoundError is to timely identify whether there is a method search fault NoSuchMethodFoundError in the program. Based on this, timely identifying whether there is a method search fault NoSuchMethodFoundError in the application program has become the focus of attention of people in this field. Summary of the invention

[0004] In view of this, the present application provides a method, apparatus, device and readable storage medium for timely identifying and searching for faults NoSuchMethodFoundError.

[0005] In order to achieve the above objectives, the proposed solution is as follows:

[0006] A method for finding and identifying a fault, comprising:

[0007] Get all bytecode files of the application body;

[0008] Determine the program behavior characteristics associated with each bytecode file;

[0009] Analyze whether there is corresponding definition information for each program behavior feature;

[0010] If any program behavior feature does not have corresponding definition information, it is determined that the application subject has a search fault NoSuchMethodFoundError; if all program behavior features have corresponding definition information, it is determined that the application subject does not have a search fault NoSuchMethodFoundError.

[0011] Optionally, determining the program behavior characteristics related to each bytecode file includes:

[0012] For each bytecode file, determine the program behavior characteristics recorded in the bytecode file, the program behavior characteristics on which the bytecode file depends, and the program behavior characteristics that depend on the bytecode file.

[0013] Optionally, determining, for each bytecode file, program behavior features recorded in the bytecode file, program behavior features on which the bytecode file depends, and program behavior features that depend on the bytecode file includes:

[0014] For each bytecode file, determine the method body recorded in the bytecode file, the external method that the bytecode file depends on, and the parent method that depends on the bytecode file.

[0015] Optionally, the analyzing whether there is corresponding definition information for each program behavior feature includes:

[0016] Extract multiple definition information from the bytecode file corresponding to each program behavior feature;

[0017] Matching each program behavior feature with each definition information of the corresponding bytecode file and a preset behavior feature definition library, wherein the behavior feature definition library records a plurality of preset definition information;

[0018] If the match is successful, it indicates that there is corresponding definition information for the corresponding program behavior feature;

[0019] If the match fails, it indicates that there is no corresponding definition information for the corresponding program behavior feature.

[0020] Optionally, extracting all definition information from the bytecode file corresponding to each program behavior feature includes:

[0021] Identify target feature categories for each program's behavioral characteristics;

[0022] All definition information related to the target feature category is extracted from the bytecode file that records the corresponding program behavior features.

[0023] Optionally, each program behavior feature is matched with each definition information of the corresponding bytecode file and a preset behavior feature definition library, including:

[0024] For each program behavior feature, the program behavior feature is matched with each definition information related to the target feature category in the corresponding bytecode file; if the program behavior feature fails to match all definition information related to the target feature category in the corresponding bytecode file, the program behavior feature is matched with each preset definition information in the preset behavior feature definition library.

[0025] Optionally, also include:

[0026] After the target program behavior feature successfully matches each definition information of the corresponding bytecode file, detecting whether the definition information of the target program behavior feature is recorded in the behavior feature definition library;

[0027] If not, the identifier of the target program behavior feature and its corresponding definition information are written into the behavior feature definition library, and the behavior feature definition library is updated.

[0028] A fault finding and identifying device, comprising:

[0029] The acquisition module is used to obtain all bytecode files of the application body;

[0030] A determination module for determining program behavior characteristics associated with each bytecode file;

[0031] The analysis module is used to analyze whether there is corresponding definition information for each program behavior feature; if there is no corresponding definition information for any program behavior feature, it is determined that the application subject has a search fault NoSuchMethodFoundError; if all program behavior features have corresponding definition information, it is determined that there is no search fault NoSuchMethodFoundError for the application subject.

[0032] A fault finding and identifying device, comprising a memory and a processor;

[0033] The memory is used to store programs;

[0034] The processor is used to execute the program to implement the various steps of the above-mentioned fault finding and identification method.

[0035] A readable storage medium stores a computer program thereon, wherein when the computer program is executed by a processor, each step of the above-mentioned fault finding and identification method is implemented.

[0036] It can be seen from the above technical scheme that the method for finding faults and identifying provided by the present application can obtain all bytecode files of the application subject; determine the program behavior characteristics related to each bytecode file; based on this, the program calling information, program dependency information and program execution information of the corresponding bytecode file can be reflected through the program behavior characteristics related to each bytecode file; further, since each definition information can reflect the name, signature, specific function and specific purpose of the corresponding program behavior characteristic in the program, therefore, when it is necessary to call a specific program behavior, the definition information of each program behavior characteristic can be used to determine whether each program behavior characteristic is a specific program behavior. Based on this, once the definition information of the program behavior characteristic does not exist, faults are likely to occur during the execution of the program behavior characteristic, and other program behavior characteristic roots cannot find the program behavior characteristic, and calling the characteristic. Program behavior characteristics; based on this, the present application can analyze whether there is corresponding definition information for each program behavior characteristic; if there is no corresponding definition information for any program behavior characteristic, it is determined that the application subject has a search fault NoSuchMethodFoundError; if all program behavior characteristics have corresponding definition information, it is determined that the application subject does not have a search fault NoSuchMethodFoundError; it can be seen that the present application can determine whether each program behavior characteristic can be searched and whether there is a search fault NoSuchMethodFoundError in the program of the application subject by identifying whether there is matching definition information for each program behavior characteristic, thereby promptly handling the NoSuchMethodFoundError and ensuring the operation stability of the application subject. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0038] Figure 1 A flow chart of a fault finding and identification method disclosed in an embodiment of the present application;

[0039] Figure 2 A structural block diagram of a fault finding and identification device disclosed in an embodiment of the present application;

[0040] Figure 3 This is a hardware structure block diagram of a fault finding and identification device disclosed in an embodiment of the present application. DETAILED DESCRIPTION

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

[0042] The present application embodiment provides a method for finding faults and identifying problems. The method can be applied to various test systems or software development systems, and can also be applied to various computer terminals or smart terminals. The execution subject can be a processor or server of the computer terminal or smart terminal. The method flow chart of the method for finding faults and identifying problems is as follows: Figure 1 As shown, specifically including:

[0043] Next, combine Figure 1 The fault finding and identification method of the present application is introduced in detail, including the following steps:

[0044] Step S1: Obtain all bytecode files of the application body.

[0045] Specifically, it can respond to the user's operation of deploying the application subject to vPaaS, monitor the information that the application subject is successfully deployed to vPaaS, and remotely log in to vPaaS through SSH;

[0046] Download all jar packages of the application entity from vPaaS through ssh;

[0047] Extract all class files from each jar package as bytecode files.

[0048] Among them, VPaaS (Video Platform as a Service) refers to the video platform server.

[0049] SSH (Secure Shell) is a network protocol that is mainly used to establish a secure encrypted connection between two computers in an insecure network.

[0050] The application subject can be any application successfully deployed on the server.

[0051] The class file is the core part that realizes the main functions of the application.

[0052] Program behavior characteristics can be used to implement partial functions of bytecode files.

[0053] Program behavior characteristics can be the dynamic behavior performance of a bytecode file, reflecting the function implementation method, operation logic, and interaction with the external environment of the corresponding bytecode file.

[0054] Specifically, program behavior characteristics can be method characteristics, class characteristics, or interface implementation characteristics.

[0055] All relevant program behavior features of each bytecode file cooperate with each other to realize all functions of the corresponding bytecode file.

[0056] Step S2: Determine program behavior characteristics related to each bytecode file.

[0057] Specifically, the program behavior features associated with each bytecode file may be program behavior features that are interdependent with the corresponding bytecode file, and program behavior features included in the corresponding bytecode file.

[0058] The program behavior characteristics associated with each bytecode file can be determined in a number of ways.

[0059] For example, bytecode analysis tools such as ASM and Byte Buddy can be used to extract program behavior features related to each bytecode file from the class file;

[0060] You can also use static analysis techniques such as decompilation tools and symbolic execution tools to perform static analysis on each bytecode file, simulate the program execution path of the bytecode file to explore program behavior, and generate program behavior features;

[0061] You can also analyze the application main body operation log and application main body performance monitoring results and other operation monitoring tools to determine the program behavior characteristics related to each bytecode file.

[0062] Step S3, analyzing whether there is corresponding definition information for each program behavior feature; if there is no corresponding definition information for any program behavior feature, executing step S4; if there is corresponding definition information for all program behavior features, executing step S5.

[0063] Specifically, each program behavior feature can be matched with all definition information;

[0064] If the match is successful, it indicates that the corresponding program behavior feature has corresponding definition information and can be called for search;

[0065] If the match fails, it means that the corresponding program behavior feature does not have corresponding definition information, and it is difficult to be called and difficult to be found;

[0066] All program behavior feature matching situations are summarized, and when any program behavior feature does not have corresponding definition information, step S4 is executed, and when all program behavior features have corresponding definition information, step S5 is executed.

[0067] Step S4: Determine if the application entity has a search failure NoSuchMethodFoundError.

[0068] Specifically, when there is no corresponding definition information for any program behavior feature of the application subject, it can be considered that there is a search fault in the program of the application subject. At this time, it can be determined that there is a search fault NoSuchMethodFoundError in the application subject.

[0069] Furthermore, a detection result indicating that a search failure NoSuchMethodFoundError exists in the application entity may be generated.

[0070] Step S5: Determine that the application subject does not have a search fault No Such Method Found Error.

[0071] Specifically, when corresponding definition information exists for all program behavior features of the application subject, it can be considered that there is no search fault in the program of the application subject. At this time, it can be determined that there is no search fault NoSuchMethodFoundError in the application subject.

[0072] Furthermore, a detection result of NoSuchMethodFoundError indicating that the application subject does not have a search failure may be generated.

[0073] Furthermore, after the test results are generated, a feedback email or feedback reminder can be constructed based on the test results.

[0074] When the detection result shows that the application entity has a search failure NoSuchMethodFoundError, the feedback email or feedback reminder may include the target bytecode file corresponding to the program behavior feature for which there is no definition information and the location information of the program behavior feature in the target bytecode file.

[0075] It can be seen from the above technical scheme that the method for finding faults and identifying provided by the present application can obtain all bytecode files of the application subject; determine the program behavior characteristics related to each bytecode file; based on this, the program calling information, program dependency information and program execution information of the corresponding bytecode file can be reflected through the program behavior characteristics related to each bytecode file; further, since each definition information can reflect the name, signature, specific function and specific purpose of the corresponding program behavior characteristic in the program, therefore, when it is necessary to call a specific program behavior, the definition information of each program behavior characteristic can be used to determine whether each program behavior characteristic is a specific program behavior. Based on this, once the definition information of the program behavior characteristic does not exist, faults are likely to occur during the execution of the program behavior characteristic, and other program behavior characteristic roots cannot find the program behavior characteristic, and calling the characteristic. Program behavior characteristics; based on this, the present application can analyze whether there is corresponding definition information for each program behavior characteristic; if there is no corresponding definition information for any program behavior characteristic, it is determined that the application subject has a search fault NoSuchMethodFoundError; if all program behavior characteristics have corresponding definition information, it is determined that the application subject does not have a search fault NoSuchMethodFoundError; it can be seen that the present application can determine whether each program behavior characteristic can be searched and whether there is a search fault NoSuchMethodFoundError in the program of the application subject by identifying whether there is matching definition information for each program behavior characteristic, thereby promptly handling the NoSuchMethodFoundError and ensuring the operation stability of the application subject.

[0076] In some embodiments of the present application, the process of step S2, determining the program behavior characteristics related to each bytecode file, is described in detail, and the steps are as follows:

[0077] S20. For each bytecode file, determine the program behavior characteristics recorded in the bytecode file, the program behavior characteristics that the bytecode file depends on, and the program behavior characteristics that depend on the bytecode file.

[0078] Specifically, for each class file, the class file may be parsed to determine program behavior features contained in the class file, behavior features of external programs called by the class file, and behavior features of external programs that call the class file.

[0079] It can be seen from the above technical solution that this embodiment provides an optional way to determine the program behavior features related to each bytecode file. Through the above method, the program behavior features related to each bytecode file can be determined according to the dependency relationship, and the program behavior features of the bytecode file itself and the program behavior features with which there is a dependency relationship are used as its related program behavior features. Through the above method, all program behavior features involved in the execution process of the bytecode file can be identified to avoid omissions in fault detection.

[0080] In some embodiments of the present application, step S20, for each bytecode file, determining the program behavior features recorded in the bytecode file, the program behavior features that the bytecode file depends on, and the process of the program behavior features that depend on the bytecode file, is described in detail, and the steps are as follows:

[0081] S200. For each bytecode file, determine the method body recorded in the bytecode file, the external method that the bytecode file depends on, and the parent method that depends on the bytecode file.

[0082] Specifically, considering that the method is the main part of the bytecode file program execution, in order to improve the efficiency of fault identification, for each bytecode file, the method body recorded in the bytecode file, the external method that the bytecode file depends on, and the parent method that depends on the bytecode file can be determined.

[0083] Among them, all methods can be extracted from each bytecode file as method bodies.

[0084] Each bytecode file can be parsed to determine the dependencies of each bytecode file;

[0085] Based on the dependencies of each bytecode file, the external methods that each bytecode file depends on and the parent methods that depend on each bytecode file are determined.

[0086] It can be seen from the above technical solution that this embodiment provides an optional method for determining, for each bytecode file, the program behavior characteristics recorded in the bytecode file, the program behavior characteristics on which the bytecode file depends, and the program behavior characteristics that depend on the bytecode file. Through the above method, the program behavior characteristics can be better extracted, the efficiency of fault finding and identification can be accelerated, and the fault finding and resolution process can be improved.

[0087] In some embodiments of the present application, the process of step S3, analyzing whether each program behavior feature has corresponding definition information, is described in detail, and the steps are as follows:

[0088] S30. Extract multiple definition information from the bytecode file corresponding to each program behavior feature.

[0089] Specifically, the class file corresponding to each program behavior feature can be determined in turn;

[0090] The class file of each program behavior feature is parsed, and multiple definition information is extracted from the corresponding class body.

[0091] S31. Match each program behavior feature with each definition information of the corresponding bytecode file and a preset behavior feature definition library, wherein the behavior feature definition library records a plurality of preset definition information; if the match is successful, it indicates that the corresponding program behavior feature has corresponding definition information; if the match fails, it indicates that the corresponding program behavior feature does not have corresponding definition information.

[0092] Specifically, each program behavior feature may be matched with each definition information extracted from a corresponding class file, and each program behavior feature may also be matched with each preset definition information in a preset behavior feature definition library;

[0093] If any program behavior feature fails to match each definition information extracted from the corresponding class file and fails to match each preset definition information in the preset behavior feature definition library, it can be determined that the application subject has a search failure NoSuchMethodFoundError;

[0094] If each program behavior feature successfully matches each definition information extracted from the corresponding class file or successfully matches each preset definition information in the preset behavior feature definition library, it can be determined that the application subject does not have a search fault No Such Method Found Error.

[0095] It can be seen from the above technical solution that this embodiment provides an optional method for analyzing whether there is corresponding definition information for each program behavior feature. Through the above method, the definition information in the bytecode file and the preset definition information can be matched with the program behavior feature to determine whether there is corresponding definition information for the program behavior feature.

[0096] In some embodiments of the present application, the process of extracting multiple definition information from the bytecode file corresponding to each program behavior feature in step S30 is described in detail, and the steps are as follows:

[0097] S300: Determine the target feature category of each program behavior feature.

[0098] Specifically, since the program behavior feature can be a method feature, a class feature or an interface implementation feature, when obtaining multiple definition information of the corresponding bytecode file, the category of each program behavior feature can be first used as the target feature category of the corresponding program behavior feature.

[0099] S301. Extract all definition information related to the target feature category from the bytecode file recording the corresponding program behavior features.

[0100] Specifically, each definition information corresponding to the target feature category can be extracted from the class file corresponding to each program behavior feature.

[0101] For example, when the program behavior feature is a method feature, all method definition information can be extracted from the bytecode file recording the corresponding program behavior feature;

[0102] When the program behavior feature is a class feature, all class definition information can be extracted from the bytecode file recording the corresponding program behavior feature;

[0103] When the program behavior feature is an interface implementation feature, all interface definition information can be extracted from the bytecode file recording the corresponding program behavior feature.

[0104] It can be seen from the above technical solution that this embodiment provides an optional method for extracting multiple definition information from the bytecode file corresponding to each program behavior feature. Through the above method, when matching definition information of program behavior features of different categories, only the definition information of the corresponding category can be obtained, thereby reducing the amount of information required and improving recognition efficiency.

[0105] In some embodiments of the present application, the process of step S31, matching each program behavior feature with each definition information of the corresponding bytecode file and the preset behavior feature definition library, is described in detail, and the steps are as follows:

[0106] S310. For each program behavior feature, match the program behavior feature with each definition information related to the target feature category in the corresponding bytecode file; if the program behavior feature fails to match all definition information related to the target feature category in the corresponding bytecode file, match the program behavior feature with each preset definition information in the preset behavior feature definition library.

[0107] Specifically, a first similarity between the program behavior feature and each definition information related to the target feature category of the program behavior feature in the class file recording the program behavior feature may be calculated;

[0108] When the first similarity is lower than a preset similarity threshold, determining that the program behavior feature corresponding to the first similarity fails to match the definition information;

[0109] When the program behavior feature fails to match each definition information of the class file recording the program behavior feature, a second similarity between the program behavior feature and each preset definition information may be calculated;

[0110] When the second similarity is lower than a preset similarity threshold, it is determined that the program behavior feature corresponding to the second similarity fails to match the preset definition information.

[0111] It can be seen from the above technical solution that this embodiment provides an optional method for matching each program behavior feature with the definition information of the corresponding bytecode file and a preset behavior feature definition library. Through the above method, when matching definition information of program behavior features of different categories, only the definition information of the corresponding category can be obtained, thereby reducing the amount of matching data and improving recognition efficiency.

[0112] In some embodiments of the present application, in order to improve the accuracy of fault identification, it is possible to try to write definition information into the behavior feature definition library to avoid identification errors caused by definition information search errors. Therefore, the definition information writing process can be added. Next, the process of adding definition information will be described in detail, and the steps are as follows:

[0113] S1. After the target program behavior feature successfully matches the definition information of the corresponding bytecode file, check whether the definition information of the target program behavior feature is recorded in the behavior feature definition library; if not, execute step S2; if yes, it is not necessary to record the definition information.

[0114] Specifically, any program behavior feature can be selected as the target program behavior feature;

[0115] Determine whether there is corresponding definition information for the target program behavior characteristics;

[0116] After the corresponding definition information exists for the target program behavior feature, the definition information of the target program behavior feature may be matched with each preset definition information for similarity;

[0117] If the similarity is lower than the preset similarity threshold, step S2 may be executed;

[0118] If the similarity is not lower than the preset similarity threshold, the recording operation can be stopped.

[0119] S2. Write the identifier of the target program behavior feature and its corresponding definition information into the behavior feature definition library, and update the behavior feature definition library.

[0120] Specifically, the feature identifier of the target program behavior feature, the bytecode file identifier of the target program behavior feature, and the definition information of the target program behavior feature may be written into a behavior feature definition library to update the behavior feature definition library.

[0121] It can be seen from the above technical solution that compared with the previous embodiment, this embodiment adds a definition information writing process. Through the above process, this embodiment can maintain the behavior feature definition library, eliminate recognition errors caused by definition information search errors, and improve recognition accuracy.

[0122] Next, we will combine Figure 2 The fault finding and identification device provided in the present application is introduced in detail. The fault finding and identification device provided below can be compared with the fault finding and identification method provided above.

[0123] See also Figure 2 It can be found that the fault identification device can include:

[0124] The acquisition module 10 is used to acquire all bytecode files of the application body;

[0125] A determination module 20, for determining program behavior characteristics associated with each bytecode file;

[0126] The analysis module 30 is used to analyze whether there is corresponding definition information for each program behavior feature; if there is no corresponding definition information for any program behavior feature, it is determined that the application subject has a search fault NoSuchMethodFoundError; if all program behavior features have corresponding definition information, it is determined that there is no search fault NoSuchMethodFoundError for the application subject.

[0127] Further, the determination module may include:

[0128] The program behavior feature determination unit is used to determine, for each bytecode file, the program behavior features recorded in the bytecode file, the program behavior features that the bytecode file depends on, and the program behavior features that depend on the bytecode file.

[0129] Furthermore, the program behavior feature determination unit may include:

[0130] The method body determination component is used to determine, for each bytecode file, the method body recorded in the bytecode file, the external method that the bytecode file depends on, and the parent method that depends on the bytecode file.

[0131] Furthermore, the analysis module may include:

[0132] A definition information extraction unit, used for extracting a plurality of definition information from a bytecode file corresponding to each program behavior feature;

[0133] A definition information matching unit is used to match each program behavior feature with the definition information of the corresponding bytecode file and a preset behavior feature definition library, wherein the behavior feature definition library records a plurality of preset definition information; if the match is successful, it indicates that the corresponding program behavior feature has corresponding definition information; if the match fails, it indicates that the corresponding program behavior feature does not have corresponding definition information.

[0134] Further, defining the information extraction unit may include:

[0135] A target feature category determination component, used to determine the target feature category of each program behavior feature;

[0136] The target feature category utilization component is used to extract all definition information related to the target feature category from the bytecode file that records the corresponding program behavior characteristics.

[0137] Further, defining the information matching unit may include:

[0138] The bytecode file parsing component is used to match each program behavior feature with each definition information related to the target feature category in the corresponding bytecode file; if the program behavior feature fails to match all the definition information related to the target feature category in the corresponding bytecode file, the program behavior feature is matched with each preset definition information in the preset behavior feature definition library.

[0139] Furthermore, the fault finding and identifying device may also include:

[0140] A definition information detection unit is used to detect whether the definition information of the target program behavior feature is recorded in the behavior feature definition library after the target program behavior feature successfully matches the definition information of the corresponding bytecode file; if not, calling the behavior feature definition library update unit;

[0141] The behavior feature definition library updating unit is used to write the identification of the behavior feature of the target program and the corresponding definition information into the behavior feature definition library, and update the behavior feature definition library.

[0142] The fault finding and identification device provided in the embodiment of the present application can be applied to fault finding and identification equipment, such as PC terminals, cloud platforms, servers and server clusters. Figure 3 The hardware structure diagram of the fault identification device is shown in FIG. Figure 3, the hardware structure of the fault finding and identifying device may include: at least one processor 1, at least one communication interface 2, at least one memory 3 and at least one communication bus 4;

[0143] In the embodiment of the present application, the number of the processor 1, the communication interface 2, the memory 3, and the communication bus 4 is at least one, and the processor 1, the communication interface 2, and the memory 3 communicate with each other through the communication bus 4;

[0144] The processor 1 may be a central processing unit CPU, or an application-specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present invention, etc.;

[0145] The memory 3 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), etc., such as at least one disk memory;

[0146] The memory stores a program, and the processor can call the program stored in the memory, and the program is used to:

[0147] Get all bytecode files of the application body;

[0148] Determine the program behavior characteristics associated with each bytecode file;

[0149] Analyze whether there is corresponding definition information for each program behavior feature;

[0150] If any program behavior feature does not have corresponding definition information, it is determined that the application subject has a search fault NoSuchMethodFoundError; if all program behavior features have corresponding definition information, it is determined that the application subject does not have a search fault NoSuchMethodFoundError.

[0151] Optionally, the detailed functions and extended functions of the program may refer to the above description.

[0152] The embodiment of the present application further provides a readable storage medium, which may store a program suitable for execution by a processor, wherein the program is used to:

[0153] Get all bytecode files of the application body;

[0154] Determine the program behavior characteristics associated with each bytecode file;

[0155] Analyze whether there is corresponding definition information for each program behavior feature;

[0156] If any program behavior feature does not have corresponding definition information, it is determined that the application subject has a search fault NoSuchMethodFoundError; if all program behavior features have corresponding definition information, it is determined that the application subject does not have a search fault NoSuchMethodFoundError.

[0157] Optionally, the detailed functions and extended functions of the program may refer to the above description.

[0158] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0159] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0160] The above description of the disclosed embodiments enables professionals and technicians in the field to implement or use the present application. Various modifications to these embodiments will be apparent to professionals and technicians in the field, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. The various embodiments of the present application can be combined with each other. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for finding faults and identifying faults, characterized in that: include: Get all bytecode files of the application body; Determine the program behavior characteristics associated with each bytecode file; Analyze whether there is corresponding definition information for each program behavior feature; If any program behavior feature does not have corresponding definition information, it is determined that the application subject has a search fault NoSuchMethodFoundError; if all program behavior features have corresponding definition information, it is determined that the application subject does not have a search fault NoSuchMethodFoundError.

2. The fault finding and identification method according to claim 1, characterized in that: Determining the program behavior characteristics related to each bytecode file includes: For each bytecode file, determine the program behavior characteristics recorded in the bytecode file, the program behavior characteristics on which the bytecode file depends, and the program behavior characteristics that depend on the bytecode file.

3. The fault finding and identification method according to claim 2, characterized in that: The step of determining, for each bytecode file, program behavior features recorded in the bytecode file, program behavior features that the bytecode file depends on, and program behavior features that depend on the bytecode file includes: For each bytecode file, determine the method body recorded in the bytecode file, the external method that the bytecode file depends on, and the parent method that depends on the bytecode file.

4. The method for finding and identifying a fault according to claim 1, characterized in that: The analyzing whether there is corresponding definition information for each program behavior feature includes: Extract multiple definition information from the bytecode file corresponding to each program behavior feature; Matching each program behavior feature with each definition information of the corresponding bytecode file and a preset behavior feature definition library, wherein the behavior feature definition library records a plurality of preset definition information; If the match is successful, it indicates that there is corresponding definition information for the corresponding program behavior feature; If the match fails, it indicates that there is no corresponding definition information for the corresponding program behavior feature.

5. The method for finding and identifying faults according to claim 4, characterized in that: The extracting of multiple definition information from the bytecode file corresponding to each program behavior feature includes: Identify target feature categories for each program's behavioral characteristics; All definition information related to the target feature category is extracted from the bytecode file that records the corresponding program behavior features.

6. The method for finding and identifying faults according to claim 5, characterized in that: The matching of each program behavior feature with each definition information of the corresponding bytecode file and a preset behavior feature definition library includes: For each program behavior feature, the program behavior feature is matched with each definition information related to the target feature category in the corresponding bytecode file; if the program behavior feature fails to match all definition information related to the target feature category in the corresponding bytecode file, the program behavior feature is matched with each preset definition information in the preset behavior feature definition library.

7. The method for finding and identifying faults according to claim 4, characterized in that: Also includes: After the target program behavior feature successfully matches each definition information of the corresponding bytecode file, detecting whether the definition information of the target program behavior feature is recorded in the behavior feature definition library; If not, the identifier of the target program behavior feature and its corresponding definition information are written into the behavior feature definition library, and the behavior feature definition library is updated.

8. A fault finding and identification device, characterized in that: include: The acquisition module is used to obtain all bytecode files of the application body; A determination module for determining program behavior characteristics associated with each bytecode file; The analysis module is used to analyze whether there is corresponding definition information for each program behavior feature; if there is no corresponding definition information for any program behavior feature, it is determined that the application subject has a search fault NoSuchMethodFoundError; if all program behavior features have corresponding definition information, it is determined that there is no search fault NoSuchMethodFoundError for the application subject.

9. A fault finding and identification device, characterized in that: including memory and processor; The memory is used to store programs; The processor is used to execute the program to implement each step of the fault finding and identification method as described in any one of claims 1-7.

10. A readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, each step of the fault finding and identifying method according to any one of claims 1 to 7 is implemented.