Application fault detection method and device, equipment and storage medium

By detecting Jar package conflicts in applications to be published and recordings of conflict-like methods called, the problem of low fault detection efficiency of traditional manual dependencies is solved, and more efficient and accurate fault detection and processing is achieved to ensure the normal release and operation of the application.

CN119690805APending Publication Date: 2025-03-25GUANGZHOU PINWEI SOFTWARE CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411971950.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-03-25

AI Technical Summary

Technical Problem

The existing application failure detection relies on manual labor, which leads to the inefficiency of the detection and testing process of the application to be released before going online, and wastes manpower and material resources.

Method used

After deploying the application to be published and determining that the deployment is successful, check whether there are records of Jar package conflicts and calling conflict-like methods. If there is, troubleshooting and re-detection are performed until the application is faultless.

Benefits of technology

Improve the efficiency and accuracy of application fault detection, ensuring that all faults are handled before release, thereby ensuring the normal operation of the application.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119690805A_ABST
    Figure CN119690805A_ABST
Patent Text Reader

Abstract

The invention discloses an application fault detection method and device, equipment and a storage medium, and the method comprises the steps: deploying a to-be-published application, and judging whether the deployment is successful or not; if yes, detecting whether a Jar packet conflict exists in the to-be-released application or not; if the Jar packet conflict exists in the to-be-published application, detecting whether a record for calling a conflict class method exists in the to-be-published application or not; if the record for calling the conflict type method exists in the application to be published, determining that the application to be published has a fault; and performing fault processing on the to-be-published application, taking the to-be-published application as a new to-be-published application after the fault processing, returning to execute the process of deploying the to-be-published application until the new to-be-published application does not have a fault, and publishing. According to the application, whether the to-be-published application has the fault is determined from the two aspects of Jar packet conflict and conflict class calling methods, so that the fault detection efficiency and accuracy can be improved, the to-be-published application can be published until the fault does not exist, all faults can be processed, and the normal operation of the to-be-published application after being published is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of application fault detection, and in particular to an application fault detection method, apparatus, device and storage medium. Background Art

[0002] Various applications play a vital role in enterprise operations and people's daily lives. As the scale of applications continues to expand, their functions become increasingly complex, and their technical architectures continue to evolve, application fault detection has become a key link in ensuring the continuous and stable operation of applications.

[0003] Traditional application fault detection mainly relies on manual monitoring and post-analysis. For example, when a developer receives a notification about the conflict correction of a jar package for an application to be released, the developer notifies the tester to retest the application to be released. If there is a problem with the test, the developer needs to repair it. After the repair is completed, the tester is notified to test again. This reliance on manual methods makes the detection and testing process of the application to be released before going online very inefficient, wasting manpower and material resources. Summary of the invention

[0004] In view of this, the present application provides an application fault detection method, device, equipment and storage medium, which are used to solve the problem that the existing application fault detection relies on manual methods, making the detection and testing process of the application to be released before going online very inefficient and wasting manpower and material resources.

[0005] To achieve the above objectives, the proposed solution is as follows:

[0006] In a first aspect, a method for detecting a fault in an application includes:

[0007] Deploy the application to be released and determine whether the deployment is successful;

[0008] If so, check whether there is a Jar package conflict in the application to be released;

[0009] If there is a Jar package conflict in the application to be released, detect whether there is a record of calling the conflicting method in the application to be released;

[0010] If there is a record of calling a conflicting method in the application to be released, it is determined that there is a fault in the application to be released;

[0011] Fault processing is performed on the application to be released, and after the fault processing, the application to be released is used as a new application to be released, and the process of deploying the application to be released is returned to execute until the new application to be released has no faults and is released.

[0012] Preferably, the detecting whether there is a Jar package conflict in the application to be released includes:

[0013] Get the Jar package directory of the application to be released;

[0014] Determine the version of each Jar package from the Jar package directory;

[0015] Determine whether the versions of the Jar packages are the same;

[0016] If yes, determine that there is no Jar package conflict in the application to be released;

[0017] If not, obtaining the dependency tree structure of the application to be released;

[0018] Determine whether at least two Jar packages of different versions are referenced in the dependency tree structure;

[0019] If at least two Jar packages of different versions are referenced in the dependency tree structure, it is determined that there is a Jar package conflict in the application to be released.

[0020] Preferably, the detecting whether there is a record of calling a conflicting method in the application to be released includes:

[0021] Establish request instructions for identifying calling conflicting methods;

[0022] Sending the request instruction to the application to be published, so that the application to be published returns each class in the application to be published and the method calling relationship between each class;

[0023] Based on the calling relationships between classes and methods, a graph data structure is formed;

[0024] Determine a starting class node in the graph data structure, and traverse the graph data structure starting from the starting class node to determine whether there is a method call relationship corresponding to a preset conflict class method set;

[0025] If so, it is determined that there is a record of calling a conflicting method in the application to be released.

[0026] Preferably, the establishment of a request instruction for identifying a call conflict method includes:

[0027] Set the request protocol;

[0028] Obtain the service address, port and authentication information of the application to be released;

[0029] Determine the request data format corresponding to the service address;

[0030] According to the request data format, a request instruction for identifying calling conflicting methods is established by the request protocol, service address, port and authentication information.

[0031] Preferably, the method further comprises:

[0032] After detecting whether there is a Jar package conflict in the application to be released, recording the conflict detection result;

[0033] After detecting whether there is a record of calling a conflicting method in the application to be released, recording the call detection result;

[0034] Generate an email according to the conflict detection result and the record call detection result;

[0035] Obtain the name and port of the application to be released;

[0036] Using the name and port of the application to be released as labels to mark the email;

[0037] Send the flagged email to the app developer.

[0038] Preferably, the determining whether the deployment is successful includes:

[0039] After the application to be released is deployed, an application detection instruction is sent to the application detection platform, so that the application detection platform performs deployment detection on the application to be released according to the application detection instruction;

[0040] Monitor in real time whether the application detection platform sends a message of successful deployment;

[0041] When a message indicating successful deployment is monitored from the application detection platform, it is determined that the application to be released is deployed successfully.

[0042] In a second aspect, a fault detection device for an application includes:

[0043] The deployment judgment module is used to deploy the application to be released and judge whether the deployment is successful;

[0044] A Jar package conflict detection module is used to detect whether there is a Jar package conflict in the application to be released;

[0045] A calling conflict method detection module is used to detect whether there is a record of calling the conflict method in the application to be released if there is a Jar package conflict in the application to be released;

[0046] A fault occurrence determination module, configured to determine that a fault exists in the application to be released if there is a record of calling a conflicting method in the application to be released;

[0047] The loop detection module is used to perform fault processing on the application to be released, and after the fault processing, the application to be released is used as a new application to be released, and the process of deploying the application to be released is returned to execute until the new application to be released has no faults and is released.

[0048] Preferably, the Jar package conflict detection module includes:

[0049] The directory acquisition module is used to obtain the Jar package directory of the application to be released;

[0050] A version determination module, used to determine the version of each Jar package from the Jar package directory;

[0051] A version determination module, used to determine whether the versions of the Jar packages are the same;

[0052] A non-conflict determination module, used for determining that if yes, there is no Jar package conflict in the application to be released;

[0053] A dependency tree structure acquisition module, used for, if not, acquiring the dependency tree structure of the application to be released;

[0054] A reference judgment module, used to judge whether at least two Jar packages of different versions are referenced in the dependency tree structure;

[0055] The conflict determination module is used to determine that there is a Jar package conflict in the to-be-published application if at least two Jar packages of different versions are referenced in the dependency tree structure.

[0056] In a third aspect, a fault detection device for an application includes a memory and a processor;

[0057] The memory is used to store programs;

[0058] The processor is used to execute the program to implement each step of the application fault detection method as described in any one of the first aspects.

[0059] In a fourth aspect, a storage medium stores a computer program thereon, wherein when the computer program is executed by a processor, the steps of the method for fault detection of an application as described in any one of the first aspects are implemented.

