CN114490529A - Dependency relationship analysis method, dependency relationship analysis device, storage medium and equipment - Google Patents

Dependency relationship analysis method, dependency relationship analysis device, storage medium and equipment Download PDF

Info

Publication number
CN114490529A
CN114490529A CN202210139273.9A CN202210139273A CN114490529A CN 114490529 A CN114490529 A CN 114490529A CN 202210139273 A CN202210139273 A CN 202210139273A CN 114490529 A CN114490529 A CN 114490529A
Authority
CN
China
Prior art keywords
compressed file
compressed
files
file
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210139273.9A
Other languages
Chinese (zh)
Inventor
廖琦
赵博
夏晓鹏
方舟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202210139273.9A priority Critical patent/CN114490529A/en
Publication of CN114490529A publication Critical patent/CN114490529A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/14Details of searching files based on file metadata
    • G06F16/148File search processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/174Redundancy elimination performed by the file system
    • G06F16/1744Redundancy elimination performed by the file system using compression, e.g. sparse files

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Library & Information Science (AREA)
  • Human Computer Interaction (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a dependency relationship analysis method, a dependency relationship analysis device, a storage medium and equipment. Wherein, the method comprises the following steps: acquiring a target package name corresponding to a first compressed file, wherein the first compressed file is a compressed file which is upgraded and/or modified in a target search range, and the target search range comprises a plurality of compressed files and a plurality of class files; traversing a second compressed file set to determine whether a second compressed file related to the target package name exists, wherein the second compressed file set includes all the compressed files in the target search range except the first compressed file; and if the second compressed file exists in the second compressed file set, determining that a dependency relationship exists between the first compressed file and the second compressed file. The invention solves the technical problems of low maintenance efficiency and high maintenance cost caused by the need of manual retrieval and analysis of the dependency relationship in the prior art.

Description

Dependency relationship analysis method, dependency relationship analysis device, storage medium and equipment
Technical Field
The invention relates to the technical field of financial science and technology, in particular to the technical field of system development and testing, and specifically relates to a dependency relationship analysis method, a dependency relationship analysis device, a storage medium and equipment.
Background
With the continuous expansion of the application range of the project, the dependency in the project becomes increasingly complex, and when operations such as project upgrading, package upgrading, adding, deleting and the like are encountered, for example, when operations such as upgrading, package upgrading, adding, deleting and the like are encountered in an application project developed based on Java, the influence brought to the application by related operations and nodes needing to be matched need to be combed, that is, the dependency relationship between the nodes is combed.
At present, the dependence relationship of jar packages needs to be searched in projects manually, and especially under the condition of indirect dependence, the workload is huge, the maintenance efficiency is reduced, and the omission phenomenon is easy to occur.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
Embodiments of the present invention provide a dependency relationship analysis method, apparatus, storage medium, and device, so as to at least solve the technical problems of low maintenance efficiency and high maintenance cost caused by the need of manually retrieving and analyzing a dependency relationship in the prior art.
According to an aspect of an embodiment of the present invention, there is provided a dependency relationship analysis method, including: acquiring a target package name corresponding to a first compressed file, wherein the first compressed file is a compressed file which is upgraded and/or modified in a target search range, and the target search range comprises a plurality of compressed files and a plurality of class files; traversing a second compressed file set to determine whether a second compressed file related to the target package name exists, wherein the second compressed file set includes all the compressed files in the target search range except the first compressed file; and if the second compressed file exists in the second compressed file set, determining that a dependency relationship exists between the first compressed file and the second compressed file.
Optionally, the method further includes: traversing whether a first class file related to the target package name exists in a plurality of class files or not; and if the first class file exists in the plurality of class files, determining that a dependency relationship exists between the first class file and the first compressed file.
Optionally, the obtaining of the target package name corresponding to the first compressed file includes: acquiring the target search range; determining the first compressed file from a plurality of the compressed files; and performing decompiling processing on the first compressed file to obtain the target package name.
Optionally, the method further includes: and recording the first compressed file and a plurality of second compressed files in a package name set.
Optionally, the method further includes: and marking the searched first compressed file and the second compressed file in the package name set.
Optionally, the method further includes: and writing the second compressed file and the first type file into an output object table.
According to another aspect of the embodiments of the present invention, there is also provided a dependency relationship analysis apparatus, including: the system comprises an acquisition module, a storage module and a processing module, wherein the acquisition module is used for acquiring a target package name corresponding to a first compressed file, the first compressed file is a compressed file which is upgraded and/or modified in a target search range, and the target search range comprises a plurality of compressed files and a plurality of class files; a traversing module, configured to traverse whether a second compressed file related to the target package name exists in a second compressed file set, where the second compressed file set includes all the compressed files in the target search range except the first compressed file; and the determining module is used for determining that the dependency relationship exists between the first compressed file and the second compressed file if the second compressed file exists in the second compressed file set.
According to another aspect of the embodiments of the present invention, there is also provided a non-volatile storage medium, wherein the non-volatile storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing any one of the above dependency analysis methods.
According to another aspect of the embodiments of the present invention, there is also provided an electronic device, including a memory and a processor, where the memory stores a computer program, and the processor is configured to execute the computer program to perform any one of the above dependency analysis methods.
According to another aspect of the embodiments of the present invention, there is also provided a processor, where the processor is configured to execute a program, where the program executes any one of the above dependency analysis methods.
In the embodiment of the invention, a dependency analysis mode is adopted, and a target package name corresponding to a first compressed file is obtained, wherein the first compressed file is a compressed file which is upgraded and/or modified in a target search range, and the target search range comprises a plurality of compressed files and a plurality of class files; traversing a second compressed file set to determine whether a second compressed file related to the target package name exists, wherein the second compressed file set includes all the compressed files in the target search range except the first compressed file; if the second compressed file exists in the second compressed file set, the dependency relationship between the first compressed file and the second compressed file is determined, and the purpose of automatically retrieving and analyzing the dependency relationship is achieved, so that the technical effects of improving the dependency relationship analysis efficiency and the maintenance efficiency and reducing the maintenance cost are achieved, and the technical problems of low maintenance efficiency and high maintenance cost caused by the fact that the dependency relationship needs to be manually retrieved and analyzed in the prior art are solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention and do not constitute a limitation of the invention. In the drawings:
FIG. 1 is a flow diagram of a method of dependency analysis according to an embodiment of the present invention;
FIG. 2 is a flow diagram of an alternative dependency analysis method according to an embodiment of the present invention;
FIG. 3 is a flow diagram of another alternative dependency analysis method according to embodiments of the present invention;
FIG. 4 is a flow diagram of another alternative dependency analysis method according to embodiments of the present invention;
fig. 5 is a schematic structural diagram of a dependency relationship analysis apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
First, in order to facilitate understanding of the embodiments of the present invention, some terms or nouns referred to in the present invention will be explained as follows:
java: the object-oriented programming language has the characteristics of cross-platform, general programming and the like, and is widely applied to enterprise-level Web application development and mobile application development.
git tool: an open source distributed version control system that can efficiently handle very small to very large project version management at high speed.
Class (c): a collection of Java data and methods to manipulate the data.
And (5) jar package: and the method is used for packaging the written classes and introducing the written classes into the items in the form of Jar packages.
Dependence relationship: for describing a relationship between different classes in Java, e.g. a class references the variable C of b class, then a dependency is formed between these two classes. The dependency relationship can be divided into direct dependency and indirect dependency, and the a-type directly refers to the b-type variable, which is called direct dependency. If d class references a class, then there is an indirect dependency between d and b classes.
Example 1
With the continuous expansion of the application range of the project, the dependency in the project becomes increasingly complex, and when operations such as project upgrading, package upgrading, adding, deleting and the like are encountered, for example, when operations such as upgrading, package upgrading, adding, deleting and the like are encountered in an application project developed based on Java, the influence brought to the application by related operations and nodes needing to be matched need to be combed, that is, the dependency relationship between the nodes is combed.
At present, the dependence relationship of jar packages needs to be searched in a project manually, particularly under the condition of indirect dependence, all jar packages need to be decompiled, the uniform package names of the java classes in the changed jar packages are searched, after relevant jar packages are listed, the relevant jar packages are searched again until all suspected affected jar packages and java classes are covered, and then the matching modification and the testing are carried out on the corresponding actual application functions. The manual searching method has the disadvantages of huge workload, low maintenance efficiency and easy omission.
In addition, the dependency relationship can only be displayed through the pom file dimension through the Maven tool, and the correlation relationship of the jar package and which java classes the relevant jar package is associated with cannot be comprehensively known. And the method has no comprehensive visual dependency graph and no uniform output result, so that the communication cost among the roles in the project is increased.
In view of the foregoing, it should be noted that the steps illustrated in the flowchart of the drawings may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than presented herein.
Fig. 1 is a flowchart of a dependency analysis method according to an embodiment of the present invention, as shown in fig. 1, the method includes the following steps:
step S102, acquiring a target package name corresponding to a first compressed file, wherein the first compressed file is a compressed file which is upgraded and/or modified in a target search range, and the target search range comprises a plurality of compressed files and a plurality of class files;
step S104, traversing whether a second compressed file related to the target package name exists in a second compressed file set or not;
step S106, if the second compressed file exists in the second compressed file set, determining that a dependency relationship exists between the first compressed file and the second compressed file.
Optionally, the first compressed file may be, but is not limited to, a jar package to be detected, that is, a jar package subjected to upgrading and/or modification processing in a target search range; the compressed file can be but is not limited to a jar package; the class file can be but is not limited to a Java class; the target package name may be, but is not limited to, a package name related to the first compressed file (i.e., jar package to be detected).
Optionally, the target search range may be introduced in a manner of, but not limited to, folder path search; or by introducing the target search scope in a way of visualizing the folder path selected by the "open" button.
Optionally, the second compressed file set includes all the compressed files in the target search range except the first compressed file.
Optionally, the dependency relationship includes: direct dependency, indirect dependency.
It should be noted that, if a second compressed file related to the target package name exists in the second compressed file set, it indicates that the same modification and/or update as the first compressed file exists in the second compressed file, that is, it is considered that a dependency relationship exists between the first compressed file and the second compressed file.
In the embodiment of the invention, a dependency analysis mode is adopted, and a target package name corresponding to a first compressed file is obtained, wherein the first compressed file is a compressed file which is upgraded and/or modified in a target search range, and the target search range comprises a plurality of compressed files and a plurality of class files; traversing a second compressed file set to determine whether a second compressed file related to the target package name exists, wherein the second compressed file set includes all the compressed files in the target search range except the first compressed file; if the second compressed file exists in the second compressed file set, the dependency relationship between the first compressed file and the second compressed file is determined, and the purpose of automatically retrieving and analyzing the dependency relationship is achieved, so that the technical effects of improving the dependency relationship analysis efficiency and the maintenance efficiency and reducing the maintenance cost are achieved, and the technical problems of low maintenance efficiency and high maintenance cost caused by the fact that the dependency relationship needs to be manually retrieved and analyzed in the prior art are solved.
In an alternative embodiment, fig. 2 is a flowchart of an alternative dependency analysis method according to an embodiment of the present invention, and as shown in fig. 2, a folder path of a target search range is first input on an interactive interface, or the folder path is selected by a visual "open" button; and importing a jar package (namely a first compressed file) to be analyzed, starting to search and analyze all files in the target search range, and finally outputting an analysis result table under the root directory of the target search range.
In an optional embodiment, the method further includes:
step S202, traversing whether a first class file related to the target package name exists in a plurality of class files;
step S204, if the first class file exists in the plurality of class files, determining that a dependency relationship exists between the first class file and the first compressed file.
Optionally, the first type of file may be, but is not limited to, a Java class; the target package name may be, but is not limited to, a package name related to the first compressed file (i.e., jar package to be detected).
It should be noted that, in the actual project application, the target search range includes not only a plurality of jar packages but also a plurality of Java classes, and therefore, it is necessary to detect whether there is a dependency relationship between the class file and the jar package to be detected (i.e., the first compressed file). If a Java class (i.e. the first class file) related to the target package name exists in the class files in the target search range, it indicates that the same modification and/or update as the first compressed file exists in the first class file, that is, it is considered that a dependency relationship exists between the first class file and the first compressed file.
As an alternative embodiment, fig. 3 is a flowchart of another alternative dependency analysis method according to an embodiment of the present invention, and as shown in fig. 3, the obtaining a target package name corresponding to a first compressed file includes:
step S302, obtaining the target search range;
step S304 of determining the first compressed file from among the plurality of compressed files;
step S306, performing decompiling processing on the first compressed file to obtain the target package name.
It should be noted that each compressed file includes a plurality of class files, that is, each jar package includes a plurality of Java classes, the essence of the analysis depending on the concern lies in the dependency relationship between the Java classes, and when an update and/or modification occurs to the jar package, the Java class that has occurred needs to be determined. Therefore, decompiling processing needs to be performed on the jar package to be detected (i.e., the first compressed file), so as to obtain a plurality of Java classes in the jar package to be detected, find the updated and/or modified Java class, and determine the package name related to the updated and/or modified Java class.
In an optional embodiment, the method further includes:
in step S402, the first compressed file and the plurality of second compressed files are recorded in a package name set.
Optionally, the set of package names may be, but is not limited to, a jar set of package names.
Optionally, after determining the first compressed file, recording a file name corresponding to the first compressed file into the package name set.
Optionally, after determining that the second compressed file exists in the second compressed file set, the file name corresponding to the second compressed file is recorded in the package name set.
In an optional embodiment, the method further includes:
step S502, performing a marking process on the searched first compressed file and the second compressed file in the package name set.
Optionally, in the set of package names, the searched first compressed file and the second compressed file are marked as "analyzed" compressed files.
Optionally, in a case where all of the first compressed file and the second compressed file are marked as "analyzed" compressed files, the traversal search operation is ended.
It should be noted that, by means of performing a marking process on the searched first compressed file and the searched second compressed file in the package name set, it is ensured that all dependency relationships in the target range are identified, and occurrence of a missing phenomenon and/or repeated search is avoided.
In an optional embodiment, the method further includes:
step S602, writing the second compressed file and the first type file into an output table.
Optionally, after traversing a plurality of the class files, a first class file related to the target package name exists, and then writing the first class file into an output object table.
Optionally, after traversing the second compressed file set, the second compressed file related to the target package name exists, and then the second compressed file is written into the output object table.
As an alternative embodiment, fig. 4 is a flowchart of another alternative dependency relationship analysis method according to an embodiment of the present invention, and as shown in fig. 4, the method may be implemented by integrating search algorithm policies by using a git tool based on JAVA dependency base relationships, and specifically includes the following steps: firstly, a plurality of java classes and a plurality of jar packages in a target search range; determining jar packages to be analyzed from the plurality of jar packages, recording names corresponding to the jar packages to be analyzed in a jar package name set, performing decompilation processing on the jar packages to be analyzed to obtain package names related to the jar packages to be analyzed, firstly searching in a plurality of Java classes corresponding to a target search range according to the package names, and outputting the Java classes related to the package names in an output object table; searching in a plurality of jar packages in a target search range to obtain all jar packages related to the package name, and recording the names of all jar packages in the jar package name set; then, taking each jar package in the jar package set as the jar package to be analyzed, traversing and carrying out the searching operation, marking the jar package after the searching operation as an analyzed jar package in the jar package name set, and continuously operating in the way until all jar packages in the jar package set are marked as analyzed; finally, all JAVA classes related to direct dependency and indirect dependency are recorded in the table.
The embodiment of the invention can at least realize the following technical effects: the method finishes the scheme of combing direct dependence and indirect dependence between jar packages and classes in the project and performing unified output, improves the project development and maintenance efficiency and reduces the burden of developers and project managers.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
Example 2
In this embodiment, a dependency relationship analysis apparatus is further provided, and the apparatus is used to implement the foregoing embodiments and preferred embodiments, and the details that have been already described are not repeated. As used hereinafter, the terms "module" and "apparatus" may refer to a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
According to an embodiment of the present invention, an embodiment of an apparatus for implementing the dependency relationship analysis method is further provided, fig. 5 is a schematic structural diagram of the dependency relationship analysis apparatus according to the embodiment of the present invention, and as shown in fig. 5, the dependency relationship analysis apparatus includes: an obtaining module 70, a traversing module 72, and a determining module 74, wherein:
the obtaining module 70 is configured to obtain a target package name corresponding to a first compressed file, where the first compressed file is a compressed file that is updated and/or modified in a target search range, and the target search range includes a plurality of compressed files and a plurality of class files;
the traversing module 72 is configured to traverse whether a second compressed file related to the target package name exists in a second compressed file set, where the second compressed file set includes all the compressed files in the target search range except the first compressed file;
the determining module 74 is configured to determine that a dependency relationship exists between the first compressed file and the second compressed file if the second compressed file exists in the second compressed file set.
In the embodiment of the present invention, a dependency analysis manner is adopted, and the obtaining module 70 is configured to obtain a target package name corresponding to a first compressed file, where the first compressed file is a compressed file that is upgraded and/or modified in a target search range, and the target search range includes multiple compressed files and multiple class files; the traversing module 72 is configured to traverse whether a second compressed file related to the target package name exists in a second compressed file set, where the second compressed file set includes all the compressed files in the target search range except the first compressed file; the determining module 74 is configured to determine that a dependency relationship exists between the first compressed file and the second compressed file if the second compressed file exists in the second compressed file set, so as to achieve the purpose of automatically retrieving and analyzing the dependency relationship, thereby achieving the technical effects of improving the dependency relationship analysis efficiency and maintenance efficiency and reducing the maintenance cost, and further solving the technical problems of low maintenance efficiency and high maintenance cost caused by the need of manually retrieving and analyzing the dependency relationship in the prior art.
It should be noted that the above modules may be implemented by software or hardware, for example, for the latter, the following may be implemented: the modules can be located in the same processor; alternatively, the modules may be located in different processors in any combination.
It should be noted that the acquiring module 70, the traversing module 72, and the determining module 74 correspond to steps S102 to S106 in embodiment 1, and the modules are the same as the examples and application scenarios realized by the corresponding steps, but are not limited to the disclosure in embodiment 1. It should be noted that the modules described above may be implemented in a computer terminal as part of an apparatus.
It should be noted that, reference may be made to the relevant description in embodiment 1 for optional or preferred embodiments of this embodiment, and details are not described here again.
The dependency relationship analysis apparatus may further include a processor and a memory, where the obtaining module 70, the traversing module 72, the determining module 74, and the like are all stored in the memory as program units, and the processor executes the program units stored in the memory to implement corresponding functions.
The processor comprises a kernel, and the kernel calls a corresponding program unit from the memory, wherein one or more than one kernel can be arranged. The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
According to an embodiment of the present application, there is also provided an embodiment of a non-volatile storage medium. Optionally, in this embodiment, the nonvolatile storage medium includes a stored program, and the device where the nonvolatile storage medium is located is controlled to execute any one of the dependency analysis methods when the program runs.
Optionally, in this embodiment, the nonvolatile storage medium may be located in any one of computer terminals in a computer terminal group in a computer network, or in any one of mobile terminals in a mobile terminal group, and the nonvolatile storage medium includes a stored program.
Optionally, the device in which the non-volatile storage medium is controlled to execute the following functions when the program runs: acquiring a target package name corresponding to a first compressed file, wherein the first compressed file is a compressed file which is upgraded and/or modified in a target search range, and the target search range comprises a plurality of compressed files and a plurality of class files; traversing a second compressed file set to determine whether a second compressed file related to the target package name exists, wherein the second compressed file set includes all the compressed files in the target search range except the first compressed file; and if the second compressed file exists in the second compressed file set, determining that a dependency relationship exists between the first compressed file and the second compressed file.
Optionally, the device in which the non-volatile storage medium is controlled to execute the following functions when the program runs: traversing whether a first class file related to the target package name exists in a plurality of class files or not; and if the first class file exists in the plurality of class files, determining that a dependency relationship exists between the first class file and the first compressed file.
Optionally, the device in which the non-volatile storage medium is controlled to execute the following functions when the program runs: acquiring the target search range; determining the first compressed file from a plurality of the compressed files; and performing decompiling processing on the first compressed file to obtain the target package name.
Optionally, the device in which the non-volatile storage medium is controlled to execute the following functions when the program runs: and recording the first compressed file and a plurality of second compressed files in a package name set.
Optionally, the device in which the non-volatile storage medium is controlled to execute the following functions when the program runs: and marking the searched first compressed file and the second compressed file in the package name set.
Optionally, the device in which the non-volatile storage medium is controlled to execute the following functions when the program runs: and writing the second compressed file and the first type file into an output object table.
According to an embodiment of the present application, there is also provided an embodiment of a processor. Optionally, in this embodiment, the processor is configured to execute a program, where the program executes any one of the dependency analysis methods.
There is further provided, according to an embodiment of the present application, an embodiment of a computer program product, which is adapted to execute a program initialized with the steps of the dependency analysis method of any one of the above when executed on a data processing device.
Optionally, the computer program product is adapted to perform a program for initializing the following method steps when executed on a data processing device: acquiring a target package name corresponding to a first compressed file, wherein the first compressed file is a compressed file which is upgraded and/or modified in a target search range, and the target search range comprises a plurality of compressed files and a plurality of class files; traversing a second compressed file set to determine whether a second compressed file related to the target package name exists, wherein the second compressed file set includes all the compressed files in the target search range except the first compressed file; and if the second compressed file exists in the second compressed file set, determining that a dependency relationship exists between the first compressed file and the second compressed file.
According to an embodiment of the present application, there is further provided an embodiment of an electronic device, including a memory and a processor, where the memory stores a computer program, and the processor is configured to execute the computer program to perform any one of the dependency analysis methods.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units may be a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed coupling or direct coupling or communication connection between each other may be an indirect coupling or communication connection through some interfaces, units or modules, and may be electrical or in other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable non-volatile storage medium. Based on such understanding, the technical solution of the present invention, which is substantially or partly contributed by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a non-volatile storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned nonvolatile storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (10)

1. A method of dependency analysis, comprising:
acquiring a target package name corresponding to a first compressed file, wherein the first compressed file is a compressed file which is upgraded and/or modified in a target search range, and the target search range comprises a plurality of compressed files and a plurality of class files;
traversing a second compressed file set to determine whether a second compressed file related to the target package name exists, wherein the second compressed file set comprises all the compressed files except the first compressed file in the target search range;
and if the second compressed file exists in the second compressed file set, determining that a dependency relationship exists between the first compressed file and the second compressed file.
2. The method of claim 1, further comprising:
traversing whether a first class file related to the target package name exists in a plurality of class files;
and if the first class files exist in the plurality of class files, determining that a dependency relationship exists between the first class files and the first compressed files.
3. The method according to claim 1, wherein the obtaining the target package name corresponding to the first compressed file comprises:
acquiring the target search range;
determining the first compressed file from a plurality of the compressed files;
and performing decompiling processing on the first compressed file to obtain the name of the target package.
4. The method of claim 1, further comprising:
and recording the first compressed file and a plurality of second compressed files in a package name set.
5. The method of claim 4, further comprising:
and marking the searched first compressed file and the second compressed file in the package name set.
6. The method of claim 2, further comprising:
writing the second compressed file and the first class file into an output table.
7. A dependency analysis apparatus, comprising:
the system comprises an acquisition module, a storage module and a processing module, wherein the acquisition module is used for acquiring a target package name corresponding to a first compressed file, the first compressed file is a compressed file which is upgraded and/or modified in a target search range, and the target search range comprises a plurality of compressed files and a plurality of class files;
a traversing module, configured to traverse whether a second compressed file related to the target package name exists in a second compressed file set, where the second compressed file set includes all the compressed files in the target search range except the first compressed file;
and the determining module is used for determining that a dependency relationship exists between the first compressed file and the second compressed file if the second compressed file exists in the second compressed file set.
8. A non-volatile storage medium storing a plurality of instructions adapted to be loaded by a processor and to perform the dependency analysis method of any one of claims 1 to 6.
9. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, and the processor is configured to execute the computer program to perform the dependency analysis method of any one of claims 1 to 6.
10. A processor, configured to run a program, wherein the program when running performs the dependency analysis method of any one of claims 1 to 6.
CN202210139273.9A 2022-02-15 2022-02-15 Dependency relationship analysis method, dependency relationship analysis device, storage medium and equipment Pending CN114490529A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210139273.9A CN114490529A (en) 2022-02-15 2022-02-15 Dependency relationship analysis method, dependency relationship analysis device, storage medium and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210139273.9A CN114490529A (en) 2022-02-15 2022-02-15 Dependency relationship analysis method, dependency relationship analysis device, storage medium and equipment

Publications (1)

Publication Number Publication Date
CN114490529A true CN114490529A (en) 2022-05-13

Family

ID=81480087

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210139273.9A Pending CN114490529A (en) 2022-02-15 2022-02-15 Dependency relationship analysis method, dependency relationship analysis device, storage medium and equipment

Country Status (1)

Country Link
CN (1) CN114490529A (en)

Similar Documents

Publication Publication Date Title
EP1782191B1 (en) Method for loading software with an intermediate object oriented language in a portable device
US20190362079A1 (en) Apparatus for quantifying security of open-source software package, and apparatus and method for optimizing open-source software package
CN107193615A (en) The renewal dispositions method and device of item code information
KR20170068814A (en) Apparatus and Method for Recognizing Vicious Mobile App
EP3444741A1 (en) Generating rules to detect security vulnerabilities based on vulnerability primitives with entry point finder
EP1046105A1 (en) Data compaction method for an intermediate object code programme executable in an onboard system provided with data processing resources and corresponding onboard system with multiple applications
CN106886445A (en) Java packets generation method and equipment and information extracting method and equipment
CN109766261B (en) Coverage test method, coverage test device, computer equipment and storage medium
CN104462968A (en) Malicious application program scanning method, device and system
CN113835713B (en) Source code packet downloading method, device, computer equipment and storage medium
CN108845839A (en) Application page loading method, device and computer readable storage medium
CN112099880B (en) Method and system for reducing application program driven by scene
CN111124480A (en) Application package generation method and device, electronic equipment and storage medium
CN113268245A (en) Code analysis method, device and storage medium
CN107526636B (en) Resource identification method and device
CN110826057B (en) Analysis method for data processing path, computer device, and storage medium
EP3444738A1 (en) Entry point finder
CN111124872A (en) Branch detection method and device based on difference code analysis and storage medium
CN112905443A (en) Test case generation method, device and storage medium
CN114490529A (en) Dependency relationship analysis method, dependency relationship analysis device, storage medium and equipment
CN114417347A (en) Vulnerability detection method, device, equipment, storage medium and program of application program
CN113821486A (en) Method and device for determining dependency relationship between pod libraries and electronic equipment
US10719609B2 (en) Automatic impact detection after patch implementation with entry point finder
EP3444740A1 (en) Checking for unnecessary privileges with entry point finder
JP6770335B2 (en) Analyst and program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination