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

By using ASM identification algorithm and script-driven scanning toolkit in jar package conflict detection, identifying and comparing the class file features in jar packages, the problem of long-term traditional detection algorithms is solved, and fast and efficient jar package conflict detection is achieved.

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

Patent Information

Application Number
CN202411736966.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

The traditional jar packet conflict detection algorithm has a long detection time, resulting in low detection efficiency and increasing server congestion.

Method used

By receiving script files and scanning algorithm toolkits uploaded by the tool platform, the script file driver toolkit is used to scan all jar packages of the target application, and the features of each class file are identified based on the ASM recognition algorithm to determine whether the same class file exists in different jar packages. If it exists, the comparison will be performed and the comparison results will be sent.

Benefits of technology

This greatly shortens the time for detecting jar packet conflicts, from dozens of minutes to minutes or even seconds, improving detection efficiency and reducing server congestion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119512904A_ABST
    Figure CN119512904A_ABST
Patent Text Reader

Abstract

According to the jar package conflict detection method and device, the storage medium and the computer equipment provided by the invention, after the server receives the script file and the scanning algorithm toolkit uploaded by the tool platform, the script file can be utilized to drive the scanning algorithm toolkit to scan all jar packages of the target application; then target features contained in each class file in all the jar packages are recognized based on an ASM recognition algorithm, and whether the same class file exists in different jar packages or not is determined according to the recognition result; if yes, comparing the jar packages with the same class file, and sending a comparison result to the tool platform for storage; otherwise, the identification result is directly sent to the tool platform for storage. According to the process, the duration for detecting the jar packet conflict is greatly shortened, so that the detection efficiency is effectively improved, and server congestion is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of target detection technology, and in particular to a jar package conflict detection method, device, storage medium and computer equipment. Background Art

[0002] Currently, when the same class exists in different jar packages on the server, and the same method name but the return type and parameter type and number of the method are inconsistent, if the application loads the class, the system may report an error or the functional behavior at runtime may be inconsistent with expectations. For this type of problem, the traditional algorithm for detecting jar package conflicts takes a long time to detect, sometimes up to half an hour, which leads to low detection efficiency and increased server congestion. Summary of the invention

[0003] The purpose of this application is to solve at least one of the above-mentioned technical defects, especially the technical defect that the traditional algorithm for detecting jar package conflicts in the prior art has a relatively long detection time, which leads to low detection efficiency and increased congestion of the server.

[0004] The present application provides a jar package conflict detection method, the method comprising:

[0005] Receive script files and scanning algorithm toolkits uploaded by the tool platform;

[0006] Using the script file to drive the scanning algorithm toolkit to scan all jar packages of the target application;

[0007] Based on the ASM recognition algorithm, the target features contained in each class file in all jar packages are identified, and based on the recognition results, it is determined whether the same class file exists in different jar packages;

[0008] If yes, then compare the jar packages that contain the same class file, and send the comparison result to the tool platform for storage;

[0009] Otherwise, the recognition result is directly sent to the tool platform for storage.

[0010] Optionally, the target features contained in each class file in all jar packages are identified based on the ASM identification algorithm to obtain identification results, including:

[0011] Calling the ASM recognition algorithm, wherein the ASM recognition algorithm is obtained by pre-training using sample features in sample class files in different sample jar packages;

[0012] The ASM recognition algorithm is used to recognize the target features contained in each class file in all jar packages to obtain recognition results.

[0013] Optionally, the target features include the type and modifiers of the method defined in the class file itself and the instruction set implemented by the method body;

[0014] The ASM recognition algorithm is used to recognize the target features contained in each class file in all jar packages to obtain recognition results, including:

[0015] The ASM recognition algorithm is used to identify the type of methods defined in each class file in all jar packages, modifiers, and instruction sets implemented by the method body, and obtain recognition results corresponding to each class file.

[0016] Optionally, the jar packages containing the same class file are compared and a comparison result is obtained, including:

[0017] Compare the signatures and implementation logic of the methods in the same class files in each jar package of the same class file, and mark the different method signatures and implementation logics as the comparison results.

[0018] The present application also provides a jar package conflict detection device, comprising:

[0019] A file receiving module, used to receive script files and scanning algorithm toolkits uploaded by the tool platform;

[0020] A jar package scanning module, used to drive the scanning algorithm toolkit to scan all jar packages of the target application using the script file;

[0021] The feature recognition module is used to recognize the target features contained in each class file in all jar packages based on the ASM recognition algorithm, and determine whether the same class file exists in different jar packages based on the recognition results;

[0022] A feature comparison module is used to compare the jar packages of the same class file and send the comparison results to the tool platform for storage;

[0023] The result saving module is used to directly send the recognition result to the tool platform for saving.

[0024] Optionally, the feature recognition module includes:

[0025] An algorithm calling module is used to call an ASM recognition algorithm, wherein the ASM recognition algorithm is obtained by pre-training using sample features in sample class files in different sample jar packages;

[0026] The ASM recognition module is used to use the ASM recognition algorithm to recognize the target features contained in each class file in all jar packages to obtain recognition results.

[0027] Optionally, the target features include the type and modifiers of the method defined in the class file itself and the instruction set implemented by the method body;

[0028] The ASM identification module comprises:

[0029] The ASM identification submodule is used to use the ASM identification algorithm to identify the type, modifiers and instruction set implemented by the method body of each class file in all jar packages to obtain the identification results corresponding to each class file.

[0030] Optionally, the feature comparison module includes:

[0031] The feature comparison submodule is used to compare the signatures and implementation logic of the methods in the same class files in various jar packages of the same class file, and mark the different method signatures and implementation logics as the comparison results.

[0032] The present application also provides a computer-readable storage medium, in which computer-readable instructions are stored. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the jar package conflict detection method as described in any of the above embodiments.

[0033] The present application also provides a computer device, comprising: one or more processors, and a memory;

[0034] The memory stores computer-readable instructions, and when the computer-readable instructions are executed by the one or more processors, the steps of the jar package conflict detection method described in any one of the above embodiments are performed.

[0035] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:

[0036] The jar package conflict detection method, device, storage medium and computer equipment provided by the present application can use the script file to drive the scanning algorithm toolkit to scan all jar packages of the target application after the server receives the script file and scanning algorithm toolkit uploaded by the tool platform; then identify the target features contained in each class file in all jar packages based on the ASM recognition algorithm, and determine whether the same class file exists in different jar packages based on the recognition results; if so, compare the jar packages with the same class file, and send the comparison results to the tool platform for storage; otherwise, directly send the recognition results to the tool platform for storage. This process greatly shortens the time for detecting jar package conflicts, which can be shortened from more than twenty minutes to a few minutes, or even from more than ten seconds to a few seconds, thereby effectively improving detection efficiency and reducing server congestion. 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 some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0038] Figure 1 A schematic diagram of a jar package conflict detection method provided in an embodiment of the present application;

[0039] Figure 2 A schematic diagram of the automated testing process for system testing provided in an embodiment of the present application;

[0040] Figure 3 A schematic diagram of the detection interface of the tool platform provided in the embodiment of the present application;

[0041] Figure 4 A schematic diagram of the structure of a jar package conflict detection device provided in an embodiment of the present application;

[0042] Figure 5 A schematic diagram of the internal structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

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

[0044] Currently, when the same class exists in different jar packages on the server, and the same method name but the return type and parameter type and number of the method are inconsistent, if the application loads the class, the system may report an error or the functional behavior at runtime may be inconsistent with expectations. For this type of problem, the traditional algorithm for detecting jar package conflicts takes a long time to detect, sometimes up to half an hour, which leads to low detection efficiency and increased server congestion.

[0045] Based on this, the present application proposes the following technical solutions, see below for details:

[0046] In one embodiment, Figure 1 As shown, Figure 1 A schematic diagram of a flow chart of a jar package conflict detection method provided in an embodiment of the present application; the present application provides a jar package conflict detection method, which may include:

[0047] S110: receiving the script file and scanning algorithm toolkit uploaded by the tool platform.

[0048] In this step, when detecting whether there is a jar package conflict, the present application can set up the corresponding detection algorithm toolkit and script text through the tool platform. The tool platform can also monitor the deployment status of the target application in the server, and save the recognition results for users to view.

[0049] Based on this, in a specific implementation, Figure 2 As shown, Figure 2 A schematic diagram of the automated testing process for system testing provided in an embodiment of the present application; Figure 2 In the present application, the tool platform can be a test tool platform. When the present application deploys the target application in the server, the vpaas platform can be selected for deployment. For example, the present application selects a suitable vpaas platform according to the application type and application scale of the target application, and then registers an account on the vpaas platform, such as a user name, password, email address, etc., and then logs in to the management console of the vpaas platform to create the target application according to the guidance of the platform. The process may involve specifying the application name, description, selecting the application type, etc., and then configuring various settings according to business needs, such as video encoding format, resolution, frame rate, storage location, etc. If necessary, security options such as access control, encryption, etc. can also be set. Then upload the application code or file, and start the application deployment process on the vpaas platform. The platform will automatically deploy the target application on the server according to the previous settings and the uploaded files. Once the application deployment is completed, the vpaas platform will send a successful deployment message to the test tool platform. At this time, the test tool platform can test the function and performance of the target application.

[0050] Furthermore, when the test tool platform monitors the successful deployment message sent by the vpaas platform, it can remotely connect to the server through the SSH protocol and upload the pre-configured script file corresponding to the target application and the scanning algorithm toolkit to the server, so as to detect whether there is a jar package conflict through the script text and the scanning algorithm toolkit.

[0051] It can be understood that the scanning algorithm toolkit in the present application is a pre-configured toolkit that contains methods, steps, procedures, etc. for scanning all jar packages related to the target application in the server. The toolkit can be used to quickly scan all jar packages of the target application.

[0052] S120: Using the script file to drive the scanning algorithm toolkit to scan all jar packages of the target application.

[0053] In this step, after receiving the script text and scanning algorithm toolkit uploaded by the tool platform through S110, the present application can also use the script file to drive the scanning algorithm toolkit to scan all jar packages of the target application. For example, the present application can use Shell scripts to drive the scanning algorithm toolkit. Since Shell scripts can be used to automate various system management tasks, file operations, process control, etc., the present application uses Shell scripts to drive the scanning algorithm toolkit, which can speed up the scanning process and improve detection efficiency.

[0054] S130: Identify the target features contained in each class file in all jar packages based on the ASM recognition algorithm, and determine whether the same class file exists in different jar packages based on the recognition result; if so, execute S140; otherwise, execute S150.

[0055] In this step, after using S120 to drive the scanning algorithm toolkit using the script file to scan all jar packages of the target application, the application server of the present application can identify and parse the target features contained in each class file in all jar packages based on the ASM recognition algorithm to determine whether the same class file exists in different jar packages, and determine whether to continue the comparison based on the recognition result, so as to send the final comparison result or recognition result to the tool platform, and the tool platform can save the result to the database.

[0056] In a specific implementation, since the ASM recognition algorithm is an algorithm for target recognition and shape matching, it can be used for face recognition, medical image analysis, object recognition, feature recognition, etc. Therefore, the present application can call the pre-configured ASM recognition algorithm to recognize the target features contained in each class file in all scanned jar packages, and the target features include but are not limited to method definitions and method body instructions in the class files, etc., which can be set according to the actual situation and are not limited here.

[0057] S140: Compare various jar packages that exist in the same class file, and send the comparison result to the tool platform for storage.

[0058] In this step, after S130 identifies the target features contained in each class file in all jar packages, an identification result can be obtained. The identification result may be that the same class file exists in different jar packages. At this time, in order to further determine the accuracy of the identification result, the present application can compare the jar packages containing the same class file, so that the final comparison result can be obtained. The present application can send the comparison result to the tool platform so that the tool platform sends the comparison result to the database for storage, and the user can view the detection result through the tool platform.

[0059] Indicatively, Figure 3 As shown, Figure 3 A schematic diagram of the detection interface of the tool platform provided in the embodiment of the present application; Figure 3 It can be seen that when this application enters the domain name in the tool platform, the scan list can be viewed. Click the "View" button in the scan list to view the specific scan details. The scan list intuitively displays the result description, such as "No package conflict", so that users can quickly determine the results of this detection.

[0060] S150: directly sending the recognition result to the tool platform for storage.

[0061] In this step, after S130 identifies the target features contained in each class file in all jar packages, an identification result can be obtained. The identification result may be that the same class file does not exist in different jar packages. The identification result indicates that there is no jar package conflict at present. At this time, the identification result can be sent directly to the tool platform so that the tool platform can display the detection result based on the identification result.

[0062] In the above embodiment, after the server receives the script file and the scanning algorithm toolkit uploaded by the tool platform, the script file can be used to drive the scanning algorithm toolkit to scan all jar packages of the target application; then the target features contained in each class file in all jar packages are identified based on the ASM recognition algorithm, and whether the same class file exists in different jar packages is determined based on the recognition result; if so, the jar packages containing the same class file are compared, and the comparison results are sent to the tool platform for storage; otherwise, the recognition results are directly sent to the tool platform for storage. This process greatly shortens the time for detecting jar package conflicts, which can be shortened from more than twenty minutes to a few minutes, or even from more than ten seconds to a few seconds, thereby effectively improving detection efficiency and reducing server congestion.

[0063] In one embodiment, in S130, target features contained in each class file in all jar packages are identified based on the ASM identification algorithm to obtain identification results, which may include:

[0064] S131: calling an ASM recognition algorithm, wherein the ASM recognition algorithm is obtained by pre-training using sample features in sample class files in different sample jar packages.

[0065] S132: Using the ASM recognition algorithm, target features contained in each class file in all jar packages are recognized to obtain recognition results.

[0066] In this embodiment, when identifying the target features contained in each class file in all jar packages, a pre-configured ASM recognition algorithm can be called. The ASM recognition algorithm is obtained after pre-training using sample features in sample class files in different sample jar packages. In this way, the ASM recognition algorithm can be used to identify the target features contained in each class file in all jar packages and quickly obtain the recognition results.

[0067] It can be understood that in order to adapt to the application scenarios of the present application, the present application can pre-train the active shape model used by the ASM recognition algorithm in the prior art in a targeted manner, such as collecting sample jar packages from different data sources, and using the sample features in the sample class files in the sample jar packages as training data, so as to use the training data to iteratively train the active shape model, and the final model can be used for the target feature recognition of the present application.

[0068] In one embodiment, the target features may include the type and modifiers of the method defined in the class file itself, and the instruction set implemented by the method body.

[0069] In S132, the target features contained in each class file in all jar packages are identified by using the ASM identification algorithm to obtain the identification results, which may include:

[0070] S1321: Using the ASM recognition algorithm, the type of methods defined in each class file in all jar packages, modifiers, and instruction sets implemented by the method body are identified to obtain the identification results corresponding to each class file.

[0071] In this embodiment, when using the ASM recognition algorithm to identify the target features of each class file in all jar packages, the type of target features can be defined first. For example, the present application can use the type of method defined in the class file itself, modifiers, and the instruction set implemented by the method body as the target features. After identifying and comparing the target features corresponding to each class file in different jar packages, it can be quickly determined whether the same class file exists in different jar packages.

[0072] In one embodiment, in S140, each jar package having the same class file is compared and a comparison result is obtained, which may include:

[0073] S141: comparing the signatures of the methods and the implementation logics of the methods in the same class files in various jar packages of the same class file, and marking the different signatures of the methods and the implementation logics of the methods as the comparison results.

[0074] In this embodiment, after determining that the same class file exists in different jar packages, the present application can further compare the jar packages containing the same class file to determine the final comparison result.

[0075] In a specific implementation method, the present application can first identify whether the same class name is in different jar packages, such as: scanning to find two jar packages under the AnswersValidator class: mockito-core-1.10.19.jar and mockito-all-1.9.0.jar, and then use the ASM recognition algorithm to identify the signature of the method in the class class and the implementation logic of the method. The main implementation can be: inherit the ClassVisitor class in the ASM package, and then rewrite the visitField method to obtain the modifier of the member variables of the class, the type of the member variables and the name of the member variables, rewrite the visitMethod method and write an anonymous internal MethodVisitor class, rewrite the visitEnd method to obtain the method modifier, the return type of the method, the method name, the type and parameter name of the method parameters, rewrite the visitInsn and visitIntInsn methods to obtain the operation instructions inside the method body. After performing the above operations, the final comparison result can be obtained.

