CN110825377A - Dependency conflict analysis method and device - Google Patents

Dependency conflict analysis method and device Download PDF

Info

Publication number
CN110825377A
CN110825377A CN201810891638.7A CN201810891638A CN110825377A CN 110825377 A CN110825377 A CN 110825377A CN 201810891638 A CN201810891638 A CN 201810891638A CN 110825377 A CN110825377 A CN 110825377A
Authority
CN
China
Prior art keywords
data packets
dependency
packet
data
packets
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
CN201810891638.7A
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.)
Beijing Gridsum Technology Co Ltd
Original Assignee
Beijing Gridsum Technology Co Ltd
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 Beijing Gridsum Technology Co Ltd filed Critical Beijing Gridsum Technology Co Ltd
Priority to CN201810891638.7A priority Critical patent/CN110825377A/en
Publication of CN110825377A publication Critical patent/CN110825377A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/43Checking; Contextual analysis
    • G06F8/433Dependency analysis; Data or control flow analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the invention provides a method and a device for analyzing dependency conflicts. In the embodiment of the invention, the packet identifiers and packet versions of a plurality of second data packets on which the first data packet depends are obtained; determining at least two second data packets with the same packet identification in the plurality of second data packets; and determining whether a dependency conflict exists between the at least two second data packets according to the respective packet versions of the at least two second data packets. By the method, whether the dependence conflicts exist in the second data packets depended on by the first data packet can be automatically detected without manually detecting whether the dependence conflicts exist in the second data packets depended on by the first data packet, so that the operation of a user is simplified, the detection time is short, and the detection efficiency is high.

Description