[0060] It can be seen from the above technical solution that the present application deploys the application to be released and determines whether the deployment is successful; if so, detects whether there is a Jar package conflict in the application to be released; if there is a Jar package conflict in the application to be released, detects whether there is a record of calling the conflicting method in the application to be released; if there is a record of calling the conflicting method in the application to be released, determines that there is a fault in the application to be released; performs fault handling on the application to be released, and after the fault handling, uses it as a new application to be released, and returns to execute the process of deploying the application to be released until the new application to be released has no faults and is released. This application first deploys the application to be released, and then determines whether the deployment is successful. This is to ensure the accuracy of subsequent fault detection. If so, first detect whether there is a jar package conflict. If so, continue with subsequent detection to detect whether there is a record of calling conflicting methods in the application to be released. Jar package conflicts and records of calling conflicting methods are both manifestations of faults in the application to be released. Therefore, this application starts from these two aspects to determine whether there is a fault in the application to be released, thereby improving the efficiency and accuracy of fault detection. If there is a fault, the fault is handled and re-detected until it can be released after there is no fault. This application can ensure that all faults have been handled before the application to be released is released, and ensure the normal operation of the application to be released after it is released. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] In order to more clearly illustrate the embodiments of the present invention 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 invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0062] Figure 1 An optional flow chart of a fault detection method for an application provided in an embodiment of the present application;

[0063] Figure 2 A schematic diagram of the structure of a fault detection device for an application provided in an embodiment of the present application;

[0064] Figure 3 A schematic diagram of the structure of a fault detection device for an application provided in an embodiment of the present application. DETAILED DESCRIPTION

[0065] 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.

[0066] Various applications play a vital role in enterprise operations and people's daily lives. As the scale of applications continues to expand, their functions become increasingly complex, and their technical architectures continue to evolve, application fault detection has become a key link in ensuring the continuous and stable operation of applications.

[0067] Traditional application fault detection mainly relies on manual monitoring and post-analysis. For example, when a developer receives a notification about the conflict correction of a jar package for an application to be released, the developer notifies the tester to retest the application to be released. If there is a problem with the test, the developer needs to repair it. After the repair is completed, the tester is notified to test again. This reliance on manual methods makes the detection and testing process of the application to be released before going online very inefficient, wasting manpower and material resources.

[0068] In one example, the pre-release detection process of an existing application to be released includes: when a developer receives a notification of jar package conflict rectification, the developer notifies the tester to conduct a test; if a jar package conflict does exist, the developer repairs it, and then notifies the tester again to trigger detection. In this complex process, there may be mistakes made by developers and / or testers, resulting in faults or bugs being released with the application to be released, affecting the operation of the application after it is officially released.

[0069] In order to solve the defects of the above-mentioned prior art, an embodiment of the present invention provides an application fault detection method, which can be applied to various computer terminals or intelligent terminals, and its execution subject can be a processor or server of the computer terminal or intelligent terminal. The method flow chart of the method is as follows: Figure 1 As shown, specifically including:

[0070] S1: Deploy the application to be released and determine whether the deployment is successful.

[0071] The pending applications in this application refer to applications that are ready for formal release, or applications that have been repaired or rectified. They need to be launched and released. In order to ensure normal operation after the launch, fault detection needs to be performed before the release.

[0072] The application to be released can be deployed and fault detection can be performed after deployment. During the deployment process, the environment configuration is first performed. A suitable server, such as a physical server or a cloud server, can be selected according to the parameters or performance of the application to be released, and the software dependencies required for the application to be released to run are clarified, such as the environment when the programming language runs, the database management system, etc., and the network settings of the server are configured; then the program files of the application to be released are uploaded to the server, and corresponding configuration is performed, and the startup command is executed after configuration.

[0073] After deployment, it is necessary to judge whether the deployment is successful or not, such as monitoring whether the application to be released responds correctly to the startup command. Only if the deployment is successful can the subsequent detection process be carried out, otherwise it will affect the accuracy of the fault detection results.

[0074] S2: If yes, check whether there is a Jar package conflict in the application to be released.

[0075] Jar package is a file format used to store and distribute Java class files, related resources (such as configuration files, image files, etc.) and metadata. It is essentially a compressed file, usually with the extension ".jar", which puts everything related to the Java program in it for easy management and use.

[0076] A jar package conflict refers to a situation in which different dependent libraries in a Java application introduce classes or resources with the same name, but these classes or resources have different versions or different contents, which causes errors in the application during compilation or runtime. For example, an application depends on two different versions of logging libraries at the same time, and both logging libraries contain a class named Logger, but their method signatures or internal implementations are different, which may cause conflicts.

[0077] Therefore, in the fault detection method set in the present application, after the application to be released is successfully deployed, it is first detected whether there is a jar package conflict in the application to be released. This can quickly and efficiently detect faults of the jar package conflict type and improve detection efficiency.

[0078] S3: If there is a Jar package conflict in the application to be released, detect whether there is a record of calling a conflicting method in the application to be released.

[0079] In order to further improve the accuracy of fault detection, after determining that there is a jar package conflict, continue to detect whether there is a record of calling conflicting methods in the application to be released, which can be achieved by using a call identification relationship algorithm. Detecting whether there is a record of calling conflicting methods in the application to be released refers to determining whether there are methods in the conflicting class in the application to be released.

[0080] Conflicting classes refer to classes with the same name introduced by different jar packages. These classes with the same name may come from different versions of dependent libraries or different third-party libraries. The application to be released calls a specific method in these classes with the same name at runtime, thus constituting the behavior of calling the method in the conflicting class. Therefore, detecting whether there is a record of calling the conflicting class method in the application to be released can further determine whether there is a fault in the application to be released.

[0081] S4: If there is a record of calling a conflicting method in the application to be released, it is determined that there is a fault in the application to be released.

[0082] After this step, it has been determined that there is a jar package conflict in the application to be released, and there is a record of calling the conflicting method, thereby confirming that there is a fault in the application to be released.

[0083] S5: performing fault processing on the application to be released, using it as a new application to be released after the fault processing, and returning to the process of deploying the application to be released until the new application to be released has no faults and is released.

[0084] The jar package conflicts and the failure problems caused by calling conflicting methods can be handled separately.

[0085] You can also first check the log file to locate the error location, and you can also directly check data processing problems and user interface display abnormalities. These problems may be caused by jar package conflicts or calling conflicting methods. After determining the problem, perform fault handling and repeat the process of steps S1 to S5 of this application after handling until the application to be released has no faults. This ensures that the application to be released can run normally after release.

[0086] It can be seen from the above technical solution that the present application deploys the application to be released and determines whether the deployment is successful; if so, detects whether there is a Jar package conflict in the application to be released; if there is a Jar package conflict in the application to be released, detects whether there is a record of calling the conflicting method in the application to be released; if there is a record of calling the conflicting method in the application to be released, determines that there is a fault in the application to be released; performs fault handling on the application to be released, and after the fault handling, uses it as a new application to be released, and returns to execute the process of deploying the application to be released until the new application to be released has no faults and is released. This application first deploys the application to be released, and then determines whether the deployment is successful. This is to ensure the accuracy of subsequent fault detection. If so, first detect whether there is a jar package conflict. If so, continue with subsequent detection to detect whether there is a record of calling conflicting methods in the application to be released. Jar package conflicts and records of calling conflicting methods are both manifestations of faults in the application to be released. Therefore, this application starts from these two aspects to determine whether there is a fault in the application to be released, thereby improving the efficiency and accuracy of fault detection. If there is a fault, the fault is handled and re-detected until it can be released after there is no fault. This application can ensure that all faults have been handled before the application to be released is released, and ensure the normal operation of the application to be released after it is released.

[0087] Optionally, after deploying the application to be released, it is necessary to determine whether the deployment is successful before subsequent fault detection can be smoothly performed. The specific steps may include:

[0088] After the application to be released is deployed, an application detection instruction is sent to the application detection platform, so that the application detection platform performs deployment detection on the application to be released according to the application detection instruction;

[0089] Monitor in real time whether the application detection platform sends a message of successful deployment;

[0090] When a message indicating successful deployment is monitored from the application detection platform, it is determined that the application to be released is deployed successfully.

[0091] Specifically, in one example, in the video field, the application detection platform can be vPaaS. When the application to be released is successfully deployed, vPaaS will send a message of successful deployment, so it is possible to monitor the dynamics in real time to grasp the deployment status of the application to be released.

[0092] In the method provided in the embodiment of the present invention, the process of detecting whether there is a Jar package conflict in the application to be released is specifically described as follows:

[0093] Get the Jar package directory of the application to be released;

[0094] Determine the version of each Jar package from the Jar package directory;

[0095] Determine whether the versions of the Jar packages are the same;

[0096] If yes, determine that there is no Jar package conflict in the application to be released;

[0097] If not, obtaining the dependency tree structure of the application to be released;

[0098] Determine whether at least two Jar packages of different versions are referenced in the dependency tree structure;

[0099] If at least two Jar packages of different versions are referenced in the dependency tree structure, it is determined that there is a Jar package conflict in the application to be released.

[0100] Specifically, the method to determine whether there is a Jar package conflict can be based on the version of the jar package, that is, first obtain the Jar package directory, which contains the versions of all Jar packages, and determine whether the versions of each Jar package are the same. If all Jar package versions are the same, then these Jar packages are considered to belong to the same type of Jar package, and no conflict will occur. If there is a Jar package with a different version from other Jar packages, it cannot be directly considered that there will be a conflict, and further determination is required, that is, obtaining the dependency tree structure of the application to be released, and analyzing whether the dependency tree structure introduces a conflicting Jar package, that is, whether at least two different versions of Jar packages are referenced. If so, it is determined that there is a Jar package conflict in the application to be released.

[0101] The above process performs double judgment from two perspectives: the Jar package version in the directory and the Jar version applied in the dependency tree structure. This can improve the accuracy of the judgment and reduce the possibility of errors caused by judging from one aspect.

[0102] The following embodiment describes in detail the process of detecting whether there is a record of calling a conflicting method in the application to be released in the present application.

[0103] Establish request instructions for identifying calling conflicting methods;

[0104] Sending the request instruction to the application to be published, so that the application to be published returns each class in the application to be published and the method calling relationship between each class;

[0105] Based on the calling relationships between classes and methods, a graph data structure is formed;

[0106] Determine a starting class node in the graph data structure, and traverse the graph data structure starting from the starting class node to determine whether there is a method call relationship corresponding to a preset conflict class method set;

[0107] If so, it is determined that there is a record of calling a conflicting method in the application to be released.

[0108] Among them, the process of establishing a request instruction for identifying calling conflicting methods may include: setting a request protocol; obtaining the service address, port and authentication information of the application to be released; determining the request data format corresponding to the service address; and according to the request data format, establishing a request instruction for identifying calling conflicting methods based on the request protocol, service address, port and authentication information.

[0109] Specifically, in order to detect call conflict class method records, you can send an identification package conflict request, that is, establish a request instruction for identifying call conflict class methods, and send the request instruction to the application to be released. After receiving the request instruction, the application to be released can feedback its own classes and the method call relationships between each class. Next, you can perform detection based on this class and the method call relationships between each class. For more efficient and simple detection, a graph data structure is formed by the method call relationships between each class, and then detection is performed based on the graph data structure.

[0110] Among them, firstly, a starting class node in the graph data structure is determined, and the graph data structure is traversed from the starting class node. In the graph data structure, each node represents a class, and the directed edges between the nodes represent that the method of one class calls the method of another class. The weight of the directed edge can be set according to factors such as the frequency of calling, so that the real method calling relationship can be intuitively displayed, so as to traverse to find out whether there is a situation where a conflicting class method is called. For example, first determine which classes are at risk of conflict, and establish a conflicting class method set based on these classes. This can be determined in the process of detecting whether there is a Jar package conflict in the application to be released in the above process. Then, a depth-first search or a breadth-first search is performed starting from the starting class node of the graph data structure to check whether the passed edge points to a method in the conflicting class. If so, it is determined that there is a method calling relationship corresponding to the preset conflicting class method set, thereby determining that there is a record of calling the conflicting class method in the application to be released.