[0076] The jar package conflict detection device provided in an embodiment of the present application is described below. The jar package conflict detection device described below and the jar package conflict detection method described above can be referenced to each other.

[0077] In one embodiment, Figure 4 As shown, Figure 4 A schematic diagram of the structure of a jar package conflict detection device provided in an embodiment of the present application; the present application also provides a jar package conflict detection device, which may include a file receiving module 210, a jar package scanning module 220, a feature recognition module 230, a feature comparison module 240, and a result storage module 250, specifically including the following:

[0078] The file receiving module 210 is used to receive the script file and the scanning algorithm toolkit uploaded by the tool platform.

[0079] The jar package scanning module 220 is used to use the script file to drive the scanning algorithm toolkit to scan all jar packages of the target application.

[0080] The feature recognition module 230 is used to recognize the target features contained in each class file in all jar packages based on the ASM recognition algorithm, and determine whether the same class file exists in different jar packages according to the recognition result.

[0081] The feature comparison module 240 is used to compare the jar packages that have the same class file, and send the comparison result to the tool platform for storage.

[0082] The result saving module 250 is used to directly send the recognition result to the tool platform for saving.

[0083] When the server receives the script file and scanning algorithm toolkit uploaded by the tool platform, it can use the script file to drive the scanning algorithm toolkit to scan all jar packages of the target application; then, based on the ASM recognition algorithm, it recognizes the target features contained in each class file in all jar packages, and determines whether the same class file exists in different jar packages based on the recognition results; if so, it compares the jar packages with the same class file, and sends the comparison results to the tool platform for storage; otherwise, it directly sends the recognition results to the tool platform for storage. This process greatly shortens the time for detecting jar package conflicts, from more than 20 minutes to a few minutes, or even from more than ten seconds to a few seconds, thereby effectively improving detection efficiency and reducing server congestion.

[0084] In one embodiment, the feature recognition module may include:

[0085] The algorithm calling module is used to call the ASM recognition algorithm, wherein the ASM recognition algorithm is obtained after being trained in advance using sample features in sample class files in different sample jar packages.

[0086] The ASM recognition module is used to use the ASM recognition algorithm to recognize the target features contained in each class file in all jar packages to obtain recognition results.

[0087] In one embodiment, the target features include the type and modifiers of the method defined in the class file itself, and the instruction set implemented by the method body.

[0088] The ASM identification module may include:

[0089] The ASM identification submodule is used to use the ASM identification algorithm to identify the type, modifiers and instruction set implemented by the method body of each class file in all jar packages to obtain the identification results corresponding to each class file.

[0090] In one embodiment, the feature comparison module may include:

[0091] The feature comparison submodule is used to compare the signatures and implementation logic of the methods in the same class files in various jar packages of the same class file, and mark the different method signatures and implementation logics as the comparison results.

[0092] In one embodiment, the present application also provides a computer-readable storage medium, which stores computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the jar package conflict detection method described in any of the above embodiments.

[0093] In one embodiment, the present application also provides a computer device, including: one or more processors, and a memory.

[0094] The memory stores computer-readable instructions, and when the computer-readable instructions are executed by the one or more processors, the steps of the jar package conflict detection method described in any one of the above embodiments are performed.

[0095] Indicatively, if Figure 5 As shown, Figure 5 This is a schematic diagram of the internal structure of a computer device provided in an embodiment of the present application. The computer device 300 may be provided as a server. Figure 5 The computer device 300 includes a processing component 302, which further includes one or more processors, and a memory resource represented by a memory 301, for storing instructions executable by the processing component 302, such as an application. The application stored in the memory 301 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 302 is configured to execute instructions to perform the jar package conflict detection method of any of the above embodiments.

[0096] The computer device 300 may further include a power supply component 303 configured to perform power management of the computer device 300, a wired or wireless network interface 304 configured to connect the computer device 300 to a network, and an input / output (I / O) interface 305. The computer device 300 may operate based on an operating system stored in the memory 301, such as Windows Server TM, Mac OS X TM, Unix TM, Linux TM, Free BSD TM, or the like.

[0097] Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

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

[0099] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The various embodiments can be combined as needed, and the same or similar parts can refer to each other.

[0100] 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 jar package conflict detection method, characterized in that: The method comprises: Receive script files and scanning algorithm toolkits uploaded by the tool platform; Using the script file to drive the scanning algorithm toolkit to scan all jar packages of the target application; Based on the ASM recognition algorithm, the target features contained in each class file in all jar packages are identified, and based on the recognition results, it is determined whether the same class file exists in different jar packages; If yes, then compare the jar packages that contain the same class file, and send the comparison result to the tool platform for storage; Otherwise, the recognition result is directly sent to the tool platform for storage.

2. The jar package conflict detection method according to claim 1, characterized in that: The target features contained in each class file in all jar packages are identified based on the ASM identification algorithm to obtain the identification results, including: Calling the ASM recognition algorithm, wherein the ASM recognition algorithm is obtained by pre-training using sample features in sample class files in different sample jar packages; The ASM recognition algorithm is used to recognize the target features contained in each class file in all jar packages to obtain recognition results.

3. The jar package conflict detection method according to claim 2, characterized in that: The target features include the type and modifiers of the method defined in the class file itself and the instruction set implemented by the method body; The ASM recognition algorithm is used to recognize the target features contained in each class file in all jar packages to obtain recognition results, including: The ASM recognition algorithm is used to identify the type of methods defined in each class file in all jar packages, modifiers, and instruction sets implemented by the method body, and obtain recognition results corresponding to each class file.

4. The jar package conflict detection method according to claim 1, characterized in that: The jar packages containing the same class file are compared and the comparison results are obtained, including: Compare the signatures and implementation logic of the methods in the same class files in each jar package of the same class file, and mark the different method signatures and implementation logics as the comparison results.

5. A jar package conflict detection device, characterized in that: include: A file receiving module, used to receive script files and scanning algorithm toolkits uploaded by the tool platform; A jar package scanning module, used to drive the scanning algorithm toolkit to scan all jar packages of the target application using the script file; The feature recognition module is used to recognize the target features contained in each class file in all jar packages based on the ASM recognition algorithm, and determine whether the same class file exists in different jar packages based on the recognition results; A feature comparison module is used to compare the jar packages of the same class file and send the comparison results to the tool platform for storage; The result saving module is used to directly send the recognition result to the tool platform for saving.

6. The jar package conflict detection device according to claim 5, characterized in that: The feature recognition module comprises: An algorithm calling module is used to call an ASM recognition algorithm, wherein the ASM recognition algorithm is obtained by pre-training using sample features in sample class files in different sample jar packages; The ASM recognition module is used to use the ASM recognition algorithm to recognize the target features contained in each class file in all jar packages to obtain recognition results.

7. The jar package conflict detection device according to claim 6, characterized in that: The target features include the type and modifiers of the method defined in the class file itself and the instruction set implemented by the method body; The ASM identification module comprises: The ASM identification submodule is used to use the ASM identification algorithm to identify the type, modifiers and instruction set implemented by the method body of each class file in all jar packages to obtain the identification results corresponding to each class file.

8. The jar package conflict detection device according to claim 5, characterized in that: The feature comparison module comprises: The feature comparison submodule is used to compare the signatures and implementation logic of the methods in the same class files in various jar packages of the same class file, and mark the different method signatures and implementation logics as the comparison results.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the jar package conflict detection method as described in any one of claims 1 to 4.

10. A computer device, characterized in that: include: one or more processors, and memory; The memory stores computer-readable instructions, and when the computer-readable instructions are executed by the one or more processors, the steps of the jar package conflict detection method as described in any one of claims 1 to 4 are performed.

Citation Information

Patent Citations

  • Method and device for detecting robustness of JAVA application program

    CN103559132A

  • Method and device for detecting JAR packet collision

    CN105630463A

  • Code detection method and device, electronic equipment and storage medium

    CN114185766A

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

    CN115563010A