Dependency conflict analysis method and device
Technical Field
The invention relates to the technical field of computers, in particular to a dependency conflict analysis method and device.
Background
Currently, software developers develop various kinds of software for users to use, and the same software gradually appears in different versions along with the development of services.
When a software is operated, a data package of other software is sometimes used as technical support, so that when a software developer develops an installation package of the software, the data package of the other software needs to be loaded in the installation package, and thus a dependency relationship is formed between the installation package and the data package of the other software, that is, the installation package of the software depends on the data package of the other software.
Sometimes, when one piece of software runs, more than one data packet of the software needs technical support, and there often exists a dependency relationship between more than one data packet, so when the dependency relationship is complex, dependency conflicts often occur between the data packets, and further the software cannot be normally installed and used.
For example, as shown in fig. 1, the installation package of software a depends on the data package of the V1 version of software B and the data package of the V3 version of software C, while the data package of the V1 version of software B depends on the data package of the V1 version of software D, the data package of the V3 version of software C depends on the data package of the V7 version of software D, and the versions of the data packages of software D collide, so that a dependency collision occurs. If the dependency conflict occurs, the software A cannot be normally installed by using the installation package of the software A.
Thus, the developer needs to manually detect which data packets have dependency conflicts and resolve the dependency conflicts.
However, when the dependency relationship is very complex, the developer often needs to spend a long time to detect the data packet with the dependency conflict, and the detection efficiency is low.
Disclosure of Invention
In order to solve the above technical problem, embodiments of the present invention show a dependency conflict analysis method and apparatus.
In a first aspect, an embodiment of the present invention shows a dependency conflict analysis method, where the method includes:
acquiring packet identifiers and packet versions of a plurality of second data packets on which the first data packet depends;
determining at least two second data packets with the same packet identification in the plurality of second data packets;
and determining whether a dependency conflict exists between the at least two second data packets according to the respective packet versions of the at least two second data packets.
In an optional implementation, the method further comprises:
and if the dependency conflict exists between the at least two second data packets, displaying the dependency conflict.
In an optional implementation manner, the presenting the dependency conflict includes:
determining a first dependency between the first data packet and the plurality of second data packets and a second dependency between the plurality of second data packets;
generating a dependency relationship tree including the first data packet and the plurality of second data packets according to the first dependency relationship and the second dependency relationship;
marking the at least two data packets in the dependency tree.
In an optional implementation manner, the presenting the dependency conflict includes:
determining a first dependency between the first data packet and the plurality of second data packets and a second dependency between the plurality of second data packets;
generating a dependency relationship tree including the first data packet and the plurality of second data packets according to the first dependency relationship and the second dependency relationship;
intercepting a partial tree comprising the at least two second packets in the dependency tree;
marking the at least two data packets in the local tree.
In an optional implementation manner, the intercepting the partial tree including the at least two second packets in the dependency tree includes:
determining, among the first data packet and the plurality of second data packets, a data packet to which the at least two second data packets directly depend and a data packet to which the at least two second data packets directly depend;
setting a minimum rectangular box comprising a data packet on which the at least two second data packets directly depend, a data packet on which the at least two second data packets directly depend and the at least two data packets in the dependency tree;
and acquiring a part positioned in the rectangular frame and using the part as the local tree.
In an optional implementation manner, the determining whether there is a dependency conflict between the at least two second data packets according to the respective packet versions of the at least two second data packets includes:
determining whether the difference between the packet versions of every two second data packets in the at least two second data packets is within a preset version interval;
if the first data packets are all located in the preset version interval, determining that dependency conflicts do not exist between the at least two second data packets;
determining that a dependency conflict exists between the at least two second packets if there is at least one difference that is not within a preset version interval.
In an optional implementation manner, the determining whether there is a dependency conflict between the at least two second data packets according to the respective packet versions of the at least two second data packets includes:
determining whether packet versions of each two of the at least two second data packets are the same;
determining that there is no dependency conflict between the at least two second data packets if the packet versions of each two second data packets are the same;
and if the packet versions of any two second data packets are not the same, determining that a dependency conflict exists between the at least two second data packets.
In a second aspect, an embodiment of the present invention shows a dependency conflict analysis apparatus, including:
the acquisition module is used for acquiring the packet identifiers and the packet versions of a plurality of second data packets which depend on the first data packet;
a first determining module, configured to determine, among the plurality of second data packets, at least two second data packets with the same packet identifier;
and the second determining module is used for determining whether a dependency conflict exists between the at least two second data packets according to the respective packet versions of the at least two second data packets.
In an optional implementation, the method further comprises:
and the display module is used for displaying the dependency conflict if the dependency conflict exists between the at least two second data packets.
In an alternative implementation, the display module includes:
a first determining unit configured to determine a first dependency relationship between the first data packet and the plurality of second data packets and a second dependency relationship between the plurality of second data packets;
a first generating unit, configured to generate a dependency tree including the first data packet and the plurality of second data packets according to the first dependency and the second dependency;
a first marking unit, configured to mark the at least two data packets in the dependency tree.
In an alternative implementation, the display module includes:
a second determining unit configured to determine a first dependency relationship between the first packet and the plurality of second packets and a second dependency relationship between the plurality of second packets;
a second generating unit, configured to generate a dependency tree including the first data packet and the plurality of second data packets according to the first dependency and the second dependency;
an intercepting unit configured to intercept a partial tree including the at least two second packets in the dependency tree;
a second marking unit for marking the at least two data packets in the local tree.
In an optional implementation manner, the intercepting unit includes:
a determining subunit, configured to determine, among the first data packet and the plurality of second data packets, a data packet on which the at least two second data packets directly depend and a data packet on which the at least two second data packets directly depend;
a setting subunit, configured to set, in the dependency tree, a data packet that includes the at least two second data packets directly dependent on each other, a data packet that directly depends on the at least two second data packets, and a minimum rectangular box of the at least two data packets;
and the acquisition subunit is used for acquiring the part positioned in the rectangular frame and taking the part as the local tree.
In an optional implementation manner, the root second determining module includes:
a third determining unit, configured to determine whether a difference between packet versions of each two second packets in the at least two second packets is within a preset version interval;
a fourth determining unit, configured to determine that there is no dependency conflict between the at least two second data packets if both of the at least two second data packets are located within the preset version interval;
a fifth determining unit, configured to determine that a dependency conflict exists between the at least two second packets if there is at least one difference that is not within a preset version interval.
In an optional implementation manner, the second determining module includes:
a sixth determining unit, configured to determine whether packet versions of each two second data packets of the at least two second data packets are the same;
a seventh determining unit, configured to determine that there is no dependency conflict between the at least two second data packets if the packet versions of each two second data packets are the same;
an eighth determining unit, configured to determine that a dependency conflict exists between any two second data packets if packet versions of the two second data packets are not the same.
In a third aspect, an embodiment of the present invention shows a storage medium, where the storage medium includes a stored program, where, when the program runs, a device where the storage medium is located is controlled to execute the dependency conflict analysis method according to the first aspect.
In a fourth aspect, an embodiment of the present invention shows a processor, configured to execute a program, where the program executes to perform the dependency conflict analysis method according to the first aspect.
Compared with the prior art, the embodiment of the invention has the following advantages:
in the embodiment of the invention, the packet identifiers and packet versions of a plurality of second data packets on which the first data packet depends are obtained; determining at least two second data packets with the same packet identification in the plurality of second data packets; and determining whether a dependency conflict exists between the at least two second data packets according to the respective packet versions of the at least two second data packets. By the method, whether the dependence conflicts exist in the second data packets depended on by the first data packet can be automatically detected without manually detecting whether the dependence conflicts exist in the second data packets depended on by the first data packet, so that the operation of a user is simplified, the detection time is short, and the detection efficiency is high.
Drawings
FIG. 1 is a flow chart of the steps of one embodiment of a dependency conflict analysis method of the present invention;
fig. 2 is a block diagram of an embodiment of a dependency conflict analysis apparatus according to the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
Referring to fig. 1, a flowchart illustrating steps of an embodiment of a method for analyzing a dependency conflict according to the present invention is shown, which may specifically include the following steps:
in step S101, packet identifiers and packet versions of a plurality of second data packets on which the first data packet depends are obtained;
in the embodiment of the present invention, it is assumed that a first data packet depends on one data packet, the first data packet is loaded with the one data packet, a packet version and a packet identifier of the one data packet are stored in the one data packet, it is assumed that the one data packet also depends on other data packets, the one data packet is loaded with the other data packets, and the other data packets are stored with packet versions and packet identifiers of the other data packets, and so on.
The packet identifier is used for uniquely identifying the data packet, and the packet version is used for identifying the version of the data packet.
In the above example, the data packet on which the first data packet depends includes the one data packet and the other data packet, wherein the first data packet directly depends on the one data packet, the first data packet indirectly depends on the other data packet, and the one data packet directly depends on the other data packet.
In this way, in this step, the data packet 1 loaded in the first data packet may be acquired, the packet identifier and the packet version stored in the data packet 1 may be acquired, if no other data packet is loaded in the data packet 1, the data packet 1 may be used as the second data packet on which the first data packet depends, and the packet identifier and the packet version of the data packet 1 may be used as the packet identifier and the packet version of the second data packet.
If data package 2 is also loaded in data package 1, the package identifier and package version stored in data package 2 are obtained, and so on. Until after acquiring the packet identifier and the packet version stored in one data packet, no other data packet is loaded in the one data packet, and then each acquired packet identifier and packet version are used as the packet identifier and packet version of the second data packet on which the first data packet depends respectively.
In step S102, at least two second data packets with the same packet identifier are determined among the plurality of second data packets;
for any second data packet, the packet identifier and the packet version of the second data packet form a version corresponding table entry; for each other second packet, the above operation is also performed, so that a plurality of version corresponding entries can be obtained.
Extracting a corresponding table entry 1 from the plurality of corresponding table entries, searching whether a corresponding table entry with the same packet identifier as the corresponding table entry 1 exists in the corresponding table entries except the corresponding table entry 1, if the corresponding table entry with the same packet identifier as the corresponding table entry 1 exists, extracting the corresponding table entry with the same packet identifier as the corresponding table entry 1, and taking the second data packet corresponding to the packet identifier in all the extracted corresponding table entries as the second data packet with the same packet identifier.
And for the rest other corresponding table entries in the plurality of corresponding table entries, the operation is also carried out according to the method until the packet identifiers in any two rest corresponding table entries are different.
In step S103, determining whether there is a dependency conflict between the at least two second data packets according to their respective packet versions;
in one embodiment of the present invention, in the packet versions of the at least two second data packets, as long as one packet version is different from the other packet versions, there is a dependency conflict between the at least two second data packets.
For example, it may be determined whether the packet versions of each two of the at least two second data packets are both the same; determining that there is no dependency conflict between the at least two second data packets if the packet versions of each two second data packets are the same; and if the packet versions of any two second data packets are not the same, determining that a dependency conflict exists between the at least two second data packets.
In another embodiment of the present invention, in the respective packet versions of the at least two second data packets, if at least one packet version is different from the other packet versions, but if the difference between the at least one packet version and the other packet versions is small, there is no dependency conflict between the at least two second data packets, and if the difference between the at least one packet version and the other packet versions is large, there is a dependency conflict between the at least two second data packets.
Therefore, in order to perform this step, it may be determined whether the difference between the packet versions of each two second packets of the at least two second packets is within the preset version interval; if the first data packets are all located in the preset version interval, determining that dependency conflicts do not exist between the at least two second data packets; determining that a dependency conflict exists between the at least two second packets if there is at least one difference that is not within the preset version interval.
The preset version interval is set locally by a developer in advance, and the specific value may be determined according to the specific situation of the data packet, which is not described in detail herein.
In the embodiment of the invention, the packet identifiers and packet versions of a plurality of second data packets on which the first data packet depends are obtained; determining at least two second data packets with the same packet identification in the plurality of second data packets; and determining whether a dependency conflict exists between the at least two second data packets according to the respective packet versions of the at least two second data packets. By the method, whether the dependence conflicts exist in the second data packets depended on by the first data packet can be automatically detected without manually detecting whether the dependence conflicts exist in the second data packets depended on by the first data packet, so that the operation of a user is simplified, the detection time is short, and the detection efficiency is high.
Further, if there is a dependency conflict between the at least two second data packets, the at least two second data packets with dependency conflicts may also be directly displayed to the developer for viewing, so that the developer knows which second data packets have dependency conflicts between them.
Therefore, in the embodiment of the present invention, if there is a dependency conflict between the at least two second data packets, a dependency conflict hint may also be displayed;
in an embodiment of the present invention, the first data packet directly depends on a part of the second data packets in the plurality of second data packets, and the part of the second data packets directly depends on another part of the second data packets, so that displaying the dependency conflict hint information may be implemented by the following processes, including:
11) determining a first dependency relationship between the first data packet and the plurality of second data packets and a second dependency relationship between the plurality of second data packets;
wherein determining a first dependency relationship between the first data packet and the plurality of second data packets comprises: a second packet on which the first packet directly depends is determined among the plurality of second packets.
Determining second dependencies between the plurality of second packets, comprising: for any one second data packet, determining other second data packets on which the second data packet directly depends, and for each other second data packet, the same holds true.
12) And generating a dependency relation tree comprising the first data packet and a plurality of second data packets according to the first dependency relation and the second dependency relation.
Each node in the dependency tree is a data packet, and the text displayed on the node is the packet identifier and the packet version of the data packet.
13) And marking the at least two second data packets in the dependency tree.
Because the dependency tree includes the first data packet and all the second data packets, if there are more second data packets, the total number of the data packets included in the dependency tree is more, and at this time, a developer cannot quickly find out the data packets having the dependency conflict in the dependency tree, which results in low search efficiency.
Therefore, in order to improve the search efficiency, after the dependency tree is generated, the at least two second data packets need to be marked in the dependency tree, and the dependency tree marked with the at least two second data packets needs to be determined as the dependency conflict hint information. After the dependency tree is displayed, the marked second data packet in the dependency tree can be easily found by a developer, so that the searching efficiency can be improved.
When the at least two second data packets are marked in the dependency relationship tree, text display colors of the at least two second data packets in the dependency relationship tree may be changed, where the text display colors are display colors of packet identifiers and packet versions of the at least two second data packets, so that the text display colors of the at least two second data packets are different from text display colors of other data packets in the dependency relationship tree, and thus, a developer can see the at least two second data packets with different text display colors at a glance in the dependency relationship tree to know that there is a dependency conflict between the at least two second data packets.
Or increasing the text display size of the at least two second data packets in the dependency relationship tree, where the text display size is a display size for displaying the packet identifier and the characters in the packet version of the at least two data packets, so that the text display size of the at least two second data packets is different from the text display size of other data packets in the dependency relationship tree, so that a developer can see the at least two second data packets with different text display sizes at a glance in the dependency relationship tree to know that there is a dependency conflict between the at least two second data packets.
Or the texts of the at least two second data packages in the dependency relationship tree are displayed in a floating mode, so that the display levels of the texts of the at least two second data packages are different from those of the texts of other data packages in the dependency relationship tree, and therefore developers can see the at least two second data packages displayed in the floating mode at a glance in the dependency relationship tree to know that a dependency conflict exists between the at least two second data packages.
When the dependency tree includes a large number of data packets, the size of the dependency tree is large, and if the size of the screen is limited, after the dependency tree is displayed on the screen, all the data packets in the dependency tree cannot be displayed on the screen at the same time, only a part of the data packets in the dependency tree may be displayed, and the displayed data packets may not be the data packets with the dependency conflict, but the data packets with the dependency conflict are not displayed.
That is, the developer can only see the data package without dependency conflict displayed on the screen, and if the data package with dependency conflict needs to be checked, the developer needs to input a sliding operation on the screen to display other data packages in the dependency tree on the screen, so that the developer can check the data package with dependency conflict.
However, in the foregoing embodiment, the developer needs to input a sliding operation on the screen to view the data packages with the dependency conflicts, which results in tedious operations and time consumption for the developer, and further results in a lower development experience for the developer and a lower viewing efficiency for the developer to view the data packages with the dependency conflicts.
Therefore, in order to improve the development experience of the developer and improve the viewing efficiency of the developer for viewing the data packets with the dependency conflicts, in another embodiment of the present invention, the displaying of the dependency conflict prompting information may be implemented through the following processes, including:
21) determining a first dependency relationship between the first data packet and the plurality of second data packets and a second dependency relationship between the plurality of second data packets;
22) generating a dependency relationship tree comprising a first data packet and a plurality of second data packets according to the first dependency relationship and the second dependency relationship;
23) intercepting a local tree comprising the at least two second data packets in the dependency tree;
in order to enable the at least two second data packets to be located in the plurality of second data packets when the partial tree is seen, a data packet on which the at least two second data packets directly depend and a data packet on which the at least two second data packets directly depend can be determined in the first data packet and the plurality of second data packets when the partial tree including the at least two second data packets is intercepted in the dependency tree; setting a minimum rectangular box comprising a data packet which the at least two second data packets directly depend on, a data packet which the at least two second data packets directly depend on and the at least two data packets in the dependency relationship tree; and acquiring a part positioned in the rectangular frame and using the part as a local tree.
24) And marking the at least two data packets in the local tree.
The partial tree that marks the at least two packets may be used as the dependency collision hint information.
The specific labeling method can be seen in the step 13) described above, and is not described in detail here.
According to the method provided by the embodiment of the invention, the local tree is intercepted from the dependency relationship tree, the local tree comprises the at least two data packages, and the size of the local tree is smaller than that of the dependency relationship tree, so that all the data packages with dependency conflicts can be displayed on a screen as far as possible, the development experience of developers is improved, and the viewing efficiency of the developers for viewing the data packages with dependency relationships is improved.
Further, if there is no dependency conflict between the at least two second data packets, the process may be ended, or prompt information for prompting that there is no dependency conflict is generated, and the prompt information for prompting that there is no dependency conflict is displayed, so that the developer knows that there is no dependency conflict between the plurality of second data packets.
Then, the developer can know which data packets in the second data packet have the dependency conflict from the dependency conflict prompt information, and timely solve the dependency conflict, so that the first data packet can be normally installed and used.
It should be noted that, for simplicity of description, the 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 illustrated order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments of the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
Referring to fig. 2, a block diagram of a dependency conflict analysis apparatus according to an embodiment of the present invention is shown, where the apparatus may specifically include the following modules:
an obtaining module 11, configured to obtain packet identifiers and packet versions of multiple second data packets on which the first data packet depends;
a first determining module 12, configured to determine, among the plurality of second data packets, at least two second data packets with the same packet identifier;
a second determining module 13, configured to determine whether a dependency conflict exists between the at least two second data packets according to respective packet versions of the at least two second data packets.
In an optional implementation, the method further comprises:
and the display module is used for displaying the dependency conflict if the dependency conflict exists between the at least two second data packets.
In an alternative implementation, the display module includes:
a first determining unit configured to determine a first dependency relationship between the first data packet and the plurality of second data packets and a second dependency relationship between the plurality of second data packets;
a first generating unit, configured to generate a dependency tree including the first data packet and the plurality of second data packets according to the first dependency and the second dependency;
a first marking unit, configured to mark the at least two data packets in the dependency tree.
In an alternative implementation, the display module includes:
a second determining unit configured to determine a first dependency relationship between the first packet and the plurality of second packets and a second dependency relationship between the plurality of second packets;
a second generating unit, configured to generate a dependency tree including the first data packet and the plurality of second data packets according to the first dependency and the second dependency;
an intercepting unit configured to intercept a partial tree including the at least two second packets in the dependency tree;
a second marking unit for marking the at least two data packets in the local tree.
In an optional implementation manner, the intercepting unit includes:
a determining subunit, configured to determine, among the first data packet and the plurality of second data packets, a data packet on which the at least two second data packets directly depend and a data packet on which the at least two second data packets directly depend;
a setting subunit, configured to set, in the dependency tree, a data packet that includes the at least two second data packets directly dependent on each other, a data packet that directly depends on the at least two second data packets, and a minimum rectangular box of the at least two data packets;
and the acquisition subunit is used for acquiring the part positioned in the rectangular frame and taking the part as the local tree.
In an optional implementation manner, the root second determining module 13 includes:
a third determining unit, configured to determine whether a difference between packet versions of each two second packets in the at least two second packets is within a preset version interval;
a fourth determining unit, configured to determine that there is no dependency conflict between the at least two second data packets if both of the at least two second data packets are located within the preset version interval;
a fifth determining unit, configured to determine that a dependency conflict exists between the at least two second packets if there is at least one difference that is not within a preset version interval.
In an optional implementation manner, the second determining module 13 includes:
a sixth determining unit, configured to determine whether packet versions of each two second data packets of the at least two second data packets are the same;
a seventh determining unit, configured to determine that there is no dependency conflict between the at least two second data packets if the packet versions of each two second data packets are the same;
an eighth determining unit, configured to determine that a dependency conflict exists between any two second data packets if packet versions of the two second data packets are not the same.
In the embodiment of the invention, the packet identifiers and packet versions of a plurality of second data packets on which the first data packet depends are obtained; determining at least two second data packets with the same packet identification in the plurality of second data packets; and determining whether a dependency conflict exists between the at least two second data packets according to the respective packet versions of the at least two second data packets. By the method, whether the dependence conflicts exist in the second data packets depended on by the first data packet can be automatically detected without manually detecting whether the dependence conflicts exist in the second data packets depended on by the first data packet, so that the operation of a user is simplified, the detection time is short, and the detection efficiency is high.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
The dependency conflict analysis device comprises a processor and a memory, wherein the modules, the units, the sub-units and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can set one or more, and the dependency conflict is prompted by adjusting the kernel parameters.
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.
An embodiment of the present invention provides a storage medium on which a program is stored, which when executed by a processor implements the dependency conflict analysis method shown in fig. 1.
An embodiment of the present invention provides a processor, where the processor is configured to execute a program, where the program executes a dependency conflict analysis method as shown in fig. 1 when running.
The embodiment of the invention provides equipment, which comprises a processor, a memory and a program which is stored on the memory and can run on the processor, wherein the processor executes the program and realizes the following steps:
acquiring packet identifiers and packet versions of a plurality of second data packets on which the first data packet depends;
determining at least two second data packets with the same packet identification in the plurality of second data packets;
and determining whether a dependency conflict exists between the at least two second data packets according to the respective packet versions of the at least two second data packets.
In an optional implementation, the method further comprises:
and if the dependency conflict exists between the at least two second data packets, displaying the dependency conflict.
In an optional implementation manner, the presenting the dependency conflict includes:
determining a first dependency between the first data packet and the plurality of second data packets and a second dependency between the plurality of second data packets;
generating a dependency relationship tree including the first data packet and the plurality of second data packets according to the first dependency relationship and the second dependency relationship;
marking the at least two data packets in the dependency tree.
In an optional implementation manner, the presenting the dependency conflict includes:
determining a first dependency between the first data packet and the plurality of second data packets and a second dependency between the plurality of second data packets;
generating a dependency relationship tree including the first data packet and the plurality of second data packets according to the first dependency relationship and the second dependency relationship;
intercepting a partial tree comprising the at least two second packets in the dependency tree;
marking the at least two data packets in the local tree.
In an optional implementation manner, the intercepting the partial tree including the at least two second packets in the dependency tree includes:
determining, among the first data packet and the plurality of second data packets, a data packet to which the at least two second data packets directly depend and a data packet to which the at least two second data packets directly depend;
setting a minimum rectangular box comprising a data packet on which the at least two second data packets directly depend, a data packet on which the at least two second data packets directly depend and the at least two data packets in the dependency tree;
and acquiring a part positioned in the rectangular frame and using the part as the local tree.
In an optional implementation manner, the determining whether there is a dependency conflict between the at least two second data packets according to the respective packet versions of the at least two second data packets includes:
determining whether the difference between the packet versions of every two second data packets in the at least two second data packets is within a preset version interval;
if the first data packets are all located in the preset version interval, determining that dependency conflicts do not exist between the at least two second data packets;
determining that a dependency conflict exists between the at least two second packets if there is at least one difference that is not within a preset version interval.
In an optional implementation manner, the determining whether there is a dependency conflict between the at least two second data packets according to the respective packet versions of the at least two second data packets includes:
determining whether packet versions of each two of the at least two second data packets are the same;
determining that there is no dependency conflict between the at least two second data packets if the packet versions of each two second data packets are the same;
and if the packet versions of any two second data packets are not the same, determining that a dependency conflict exists between the at least two second data packets.
The present application further provides a computer program product adapted to perform a program for initializing the following method steps when executed on a data processing device:
acquiring packet identifiers and packet versions of a plurality of second data packets on which the first data packet depends;
determining at least two second data packets with the same packet identification in the plurality of second data packets;
and determining whether a dependency conflict exists between the at least two second data packets according to the respective packet versions of the at least two second data packets.
In an optional implementation, the method further comprises:
and if the dependency conflict exists between the at least two second data packets, displaying the dependency conflict.
In an optional implementation manner, the presenting the dependency conflict includes:
determining a first dependency between the first data packet and the plurality of second data packets and a second dependency between the plurality of second data packets;
generating a dependency relationship tree including the first data packet and the plurality of second data packets according to the first dependency relationship and the second dependency relationship;
marking the at least two data packets in the dependency tree.
In an optional implementation manner, the presenting the dependency conflict includes:
determining a first dependency between the first data packet and the plurality of second data packets and a second dependency between the plurality of second data packets;
generating a dependency relationship tree including the first data packet and the plurality of second data packets according to the first dependency relationship and the second dependency relationship;
intercepting a partial tree comprising the at least two second packets in the dependency tree;
marking the at least two data packets in the local tree.
In an optional implementation manner, the intercepting the partial tree including the at least two second packets in the dependency tree includes:
determining, among the first data packet and the plurality of second data packets, a data packet to which the at least two second data packets directly depend and a data packet to which the at least two second data packets directly depend;
setting a minimum rectangular box comprising a data packet on which the at least two second data packets directly depend, a data packet on which the at least two second data packets directly depend and the at least two data packets in the dependency tree;
and acquiring a part positioned in the rectangular frame and using the part as the local tree.
In an optional implementation manner, the determining whether there is a dependency conflict between the at least two second data packets according to the respective packet versions of the at least two second data packets includes:
determining whether the difference between the packet versions of every two second data packets in the at least two second data packets is within a preset version interval;
if the first data packets are all located in the preset version interval, determining that dependency conflicts do not exist between the at least two second data packets;
determining that a dependency conflict exists between the at least two second packets if there is at least one difference that is not within a preset version interval.
In an optional implementation manner, the determining whether there is a dependency conflict between the at least two second data packets according to the respective packet versions of the at least two second data packets includes:
determining whether packet versions of each two of the at least two second data packets are the same;
determining that there is no dependency conflict between the at least two second data packets if the packet versions of each two second data packets are the same;
and if the packet versions of any two second data packets are not the same, determining that a dependency conflict exists between the at least two second data packets.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. A dependency conflict analysis method, the method comprising:
acquiring packet identifiers and packet versions of a plurality of second data packets on which the first data packet depends;
determining at least two second data packets with the same packet identification in the plurality of second data packets;
and determining whether a dependency conflict exists between the at least two second data packets according to the respective packet versions of the at least two second data packets.
2. The method of claim 1, further comprising:
and if the dependency conflict exists between the at least two second data packets, displaying the dependency conflict.
3. The method of claim 2, wherein said exposing the dependency conflict comprises:
determining a first dependency between the first data packet and the plurality of second data packets and a second dependency between the plurality of second data packets;
generating a dependency relationship tree including the first data packet and the plurality of second data packets according to the first dependency relationship and the second dependency relationship;
marking the at least two data packets in the dependency tree.
4. The method of claim 2, wherein said exposing the dependency conflict comprises:
determining a first dependency between the first data packet and the plurality of second data packets and a second dependency between the plurality of second data packets;
generating a dependency relationship tree including the first data packet and the plurality of second data packets according to the first dependency relationship and the second dependency relationship;
intercepting a partial tree comprising the at least two second packets in the dependency tree;
marking the at least two data packets in the local tree.
5. The method of claim 4, wherein intercepting the partial tree including the at least two second packets in the dependency tree comprises:
determining, among the first data packet and the plurality of second data packets, a data packet to which the at least two second data packets directly depend and a data packet to which the at least two second data packets directly depend;
setting a minimum rectangular box comprising a data packet on which the at least two second data packets directly depend, a data packet on which the at least two second data packets directly depend and the at least two data packets in the dependency tree;
and acquiring a part positioned in the rectangular frame and using the part as the local tree.
6. The method of claim 1, wherein the determining whether there is a dependency conflict between the at least two second packets according to their respective packet versions comprises:
determining whether the difference between the packet versions of every two second data packets in the at least two second data packets is within a preset version interval;
if the first data packets are all located in the preset version interval, determining that dependency conflicts do not exist between the at least two second data packets;
determining that a dependency conflict exists between the at least two second packets if there is at least one difference that is not within a preset version interval.
7. The method of claim 1, wherein the determining whether there is a dependency conflict between the at least two second packets according to their respective packet versions comprises:
determining whether packet versions of each two of the at least two second data packets are the same;
determining that there is no dependency conflict between the at least two second data packets if the packet versions of each two second data packets are the same;
and if the packet versions of any two second data packets are not the same, determining that a dependency conflict exists between the at least two second data packets.
8. A dependency conflict analysis apparatus, comprising:
the acquisition module is used for acquiring the packet identifiers and the packet versions of a plurality of second data packets which depend on the first data packet;
a first determining module, configured to determine, among the plurality of second data packets, at least two second data packets with the same packet identifier;
and the second determining module is used for determining whether a dependency conflict exists between the at least two second data packets according to the respective packet versions of the at least two second data packets.
9. A storage medium characterized by comprising a stored program, wherein a device on which the storage medium is located is controlled to execute the dependency conflict analysis method according to any one of claims 1 to 7 when the program is executed.
10. A processor, configured to run a program, wherein the program when running performs the dependency conflict analysis method of any one of claims 1-7.
CN201810891638.7A 2018-08-07 2018-08-07 Dependency conflict analysis method and device Pending CN110825377A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810891638.7A CN110825377A (en) 2018-08-07 2018-08-07 Dependency conflict analysis method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810891638.7A CN110825377A (en) 2018-08-07 2018-08-07 Dependency conflict analysis method and device