[0111] Furthermore, the application may also include:

[0112] After detecting whether there is a Jar package conflict in the application to be released, recording the conflict detection result;

[0113] After detecting whether there is a record of calling a conflicting method in the application to be released, recording the call detection result;

[0114] Generate an email according to the conflict detection result and the record call detection result;

[0115] Obtain the name and port of the application to be released;

[0116] Using the name and port of the application to be released as labels to mark the email;

[0117] Send the flagged email to the app developer.

[0118] Specifically, in order to promptly resolve failures in applications to be released and to record the results for later traceability analysis, after detecting whether there is a Jar package conflict, the conflict detection results can be recorded, and after detecting whether there is a record of calling conflicting methods, the call detection results can be recorded. The corresponding emails are then generated from these two results, and the name and port of the application to be released are obtained. The email is marked to indicate the application to which the email belongs, and then sent to the application developer.

[0119] The content of the email may include: the name of the conflicting Jar package, branch name, package conflict details, detail link, and package conflict viewing manual. The package conflict details include the class name in the source code, the conflicting class name called, the conflicting method called, and the conflicting Jar package set.

[0120] Then, application developers can create fault details based on the information in this email, which includes: title (the title content consists of the name of the conflicting Jar package and the branch name), domain information, fault status, fault level, project, project leader, copy recipient of the fault information, fault discovery stage, fault impact environment, fault ticket number, fault repairer, related use cases, commit ID, detailed description of the fault content, etc.

[0121] and Figure 1 Corresponding to the method described above, the embodiment of the present invention also provides an application fault detection device for detecting Figure 1 In the specific implementation of the method, the application fault detection device provided in the embodiment of the present invention can be in a computer terminal or various mobile devices, combined with Figure 2 , introduce the applied fault detection device, such as Figure 2 As shown, the device may include:

[0122] A deployment judgment module 10 is used to deploy the application to be released and judge whether the deployment is successful;

[0123] Jar package conflict detection module 20, used to detect whether there is a Jar package conflict in the application to be released;

[0124] A calling conflict method detection module 30 is used to detect whether there is a record of calling a conflict method in the application to be released if there is a Jar package conflict in the application to be released;

[0125] A fault occurrence determination module 40, configured to determine that a fault occurs in the application to be released if there is a record of calling a conflicting method in the application to be released;

[0126] The loop detection module 50 is used to perform fault processing on the application to be released, and after the fault processing, use it as a new application to be released, and return to execute the process of deploying the application to be released until the new application to be released has no faults and is released.

[0127] It can be seen from the above technical solution that the present application deploys the application to be released and determines whether the deployment is successful; if so, detects whether there is a Jar package conflict in the application to be released; if there is a Jar package conflict in the application to be released, detects whether there is a record of calling the conflicting method in the application to be released; if there is a record of calling the conflicting method in the application to be released, determines that there is a fault in the application to be released; performs fault handling on the application to be released, and after the fault handling, uses it as a new application to be released, and returns to execute the process of deploying the application to be released until the new application to be released has no faults and is released. This application first deploys the application to be released, and then determines whether the deployment is successful. This is to ensure the accuracy of subsequent fault detection. If so, first detect whether there is a jar package conflict. If so, continue with subsequent detection to detect whether there is a record of calling conflicting methods in the application to be released. Jar package conflicts and records of calling conflicting methods are both manifestations of faults in the application to be released. Therefore, this application starts from these two aspects to determine whether there is a fault in the application to be released, thereby improving the efficiency and accuracy of fault detection. If there is a fault, the fault is handled and re-detected until it can be released after there is no fault. This application can ensure that all faults have been handled before the application to be released is released, and ensure the normal operation of the application to be released after it is released.

[0128] In one example, the Jar package conflict detection module 20 includes:

[0129] The directory acquisition module is used to obtain the Jar package directory of the application to be released;

[0130] A version determination module, used to determine the version of each Jar package from the Jar package directory;

[0131] A version determination module, used to determine whether the versions of the Jar packages are the same;

[0132] A non-conflict determination module, used for determining that if yes, there is no Jar package conflict in the application to be released;

[0133] A dependency tree structure acquisition module, used for, if not, acquiring the dependency tree structure of the application to be released;

[0134] A reference judgment module, used to judge whether at least two Jar packages of different versions are referenced in the dependency tree structure;

[0135] The conflict determination module is used to determine that there is a Jar package conflict in the to-be-published application if at least two Jar packages of different versions are referenced in the dependency tree structure.

[0136] Furthermore, the embodiment of the present application provides a fault detection device for an application. Optionally, Figure 3 The hardware structure diagram of the fault detection device of the application is shown in FIG. Figure 3 The hardware structure of the applied fault detection device may include: at least one processor 01 , at least one communication interface 02 , at least one memory 03 and at least one communication bus 04 .

[0137] In the embodiment of the present application, the number of the processor 01 , the communication interface 02 , the memory 03 , and the communication bus 04 is at least one, and the processor 01 , the communication interface 02 , and the memory 03 communicate with each other through the communication bus 04 .

[0138] The processor 01 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention.

[0139] The memory 03 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.

[0140] The memory stores a program, and the processor can call the program stored in the memory, and the program is used to execute the fault detection method of the following application, including:

[0141] Deploy the application to be released and determine whether the deployment is successful;

[0142] If so, check whether there is a Jar package conflict in the application to be released;

[0143] If there is a Jar package conflict in the application to be released, detect whether there is a record of calling the conflicting method in the application to be released;

[0144] If there is a record of calling a conflicting method in the application to be released, it is determined that there is a fault in the application to be released;

[0145] Fault processing is performed on the application to be released, and after the fault processing, the application to be released is used as a new application to be released, and the process of deploying the application to be released is returned to execute until the new application to be released has no faults and is released.

[0146] Optionally, the detailed functions and extended functions of the program may refer to the description of the fault detection method applied in the method embodiment.

[0147] The embodiment of the present application further provides a storage medium, which may store a program suitable for execution by a processor, and when the program is running, controls the device where the storage medium is located to execute the following application fault detection method, including:

[0148] Deploy the application to be released and determine whether the deployment is successful;

[0149] If so, check whether there is a Jar package conflict in the application to be released;

[0150] If there is a Jar package conflict in the application to be released, detect whether there is a record of calling the conflicting method in the application to be released;

[0151] If there is a record of calling a conflicting method in the application to be released, it is determined that there is a fault in the application to be released;

[0152] Fault processing is performed on the application to be released, and after the fault processing, the application to be released is used as a new application to be released, and the process of deploying the application to be released is returned to execute until the new application to be released has no faults and is released.

[0153] Specifically, the storage medium may be a computer-readable storage medium, and the computer-readable storage medium may be an electronic memory such as a flash memory, an EEPROM (Electrically Erasable Programmable Read-Only Memory), an EPROM, a hard disk or a ROM.

[0154] Optionally, the detailed functions and extended functions of the program may refer to the description of the fault detection method applied in the method embodiment.

[0155] In addition, the functional modules in the various embodiments of the present disclosure can be integrated together to form an independent part, or each module can exist separately, or two or more modules can be integrated to form an independent part. If the function is implemented in the form of a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present disclosure is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions for a computer device (which can be a personal computer, a live broadcast device, or a network device, etc.) to perform all or part of the steps of the methods of the various embodiments of the present disclosure.

[0156] 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.

[0157] 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.

[0158] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. 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 detecting a fault in an application, characterized in that: include: Deploy the application to be released and determine whether the deployment is successful; If so, check whether there is a Jar package conflict in the application to be released; If there is a Jar package conflict in the application to be released, detect whether there is a record of calling the conflicting method in the application to be released; If there is a record of calling a conflicting method in the application to be released, it is determined that there is a fault in the application to be released; Fault processing is performed on the application to be released, and after the fault processing, the application to be released is used as a new application to be released, and the process of deploying the application to be released is returned to execute until the new application to be released has no faults and is released.

2. The method according to claim 1, characterized in that The detecting whether there is a Jar package conflict in the application to be released includes: Get the Jar package directory of the application to be released; Determine the version of each Jar package from the Jar package directory; Determine whether the versions of the Jar packages are the same; If yes, determine that there is no Jar package conflict in the application to be released; If not, obtaining the dependency tree structure of the application to be released; Determine whether at least two Jar packages of different versions are referenced in the dependency tree structure; If at least two Jar packages of different versions are referenced in the dependency tree structure, it is determined that there is a Jar package conflict in the application to be released.

3. The method according to claim 1, characterized in that The detecting whether there is a record of calling a conflicting method in the application to be released includes: Establish request instructions for identifying calling conflicting methods; Sending the request instruction to the application to be published, so that the application to be published returns each class in the application to be published and the method calling relationship between each class; Based on the calling relationships between classes and methods, a graph data structure is formed; Determine a starting class node in the graph data structure, and traverse the graph data structure starting from the starting class node to determine whether there is a method call relationship corresponding to a preset conflict class method set; If so, it is determined that there is a record of calling a conflicting method in the application to be released.

4. The method according to claim 3, characterized in that The request instruction for establishing the identification calling conflict method includes: Set the request protocol; Obtain the service address, port and authentication information of the application to be released; Determine the request data format corresponding to the service address; According to the request data format, a request instruction for identifying calling conflicting methods is established by the request protocol, service address, port and authentication information.

5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: After detecting whether there is a Jar package conflict in the application to be released, recording the conflict detection result; After detecting whether there is a record of calling a conflicting method in the application to be released, recording the call detection result; Generate an email according to the conflict detection result and the record call detection result; Obtain the name and port of the application to be released; Using the name and port of the application to be released as labels to mark the email; Send the flagged email to the app developer.

6. The method according to claim 1, characterized in that The determining whether the deployment is successful includes: After the application to be released is deployed, an application detection instruction is sent to the application detection platform, so that the application detection platform performs deployment detection on the application to be released according to the application detection instruction; Monitor in real time whether the application detection platform sends a message of successful deployment; When a message indicating successful deployment is monitored from the application detection platform, it is determined that the application to be released is deployed successfully.

7. An applied fault detection device, characterized in that: include: The deployment judgment module is used to deploy the application to be released and judge whether the deployment is successful; A Jar package conflict detection module is used to detect whether there is a Jar package conflict in the application to be released; A calling conflict method detection module is used to detect whether there is a record of calling the conflict method in the application to be released if there is a Jar package conflict in the application to be released; A fault occurrence determination module, configured to determine that a fault exists in the application to be released if there is a record of calling a conflicting method in the application to be released; The loop detection module is used to perform fault processing on the application to be released, and after the fault processing, the application to be released is used as a new application to be released, and the process of deploying the application to be released is returned to execute until the new application to be released has no faults and is released.

8. The device according to claim 7, characterized in that The Jar package conflict detection module includes: The directory acquisition module is used to obtain the Jar package directory of the application to be released; A version determination module, used to determine the version of each Jar package from the Jar package directory; A version determination module, used to determine whether the versions of the Jar packages are the same; A non-conflict determination module, used for determining that if yes, there is no Jar package conflict in the application to be released; A dependency tree structure acquisition module, used for, if not, acquiring the dependency tree structure of the application to be released; A reference judgment module, used to judge whether at least two Jar packages of different versions are referenced in the dependency tree structure; The conflict determination module is used to determine that there is a Jar package conflict in the to-be-published application if at least two Jar packages of different versions are referenced in the dependency tree structure.

9. An applied fault detection 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 detection method for an application as described in any one of claims 1 to 6.

10. A 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 detection method for an application as claimed in any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Method for automatically detecting dependency conflict problem in Maven project based on GitHub

    CN112799937A

  • Jar packet conflict detection method and device, storage medium and computer equipment

    CN115563010A

  • Method and device for detecting jar packet conflict

    CN116501371A

  • Malicious application detection method, system and equipment based on simplified call graph and medium

    CN118036005A