Publications (1)

Publication Number Publication Date
CN110825377A true CN110825377A (en) 2020-02-21

Family

ID=69533684

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810891638.7A Pending CN110825377A (en) 2018-08-07 2018-08-07 Dependency conflict analysis method and device

Country Status (1)

Country Link
CN (1) CN110825377A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111679852A (en) * 2020-05-29 2020-09-18 北京五八信息技术有限公司 Detection method and device for conflict dependency library
CN111736848A (en) * 2020-06-15 2020-10-02 北京奇艺世纪科技有限公司 Packet conflict positioning method and device, electronic equipment and readable storage medium
CN113778450A (en) * 2020-07-10 2021-12-10 北京沃东天骏信息技术有限公司 Processing method, device and equipment for dependency conflict and storage medium
CN114371890A (en) * 2022-03-22 2022-04-19 天津市天河计算机技术有限公司 Software management system of HPC cluster
WO2024016729A1 (en) * 2022-07-21 2024-01-25 华为云计算技术有限公司 Visualization method and apparatus for call conflict

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2568096A1 (en) * 2005-12-08 2007-02-13 Sxip Identity Corporation Networked identity framework
CN1987797A (en) * 2005-12-23 2007-06-27 国际商业机器公司 Method and system for avoiding software conflict
CN104834528A (en) * 2015-05-25 2015-08-12 北京京东尚科信息技术有限公司 Dependency version processing plug-in and dependency version processing method adopting same
CN105446757A (en) * 2014-08-21 2016-03-30 阿里巴巴集团控股有限公司 Data packet processing method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2568096A1 (en) * 2005-12-08 2007-02-13 Sxip Identity Corporation Networked identity framework
CN1987797A (en) * 2005-12-23 2007-06-27 国际商业机器公司 Method and system for avoiding software conflict
CN105446757A (en) * 2014-08-21 2016-03-30 阿里巴巴集团控股有限公司 Data packet processing method and device
CN104834528A (en) * 2015-05-25 2015-08-12 北京京东尚科信息技术有限公司 Dependency version processing plug-in and dependency version processing method adopting same

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111679852A (en) * 2020-05-29 2020-09-18 北京五八信息技术有限公司 Detection method and device for conflict dependency library
CN111736848A (en) * 2020-06-15 2020-10-02 北京奇艺世纪科技有限公司 Packet conflict positioning method and device, electronic equipment and readable storage medium
CN111736848B (en) * 2020-06-15 2023-08-22 北京奇艺世纪科技有限公司 Packet conflict positioning method, device, electronic equipment and readable storage medium
CN113778450A (en) * 2020-07-10 2021-12-10 北京沃东天骏信息技术有限公司 Processing method, device and equipment for dependency conflict and storage medium
CN113778450B (en) * 2020-07-10 2024-06-18 北京沃东天骏信息技术有限公司 Method, device, equipment and storage medium for processing dependency conflict
CN114371890A (en) * 2022-03-22 2022-04-19 天津市天河计算机技术有限公司 Software management system of HPC cluster
CN114371890B (en) * 2022-03-22 2022-06-03 天津市天河计算机技术有限公司 Software management system of HPC cluster
WO2024016729A1 (en) * 2022-07-21 2024-01-25 华为云计算技术有限公司 Visualization method and apparatus for call conflict

Similar Documents

Publication Publication Date Title
CN110825377A (en) Dependency conflict analysis method and device
CN108255722B (en) Script generation method, script generation device and server
CN109634682B (en) Configuration file updating method and device for application program
CN105446874B (en) A kind of detection method and device of resource distribution file
CN107133165B (en) Browser compatibility detection method and device
CN106897342B (en) Data verification method and equipment
CN109598526B (en) Method and device for analyzing media contribution
CN110895544B (en) Interface data processing method, device, system and storage medium
CN106878365B (en) data synchronization method and device
CN106155754B (en) Display template processing method and device
CN109522189B (en) Data monitoring method, device and system
CN105447040B (en) Binary file management and updating method, device and system
CN108268369B (en) Test data acquisition method and device
CN108255891B (en) Method and device for judging webpage type
CN111240987A (en) Migration program detection method and device, electronic equipment and computer readable storage medium
CN110019508B (en) Data synchronization method, device and system
CN110019357B (en) Database query script generation method and device
CN111078905A (en) Data processing method, device, medium and equipment
CN111125087A (en) Data storage method and device
CN114329495A (en) Endogenous security based asset vulnerability static analysis method and device
CN107908516B (en) Data display method and device
CN111400245B (en) Art resource migration method and device
CN111078574A (en) Method and device for generating influence analysis report
CN110717131B (en) Page revising monitoring method and related system
CN109582191B (en) Menu content display method and device

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200221